Welcome! Log In Create A New Profile

Advanced

Debian on Dell Kace M300

Posted by JDS420 
Re: Dell Appliance
June 15, 2018 01:53PM
I'm starting to think UART booting has been disabled. I haven't been able to find a datasheet for the 88F6282A, but I found one for the Armada XP (from what I can find, the 88F6282A is an Armada 300). In the Armada XP datasheet it mentions a "Secured Boot mode" that can be enabled in eFuse. If the Secured Boot mode is set then it doesn't scan the serial port for the sequence and that appears to be what's happening since the first byte it receives just interrupts u-boot and the next 7 bytes of the code get interpreted as an invalid command.

I'm thinking the 10-pin unpopulated header next to the serial port header may be for JTAG, so that might be something useful.

-JT
Re: Dell Appliance
June 15, 2018 10:04PM
OP, I see that kw boot might not work but it appears it will accept commands at the uboot command line if uboot is interupted. Can you do setenv commands? If so we might be able to netboot the Debian network installer ( for a similar Marvell device) and install the OS that way. Michael Michlmayr provides guidance here Plug computer Debian network install. I would try it just to see if you can get the installer to run.
Re: Dell Appliance
June 15, 2018 10:32PM
@JT,

I don't think this box Secure Boot is on. We had quite a few Kirkwood boxes that don't have kwboot capability. This is a Kirkwood just like the NSA325.

@Leggo,

We already have a Kirkwood rootfs, you'd install it just like other boxes. The thing to look for is which DTB you are going to use to allow it to boot into Debian. I would start with the NSA325 or something similar.

@all,

I've bought one, and my box is coming. So I will see if I can boot it with a new DTS based on the NSA325. GPL source is important to get this box running correctly. If we have GPL source code for this u-boot or kernel, we will get this box running soon.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dell Appliance
June 15, 2018 10:45PM
bodhi Wrote:
-------------------------------------------------------
> @JT,
>
> I don't think this box Secure Boot is on. We had
> quite a few Kirkwood boxes that don't have kwboot
> capability. This is a Kirkwood just like the
> NSA325.
>
Right, but didn't the NSA325 support kwboot?
Re: Dell Appliance
June 15, 2018 11:00PM
JT,

> Right, but didn't the NSA325 support kwboot?

Yes. The NSA 325 did not have a bootROM version identified, so we thought it does not have kwboot. And at the end, it has kwboot supports.

However, most other Kirkwood boxes with bootROM 1.21 do supports kwboot, so I hope we just did not get the right timing (like the Pogo V4 in the beginning).

From what I've seen, the Secure Boot mode only activated for later bootROM for the Armada series (ARM v7 or later). Not on older SoC, i.e. Kirkwood.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dell Appliance
June 16, 2018 04:37PM
Could somebody post the serial console log of you kwboot attempt (including the command how you executed it).

I've just realized I have missed that part. We just talked about how it failed :)

What JDS did above was the wrong way to execute this image:
./kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.nsa325.mtd0.kwb


You need -p like this:
./kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.nsa325.mtd0.kwb -p

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 4 time(s). Last edit at 06/16/2018 04:42PM by bodhi.
Re: Dell Appliance
June 16, 2018 07:32PM
Ok, I do think it's a timing issue and not some kind of Secured Boot issue. I don't think the kwboot command used is the problem. Using Tera Term to send the "enter command line debug mode" pattern (0xDD, 0x11, 0x22, 0x33, ... 0x77) over and over for a few seconds, I can plug in the power and see it respond with "Bootstrap 1.21>". So it's clearly not in Secured Boot Mode. Once I'm in the command line debug mode, I'm not sure what can be done since there doesn't appear to be any help. Pressing j<CR> stops it from responding with prompts, for what that's worth.

I think the window of opportunity is so short that you'd have to be extremely lucky to get kwboot to work. I tried the same trick with the "Boot from UART" pattern (substitute 0xBB for 0xDD in the above). It clearly stops the booting process. I then used the built-in Xmodem transfer feature to upload uboot.2017.07-tld-1.nsa325.mtd0.kwb, but I can't tell if it worked. I got some interesting flashing lights and eventually got a debian prompt, but the status bar in the transfer window never got above 1 packet sent and I never saw any u-boot output. Is there any way to tell if it used the transferred u-boot or not?

I think this is progress!
-JT
Re: Dell Appliance
June 16, 2018 07:54PM
renojim Wrote:
-------------------------------------------------------
> Ok, I do think it's a timing issue and not some
> kind of Secured Boot issue. I don't think the
> kwboot command used is the problem. Using
> Tera Term to
> send the "enter command line debug mode" pattern
> (0xDD, 0x11, 0x22, 0x33, ... 0x77) over and over
> for a few seconds, I can plug in the power and see
> it respond with "Bootstrap 1.21>". So it's
> clearly not in Secured Boot Mode. Once I'm in the
> command line debug mode, I'm not sure what can be
> done since there doesn't appear to be any help.
> Pressing j<CR> stops it from responding
> with prompts, for what that's worth.
>
> I think the window of opportunity is so short that
> you'd have to be extremely lucky to get kwboot to
> work. I tried the same trick with the "Boot from
> UART" pattern (substitute 0xBB for 0xDD in the
> above). It clearly stops the booting process. I
> then used the built-in Xmodem transfer feature to
> upload uboot.2017.07-tld-1.nsa325.mtd0.kwb,
> but I can't tell if it worked. I got some
> interesting flashing lights and eventually got a
> debian prompt, but the status bar in the transfer
> window never got above 1 packet sent and I never
> saw any u-boot output. Is there any way to tell
> if it used the transferred u-boot or not?
>
> I think this is progress!
> -JT

Definitely some progress! But debug mode does not help us go further.

It seems the stock uboot that was executing. However, you need to post the log, as always, for me to look at.

Also at Debian prompt, log in and get dmesg output too, that will have some clue.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dell Appliance
June 17, 2018 03:04AM
Ok, I may be losing my mind. Here's the original log with the protocol error:
root@jt-ubuntu:/home/jt# ./kwboot -B 115200 -b gdrv/uboot.2017.07-tld-1.nsa325.mtd0.kwb -t /dev/ttyUSB0
Sending boot message. Please reboot the target...-
Sending boot image...
  0 % [+xmodem: Protocol error

I could have sworn I tried every combination of parameters, but maybe not. It looks like the -p parameter makes all the difference:
root@jt-ubuntu:/home/jt# ./kwboot -B 115200 -b gdrv/uboot.2017.07-tld-1.nsa325.mtd0.kwb -t -p /dev/ttyUSB0
Sending boot message. Please reboot the target.../
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
  3 % [......................................................................]
  5 % [......................................................................]
  6 % [......................................................................]
  8 % [......................................................................]
 10 % [......................................................................]
 11 % [......................................................................]
 13 % [......................................................................]
 15 % [......................................................................]
 17 % [......................................................................]
 18 % [......................................................................]
 20 % [......................................................................]
 22 % [......................................................................]
 23 % [......................................................................]
 25 % [......................................................................]
 27 % [......................................................................]
 29 % [......................................................................]
 30 % [......................................................................]
 32 % [......................................................................]
 34 % [......................................................................]
 35 % [......................................................................]
 37 % [......................................................................]
 39 % [......................................................................]
 41 % [......................................................................]
 42 % [......................................................................]
 44 % [......................................................................]
 46 % [......................................................................]
 47 % [......................................................................]
 49 % [......................................................................]
 51 % [......................................................................]
 53 % [......................................................................]
 54 % [......................................................................]
 56 % [......................................................................]
 58 % [......................................................................]
 59 % [......................................................................]
 61 % [......................................................................]
 63 % [......................................................................]
 64 % [......................................................................]
 66 % [......................................................................]
 68 % [......................................................................]
 70 % [......................................................................]
 71 % [......................................................................]
 73 % [......................................................................]
 75 % [......................................................................]
 76 % [......................................................................]
 78 % [......................................................................]
 80 % [......................................................................]
 82 % [......................................................................]
 83 % [......................................................................]
 85 % [......................................................................]
 87 % [......................................................................]
 88 % [......................................................................]
 90 % [......................................................................]
 92 % [......................................................................]
 94 % [......................................................................]
 95 % [......................................................................]
 97 % [......................................................................]
 99 % [....................................]
[Type Ctrl-\ + c to quit]
It doesn't boot, but it looks like the transfer was successful.

Here's the dmesg output after booting with original u-boot:
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
                                     M300
                                 dellkaceM300

To manage this appliance, please view the web interface at:
                             http://192.168.2.100

See the documentation for additional information

                         Copyright © 2010-2018 Dell
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
dellkaceM300 login: root
Password:
Last login: Sun Jun 17 17:11:06 UTC 2018 on ttyS0
Linux dellkaceM300 2.6.31.8-kacemini-1.7 #1 Thu Apr 21 06:52:17 PDT 2011 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@dellkaceM300:~# dmesg
Linux version 2.6.31.8-kacemini-1.7 (lewinski@armcross) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 Thu Apr 21 06:52:17 PDT 2011
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
CPU: VIVT data cache, VIVT instruction cache
Machine: Feroceon-KW
Using UBoot passing parameters structure
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 524288
free_area_init_node: node 0, pgdat 404895a4, node_mem_map 4134b000
  Normal zone: 4096 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 520192 pages, LIFO batch:31
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 520192
Kernel command line: console=ttyS0,115200 mtdparts=spi_flash:0x7f000@0(uboot),0x1000@0x7f000(u-boot-env)
PID hash table entries: 4096 (order: 12, 16384 bytes)
Dentry cache hash table entries: 262144 (order: 8, 1048576 bytes)
Inode-cache hash table entries: 131072 (order: 7, 524288 bytes)
Memory: 512MB 512MB 512MB 512MB = 2048MB total
Memory: 2071808KB available (4220K code, 266K data, 136K init, 0K highmem)
NR_IRQS:128
Console: colour dummy device 80x30
Calibrating delay loop... 1998.84 BogoMIPS (lpj=9994240)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
xor: measuring software checksum speed
   arm4regs  :  1819.600 MB/sec
   8regs     :  1379.600 MB/sec
   32regs    :  1547.200 MB/sec
xor: using function: arm4regs (1819.600 MB/sec)
NET: Registered protocol family 16
Feroceon L2: Enabling L2
Feroceon L2: Cache support initialised.

CPU Interface
-------------
SDRAM_CS0 ....base 00000000, size 512MB
SDRAM_CS1 ....base 20000000, size 512MB
SDRAM_CS2 ....base 40000000, size 512MB
SDRAM_CS3 ....base 60000000, size 512MB
PEX0_MEM ....base e8000000, size 128MB
PEX0_IO ....base f2000000, size   1MB
INTER_REGS ....base f1000000, size   1MB
NFLASH_CS ....base fa000000, size   2MB
SPI_CS ....base f4000000, size  16MB
BOOT_ROM_CS ....no such
DEV_BOOTCS ....no such
CRYPT_ENG ....base f0000000, size   2MB

  Marvell Development Board (LSP Version KW_LSP_5.0.3)-- DB-88F6282A-BP  Soc: MV88F1155 Rev 1 LE

 Detected Tclk 200000000 and SysClk 500000000
MV Buttons Device Load
Marvell USB EHCI Host controller #0: bf833500
PEX0 interface detected no Link.
PCI: bus0: Fast back to back transfers enabled
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
raid6: int32x1    142 MB/s
raid6: int32x2    178 MB/s
raid6: int32x4    208 MB/s
raid6: int32x8    163 MB/s
raid6: using algorithm int32x4 (208 MB/s)
NET: Registered protocol family 2
IP route cache hash table entries: 65536 (order: 6, 262144 bytes)
TCP established hash table entries: 262144 (order: 9, 2097152 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 262144 bind 65536)
TCP reno registered
NET: Registered protocol family 1
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 2344K
rtc mv_rtc: rtc core: registered kw-rtc as rtc0
RTC registered
cpufreq: Init kirkwood cpufreq driver
Kirkwood hwmon thermal sensor initialized.
XOR registered 4 channels
XOR 2nd invalidate WA enabled
cesadev_init(4000eec4)
MV Buttons Driver Load
NTFS driver 2.1.29 [Flags: R/O].
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 4051
alg: No test for cipher_null (cipher_null-generic)
alg: No test for ecb(cipher_null) (ecb-cipher_null)
alg: No test for digest_null (digest_null-generic)
alg: No test for compress_null (compress_null-generic)
alg: No test for stdrng (krng)
async_tx: api initialized (sync-only)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler anticipatory registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
console [ttyS0] enabled
brd: module loaded
loop: module loaded
Integrated Sata device found
IRQ 21/mvSata: IRQF_DISABLED is not guaranteed on shared IRQs
scsi0 : Marvell SCSI to SATA adapter
scsi1 : Marvell SCSI to SATA adapter
scsi 0:0:0:0: Direct-Access     ATA      TS16GSSD25H-M    2010 PQ: 0 ANSI: 5
sd 0:0:0:0: Attached scsi generic sg0 type 0
Loading Marvell Ethernet Driver:
  o Cached descriptors in DRAM
  o DRAM SW cache-coherency
  o 2 Giga ports supported
  o Multi RX Queue support - 4 RX queues
  o Multi TX Queue support - 2 TX Queues
  o TCP segmentation offload (TSO) supported
  o Large Receive offload (LRO) supported
  o Receive checksum offload supported
  o Transmit checksum offload supported
  o Network Fast Processing (Routing) supported - (Disabled)
  o Driver ERROR statistics enabled
  o Driver INFO statistics enabled
  o Proc tool API enabled
  o SKB Reuse supported - (Disabled)
  o SKB Recycle supported - (Disabled)
  o Rx descripors: q0=128 q1=128 q2=128 q3=128
  o Tx descripors: q0=532 q1=532
  o Loading network interface(s):
    o  register under mv88fx_eth platform
    o eth0, ifindex = 2, GbE port = 0

Warning: Giga 1 is Powered Off

mvFpRuleDb (bef00000): 65536 entries, 262144 bytes
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
sd 0:0:0:0: [sda] Sector size 0 reported, assuming 512.
sd 0:0:0:0: [sda] 31277056 512-byte logical blocks: (16.0 GB/14.9 GiB)
sd 0:0:0:0: [sda] 0-byte physical blocks
SPI Serial flash detected @ 0xf4000000, 512KB (128sec x 4KB)
2 cmdlinepart partitions found on MTD device spi_flash
Creating 2 MTD partitions on "spi_flash":
0x000000000000-0x00000007f000 : "uboot"
0x00000007f000-0x000000080000 : "u-boot-env"
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci_marvell ehci_marvell.70059: Marvell Orion EHCI
ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 0:0:0:0: [sda] Sector size 0 reported, assuming 512.
 sda: sda1 sda2 sda3 < sda5 >
sd 0:0:0:0: [sda] Sector size 0 reported, assuming 512.
ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100
sd 0:0:0:0: [sda] Attached SCSI disk
ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
uhci_hcd: USB Universal Host Controller Interface driver
usbcore: registered new interface driver usblp
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver ums-datafab
usbcore: registered new interface driver ums-freecom
usbcore: registered new interface driver ums-jumpshot
usbcore: registered new interface driver ums-sddr09
usbcore: registered new interface driver ums-sddr55
usbcore: registered new interface driver ums-usbat
mice: PS/2 mouse device common for all mice
input: gpio-keys as /devices/platform/gpio-keys/input/input0
i2c /dev entries driver
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: dm-devel@redhat.com
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
mmc0: mvsdio driver initialized, lacking card detect (fall back to polling)
Registered led device: white
Registered led device: orange
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
rtc mv_rtc: setting system clock to 2018-06-17 17:10:03 UTC (1529255403)
Freeing init memory: 136K
usb 1-1: new high speed USB device using ehci_marvell and address 2
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with writeback data mode.
udev[195]: starting version 164
Adding 203752k swap on /dev/sda5.  Priority:-1 extents:1 across:203752k
EXT3 FS on sda2, internal journal
eth0: started
root@dellkaceM300:~#

That's all for tonight!
-JT
Re: Dell Appliance
June 17, 2018 03:28AM
JT,

> It looks like the
> -p parameter makes all the
> difference

Awesome :) it really does. Because without the -p parameter, it would not expect the SPI header, when there is a header in the image being sent (so the image looks invalid to the bootROM).


root@jt-ubuntu:/home/jt# ./kwboot
> -B 115200 -b
> gdrv/uboot.2017.07-tld-1.nsa325.mtd0.kwb -t -p
> /dev/ttyUSB0
> Sending boot message. Please reboot the
> target.../
> Sending boot image...
>   0 %
> [......................................................................]
>   1 %
> [......................................................................]
>   3 %
> [......................................................................]
>   5 %
> [......................................................................]

<snip>

>  95 %
> [......................................................................]
>  97 %
> [......................................................................]
>  99 % [....................................]
> [Type Ctrl-\ + c to quit]
> It doesn't boot, but it looks like the transfer
> was successful.

Now we are lot closer. UART booting is supported in this box.

This told me that most likely the NSA325 image preamble is unfit for this box. Now I that I looked at the JDS stock bootlog again, it is definitely not ready. So I need to actually build a new u-boot for this box using the NSA325 as the starting point. It is close enough so hopefully will be relatively easy to get it boot. For a complete uboot, we will need GPL source. However, just get it booting is big step in having a recovery path when we are going mess with stock u-boot envs to bring up Debian.

> Kernel command line: console=ttyS0,115200
> mtdparts=spi_flash:0x7f000@0(uboot),0x1000@0x7f000(u-boot-env)

Yes, this is stock u-boot running.

> That's all for tonight!
> -JT

Thanks JT! good works :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dell Appliance
June 24, 2018 03:20AM
Got my unit and connected serial console.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
                                     M300
                                 dellkaceM300

To manage this appliance, please view the web interface at:
                             http://192.168.2.100 

See the documentation for additional information

                         Copyright © 2010-2018 Dell
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
dellkaceM300 login:

Has anybody found out what the root login credential is?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dell Appliance
June 24, 2018 04:21AM
> Received the unit I purchased on ebay today. It's
> a brand new unit and in my opinion in violation of
> the GPL as none of the documents included tell me
> how to get the source code. A search of Dell's
> website isn't helpful as it appears they have spun
> the Kace unit off to Quest KACE which appears to
> be oriented toward the software and have no
> mention of the M300 unit.

Thanks Ray! GPL is a really important data to have. We would be blind without it. We could get it running, but never really complete the board bringup without knowing some GPL info.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dell Appliance
June 24, 2018 01:45PM
bodhi Wrote:
-------------------------------------------------------
> Got my unit and connected serial console.

Yay!!!

>
>
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
>                                      M300
>                                  dellkaceM300
> 
> To manage this appliance, please view the web
> interface at:
>                              http://192.168.2.100
> 
> 
> See the documentation for additional information
> 
>                          Copyright © 2010-2018
> Dell
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> dellkaceM300 login:
>
>
> Has anybody found out what the root login
> credential is?

I didn't bother researching it too much. I took out the SATA module, put it in a USB/SATA enclosure, plugged it into my Dockstar and used chroot to change the root password.

-JT
Re: Dell Appliance
June 24, 2018 04:48PM
JT,

> I didn't bother researching it too much. I took
> out the SATA module, put it in a USB/SATA
> enclosure, plugged it into my Dockstar and used
> chroot to change the root password.
>

That's a good way to do it :) I think they let us enable SSH through the web page, too, but probably just an admin user, not root.

Was it easy to remove the SATA module? I did not look closely yet.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dell Appliance
June 24, 2018 06:29PM
Here is the first boot with the rootfs 4.12.1-kirkwood-tld-1.


Debian GNU/Linux 9 M300 ttyS0

M300 login: root
Password: 
Last login: Wed Dec 31 16:01:32 PST 1969 from 192.168.0.220 on pts/0
Linux M300 4.12.1-kirkwood-tld-1 #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@M300:~# myinfo 
M300
Dell Kace M300
Linux version 4.12.1-kirkwood-tld-1 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017

root@M300:~# date
Mon Jun 25 02:29:51 PDT 2018

root@M300:~# cat /proc/cpuinfo 
processor	: 0
model name	: Feroceon 88FR131 rev 1 (v5l)
BogoMIPS	: 400.00
Features	: swp half thumb fastmult edsp 
CPU implementer	: 0x56
CPU architecture: 5TE
CPU variant	: 0x2
CPU part	: 0x131
CPU revision	: 1

Hardware	: Marvell Kirkwood (Flattened Device Tree)
Revision	: 0000
Serial		: 0000000000000000
root@M300:~#

dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.12.1-kirkwood-tld-1 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Dell Kace M300

Device tree
root@M300:~# cat /proc/device-tree/compatible 
dell,m300marvell,kirkwood-88f6282marvell,kirkwood

root@M300:~# cat /proc/device-tree/model
Dell Kace M300
root@M300:~#

root@M300:~# uptime 
 02:37:30 up 11 min,  1 user,  load average: 0.00, 0.00, 0.00

SATA
[    5.148226] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    5.159007] ata1.00: ATA-7: TS16GSSD25H-M, 20100712, max UDMA/133
[    5.165127] ata1.00: 31277056 sectors, multi 0: LBA48 
[    5.176963] ata1.00: configured for UDMA/133
[    5.191711] scsi 0:0:0:0: Direct-Access     ATA      TS16GSSD25H-M    0712 PQ: 0 ANSI: 5
[    5.200744] sd 0:0:0:0: [sda] 31277056 512-byte logical blocks: (16.0 GB/14.9 GiB)
[    5.208918] sd 0:0:0:0: [sda] Write Protect is off
[    5.213760] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    5.213846] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    5.224795]  sda: sda1 sda2 sda3 < sda5 >
[    5.230299] sd 0:0:0:0: [sda] Attached SCSI disk



A lot more still needs to be corrected: RAM, Ethernet, SPI flash.

I will be back with some instruction and the new DTB for everybody to test.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 2 time(s). Last edit at 06/24/2018 06:36PM by bodhi.
Re: Dell Appliance
June 25, 2018 01:57AM
Cool! I had to pack mine up since I'm in the process of moving. I probably won't be able to get back to it for a couple of weeks.

-JT

P.S. - I assume you were able to remove the SATA module? There's only two screws holding it in.
Re: Dell Appliance
June 25, 2018 02:11AM
JT,

> P.S. - I assume you were able to remove the SATA
> module? There's only two screws holding it in.

I have not tried that (I have permanent serial console now so root access is not urgent atm).

Updated:

I've gained root access to the box (chrooting from Debian).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 2 time(s). Last edit at 06/26/2018 05:50PM by bodhi.
Re: Dell Appliance
June 25, 2018 02:30AM
Here is how to boot the new Debian rootfs.

Please see updated instruction in the post below.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 06/26/2018 05:51PM by bodhi.
Attachments:
open | download - kirkwood-m300.dtb (9.5 KB)
Re: Dell Appliance
June 25, 2018 04:29AM
@Ray,

Marvell>> flinfo

Bank # 1: 
Flash Base Address  : 0xf8000000
Flash Model         : MXIC MX25L4005
Manufacturer ID     : 0xc2
Device Id           : 0x2013
Sector Size         : 4K
Number of sectors   : 128
Page Size           : 256
Write Protection    : Upper 1 of 2

So that chip marking for SPI that you've observed is probably accurate, but not what stock u-boot sees. I think they (MX25L4005 and 4006E) must be compatible, probably have the same ID 0x2013.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 06/25/2018 04:30AM by bodhi.
Re: Dell Appliance
June 25, 2018 08:03PM
bodhi note:

This old installation instruction is deprecated.

Please see this post for new Installation Instruction:

https://forum.doozan.com/read.php?2,61344,89559,page=5#msg-89559




===================


A. Installation instruction.

Here is how to boot the new Debian rootfs

1. Create the USB rootfs using Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 from the kernel/rootfs release thread:
https://forum.doozan.com/read.php?2,12096

Since we are going to boot with stock u-boot, step 4 is needed (using the DTB attached in this post, and this DTB should be downloaded and placed in the rootfs /boot/dts/):

Quote

4. Create uImage with embedded DTB for booting with older u-boots (2012 or earlier). Skip this step if you have installed the latest U-Boot for Kirkwood (or are installing this u-boot at the same time).

Please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box (see the folder /media/sdb1/boot/dts for the exact spelling of your Kirkwood box name).

Generate the uImage with DTB embedded inside:
cd /media/sdb1/boot
cp -a zImage-4.12.1-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-4.12.1-kirkwood-tld-1 -d zImage.fdt uImage
sync

2. After the USB rootfs preparation is done. Bring it to the M300 and plug in to the USB port in the back.

3. Power up, interrupt serial console and execute the following commands:

setenv mtdparts 'mtdparts=spi0.0:0x7f000@0(uboot),0x1000@0x7f000(u-boot-env)' 
setenv set_bootargs_usb 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $(mtdparts) earlyprintk=serial'
usb start
ext2load usb 0:1 0x800000 /boot/uImage
ext2load usb 0:1 0x02100000 /boot/uInitrd
run set_bootargs_usb
bootm 0x800000 0x02100000

4. login with root/root credential.


B. Post Installation

Modify the /etc/fw_config.env to enable access to u-boot envs.

cat /etc/fw_env.config
# Dell KACE M300
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd1 0x0 00001000 0x00001000

NOTE: at the moment, u-boot envs cannot be changed in Debian (it is possible to change them in stock OS). I'm investigating the reason why.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 4 time(s). Last edit at 09/04/2019 10:30PM by bodhi.
Attachments:
open | download - kirkwood-m300.dtb (9.8 KB)
Re: Dell Appliance
June 27, 2018 01:36AM
bodhi Wrote:
-------------------------------------------------------
> JT,
>
> > I didn't bother researching it too much. I
> took
> > out the SATA module, put it in a USB/SATA
> > enclosure, plugged it into my Dockstar and used
> > chroot to change the root password.
> >
>
> That's a good way to do it :) I think they let us
> enable SSH through the web page, too, but probably
> just an admin user, not root.
>
> Was it easy to remove the SATA module? I did not
> look closely yet.

Sorry for being late.

In order to enable ssh the way Dell intended, you have to enter a "tether key" which allows customer support to ssh into the box an undo/fix anything someone may have broken. Without a legitimate key, you have you purge all openssh packages and reinstall them. You might have to remove the kace-tether app too, but it's been months since I messed with the internals so I don't remember for sure



Edited 1 time(s). Last edit at 06/27/2018 01:41AM by JDS420.
Re: Dell Appliance
June 27, 2018 03:34AM
JDS420,

> In order to enable ssh the way Dell intended, you
> have to enter a "tether key" which allows customer
> support to ssh into the box an undo/fix anything
> someone may have broken. Without a legitimate key,
> you have you purge all openssh packages and
> reinstall them. You might have to remove the
> kace-tether app too, but it's been months since I
> messed with the internals so I don't remember for
> sure

Thanks for the info!

I did it the easy way. After I've booted with the Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 rootfs, I mounted the internal SATA drive root partition and chroot into it, and reset root password. So now I can login to the box stock OS as root, if needed.

Here is Debian 9.3 with kernel 4.17.2-kirkwood-tld-2 running.

root@M300:~# myinfo
M300
192.168.0.249  
Dell KACE M300
Linux version 4.17.2-kirkwood-tld-2 (root@tldDebian) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 PREEMPT Sun Jun 24 23:23:16 PDT 2018
Debian 9.3
console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi0.0:0x7f000@0(uboot),0x1000@0x7f000(u-boot-env) earlyprintk=serial

root@M300:~# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=1029180k,nr_inodes=186911,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=206752k,mode=755)
/dev/sdb1 on / type ext3 (rw,noatime,errors=remount-ro)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=413500k)
tmpfs on /tmp type tmpfs (rw,relatime)
rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/etc/auto.nfs on /mnt/nfs type autofs (rw,relatime,fd=6,pgrp=1705,timeout=300,minproto=5,maxproto=5,indirect)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
tmpfs on /var/log type tmpfs (rw,relatime)
/dev/sda1 on /media/boot type ext2 (rw,noatime,errors=continue)
/dev/sda2 on /media/root type ext3 (rw,noatime)

/media/root is stock rootfs.

So far it has been running perfectly for 8 hours today.

root@M300:~# uptime
01:06:52 up  8:37,  1 user,  load average: 0.01, 0.02, 0.00

There are still some unknown info that GPL source would make it easier (eg. GPIO and other miscellaneuos stuff). And that would finish the hack :) But so far I'd say we got this NAS running successfully at a production quality (knock on wood). I will need to release new kernel version 4.17.2-kirkwood-tld-2 that has support for this box (this kernel will run on all Kirkwood boxes).

root@M300:~# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.17.2-kirkwood-tld-2 (root@tldDebian) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 PREEMPT Sun Jun 24 23:23:16 PDT 2018
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Dell KACE M300
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 524288
[    0.000000]   Normal zone: 1536 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 196608 pages, LIFO batch:31
[    0.000000]   HighMem zone: 327680 pages, LIFO batch:31
[    0.000000] random: get_random_bytes called from start_kernel+0x7c/0x4f0 with crng_init=0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 522752
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi0.0:0x7f000@0(uboot),0x1000@0x7f000(u-boot-env) earlyprintk=serial
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 2058364K/2097152K available (8192K kernel code, 804K rwdata, 2124K rodata, 1024K init, 289K bss, 38788K reserved, 0K cma-reserved, 1310720K highmem)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                   fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                   vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
                   lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
                   pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
                   modules : 0xbf000000 - 0xbfe00000   (  14 MB)
                     .text : 0x(ptrval) - 0x(ptrval)   (9184 kB)
                     .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
                     .data : 0x(ptrval) - 0x(ptrval)   ( 805 kB)
                      .bss : 0x(ptrval) - 0x(ptrval)   ( 290 kB)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 06/27/2018 04:27AM by bodhi.
Re: Dell Appliance
June 27, 2018 04:09AM
There is a PCI bus. Does anybody see it exposed any where on the board?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dell Appliance
June 27, 2018 12:05PM
I haven't noticed it exposed on the board. And as far as the sources go, good luck. Dell kept this thing locked down until they decided to abandon it altogether. When they did that, they pretty much wrote off as much of it's existence as they could.

If they're to be found they'd most likely be in here on on this server somewhere... opensource.dell.com



Edited 2 time(s). Last edit at 06/27/2018 12:26PM by JDS420.
Re: Dell Appliance
June 27, 2018 02:15PM
JDS420,

You and JT already searched for this. So I'm not going waste time :)

Without GPL, we're not going to have new u-boot and have to use stock uboot. But that's enough to run Debian. We don't know yet which GPIO controls which LED lights (that's just cosmetics). Everything else is running OK.

I will try kwboot to at least get a recovery mechanism (in case someone's box is bricked).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dell Appliance
June 27, 2018 04:09PM
There's a php/? script in the kbox directory that controls the led status and color. Might it have the GPIO pins listed in it?

Part of the LED functions:
    private function _led($args) {
        $this->_ledstatus($args);
    }

    private function _ledstatus($args) {
        echo PlatformUtility::LEDStatus();
    }

    private function _ledon($args) {
        echo PlatformUtility::LEDOff();
        echo PlatformUtility::LEDControl('on',true);
    }

    private function _ledtest($args) {        
        echo "Begin LED Test Cycle\n";
        echo "LEDOff() for 2 secs\n";
        PlatformUtility::LEDOff();
        sleep(2);
        foreach(array(true, false) as $white)  {
            foreach(array('on','off','blink') as $on)  {
                if(!$white)
                    $label = 'orange';
                else
                    $label = 'white';
                echo "LEDControl($on, $label) for 4 secs\n";
                PlatformUtility::LEDControl($on, $white);
                sleep(4);
                echo "LEDOff() for 2 secs\n";
                PlatformUtility::LEDOff();
                sleep(2);
            }
        }        
        // set the white led back on
        echo "turning white led ON\n";
        echo PlatformUtility::LEDOff();
        echo PlatformUtility::LEDControl('on',true);
    }



Edited 2 time(s). Last edit at 06/27/2018 06:49PM by JDS420.
Re: Dell Appliance
June 27, 2018 10:19PM
Did anyone try to contact Dell at opensource@dell.com?
Re: Dell Appliance
June 28, 2018 12:20AM
JDS420,

> There's a php/? script in the kbox directory that
> controls the led status and color. Might it have
> the GPIO pins listed in it?

Very promising! now we just need to drill down to the low level script (but if the low level is binary then it's a bit more difficult).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dell Appliance
June 28, 2018 12:21AM
renojim Wrote:
-------------------------------------------------------
> Did anyone try to contact Dell at
> opensource@dell.com?

Please do. I have not.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dell Appliance
June 28, 2018 01:14AM
JDS420,


> There's a php/? script in the kbox directory that
> controls the led status and color. Might it have
> the GPIO pins listed in it?
>
> Part of the LED functions:
>
>     private function _led($args) {
>         $this->_ledstatus($args);
>     }
> 
>     private function _ledstatus($args) {
>         echo PlatformUtility::LEDStatus();
>     }
> 
>     private function _ledon($args) {
>         echo PlatformUtility::LEDOff();
>         echo
> PlatformUtility::LEDControl('on',true);
>     }
> 
>     private function _ledtest($args) {        
>         echo "Begin LED Test Cycle\n";
>         echo "LEDOff() for 2 secs\n";
>         PlatformUtility::LEDOff();
>         sleep(2);
>         foreach(array(true, false) as $white)  {
>             foreach(array('on','off','blink') as
> $on)  {
>                 if(!$white)
>                     $label = 'orange';
>                 else
>                     $label = 'white';
>                 echo "LEDControl($on, $label) for
> 4 secs\n";
>                 PlatformUtility::LEDControl($on,
> $white);
>                 sleep(4);
>                 echo "LEDOff() for 2 secs\n";
>                 PlatformUtility::LEDOff();
>                 sleep(2);
>             }
>         }        
>         // set the white led back on
>         echo "turning white led ON\n";
>         echo PlatformUtility::LEDOff();
>         echo
> PlatformUtility::LEDControl('on',true);
>     }
>

Very useful info! I think we will solve this even without GPL.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
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: