Welcome! Log In Create A New Profile

Advanced

Debian on Dell Kace M300

Posted by JDS420 
Re: Debian on Dell Kace M300
February 01, 2023 03:39PM
> wanted to give an update on this after so long,
> finally found one of my max3232 adapters and got
> one of them hooked up-- I made a booboo when I did
> the kernel upgrade around 5.18 or so it seems, and
> set the load_dtb_addr env to 0x2c00000 as
> "required" with the newer larger kernels... turns
> out, I'm a dummy, the M300's U-Boot is much newer
> and should be kept at the stock 0x1c00000 instead.

True. The new u-boot figures out the relocation perfectly. So we don't need to play with those load addresses. But the size has to fit in memory first.

> This should probably get added to the kernel page
> so others with an M300 don't give themselves this
> issue by accident, given the U-Boot is much newer
> as stated, and the difference between a 2017
> version and a 2022 version is like comparing a
> Model A and a Tesla.

Haha :)

You would notice that I have not formally released the M300 u-boot 2022 version. I still need to tweak the new envs image. And want to release new version for other boards too. So I'm procastinate a bit.

>
> and yeah I didn't do a lazy_init when I created
> the ext4 rootfs, it's good, so I knew that wasn't
> the issue, I thought it was just some crazy stuff
> with the uboot but it turns out it was a true
> PEBKAC error with the uboot all along.... just
> took me 5 months to get around to it.
>
> One of my two M300s has become an Owntone server
> in that time, and I've been using it to listen to
> music via iTunes on my PCs and on my Roku
> Soundbridge M1001. Turns out the 2GHz kirkwood has
> JUST enough horsepower to transcode FLAC files to
> something usable by iTunes in the end (probably
> WAV.)

Cool!

> The other one has been sitting on and dormant as
> the test box for anything I want to try running on
> these. I've since given away my Pogoplug E02 to a
> friend in CA and the v4 is still kicking around...
> somewhere, buried under other projects. but given
> how much power just the M300 has alone, I'm
> unlikely to use it ever again. It was a good
> starter box, but now we're playing with real fire.
> :D

The Pogo V4 still has its place as a mini NAS with a nice SATA slot and 1Gbit ethernet.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Dell Kace M300
March 20, 2023 07:31AM
read about these kace m300 boxes and ordered 3 from ebay at around 20 each. i did sift through this forum.
i was able to remove the root password by just editing the shadow file and blanking out the second field of the root account and have access to the prompt.
what are the current instructions and files i need to update these boxes?
also are there any usb images available that are already prepared with what is needed to do the updates on new boxes,
since they are the same hardware inside the m300's? and is there a kwboot.exe for windows?



Edited 1 time(s). Last edit at 03/20/2023 07:49AM by mrc333777.
Re: Debian on Dell Kace M300
March 20, 2023 01:45PM
> what are the current instructions and files i need
> to update these boxes?

Quote
1st post

bodhi's note:

Please see this post for Installation Instruction:

https://forum.doozan.com/read.php?2,61344,90019#msg-90019

And there is no kwboot for windows.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Dell Kace M300
March 20, 2023 02:40PM
bodhi Wrote:
-------------------------------------------------------

> And there is no kwboot for windows.

You can build kwboot from source under cygwin. I don't know about the legality of packaging the cygwin dll with an application or I'd just post a link to an already built version.
Re: Debian on Dell Kace M300
March 20, 2023 05:11PM
JT,

> You can build kwboot from source under cygwin. I
> don't know about the legality of packaging the
> cygwin dll with an application or I'd just post a
> link to an already built version.

Yeah. It would be nice to find out. It is quite useful for Windows users who are not yet ready to run a Linux VM. So you have built one under cygwin? what is the size of that package?

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Dell Kace M300
March 20, 2023 07:30PM
the reason i asked about that was i noticed while sifting through some of these messages, i seen kwboot.exe in them
Re: Debian on Dell Kace M300
March 21, 2023 10:28PM
bodhi Wrote:
-------------------------------------------------------
> JT,
>
>
> Yeah. It would be nice to find out. It is quite
> useful for Windows users who are not yet ready to
> run a Linux VM. So you have built one under
> cygwin? what is the size of that package?

The big part of the package is cygwin1.dll which is 3.4MB. The kwboot.exe is only 67k. My zip with everything is 1.3MB.
Re: Debian on Dell Kace M300
March 21, 2023 11:19PM
> The big part of the package is cygwin1.dll which
> is 3.4MB. The kwboot.exe is only 67k. My zip
> with everything is 1.3MB.

Not bad. Now I guess there must be some info out there re the dll copyright.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Dell Kace M300
March 22, 2023 12:20AM
I think it's ok to distribute the dll (https://www.cygwin.com/faq.html):

"4.22.

Can I bundle Cygwin with my product for free?

Starting with Cygwin version 2.5.2, which is LGPL licensed, yes, albeit it's not recommended for interoperability reasons."

I'm not real sure what "bundle Cygwin" means or what that entails (just add the dll to the zip?).

For now, here's the exe as well as the source I used. I'm not sure how useful it is without the dll, but if anyone wants to try it, here it is. Make sure you read the readme.txt file. As I stated in the readme, it's been a few years since I've used it, but I did successfully use it on my Kace/M300. I'm having issues with a Pogopro I can't ssh into right now, so may have to crack it open to get to the serial console anyway. If I do, I'll give it a try. I don't have Windows 11 on any of my computers, so Windows 10 is the best I'll be able to test assuming I can find the right driver. The USB serial port adapter I have is pretty old from Prolific.
Attachments:
open | download - kwboot-windows.zip (106.2 KB)
Re: Debian on Dell Kace M300
March 22, 2023 02:17PM
Up in the Wiki thread.

Quote

Unbricking with Serial Console & JTAG console

How to unbrick your box using serial console with kwboot
kwboot on Mac OSX 10
kwboot on Windows 10

Thanks!

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Dell Kace M300
March 26, 2023 03:31PM
i cant get a created usb to boot up, i followed the instructions properly i think.
can someone make a couple usb images of already working bootable usb sticks for me to toy around with?

and the m300 command line / env settings i need to boot them



Edited 1 time(s). Last edit at 03/26/2023 04:18PM by mrc333777.
Re: Debian on Dell Kace M300
March 26, 2023 04:28PM
mrc333777,

> i cant get a created usb to boot up, i followed
> the instructions properly i think.
> can someone make a couple usb images of already
> working bootable usb sticks for me to toy around
> with?

The instruction is concise. So you might have missed some details. Recreate the USB rootfs, and copy /paste everything you've done on the Linux terminal, and post here. I will take a look for you.


>
> and the m300 command line / env settings i need to
> boot them

It is in the first post, where I pointed to the installation instruction:

Quote

Please see this post for Installation Instruction:

https://forum.doozan.com/read.php?2,61344,90019#msg-90019

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Dell Kace M300
March 26, 2023 05:17PM
root@x:~# mkfs.ext3 /dev/sdb
mke2fs 1.46.2 (28-Feb-2021)
/dev/sdb contains a ext3 file system labelled 'rootfs'
        last mounted on /mnt on Sun Mar 26 15:53:12 2023
Proceed anyway? (y,N) y
Creating filesystem with 29305205 4k blocks and 7331840 inodes
Filesystem UUID: 00426021-bdce-4f72-90e9-8612522a9375
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872

Allocating group tables: done
Writing inode tables: done
Creating journal (131072 blocks): done
Writing superblocks and filesystem accounting information: done

root@x:~# e2label /dev/sdb rootfs
root@x:~# mount /dev/sdb /mnt
cp Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 /mnt
cd /mnt
root@x:/mnt# ls
Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2  lost+found
tar -xjf Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2
root@x:/mnt# ls
bin  boot  Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2  dev  etc  home  lib  lost+found  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
root@x:/mnt# cd boot
root@x:/mnt/boot# ls
config-5.2.9-kirkwood-tld-1 initrd.img-5.2.9-kirkwood-tld-1 System.map-5.2.9-kirkwood-tld-1 uInitrd zImage-5.2.9-kirkwood-tld-1 dts linux-headers-5.2.9-kirkwood-tld-1_1.0_armel.deb  uImage vmlinuz-5.2.9-kirkwood-tld-1
root@x:/mnt/boot# cp -a zImage-5.2.9-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-m300.dtb  >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.2.9-kirkwood-tld-1 -d zImage.fdt  uImage
sync
Image Name:   Linux-5.2.9-kirkwood-tld-1
Created:      Sun Mar 26 18:07:39 2023
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    4974252 Bytes = 4857.67 KiB = 4.74 MiB
Load Address: 00008000
Entry Point:  00008000
root@x:/mnt/boot#
sync

umount /dev/sdb

then went to the m300 and did this

----------------------------------------------

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|  ** LOADER **
 ** MARVELL BOARD: DB-88F6282A-BP LE

U-Boot 1.1.4 (Jun 20 2011 - 13:16:26) Marvell version: 3.4.27
USISH-SMB Ver: kacemini-1.5

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CDBC0

Soc: MV88F1155 Rev 1 (DDR3)
CPU running @ 2000Mhz L2 running @ 500Mhz
SysClock = 500Mhz , TClock = 200Mhz

DRAM (DDR3) CAS Latency = 7 tRP = 7 tRAS = 20 tRCD=7
DRAM CS[0] base 0x00000000   size 512MB
DRAM CS[1] base 0x20000000   size 512MB
DRAM CS[2] base 0x40000000   size 512MB
DRAM CS[3] base 0x60000000   size 512MB
DRAM Total size   2GB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
[512kB@f8000000] Flash: 512 kB
Good CRC!

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME]


Running diagnostics ...

        DDR3 data bus test                               PASSED

        DDR3 address bus test                            PASSED

        DDR3 device test                                 PASSED

Diag completed
Hit any key to stop autoboot:  0
Marvell>>
Marvell>> setenv usb_set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial'
Marvell>> setenv load_uima usb 0:1 0x800000 /boot/uImage'
Marvell>> setenv load_uinitrd 'ext2load usb 0:1 0x2100000 /boot/uInitrd'
Marvell>> setenv usb_boot 'mw 0x800000 0 1; run load_uimage; run load_uinitrd; bootm 0x800000 0x2100000'
Marvell>> setenv usb_bootcmd 'run usb_set_bootargs; run usb_boot'
Marvell>> setenv bootcmd 'usb reset; run usb_bootcmd; usb stop; reset'
Marvell>> printenv
baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
usiversion=kacemini-1.5
console=console=ttyS0,115200 mtdparts=spi_flash:0x7f000@0(uboot),0x1000@0x7f000(u-boot-env)
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
ethact=egiga0
filesize=728c0
fileaddr=1200000
netmask=255.255.255.0
ipaddr=192.168.58.233
serverip=192.168.58.188
ethaddr=18:03:73:41:db:df
run_diag=yes
bootargs_console=console=ttyS0,115200 mtdparts=spi_flash:0x7f000@0(uboot),0x1000@0x7f000(u-boot-env)
bootcmd_ide=run bootcmd_ideload; setenv bootargs $(bootargs_console); bootm 0x100000 0x01100000
bootcmd_ideload=ide reset; ext2load ide 0:1 0x100000 /uImage; ext2load ide 0:1 0x01100000 /uInitrd
bootcmd2=ide reset; ext2load ide 0:2 0x100000 /kbox/bin/uImage.bak; ext2load ide 0:1 0x01100000 /uInitrd;bootm 0x100000 0x01100000
bootargs=console=ttyS0,115200 mtdparts=spi_flash:0x7f000@0(uboot),0x1000@0x7f000(u-boot-env)
kernel2bootup=no
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial
load_uima=usb 0:1 0x800000 /boot/uImage
load_uinitrd=ext2load usb 0:1 0x2100000 /boot/uInitrd
usb_boot=mw 0x800000 0 1; run load_uimage; run load_uinitrd; bootm 0x800000 0x2100000
usb_bootcmd=run usb_set_bootargs; run usb_boot
bootcmd=usb reset; run usb_bootcmd; usb stop; reset

Environment size: 2056/4092 bytes
Marvell>> boot
(Re)start USB...
USB:   scanning bus for devices... 3 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
USI board reset
ΓΌ
         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|  ** LOADER **
 ** MARVELL BOARD: DB-88F6282A-BP LE

U-Boot 1.1.4 (Jun 20 2011 - 13:16:26) Marvell version: 3.4.27
USISH-SMB Ver: kacemini-1.5

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CDBC0

Soc: MV88F1155 Rev 1 (DDR3)
CPU running @ 2000Mhz L2 running @ 500Mhz
SysClock = 500Mhz , TClock = 200Mhz

DRAM (DDR3) CAS Latency = 7 tRP = 7 tRAS = 20 tRCD=7
DRAM CS[0] base 0x00000000   size 512MB
DRAM CS[1] base 0x20000000   size 512MB
DRAM CS[2] base 0x40000000   size 512MB
DRAM CS[3] base 0x60000000   size 512MB
DRAM Total size   2GB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
[512kB@f8000000] Flash: 512 kB
Good CRC!

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME]


Running diagnostics ...

        DDR3 data bus test                               PASSED

        DDR3 address bus test                            PASSED

        DDR3 device test                                 PASSED

Diag completed
Hit any key to stop autoboot:  0
Marvell>>


this is one of the 3 new boxes i ordered from ebay to play with

============
bodhi's edit: please use code tags (formatted code) to post log.



Edited 2 time(s). Last edit at 03/26/2023 07:40PM by bodhi.
Re: Debian on Dell Kace M300
March 26, 2023 07:46PM
> root@x:~# mkfs.ext3 /dev/sdb

This was wrong. It should be the 1st partition, not the whole disk.

mkfs.ext3 /dev/sdb1

> root@x:~# e2label /dev/sdb rootfs

This was also incorrect. Should be:

e2label /dev/sdb1 rootfs

> root@x:~# mount /dev/sdb /mnt

Ditto,

mount /dev/sdb1 /mnt

So on ....

> Marvell>> boot
> (Re)start USB...
> USB: scanning bus for devices... 3 USB Device(s)
> found
> Waiting for storage device(s) to settle before
> scanning...
> USI board reset

So stock u-boot probably choked on reading the partition.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Dell Kace M300
March 26, 2023 08:52PM
wow it worked, i must of tried 10 different usb sticks and 3 sata to usb 3 adapters. thank you!
now i am on a mission to update the uboot.
do i need it? im not sure if these boxes have the latest
Re: Debian on Dell Kace M300
March 26, 2023 08:58PM
It is optional. The new u-boot has not been released yet. But others have tried OK.

Installation instruction:

Quote

E. U-Boot 2022.04-tld-1 for M300 (Optional)

After the box is running to your satisfaction. Consider installing new u-boot.

See new u-boot installation and binary here

You don't have to, since stock u-boot works OK. The advantage with the new u-boot is that it is modern and has all capabilities that I can think of adding.

-bodhi
===========================
Forum Wiki
bodhi's corner
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: