Welcome! Log In Create A New Profile

Advanced

Debian on Omninas Shuttle KS10

Posted by Mijzelf 
Debian on Omninas Shuttle KS10
January 10, 2022 08:21AM
@bohdi I'm trying to fill some gaps. When trying to boot an OpenWrt Mirabox uImage on my Shuttle Omninas KS10 (Armada 370), it stopped at 'Starting Kernel...'. The reason to try that image, is that it is confirmed to work on the Shuttle KD22, which seems to be a dual disk version of the KS10.
I was pointed to this thread, and indeed I could boot the box using your 'old u-boot compatible' kernel, in combination with the Mirabox dtb file. (Didn't try other dtb's)

Now the question is, why does the KD22 (bootlog) boot the OpenWrt Mirabox uImage, and doesn't the KS10? The stock bootlogs (KD22 and KS10) show they share the same u-boot.

Further, what does CONFIG_DEBUG_UART_PHYS and CONFIG_DEBUG_UART_VIRT actually mean? Google isn't helpful. Is it the hardware address of the UART? If yes, is it u-boot's task to configure it to use that address? Any idea why it changed?

======================
bodhi's edit: modified thread subject title to make it easier to search for.



Edited 1 time(s). Last edit at 02/11/2022 10:19PM by bodhi.
Re: Shuttle KS10
January 10, 2022 04:01PM
Hi Mijzelf,

> Further, what does CONFIG_DEBUG_UART_PHYS and
> CONFIG_DEBUG_UART_VIRT actually mean? Google isn't
> helpful. Is it the hardware address of the UART?
> If yes, is it u-boot's task to configure it to use
> that address? Any idea why it changed?

Tthat is correct. u-boot sets the HW address of the UART (the reason of the conflict). It is possible but hard to change during kernel booting (because it is set very early in assembler code).

Here is the diff for these configs (0xf1012000 is the one should be used, but older u-boot used 0xd0012000).

< CONFIG_DEBUG_UART_PHYS=0xf1012000
< CONFIG_DEBUG_UART_VIRT=0xfed12000
---
> CONFIG_DEBUG_UART_PHYS=0xd0012000
> CONFIG_DEBUG_UART_VIRT=0xfec12000

Since we always want to to able to debug the system during boot, we also have

CONFIG_EARLY_PRINTK=y

The combination of these switches made it possible to see early kernel booting problem.

The Mirabox and a few others Armada 370 boxes used u-boot version that set the HW address to 0xd0012000. And the DTS reflects that:

soc {
                ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000

Later, the manufacturer came out with a u-boot version that use the correct address (this is how it should be for all Armada SoCs):
soc {
                ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000

So all old Armada 370 boxes have this problem (the newer ones don't). If UART debug is turned on, the DTS must use 0xd0000000, and the kernel config must use 0xd0012000.

Quote

Now the question is, why does the KD22 (bootlog) boot the OpenWrt Mirabox uImage, and doesn't the KS10? The stock bootlogs (KD22 and KS10) show they share the same u-boot.

I would look at the DTS for these 2 boxes to make sure they use 0xd0000000 for old u-boot, and 0xf1000000 for newer u-boot. And the kernel config should be consistent with that.

=======

I have not looked at the logs you linked to above, so if you could not find the conflicts, please let me know.

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



Edited 1 time(s). Last edit at 01/10/2022 04:22PM by bodhi.
Re: Shuttle KS10
January 10, 2022 05:37PM
Mijzelf,

I've briefly scanned the boot logs, no useful info.

In serial console, do this to get the addresses the current u-boot uses:

map

Also you don't need to change the memory size in the DTS. It will be detected by u-boot.

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



Edited 1 time(s). Last edit at 01/10/2022 05:39PM by bodhi.
Re: Shuttle KS10
January 11, 2022 12:53PM
bodhi Wrote:
-------------------------------------------------------
> I would look at the DTS for these 2 boxes

Well, that is a problem. There are none. AFAIK the stock firmware doesn't use fdt, and GPL sources are not available. The KD22 thread on the OpenWrt forum concluded in: 'the Mirabox uImage (+dts) works'.

bodhi Wrote:
-------------------------------------------------------
> Later, the manufacturer came out with a u-boot version that use the correct address (this is how it should be for all
> Armada SoCs):

Are you aware of a reason why this is the 'correct' one?

bodhi Wrote:
-------------------------------------------------------
> Mijzelf,
>
> I've briefly scanned the boot logs, no useful
> info.
>
> In serial console, do this to get the addresses
> the current u-boot uses:
>
>
> map
>

Shuttle>> map

CPU Interface
-------------
SDRAM_CS0 ....base 00000000, size 256MB 
SDRAM_CS1 ....disable
SDRAM_CS2 ....disable
SDRAM_CS3 ....disable
DEVICE_CS0 ....no such
DEVICE_CS1 ....no such
DEVICE_CS2 ....no such
DEVICE_CS3 ....no such
PEX0_MEM ....base b0000000, size  32MB 
PEX0_IO ....no such
PEX1_MEM ....base b2000000, size  32MB 
PEX1_IO ....no such
INTER_REGS ....base d0000000, size   1MB 
DMA_UART ....no such
SPI_CS0 ....base f4000000, size  16MB 
SPI_CS1 ....no such
SPI_CS2 ....no such
SPI_CS3 ....no such
SPI_CS4 ....no such
SPI_CS5 ....no such
SPI_CS6 ....no such
SPI_CS7 ....no such
BOOT_ROM_CS ....base f8000000, size   1MB 
DEV_BOOTCS ....base fd000000, size  16MB 
PMU_SCRATCHPAD ....no such
CRYPT0_ENG ....base c8010000, size  64KB 

AHB To MBUS Bridge:
-------------------
win0 - PEX0_MEM base b0000000, ....size  32MB 
win1 - PEX1_MEM base b2000000, ....size  32MB 
win2 - disable
win3 - disable
win4 - disable
win5 - disable
win6 - disable
win7 - disable
win8 - SPI_CS0 base f4000000, ....size  16MB 
win9 - DEV_BOOTCS base fd000000, ....size  16MB 
win10 - CRYPT0_ENG base c8010000, ....size  64KB 
win11 - disable
win12 - disable
win13 - BOOT_ROM_CS base f8000000, ....size   1MB 
win14 - disable
win15 - disable
win16 - disable
win17 - disable
win18 - disable
win19 - disable
win20 - INTER_REGS base d0000000, ....size   1MB 

PEX0:
-----

Pex Bars 

Internal Regs Bar0.... base d0000000, size   1MB 
DRAM Bar1............. base 00000000, size 256MB 
Devices Bar2.......... disable

Pex Decode Windows

win0 - SDRAM_CS0 base 00000000, ....size 256MB 
win1 - disable
win2 - disable
win3 - disable
win4 - disable
win5 - disable
default win - SDRAM_CS0 
Expansion ROM - SDRAM_CS0 

PEX1:
-----

Pex Bars 

Internal Regs Bar0.... base d0000000, size   1MB 
DRAM Bar1............. base 00000000, size 256MB 
Devices Bar2.......... disable

Pex Decode Windows

win0 - SDRAM_CS0 base 00000000, ....size 256MB 
win1 - disable
win2 - disable
win3 - disable
win4 - disable
win5 - disable
default win - SDRAM_CS0 
Expansion ROM - SDRAM_CS0 

USB 0:
----
win0 - SDRAM_CS0 base 00000000, ....size 256MB 
win1 - PEX0_MEM base b0000000, ....size  32MB 
win2 - disable
win3 - disable
mvUsbWinRead (dev=0): ERR. Invalid winNum 4
mvUsbWinRead (dev=0): ERR. Invalid winNum 5
mvUsbWinRead (dev=0): ERR. Invalid winNum 6
mvUsbWinRead (dev=0): ERR. Invalid winNum 7
mvUsbWinRead (dev=0): ERR. Invalid winNum 8
mvUsbWinRead (dev=0): ERR. Invalid winNum 9
mvUsbWinRead (dev=0): ERR. Invalid winNum 10
mvUsbWinRead (dev=0): ERR. Invalid winNum 11
mvUsbWinRead (dev=0): ERR. Invalid winNum 12
mvUsbWinRead (dev=0): ERR. Invalid winNum 13
mvUsbWinRead (dev=0): ERR. Invalid winNum 14
mvUsbWinRead (dev=0): ERR. Invalid winNum 15

USB 1:
----
win0 - SDRAM_CS0 base 00000000, ....size 256MB 
win1 - PEX0_MEM base b0000000, ....size  32MB 
win2 - disable
win3 - disable
mvUsbWinRead (dev=1): ERR. Invalid winNum 4
mvUsbWinRead (dev=1): ERR. Invalid winNum 5
mvUsbWinRead (dev=1): ERR. Invalid winNum 6
mvUsbWinRead (dev=1): ERR. Invalid winNum 7
mvUsbWinRead (dev=1): ERR. Invalid winNum 8
mvUsbWinRead (dev=1): ERR. Invalid winNum 9
mvUsbWinRead (dev=1): ERR. Invalid winNum 10
mvUsbWinRead (dev=1): ERR. Invalid winNum 11
mvUsbWinRead (dev=1): ERR. Invalid winNum 12
mvUsbWinRead (dev=1): ERR. Invalid winNum 13
mvUsbWinRead (dev=1): ERR. Invalid winNum 14
mvUsbWinRead (dev=1): ERR. Invalid winNum 15

ETH 0:
----
win0 - SDRAM_CS0 base 00000000, ....size 256MB 
win1 - disable
win2 - disable
win3 - disable
win4 - disable
win5 - disable
mvNetaWinGet: ERR. Invalid winNum 6
mvNetaWinGet: ERR. Invalid winNum 7
mvNetaWinGet: ERR. Invalid winNum 8
mvNetaWinGet: ERR. Invalid winNum 9
mvNetaWinGet: ERR. Invalid winNum 10
mvNetaWinGet: ERR. Invalid winNum 11
mvNetaWinGet: ERR. Invalid winNum 12
mvNetaWinGet: ERR. Invalid winNum 13
mvNetaWinGet: ERR. Invalid winNum 14
mvNetaWinGet: ERR. Invalid winNum 15

XOR 0:
----
win0 - SDRAM_CS0 base 00000000, ....size 256MB 
win1 - PEX0_MEM base b0000000, ....size  32MB 
win2 - PEX1_MEM base b2000000, ....size  32MB 
win3 - disable
win4 - disable
win5 - disable
win6 - disable
win7 - disable

XOR 1:
----
win0 - SDRAM_CS0 base 00000000, ....size 256MB 
win1 - PEX0_MEM base b0000000, ....size  32MB 
win2 - PEX1_MEM base b2000000, ....size  32MB 
win3 - disable
win4 - disable
win5 - disable
win6 - disable
win7 - disable

Sata 0:
----
win0 - SDRAM_CS0 base 00000000, ....size 256MB 
win1 - SDRAM_CS1 base 10000000, ....size 256MB 
win2 - SDRAM_CS2 base 20000000, ....size 256MB 
win3 - SDRAM_CS3 base 30000000, ....size 256MB 
mvSataWinRead (dev=0): ERR. Invalid winNum 4
mvSataWinRead (dev=0): ERR. Invalid winNum 5
mvSataWinRead (dev=0): ERR. Invalid winNum 6
mvSataWinRead (dev=0): ERR. Invalid winNum 7
mvSataWinRead (dev=0): ERR. Invalid winNum 8
mvSataWinRead (dev=0): ERR. Invalid winNum 9
mvSataWinRead (dev=0): ERR. Invalid winNum 10
mvSataWinRead (dev=0): ERR. Invalid winNum 11
mvSataWinRead (dev=0): ERR. Invalid winNum 12
mvSataWinRead (dev=0): ERR. Invalid winNum 13
mvSataWinRead (dev=0): ERR. Invalid winNum 14
mvSataWinRead (dev=0): ERR. Invalid winNum 15

Sata 1:
----
win0 - SDRAM_CS0 base 00000000, ....size 256MB 
win1 - SDRAM_CS1 base 10000000, ....size 256MB 
win2 - SDRAM_CS2 base 20000000, ....size 256MB 
win3 - SDRAM_CS3 base 30000000, ....size 256MB 
mvSataWinRead (dev=1): ERR. Invalid winNum 4
mvSataWinRead (dev=1): ERR. Invalid winNum 5
mvSataWinRead (dev=1): ERR. Invalid winNum 6
mvSataWinRead (dev=1): ERR. Invalid winNum 7
mvSataWinRead (dev=1): ERR. Invalid winNum 8
mvSataWinRead (dev=1): ERR. Invalid winNum 9
mvSataWinRead (dev=1): ERR. Invalid winNum 10
mvSataWinRead (dev=1): ERR. Invalid winNum 11
mvSataWinRead (dev=1): ERR. Invalid winNum 12
mvSataWinRead (dev=1): ERR. Invalid winNum 13
mvSataWinRead (dev=1): ERR. Invalid winNum 14
mvSataWinRead (dev=1): ERR. Invalid winNum 15
Shuttle>> 
Re: Shuttle KS10
January 11, 2022 04:17PM
Mijzelf,

> Well, that is a problem. There are none. AFAIK the
> stock firmware doesn't use fdt, and GPL sources
> are not available. The KD22 thread on the OpenWrt
> forum concluded in: 'the Mirabox uImage (+dts)
> works'.

Ah. I see it's still a work in progress to add support to the KD22.

> Are you aware of a reason why this is the
> 'correct' one?

IIRC, what happen was the address 0xd0012000 was only used in those u-boots built for the Armada 370 during that period (Mirabox and Netgear RN10x came out). Nobody understood why they decided to do that. It could have been a mistake. The problem that the same stock Marvell u-boot was used in all those boxes, with some variations added in by the vendor. Later the manufacturer switch back to 0xf1012000. I believe the Mirabox V9 uses the newer u-boot with this address, but I have not confirmed this yet (looking at you Ray, could you provide a Mirabox V9 serial boot log, or u-boot image dump? :-).

> Shuttle>> map
> DEV_BOOTCS ....base fd000000, size  16MB

That address matches the range.

========

So if the OpenWrt baseline MVEBU kernel enables CONFIG_DEBUG_UART_xxx then,

CONFIG_DEBUG_UART_PHYS=0xd0012000
CONFIG_DEBUG_UART_VIRT=0xfec12000

The problem is that this will not work for all other Armada 38x SoCs.

It's hard to make a baseline kernel to enable these addresses only for the Armada 370, because it happens very early, before DTB nodes are enumerated. The only way I can see to make it works is patching an assembler routine code that got invoked early on when the kernel starts. Or not using DEBUG UART at all (which is not good solution). I've investigated this issue quite a bit, but finally decided that if I try then it will be making a newer u-boot (kernel hack potentially will break again).

======

Side note, are you the same Mijzelf at NAS Central from way back? if you are, thank you for your contribution!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Shuttle KS10
January 12, 2022 01:22PM
Quote
bodhi
So if the OpenWrt baseline MVEBU kernel enables CONFIG_DEBUG_UART_xxx then,

It does, this is the default config for all mvebu targets:

~/openwrt $ grep 'EARLY_PRINTK\|DEBUG_UART' target/linux/mvebu/config-5.10 
CONFIG_DEBUG_UART_8250=y
CONFIG_DEBUG_UART_8250_SHIFT=2
CONFIG_DEBUG_UART_PHYS=0xd0012000
CONFIG_DEBUG_UART_VIRT=0xfec12000
CONFIG_EARLY_PRINTK=y

and I can't find a patch which changes that to the 'correct' values. As most mvebu targets in OpenWrt are newer than a 370, I can only conclude I can't search.

Quote
bodhi
IIRC, what happen was the address 0xd0012000 was only used in those u-boots built for the Armada 370 during that period (Mirabox and Netgear RN10x came out). Nobody understood why they decided to do that.

You don't say it, but I assume 0xf1012000 was in use by previous Marvel SoC's? And btw, DEBUG_UART is only about logging, or can you actually debug over serial? If yes, doesn't that add a lot of overhead to the kernel? In that case I'd be surprised that OpenWrt by default enables it, as in most cases everything is optimized on size.

Quote
bodhi
Side note, are you the same Mijzelf at NAS Central from way back? if you are, thank you for your contribution!

It's me. And you are welcome.
Re: Shuttle KS10
January 12, 2022 03:17PM
Mijzelf ,

> It does, this is the default config for all mvebu
> targets:
>
>
~/openwrt $ grep 'EARLY_PRINTK\|DEBUG_UART'
> target/linux/mvebu/config-5.10 
> CONFIG_DEBUG_UART_8250=y
> CONFIG_DEBUG_UART_8250_SHIFT=2
> CONFIG_DEBUG_UART_PHYS=0xd0012000
> CONFIG_DEBUG_UART_VIRT=0xfec12000
> CONFIG_EARLY_PRINTK=y
>

Then it will not work for Armada 38x SoC. Unless this was fixed in someway in mainline (or patched by OpenWrt), but I did not know about. That would be fanstastic!


> and I can't find a patch which changes that to the
> 'correct' values. As most mvebu targets in OpenWrt
> are newer than a 370, I can only conclude I can't
> search.

Now it is strange. Can you post a link to some OpenWrt Armada 38x targets?

> You don't say it, but I assume 0xf1012000 was in
> use by previous Marvel SoC's?

Yes, it was.

> And btw, DEBUG_UART
> is only about logging, or can you actually debug
> over serial? If yes, doesn't that add a lot of
> overhead to the kernel? In that case I'd be
> surprised that OpenWrt by default enables it, as
> in most cases everything is optimized on size.

The overhead is very minimal (serial driver is tiny). Although the config name is DEBUG_UART, it only means that the serial output is available during early booting (it is only logging).

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



Edited 1 time(s). Last edit at 01/12/2022 03:21PM by bodhi.
Re: Shuttle KS10
January 12, 2022 05:00PM
I went here and look:

https://github.com/openwrt/openwrt/tree/master/target/linux/mvebu

Have not found any changes to this address either. Perhaps I need to dig deaper into the pacthes.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Shuttle KS10
January 13, 2022 01:21PM
Quote
bohdi
Can you post a link to some OpenWrt Armada 38x targets?

https://openwrt.org/docs/techref/targets/mvebu#devices_with_this_target

The OpenWrt sources do not contain a dts file for the mirabox, so the file from Linux is used, which contains

        soc {
                ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000

I build an OpenWrt mirabox initramfs kernel from freshly pulled source, where I changed the kernel config (using 'make kernel_menuconfig') to generate a configs.ko. After building I extracted configs.ko, and it doesn't contain an CONFIG_EARLY_PRINTK, or one of the CONFIG_DEBUG_UART* .
The content of configs.ko is identical to the .config in the Linux directory in the build_dir.

So when I'm not mistaken this image should be able to boot. But it isn't.
Re: Shuttle KS10
January 13, 2022 03:11PM
This u-boot supports booting from disk. I create 2 partitions, one 1GiB ext2 and one ext4. Created a mirabox uImage on the first partition, and put your mvebu Debian rootfs on the 2nd.
The boot ended in a kernel panic. It took me some time to realize that a mirabox doesn't have sata. So I took the netgear rn102 uImage instead. That one boots, but there is something wrong with the network port. It detects the cable
[ 1100.166524][ T2483] mvneta d0074000.ethernet eth0: Link is Down
[ 1109.523448][ T2483] mvneta d0074000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
I can set an IP addres, can ping it, but I can't ping an address on the other side. Nor the other way around. And of course connecting to the ssh deamon also fails. Wrong interrupt? Would the link then be detected?

/Edit: If the mirabox doesn't have sata, then maybe the reports on OpenWrt about the KD22 booting the mirabox image is bogus. Why would you claim that it works, when you NAS doesn't detect it's disks?



Edited 1 time(s). Last edit at 01/13/2022 03:29PM by Mijzelf.
Re: Shuttle KS10
January 13, 2022 03:45PM
Mijzelf ,

Quote

After building I extracted configs.ko, and it doesn't contain an CONFIG_EARLY_PRINTK, or one of the CONFIG_DEBUG_UART* .
The content of configs.ko is identical to the .config in the Linux directory

That would explain why it works for Armada 38x and later MVEBU SoCs in general. The correct mapped address in Armada 38x boxes u-boot and their DTS mbus address are in sync. And there is no UART address in conflict.

Quote

This u-boot supports booting from disk. I create 2 partitions, one 1GiB ext2 and one ext4. Created a mirabox uImage on the first partition, and put your mvebu Debian rootfs on the 2nd.
The boot ended in a kernel panic. It took me some time to realize that a mirabox doesn't have sata.

This might not have been because of SATA. Usually a lack of definition in the DTS will not cause problem. Only when we define something that there is no HW for it, then it would cause booting problem. My rootfs has rootfs label defined in fstab. So the u-boot bootargs must be defined as such. If you post the bootlog here, I can confirm whether it's indeed the problem.

setenv set_bootargs_debian 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=pxa3xx_nand-0:4M(u-boot),4M(linux),-(filesystem) earlyprintk=serial'


Quote

So I took the netgear rn102 uImage instead. That one boots, but there is something wrong with the network port. It detects the cable
[ 1100.166524][ T2483] mvneta d0074000.ethernet eth0: Link is Down
[ 1109.523448][ T2483] mvneta d0074000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
I can set an IP addres, can ping it, but I can't ping an address on the other side. Nor the other way around. And of course connecting to the ssh deamon also fails. Wrong interrupt? Would the link then be detected?

This might be because a different netwok chip is used in the rn102 DTS.

I think perhaps you need to just use Mirabox DTS as a base to get it booted first. And then add SATA to the DTS.

Note: the Netgear RN102 and RN104 have PCI SATA, not native SATA.

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



Edited 4 time(s). Last edit at 01/13/2022 04:04PM by bodhi.
Re: Shuttle KS10
January 13, 2022 03:56PM
Quote
KS10 stock boot log
[ 6.472037] ata1.00: ATA-8: FUJITSU MHY2160BH, 0040020B, max UDMA/100
[ 6.478520] ata1.00: 312581808 sectors, multi 16: LBA48 NCQ (depth 31/32)
[ 6.485888] oprofile: no performance counters
[ 6.490544] oprofile: using timer interrupt.
[ 6.494919] pktgen: Packet Generator for packet performance testing. Version: 2.74
[ 6.502909] TCP cubic registered
[ 6.506286] NET: Registered protocol family 10
[ 6.511301] IPv6 over IPv4 tunneling driver
[ 6.516164] NET: Registered protocol family 17
[ 6.520746] 8021q: 802.1Q VLAN Support v1.8
[ 6.524959] VFP support v0.3: implementor 56 architecture 2 part 20 variant 9 rev 6
[ 6.532817] ata1.00: configured for UDMA/100
[ 6.537492] scsi 0:0:0:0: Direct-Access ATA FUJITSU MHY2160B 0040 PQ: 0 ANSI: 5

Looks like a native SATA port.

Native SATA should be

sata@a0000 {
                                nr-ports = <1>;
                                status = "okay";
                        };

If it is PCIe SATA then

&pciec {
        status = "okay";

        pcie@1,0 {
                status = "okay";
        };
};

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



Edited 1 time(s). Last edit at 01/13/2022 04:02PM by bodhi.
Re: Shuttle KS10
January 13, 2022 04:07PM
Network chip is definitely not the same as Minrabox or RN102/104.

Quote
KS10 stock boot log
[ 6.121548] e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI
[ 6.127663] e100: Copyright(c) 1999-2006 Intel Corporation
[ 6.133354] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI
[ 6.140443] e1000: Copyright (c) 1999-2006 Intel Corporation.
[ 6.146372] e1000e: Intel(R) PRO/1000 Network Driver - 1.5.1-k
[ 6.152236] e1000e: Copyright(c) 1999 - 2011 Intel Corporation.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Shuttle KS10
January 13, 2022 05:06PM
Quote

/Edit: If the mirabox doesn't have sata, then maybe the reports on OpenWrt about the KD22 booting the mirabox image is bogus. Why would you claim that it works, when you NAS doesn't detect it's disks?

If KD20 and KD22 are the same then it is a totally different box. It use OXAS CPU.

http://en.techinfodepot.shoutwiki.com/wiki/Shuttle_OmniNAS_KD20

If KD22 boots with Mirabox image then it is Marvell Armada 370.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Shuttle KS10
January 14, 2022 10:48AM
Bootlog of Mirabox uImage (using LABEL=rootfs caused a kernel panic on the rn104, maybe because there is no initramfs, so I specified the partition)

Shuttle>> setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 mtdparts=pxa3xx_nand-0:4M(u-boot),4M(linux),-(filesystem) earlyprintk=serial
Shuttle>> ide reset

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found
  Device 0 @ 0 0:
Model: FUJITSU MHY2160BH                        Firm: 0040020B Ser#:         K428T7C2AEA6
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 152627.8 MB = 149.0 GB (312581808 x 512)

Shuttle>> ext2load ide 0:1 0x02000000 uImage.mirabox
Loading file "uImage.mirabox" from ide device 0:1 (hda1)
5019537 bytes read
Shuttle>> bootm
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-5.10.7-mvebu-370xp-tld-1
   Created:      1970-01-01   0:10:26 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5019473 Bytes =  4.8 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.10.7-mvebu-370xp-tld-1 (root@tldDebianVM) (arm-linux-gnueabihf-gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0, GNU ld (GNU Binutils for Ubuntu) 2.30) #1.0 PREEMPT Sat Jan 30 15:22:18 PST 2021
[    0.000000][    T0] CPU: ARMv7 Processor [561f5811] revision 1 (ARMv7), cr=10c5387d
[    0.000000][    T0] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000][    T0] OF: fdt: Machine model: Globalscale Mirabox
[    0.000000][    T0] printk: bootconsole [earlycon0] enabled
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] Zone ranges:
[    0.000000][    T0]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0]   HighMem  empty
[    0.000000][    T0] Movable zone start for each node
[    0.000000][    T0] Early memory node ranges
[    0.000000][    T0]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0] CPU: All CPU(s) started in SVC mode.
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 65024
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=/dev/sda1 rootdelay=10 mtdparts=pxa3xx_nand-0:4M(u-boot),4M(linux),-(filesystem) earlyprintk=serial
[    0.000000][    T0] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000][    T0] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000][    T0] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000][    T0] Memory: 242556K/262144K available (10240K kernel code, 1479K rwdata, 3000K rodata, 1024K init, 362K bss, 19588K reserved, 0K cma-reserved, 0K highmem)
[    0.000000][    T0] random: get_random_u32 called from ____cache_alloc+0x2ec/0x790 with crng_init=0
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0] 	Trampoline variant of Tasks RCU enabled.
[    0.000000][    T0] 	Tracing variant of Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] L2C: DT/platform modifies aux control register: 0x12086302 -> 0x1a086302
[    0.000000][    T0] Aurora cache controller enabled, 4 ways, 256 kB
[    0.000000][    T0] Aurora: CACHE_ID 0x00000100, AUX_CTRL 0x1a086302
[    0.000000][    T0] Switching to timer-based delay loop, resolution 60ns
[    0.000009][    T0] sched_clock: 32 bits at 16MHz, resolution 60ns, wraps every 129195984865ns
[    0.008598][    T0] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 114984426661 ns
[    0.021116][    T0] Console: colour dummy device 80x30
[    0.026272][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 33.24 BogoMIPS (lpj=166219)
[    0.037317][    T0] pid_max: default: 32768 minimum: 301
[    0.042928][    T0] LSM: Security Framework initializing
[    0.048328][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.056324][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.065839][    T0] CPU: Testing write buffer coherency: ok
[    0.072349][    T1] Setting up static identity map for 0x100000 - 0x100060
[    0.079624][    T1] mvebu-soc-id: MVEBU SoC ID=0x6707, Rev=0x1
[    0.085630][    T1] mvebu-pmsu: Initializing Power Management Service Unit
[    0.092654][    T1] rcu: Hierarchical SRCU implementation.
[    0.099208][    T1] devtmpfs: initialized
[    0.108065][    T1] VFP support v0.3: implementor 56 architecture 2 part 20 variant 9 rev 6
[    0.117275][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.128112][    T1] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.172005][    T1] prandom32: self test passed (less than 6 bits correlated)
[    0.179126][    T1] prandom: seed boundary self test passed
[    0.188686][    T1] prandom: 100 self tests passed
[    0.193496][    T1] pinctrl core: initialized pinctrl subsystem
[    0.201567][    T1] NET: Registered protocol family 16
[    0.207466][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.217474][    T1] audit: initializing netlink subsys (disabled)
[    0.226372][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    0.226591][    T1] cpuidle: using governor ladder
[    0.238156][   T27] audit: type=2000 audit(0.200:1): state=initialized audit_enabled=0 res=1
[    0.249876][    T1] cpuidle: using governor menu
[    0.254831][    T1] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.261686][    T1] mvebu-pmsu: CPU idle is currently broken: disabling
[    0.581250][    T1] raid6: int32x8  gen()   142 MB/s
[    0.750601][    T1] raid6: int32x8  xor()    90 MB/s
[    0.920417][    T1] raid6: int32x4  gen()   149 MB/s
[    1.090311][    T1] raid6: int32x4  xor()   100 MB/s
[    1.260344][    T1] raid6: int32x2  gen()   275 MB/s
[    1.430292][    T1] raid6: int32x2  xor()   144 MB/s
[    1.600246][    T1] raid6: int32x1  gen()   286 MB/s
[    1.770321][    T1] raid6: int32x1  xor()   133 MB/s
[    1.775269][    T1] raid6: using algorithm int32x1 gen() 286 MB/s
[    1.781349][    T1] raid6: .... xor() 133 MB/s, rmw enabled
[    1.786900][    T1] raid6: using intx1 recovery algorithm
[    1.793543][    T1] vgaarb: loaded
[    1.799418][    T1] SCSI subsystem initialized
[    1.805796][    T1] usbcore: registered new interface driver usbfs
[    1.813876][    T1] usbcore: registered new interface driver hub
[    1.820622][    T1] usbcore: registered new device driver usb
[    1.827614][    T1] mc: Linux media interface: v0.10
[    1.834205][    T1] videodev: Linux video capture interface: v2.00
[    1.841245][    T1] pps_core: LinuxPPS API ver. 1 registered
[    1.846890][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.857893][    T1] PTP clock support registered
[    1.866671][    T1] clocksource: Switched to clocksource armada_370_xp_clocksource
[    3.405366][    T1] VFS: Disk quotas dquot_6.6.0
[    3.410106][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    3.452543][    T1] NET: Registered protocol family 2
[    3.460628][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    3.470085][    T1] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    3.478700][    T1] TCP bind hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    3.486435][    T1] TCP: Hash tables configured (established 2048 bind 2048)
[    3.493755][    T1] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    3.501759][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    3.509019][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    3.516934][    T1] NET: Registered protocol family 1
[    3.522618][    T1] RPC: Registered named UNIX socket transport module.
[    3.529299][    T1] RPC: Registered udp transport module.
[    3.534680][    T1] RPC: Registered tcp transport module.
[    3.540078][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    3.547209][    T1] PCI: CLS 0 bytes, default 64
[    3.552368][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    3.559856][    T1] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    3.571522][    T1] Initialise system trusted keyrings
[    3.579374][    T1] Key type blacklist registered
[    3.584262][    T1] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    3.591625][    T1] zbud: loaded
[    3.596523][    T1] NFS: Registering the id_resolver key type
[    3.602805][    T1] Key type id_resolver registered
[    3.607782][    T1] Key type id_legacy registered
[    3.612522][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    3.620025][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    3.740907][    T1] xor: measuring software checksum speed
[    3.759346][    T1]    arm4regs        :   764 MB/sec
[    3.785748][    T1]    8regs           :   461 MB/sec
[    3.804139][    T1]    32regs          :   740 MB/sec
[    3.809211][    T1] xor: using function: arm4regs (764 MB/sec)
[    3.815028][    T1] async_tx: api initialized (async)
[    3.820112][    T1] Key type asymmetric registered
[    3.824890][    T1] Asymmetric key parser 'x509' registered
[    3.830649][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[    3.839098][    T1] io scheduler bfq registered
[    3.848463][    T1] armada-370-pinctrl d0018000.pin-ctrl: registered pinctrl driver
[    3.866275][    T1] mvebu-pcie soc:pcie@82000000: host bridge /soc/pcie@82000000 ranges:
[    3.875128][    T1] mvebu-pcie soc:pcie@82000000:      MEM 0x00d0040000..0x00d0041fff -> 0x0000040000
[    3.884768][    T1] mvebu-pcie soc:pcie@82000000:      MEM 0x00d0080000..0x00d0081fff -> 0x0000080000
[    3.894141][    T1] mvebu-pcie soc:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    3.903936][    T1] mvebu-pcie soc:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    3.913742][    T1] mvebu-pcie soc:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[    3.923485][    T1] mvebu-pcie soc:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[    3.933774][    T1] mvebu-pcie soc:pcie@82000000: PCI host bridge to bus 0000:00
[    3.941435][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    3.947705][    T1] pci_bus 0000:00: root bus resource [mem 0xd0040000-0xd0041fff] (bus address [0x00040000-0x00041fff])
[    3.958614][    T1] pci_bus 0000:00: root bus resource [mem 0xd0080000-0xd0081fff] (bus address [0x00080000-0x00081fff])
[    3.969494][    T1] pci_bus 0000:00: root bus resource [mem 0xf8000000-0xffdfffff]
[    3.977092][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    3.984170][    T1] pci 0000:00:01.0: [11ab:6707] type 01 class 0x060400
[    3.990954][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    3.999187][    T1] pci 0000:00:02.0: [11ab:6710] type 01 class 0x060400
[    4.005894][    T1] pci 0000:00:02.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    4.015668][    T1] PCI: bus0: Fast back to back transfers disabled
[    4.022462][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    4.031246][    T1] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    4.040399][    T1] pci 0000:01:00.0: [10ec:8176] type 00 class 0x028000
[    4.047390][    T1] pci 0000:01:00.0: reg 0x10: [io  0xffffff00-0xffffffff]
[    4.054358][    T1] pci 0000:01:00.0: reg 0x18: [mem 0x40000000-0x40003fff 64bit]
[    4.062056][    T1] pci 0000:01:00.0: supports D1 D2
[    4.067093][    T1] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    4.158005][    T1] PCI: bus1: Fast back to back transfers disabled
[    4.164273][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    4.173152][    T1] PCI: bus2: Fast back to back transfers enabled
[    4.179595][    T1] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    4.187064][    T1] pci 0000:00:01.0: BAR 14: assigned [mem 0xf8000000-0xf80fffff]
[    4.194613][    T1] pci 0000:00:01.0: BAR 13: assigned [io  0x10000-0x10fff]
[    4.201726][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xf8100000-0xf81007ff pref]
[    4.209676][    T1] pci 0000:00:02.0: BAR 6: assigned [mem 0xf8200000-0xf82007ff pref]
[    4.217616][    T1] pci 0000:01:00.0: BAR 2: assigned [mem 0xf8000000-0xf8003fff 64bit]
[    4.225607][    T1] pci 0000:01:00.0: BAR 0: assigned [io  0x10000-0x100ff]
[    4.232596][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    4.238282][    T1] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    4.245227][    T1] pci 0000:00:01.0:   bridge window [mem 0xf8000000-0xf80fffff]
[    4.252717][    T1] pci 0000:00:02.0: PCI bridge to [bus 02]
[    4.258516][    T1] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    4.266704][    T1] mv_xor d0060800.xor: Marvell shared XOR driver
[    4.328061][    T1] mv_xor d0060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    4.339437][    T1] mv_xor d0060900.xor: Marvell shared XOR driver
[    4.408032][    T1] mv_xor d0060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    4.652150][    T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    4.664804][    T1] printk: console [ttyS0] disabled
[    4.693162][    T1] d0012000.serial: ttyS0 at MMIO 0xd0012000 (irq = 20, base_baud = 12500000) is a 16550A
[    4.703080][    T1] printk: console [ttyS0] enabled
[    4.703080][    T1] printk: console [ttyS0] enabled
[    4.712945][    T1] printk: bootconsole [earlycon0] disabled
[    4.712945][    T1] printk: bootconsole [earlycon0] disabled
[    4.731609][    T1] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    4.738825][    T1] nand: Hynix H27U1G8F2BTR-BC
[    4.743390][    T1] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    4.752512][    T1] Bad block table found at page 65472, version 0x01
[    4.760351][    T1] Bad block table found at page 65408, version 0x01
[    4.767433][    T1] nand_bbt: ECC error in BBT at 0x000007fe0000
[    4.774012][    T1] nand_bbt: ECC error in BBT at 0x000007fc0000
[    4.780123][    T1] Scanning device for bad blocks
[    5.333275][    T1] Bad block table written to 0x000007fe0000, version 0x01
[    5.341556][    T1] Bad block table written to 0x000007fc0000, version 0x01
[    5.348628][    T1] 3 cmdlinepart partitions found on MTD device pxa3xx_nand-0
[    5.355892][    T1] Creating 3 MTD partitions on "pxa3xx_nand-0":
[    5.362048][    T1] 0x000000000000-0x000000400000 : "u-boot"
[    5.369881][    T1] 0x000000400000-0x000000800000 : "linux"
[    5.378701][    T1] 0x000000800000-0x000008000000 : "filesystem"
[    5.389661][    T1] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    5.400495][    T1] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    5.414187][    T1] libphy: Fixed MDIO Bus: probed
[    5.426251][    T1] libphy: orion_mdio_bus: probed
[    5.436251][    T1] mdio_bus d0072004.mdio-mii: MDIO device at address 1 is missing.
[    5.450058][    T1] mvneta d0070000.ethernet eth0: Using random mac address ee:b7:a9:98:73:56
[    5.463985][    T1] mvneta d0074000.ethernet eth1: Using random mac address 82:7f:2d:1e:27:dd
[    5.475993][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.484762][    T1] ehci-pci: EHCI PCI platform driver
[    5.490398][    T1] ehci-orion: EHCI orion driver
[    5.495355][    T1] orion-ehci d0050000.usb: EHCI Host Controller
[    5.501973][    T1] orion-ehci d0050000.usb: new USB bus registered, assigned bus number 1
[    5.510557][    T1] orion-ehci d0050000.usb: irq 26, io mem 0xd0050000
[    5.546711][    T1] orion-ehci d0050000.usb: USB 2.0 started, EHCI 1.00
[    5.553656][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    5.562725][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.570717][    T1] usb usb1: Product: EHCI Host Controller
[    5.576325][    T1] usb usb1: Manufacturer: Linux 5.10.7-mvebu-370xp-tld-1 ehci_hcd
[    5.584042][    T1] usb usb1: SerialNumber: d0050000.usb
[    5.590393][    T1] hub 1-0:1.0: USB hub found
[    5.595416][    T1] hub 1-0:1.0: 1 port detected
[    5.601181][    T1] orion-ehci d0051000.usb: EHCI Host Controller
[    5.608112][    T1] orion-ehci d0051000.usb: new USB bus registered, assigned bus number 2
[    5.616577][    T1] orion-ehci d0051000.usb: irq 27, io mem 0xd0051000
[    5.646709][    T1] orion-ehci d0051000.usb: USB 2.0 started, EHCI 1.00
[    5.653660][    T1] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    5.662727][    T1] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.670719][    T1] usb usb2: Product: EHCI Host Controller
[    5.676328][    T1] usb usb2: Manufacturer: Linux 5.10.7-mvebu-370xp-tld-1 ehci_hcd
[    5.684046][    T1] usb usb2: SerialNumber: d0051000.usb
[    5.690369][    T1] hub 2-0:1.0: USB hub found
[    5.695380][    T1] hub 2-0:1.0: 1 port detected
[    5.701989][    T1] usbcore: registered new interface driver usblp
[    5.710123][    T1] usbcore: registered new interface driver usb-storage
[    5.717986][    T1] mousedev: PS/2 mouse device common for all mice
[    6.746700][    T1] rtc-mv d0010300.rtc: internal RTC not ticking
[    6.753467][    T1] i2c /dev entries driver
[    6.759835][    T1] pca953x 0-0025: supply vcc not found, using dummy regulator
[    6.768402][    T1] pca953x 0-0025: using AI
[    6.773012][    T1] pca953x 0-0025: failed writing register
[    6.808300][    T1] orion_wdt: Initial timeout 258 sec
[    6.815842][    T1] device-mapper: uevent: version 1.0.3
[    6.821991][    T1] device-mapper: ioctl: 4.43.0-ioctl (2020-10-01) initialised: dm-devel@redhat.com
[    6.831906][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[    6.839391][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[    6.846830][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[    6.854236][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[    6.861126][    T1] device-mapper: raid: Loading target version 1.15.1
[    6.874030][    T1] marvell-cesa d0090000.crypto: CESA device successfully registered
[    6.882774][    T1] hid: raw HID events driver (C) Jiri Kosina
[    6.890522][    T1] usbcore: registered new interface driver usbhid
[    6.897892][    T1] usbhid: USB HID core driver
[    6.903100][    T1] drop_monitor: Initializing network drop monitor service
[    6.911459][    T1] NET: Registered protocol family 10
[    6.918385][    T1] Segment Routing with IPv6
[    6.922783][    T1] RPL Segment Routing with IPv6
[    6.927802][    T1] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    6.936505][    T1] NET: Registered protocol family 17
[    6.942847][    T1] 8021q: 802.1Q VLAN Support v1.8
[    6.947923][    T1] Key type dns_resolver registered
[    6.953190][    T1] ThumbEE CPU extension supported.
[    6.958292][    T1] Registering SWP/SWPB emulation handler
[    6.964246][    T1] registered taskstats version 1
[    6.969470][    T1] Loading compiled-in X.509 certificates
[    6.975120][    T1] zswap: loaded using pool lzo/zbud
[    6.980681][    T1] Key type ._fscrypt registered
[    6.985426][    T1] Key type .fscrypt registered
[    6.990181][    T1] Key type fscrypt-provisioning registered
[    6.997769][    T1] Key type big_key registered
[    7.003420][    T1] Key type encrypted registered
[    7.012283][    T1] Waiting 10 sec before mounting root device...
[   17.146696][    T1] md: Waiting for all devices to be available before autodetect
[   17.154234][    T1] md: If you don't use raid, use raid=noautodetect
[   17.160644][    T1] md: Autodetecting RAID arrays.
[   17.165465][    T1] md: autorun ...
[   17.168991][    T1] md: ... autorun DONE.
[   17.173283][    T1] VFS: Cannot open root device "sda1" or unknown-block(0,0): error -6
[   17.181397][    T1] Please append a correct "root=" boot option; here are the available partitions:
[   17.190543][    T1] 1f00            4096 mtdblock0 
[   17.190549][    T1]  (driver?)
[   17.198559][    T1] 1f01            4096 mtdblock1 
[   17.198564][    T1]  (driver?)
[   17.206544][    T1] 1f02          122880 mtdblock2 
[   17.206549][    T1]  (driver?)
[   17.214544][    T1] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[   17.223556][    T1] CPU: 0 PID: 1 Comm: swapper Not tainted 5.10.7-mvebu-370xp-tld-1 #1.0
[   17.231775][    T1] Hardware name: Marvell Armada 370/XP (Device Tree)
[   17.238367][    T1] [<c0113940>] (unwind_backtrace) from [<c0110000>] (show_stack+0x10/0x14)
[   17.246864][    T1] [<c0110000>] (show_stack) from [<c0acc4e8>] (panic+0xf8/0x304)
[   17.254492][    T1] [<c0acc4e8>] (panic) from [<c0f0197c>] (mount_block_root+0x198/0x238)
[   17.262723][    T1] [<c0f0197c>] (mount_block_root) from [<c0f01b0c>] (mount_root+0xf0/0x11c)
[   17.271302][    T1] [<c0f01b0c>] (mount_root) from [<c0f01c7c>] (prepare_namespace+0x144/0x180)
[   17.280055][    T1] [<c0f01c7c>] (prepare_namespace) from [<c0f014f0>] (kernel_init_freeable+0x16c/0x1e8)
[   17.289679][    T1] [<c0f014f0>] (kernel_init_freeable) from [<c0ad2b10>] (kernel_init+0x8/0x118)
[   17.298604][    T1] [<c0ad2b10>] (kernel_init) from [<c0100148>] (ret_from_fork+0x14/0x2c)
[   17.306912][    T1] Exception stack(0xc1891fb0 to 0xc1891ff8)
[   17.312694][    T1] 1fa0:                                     00000000 00000000 00000000 00000000
[   17.321618][    T1] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   17.330539][    T1] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[   17.337898][    T1] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

Bootlog of rn102 uImage:

Shuttle>> setenv bootargs console=ttyS0,115200 root=/dev/sda2 rootdelay=10 mtdparts=pxa3xx_nand-0:4M(u-boot),4M(linux),-(filesystem) earlyprintk=serial
Shuttle>> ide reset

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found
  Device 0 @ 0 0:
Model: FUJITSU MHY2160BH                        Firm: 0040020B Ser#:         K428T7C2AEA6
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 152627.8 MB = 149.0 GB (312581808 x 512)

Shuttle>> ext2load ide 0:1 0x02000000 uImage
Loading file "uImage" from ide device 0:1 (hda1)
5021086 bytes read
Shuttle>> bootm
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-5.10.7-mvebu-370xp-tld-1
   Created:      2022-01-13  20:34:45 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5021022 Bytes =  4.8 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.10.7-mvebu-370xp-tld-1 (root@tldDebianVM) (arm-linux-gnueabihf-gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0, GNU ld (GNU Binutils for Ubuntu) 2.30) #1.0 PREEMPT Sat Jan 30 15:22:18 PST 2021
[    0.000000][    T0] CPU: ARMv7 Processor [561f5811] revision 1 (ARMv7), cr=10c5387d
[    0.000000][    T0] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000][    T0] OF: fdt: Machine model: NETGEAR ReadyNAS 102
[    0.000000][    T0] printk: bootconsole [earlycon0] enabled
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] Zone ranges:
[    0.000000][    T0]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0]   HighMem  empty
[    0.000000][    T0] Movable zone start for each node
[    0.000000][    T0] Early memory node ranges
[    0.000000][    T0]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0] CPU: All CPU(s) started in SVC mode.
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 65024
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=/dev/sda2 rootdelay=10 mtdparts=pxa3xx_nand-0:4M(u-boot),4M(linux),-(filesystem) earlyprintk=serial
[    0.000000][    T0] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000][    T0] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000][    T0] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000][    T0] Memory: 242548K/262144K available (10240K kernel code, 1479K rwdata, 3000K rodata, 1024K init, 362K bss, 19596K reserved, 0K cma-reserved, 0K highmem)
[    0.000000][    T0] random: get_random_u32 called from ____cache_alloc+0x2ec/0x790 with crng_init=0
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0] 	Trampoline variant of Tasks RCU enabled.
[    0.000000][    T0] 	Tracing variant of Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] L2C: DT/platform modifies aux control register: 0x12086302 -> 0x1a086302
[    0.000000][    T0] Aurora cache controller enabled, 4 ways, 256 kB
[    0.000000][    T0] Aurora: CACHE_ID 0x00000100, AUX_CTRL 0x1a086302
[    0.000000][    T0] Switching to timer-based delay loop, resolution 60ns
[    0.000009][    T0] sched_clock: 32 bits at 16MHz, resolution 60ns, wraps every 129195984865ns
[    0.008597][    T0] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 114984426661 ns
[    0.021140][    T0] Console: colour dummy device 80x30
[    0.026296][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 33.24 BogoMIPS (lpj=166219)
[    0.037341][    T0] pid_max: default: 32768 minimum: 301
[    0.042954][    T0] LSM: Security Framework initializing
[    0.048354][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.056351][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.065865][    T0] CPU: Testing write buffer coherency: ok
[    0.072368][    T1] Setting up static identity map for 0x100000 - 0x100060
[    0.079656][    T1] mvebu-soc-id: MVEBU SoC ID=0x6707, Rev=0x1
[    0.085669][    T1] mvebu-pmsu: Initializing Power Management Service Unit
[    0.092698][    T1] rcu: Hierarchical SRCU implementation.
[    0.099257][    T1] devtmpfs: initialized
[    0.108537][    T1] VFP support v0.3: implementor 56 architecture 2 part 20 variant 9 rev 6
[    0.117749][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.128591][    T1] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.172483][    T1] prandom32: self test passed (less than 6 bits correlated)
[    0.179605][    T1] prandom: seed boundary self test passed
[    0.189164][    T1] prandom: 100 self tests passed
[    0.193974][    T1] pinctrl core: initialized pinctrl subsystem
[    0.202010][    T1] NET: Registered protocol family 16
[    0.207908][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.217898][    T1] audit: initializing netlink subsys (disabled)
[    0.226808][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    0.227035][    T1] cpuidle: using governor ladder
[    0.238602][   T27] audit: type=2000 audit(0.200:1): state=initialized audit_enabled=0 res=1
[    0.250350][    T1] cpuidle: using governor menu
[    0.255220][    T1] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.261959][    T1] mvebu-pmsu: CPU idle is currently broken: disabling
[    0.581244][    T1] raid6: int32x8  gen()   142 MB/s
[    0.750477][    T1] raid6: int32x8  xor()    90 MB/s
[    0.920425][    T1] raid6: int32x4  gen()   149 MB/s
[    1.090310][    T1] raid6: int32x4  xor()   100 MB/s
[    1.260326][    T1] raid6: int32x2  gen()   275 MB/s
[    1.430296][    T1] raid6: int32x2  xor()   144 MB/s
[    1.600250][    T1] raid6: int32x1  gen()   286 MB/s
[    1.770319][    T1] raid6: int32x1  xor()   133 MB/s
[    1.775267][    T1] raid6: using algorithm int32x1 gen() 286 MB/s
[    1.781348][    T1] raid6: .... xor() 133 MB/s, rmw enabled
[    1.786899][    T1] raid6: using intx1 recovery algorithm
[    1.793536][    T1] vgaarb: loaded
[    1.799411][    T1] SCSI subsystem initialized
[    1.805782][    T1] usbcore: registered new interface driver usbfs
[    1.813860][    T1] usbcore: registered new interface driver hub
[    1.820583][    T1] usbcore: registered new device driver usb
[    1.827568][    T1] mc: Linux media interface: v0.10
[    1.834162][    T1] videodev: Linux video capture interface: v2.00
[    1.841217][    T1] pps_core: LinuxPPS API ver. 1 registered
[    1.846863][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.857879][    T1] PTP clock support registered
[    1.866631][    T1] clocksource: Switched to clocksource armada_370_xp_clocksource
[    3.405232][    T1] VFS: Disk quotas dquot_6.6.0
[    3.409973][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    3.452403][    T1] NET: Registered protocol family 2
[    3.460437][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    3.469890][    T1] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    3.478499][    T1] TCP bind hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    3.486232][    T1] TCP: Hash tables configured (established 2048 bind 2048)
[    3.493554][    T1] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    3.501577][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    3.508839][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    3.516754][    T1] NET: Registered protocol family 1
[    3.522430][    T1] RPC: Registered named UNIX socket transport module.
[    3.529108][    T1] RPC: Registered udp transport module.
[    3.534489][    T1] RPC: Registered tcp transport module.
[    3.539886][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    3.547016][    T1] PCI: CLS 0 bytes, default 64
[    3.552177][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    3.559666][    T1] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    3.571332][    T1] Initialise system trusted keyrings
[    3.576506][    T1] Key type blacklist registered
[    3.584059][    T1] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    3.591431][    T1] zbud: loaded
[    3.596323][    T1] NFS: Registering the id_resolver key type
[    3.602606][    T1] Key type id_resolver registered
[    3.607585][    T1] Key type id_legacy registered
[    3.612339][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    3.619841][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    3.736754][    T1] xor: measuring software checksum speed
[    3.755175][    T1]    arm4regs        :   764 MB/sec
[    3.781624][    T1]    8regs           :   461 MB/sec
[    3.800005][    T1]    32regs          :   740 MB/sec
[    3.805040][    T1] xor: using function: arm4regs (764 MB/sec)
[    3.810898][    T1] async_tx: api initialized (async)
[    3.815942][    T1] Key type asymmetric registered
[    3.820758][    T1] Asymmetric key parser 'x509' registered
[    3.826476][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[    3.834911][    T1] io scheduler bfq registered
[    3.842411][    T1] armada-370-pinctrl d0018000.pin-ctrl: registered pinctrl driver
[    3.861759][    T1] mvebu-pcie soc:pcie@82000000: host bridge /soc/pcie@82000000 ranges:
[    3.870797][    T1] mvebu-pcie soc:pcie@82000000:      MEM 0x00d0040000..0x00d0041fff -> 0x0000040000
[    3.880427][    T1] mvebu-pcie soc:pcie@82000000:      MEM 0x00d0080000..0x00d0081fff -> 0x0000080000
[    3.889815][    T1] mvebu-pcie soc:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    3.899589][    T1] mvebu-pcie soc:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    3.909364][    T1] mvebu-pcie soc:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[    3.919123][    T1] mvebu-pcie soc:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[    3.929408][    T1] mvebu-pcie soc:pcie@82000000: PCI host bridge to bus 0000:00
[    3.937064][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    3.943234][    T1] pci_bus 0000:00: root bus resource [mem 0xd0040000-0xd0041fff] (bus address [0x00040000-0x00041fff])
[    3.954162][    T1] pci_bus 0000:00: root bus resource [mem 0xd0080000-0xd0081fff] (bus address [0x00080000-0x00081fff])
[    3.965067][    T1] pci_bus 0000:00: root bus resource [mem 0xf8000000-0xffdfffff]
[    3.972662][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    3.979790][    T1] pci 0000:00:01.0: [11ab:6707] type 01 class 0x060400
[    3.986494][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    3.994764][    T1] pci 0000:00:02.0: [11ab:6710] type 01 class 0x060400
[    4.001998][    T1] pci 0000:00:02.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    4.011469][    T1] PCI: bus0: Fast back to back transfers disabled
[    4.018296][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    4.027121][    T1] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    4.036171][    T1] pci 0000:01:00.0: [10ec:8176] type 00 class 0x028000
[    4.043241][    T1] pci 0000:01:00.0: reg 0x10: [io  0xffffff00-0xffffffff]
[    4.050309][    T1] pci 0000:01:00.0: reg 0x18: [mem 0x40000000-0x40003fff 64bit]
[    4.057987][    T1] pci 0000:01:00.0: supports D1 D2
[    4.062941][    T1] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    4.098108][    T1] PCI: bus1: Fast back to back transfers enabled
[    4.104290][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    4.113313][    T1] PCI: bus2: Fast back to back transfers enabled
[    4.119783][    T1] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    4.127253][    T1] pci 0000:00:01.0: BAR 14: assigned [mem 0xf8000000-0xf80fffff]
[    4.134801][    T1] pci 0000:00:01.0: BAR 13: assigned [io  0x10000-0x10fff]
[    4.141917][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xf8100000-0xf81007ff pref]
[    4.149865][    T1] pci 0000:00:02.0: BAR 6: assigned [mem 0xf8200000-0xf82007ff pref]
[    4.157804][    T1] pci 0000:01:00.0: BAR 2: assigned [mem 0xf8000000-0xf8003fff 64bit]
[    4.165795][    T1] pci 0000:01:00.0: BAR 0: assigned [io  0x10000-0x100ff]
[    4.172785][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    4.178472][    T1] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    4.185417][    T1] pci 0000:00:01.0:   bridge window [mem 0xf8000000-0xf80fffff]
[    4.192906][    T1] pci 0000:00:02.0: PCI bridge to [bus 02]
[    4.198705][    T1] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    4.206877][    T1] mv_xor d0060800.xor: Marvell shared XOR driver
[    4.268026][    T1] mv_xor d0060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    4.279377][    T1] mv_xor d0060900.xor: Marvell shared XOR driver
[    4.348007][    T1] mv_xor d0060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    4.594647][    T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    4.609473][    T1] printk: console [ttyS0] disabled
[    4.637757][    T1] d0012000.serial: ttyS0 at MMIO 0xd0012000 (irq = 19, base_baud = 12500000) is a 16550A
[    4.647666][    T1] printk: console [ttyS0] enabled
[    4.647666][    T1] printk: console [ttyS0] enabled
[    4.657607][    T1] printk: bootconsole [earlycon0] disabled
[    4.657607][    T1] printk: bootconsole [earlycon0] disabled
[    4.672050][    T1] sata_mv d00a0000.sata: slots 32 ports 1
[    4.682614][    T1] scsi host0: sata_mv
[    4.687460][    T1] ata1: SATA max UDMA/133 irq 27
[    4.694153][    T1] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    4.702901][    T1] nand: Hynix H27U1G8F2BTR-BC
[    4.707813][    T1] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    4.716617][    T1] Bad block table found at page 65472, version 0x01
[    4.723882][    T1] Bad block table found at page 65408, version 0x01
[    4.730783][    T1] 3 cmdlinepart partitions found on MTD device pxa3xx_nand-0
[    4.738096][    T1] Creating 3 MTD partitions on "pxa3xx_nand-0":
[    4.744233][    T1] 0x000000000000-0x000000400000 : "u-boot"
[    4.752085][    T1] 0x000000400000-0x000000800000 : "linux"
[    4.760874][    T1] 0x000000800000-0x000008000000 : "filesystem"
[    4.771793][    T1] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    4.782548][    T1] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    4.796345][    T1] libphy: Fixed MDIO Bus: probed
[    4.808618][    T1] libphy: orion_mdio_bus: probed
[    4.822220][    T1] mvneta d0074000.ethernet eth0: Using random mac address 5a:41:8e:c1:e2:b7
[    4.835833][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.844536][    T1] ehci-pci: EHCI PCI platform driver
[    4.850222][    T1] ehci-orion: EHCI orion driver
[    4.855177][    T1] orion-ehci d0050000.usb: EHCI Host Controller
[    4.861815][    T1] orion-ehci d0050000.usb: new USB bus registered, assigned bus number 1
[    4.870395][    T1] orion-ehci d0050000.usb: irq 25, io mem 0xd0050000
[    4.906691][    T1] orion-ehci d0050000.usb: USB 2.0 started, EHCI 1.00
[    4.913659][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    4.922739][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.930753][    T1] usb usb1: Product: EHCI Host Controller
[    4.936385][    T1] usb usb1: Manufacturer: Linux 5.10.7-mvebu-370xp-tld-1 ehci_hcd
[    4.944120][    T1] usb usb1: SerialNumber: d0050000.usb
[    4.950500][    T1] hub 1-0:1.0: USB hub found
[    4.955565][    T1] hub 1-0:1.0: 1 port detected
[    4.962134][    T1] usbcore: registered new interface driver usblp
[    4.970117][    T1] usbcore: registered new interface driver usb-storage
[    4.978008][    T1] mousedev: PS/2 mouse device common for all mice
[    4.986329][    T1] i2c /dev entries driver
[    5.028289][    T1] orion_wdt: Initial timeout 258 sec
[    5.035634][    T1] device-mapper: uevent: version 1.0.3
[    5.041965][    T1] device-mapper: ioctl: 4.43.0-ioctl (2020-10-01) initialised: dm-devel@redhat.com
[    5.052003][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[    5.059423][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[    5.067268][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[    5.074679][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[    5.081576][    T1] device-mapper: raid: Loading target version 1.15.1
[    5.096101][    T1] marvell-cesa d0090000.crypto: CESA device successfully registered
[    5.104868][    T1] hid: raw HID events driver (C) Jiri Kosina
[    5.112607][    T1] usbcore: registered new interface driver usbhid
[    5.120026][    T1] usbhid: USB HID core driver
[    5.125222][    T1] drop_monitor: Initializing network drop monitor service
[    5.133593][    T1] NET: Registered protocol family 10
[    5.140320][    T1] Segment Routing with IPv6
[    5.144717][    T1] RPL Segment Routing with IPv6
[    5.149812][    T1] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    5.158648][    T1] NET: Registered protocol family 17
[    5.164873][    T1] 8021q: 802.1Q VLAN Support v1.8
[    5.169938][    T1] Key type dns_resolver registered
[    5.175204][    T1] ThumbEE CPU extension supported.
[    5.180305][    T1] Registering SWP/SWPB emulation handler
[    5.186274][    T1] registered taskstats version 1
[    5.191250][ T1211] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl F300)
[    5.198607][    T1] Loading compiled-in X.509 certificates
[    5.204257][    T1] zswap: loaded using pool lzo/zbud
[    5.209982][    T1] Key type ._fscrypt registered
[    5.215025][    T1] Key type .fscrypt registered
[    5.219834][ T1211] ata1.00: ATA-8: FUJITSU MHY2160BH, 0040020B, max UDMA/100
[    5.227081][    T1] Key type fscrypt-provisioning registered
[    5.234644][    T1] Key type big_key registered
[    5.239310][ T1211] ata1.00: 312581808 sectors, multi 16: LBA48 NCQ (depth 31/32)
[    5.248152][    T1] Key type encrypted registered
[    5.257623][ T1211] ata1.00: configured for UDMA/100
[    5.262973][    T1] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    5.273215][    T7] scsi 0:0:0:0: Direct-Access     ATA      FUJITSU MHY2160B 020B PQ: 0 ANSI: 5
[    5.282400][    T1] Waiting 10 sec before mounting root device...
[    5.291197][ T1216] sd 0:0:0:0: [sda] 312581808 512-byte logical blocks: (160 GB/149 GiB)
[    5.301225][ T1216] sd 0:0:0:0: [sda] Write Protect is off
[    5.307022][ T1216] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    5.405695][ T1216]  sda: sda1 sda2
[    5.411389][ T1216] sd 0:0:0:0: [sda] Attached SCSI disk
[   15.866656][    T1] md: Waiting for all devices to be available before autodetect
[   15.874195][    T1] md: If you don't use raid, use raid=noautodetect
[   15.880606][    T1] md: Autodetecting RAID arrays.
[   15.885426][    T1] md: autorun ...
[   15.888953][    T1] md: ... autorun DONE.
[   16.067237][    T1] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[   16.075718][    T1] VFS: Mounted root (ext4 filesystem) readonly on device 8:2.
[   16.120940][    T1] devtmpfs: mounted
[   16.127745][    T1] Freeing unused kernel memory: 1024K
[   16.135578][    T1] Checked W+X mappings: passed, no W+X pages found
[   16.142011][    T1] Run /sbin/init as init process
INIT: version 2.96 booting
Using makefile-style concurrent boot in runlevel S.
Files under mount point '/run' will be hidden. ... (warning).
[   18.690644][    C0] random: fast init done
Starting hotplug events dispatcher: systemd-udevd.
Synthesizing the initial hotplug events (subsystems)...done.
Synthesizing the initial hotplug events (devices)...done.
Waiting for /dev to be fully populated...done.
Setting hostname to 'debian'...done.
Activating swap:.
[   24.625699][ T1707] EXT4-fs (sda2): re-mounted. Opts: (null)
Will now check root file system:[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -y -C0 /dev/sda2 
e2fsck 1.46.2 (28-Feb-2021)
rootfs: clean, 22097/9707520 files, 1078979/38810326 blocks
.
[   25.456986][ T1719] EXT4-fs (sda2): re-mounted. Opts: errors=remount-ro
Will now check all file systems.
Checking all file systems.
LABEL=rootfs is mounted
Done checking file systems.
Log is being saved in /var/log/fsck/checkfs if that location is writable.
Cleaning up temporary files...
Cleaning /tmp...done.
 /tmp.
Will now mount local filesystems:.
Will now activate swapfile swap, if any:done.
Checking minimum space in /tmp...done.
Cleaning up temporary files....
Starting Setting kernel variables: sysctl.
[   27.708686][ T2099] random: dd: uninitialized urandom read (512 bytes read)
Initializing random number generator...done.
[   28.279004][    C0] random: crng init done
[   28.486098][ T2135] mvneta d0074000.ethernet eth0: PHY [d0072004.mdio-mii:00] driver [Marvell 88E1510] (irq=POLL)
[   28.502948][ T2135] mvneta d0074000.ethernet eth0: configuring for phy/rgmii-id link mode
Configuring network interfaces...Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/c2:90:9a:b0:fd:d6
Sending on   LPF/eth0/c2:90:9a:b0:fd:d6
Sending on   Socket/fallback
DHCPREQUEST for 192.168.0.18 on eth0 to 255.255.255.255 port 67
DHCPREQUEST for 192.168.0.18 on eth0 to 255.255.255.255 port 67
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 18
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13
No DHCPOFFERS received.
Trying recorded lease 192.168.0.18
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.

--- 192.168.0.1 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

No working leases in persistent database - sleeping.
done.
Starting RPC port mapper daemon: rpcbind.
Starting NFS common utilities: statd idmapd.
Cleaning up temporary files....
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
Not starting NFS kernel daemon: no exports. ... (warning).
Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
2277 (syslogd)
.
Starting periodic command scheduler: cron.
Starting system message bus: dbus.
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Starting NTP server: ntpd.
Starting OpenBSD Secure Shell server: sshd.
Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
2305 (klogd)
.
Running local boot scripts (/etc/rc.local)
Cannot read environment, using default
Cannot read default environment from file
<13>Dec 31 16:01:59 root[2406]: 
Cannot read u-boot env ethaddr

.

Debian GNU/Linux 11 debian ttyS0

debian login: root
Password: 
Linux debian 5.10.7-mvebu-370xp-tld-1 #1.0 PREEMPT Sat Jan 30 15:22:18 PST 2021 armv7l

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.
Last login: Wed Dec 31 16:02:08 PST 1969 on ttyS0
debian
NETGEAR ReadyNAS 102
Linux version 5.10.7-mvebu-370xp-tld-1 (root@tldDebianVM) (arm-linux-gnueabihf-gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0, GNU ld (GNU Binutils for Ubuntu) 2.30) #1.0 PREEMPT Sat Jan 30 15:22:18 PST 2021
Debian 11.0
Wed Dec 31 16:02:17 PST 1969 up 2 minutes
root@debian:~#

Quote

That would explain why it works for Armada 38x and later MVEBU SoCs in general. The correct mapped address in Armada 38x boxes u-boot and their DTS mbus address are in sync. And there is no UART address in conflict.

That is clear, but why doesn't it boot my box? The mirabox dts should be ok.

Quote

If KD20 and KD22 are the same then it is a totally different box. It use OXAS CPU.

Nah, it's a totally different box. I can't upload images?
https://cdn2.nextinpact.com/images/bd/news/146562.png

Quote

Network chip is definitely not the same as Minrabox or RN102/104.

That looks funny. If it's indeed an Intel, then how could it detect the network cable? I tried to find which driver is used on stock, but the shell is rather limited (had to add an init=/bin/sh to bootargs as I don't know the login) and found this:

/sys/class/net # ls -l
lrwxrwxrwx    1 root     root             0 Jan 14 17:35 eth0 -> ../../devices/platform/mv88fx_neta.0/net/eth0

I'm not sure, but I suppose that means its a marvel.

This box also has wifi, which didn't show up in /sys/class/net, so I searched for a module, and I found an rtl8192cd.ko. Loading is gave this:

/lib/modules # insmod rtl8192cd.ko 
[  446.662107] RTL8192C/RTL8188C driver version 1.6 (2011-07-18/2012-03-26)
[  446.668911] =====>>INSIDE rtl8192cd_init_one <<=====
[  446.674383] PCI: enabling device 0000:00:01.0 (0146 -> 0147)
[  446.687598] correcting to 32
[  446.692124] =====>>EXIT rtl8192cd_init_one <<=====
[  446.696935] =====>>INSIDE rtl8192cd_init_one <<=====
[  446.704592] =====>>EXIT rtl8192cd_init_one <<=====
[  446.709408] =====>>INSIDE rtl8192cd_init_one <<=====
[  446.727665] =====>>EXIT rtl8192cd_init_one <<=====
[  446.732510] =====>>INSIDE rtl8192cd_init_one <<=====
[  446.763553] =====>>EXIT rtl8192cd_init_one <<=====
[  446.768372] =====>>INSIDE rtl8192cd_init_one <<=====
[  446.776011] =====>>EXIT rtl8192cd_init_one <<=====
/lib/modules # ls -l /sys/class/net
lrwxrwxrwx    1 root     root             0 Jan 14 17:35 eth0 -> ../../devices/platform/mv88fx_neta.0/net/eth0
lrwxrwxrwx    1 root     root             0 Jan 14 17:35 lo -> ../../devices/virtual/net/lo
lrwxrwxrwx    1 root     root             0 Jan 14 17:35 sit0 -> ../../devices/virtual/net/sit0
lrwxrwxrwx    1 root     root             0 Jan 14 17:43 wlan0 -> ../../devices/virtual/net/wlan0
lrwxrwxrwx    1 root     root             0 Jan 14 17:43 wlan0-va0 -> ../../devices/virtual/net/wlan0-va0
lrwxrwxrwx    1 root     root             0 Jan 14 17:43 wlan0-va1 -> ../../devices/virtual/net/wlan0-va1
lrwxrwxrwx    1 root     root             0 Jan 14 17:43 wlan0-va2 -> ../../devices/virtual/net/wlan0-va2
lrwxrwxrwx    1 root     root             0 Jan 14 17:43 wlan0-va3 -> ../../devices/virtual/net/wlan0-va3

Ehm
Re: Shuttle KS10
January 14, 2022 05:04PM
> a kernel panic on the rn104, maybe because
> there is no initramfs,

Right!

> so I specified the
> partition)

Quote

[ 17.173283][ T1] VFS: Cannot open root device "sda1" or unknown-block(0,0): error -6

Yes. But there is no SATA in the Mirabox DTS, so there is no /dev/sda1.

> Bootlog of rn102 uImage:

There is SATA definition in the RN102 DTS, so /dev/sda2 exists.

> No DHCPOFFERS received.

So probably the network chip does not work.

> That is clear, but why doesn't it boot my box? The
> mirabox dts should be ok.

If you had booted with the kernel uImage on USB rootfs (if USB is available in stock u-boot), or boot the kernel uImage with tftp, and mount USB rootfs, then it would work with the Mirabox DTS. But not SATA, it does not exist in the Mirabox.

To prove this, you could have both HDD and USB rootfs. And boot with the kernels on HDD like you did. During rootfs mounting, the kernel will find the /dev/sda1 to be USB and it will mount that rootfs.

> If it's indeed an Intel, then
> how could it detect the network cable? I tried to
> find which driver is used on stock,

No idea why the stock boot log shows only the Intel NIC.


> This box also has wifi, which didn't show up in
> /sys/class/net, so I searched for a module, and I
> found an rtl8192cd.ko. Loading is gave this:
>

Cool! so at least you know Wifi works.

=====

OK! do you have a plan to create a new DTS for this box? If you don't, I think perhaps it is best that I created a new DTS using Mirabox as a base.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Shuttle KS10
January 15, 2022 03:08AM
Quote

> That is clear, but why doesn't it boot my box? The
> mirabox dts should be ok.

If you had booted with the kernel uImage on USB rootfs (if USB is available in stock u-boot), or boot the kernel uImage with tftp, and mount USB rootfs, then it would work with the Mirabox DTS. But not SATA, it does not exist in the Mirabox.

Here I was talking about the OpenWrt Mirabox uImage, which doesn't give any output after 'Starting kernel ...'. Maybe it boots silent, but I couldn't find any proof for that. Your Mirabox uImage boots, but ends in a kernel panic, due to no rootfs, which in my opinion counts as 'boots'. Maybe I should be more verbose about which kernel mean.

About dts, I was planning to take the mirabox dts and rn102 dts and combine them, (sata + network), then try to find the digio by trial and error (is that dangerous? What if I set an output high as it actually is a closed input?) but first I need to find out if the Mirabox image has a working network. I'll try an USB rootfs.
Re: Shuttle KS10
January 15, 2022 03:58AM
> Here I was talking about the OpenWrt Mirabox
> uImage, which doesn't give any output after
> 'Starting kernel ...'. Maybe it boots silent, but
> I couldn't find any proof for that. Your Mirabox
> uImage boots, but ends in a kernel panic, due to
> no rootfs, which in my opinion counts as 'boots'.
> Maybe I should be more verbose about which kernel
> mean.

I see. That's is still a mystery. The problem is that by avoiding the address conflict, UART address was not specified, and earlyprintk was not enabled in OpenWrt config. So we cannot see what's going on during that time, i.e. is there more than "Starting kernel ..."? usually you would see a "Data Abort..." error, and would recognize that there is some address or architecture conflicts. Or the kernel has booted further to the point of kernel panic due to no rootfs, but there is no way to see that without earlyprintk. IOW, the log buffer might be gone too quickly.

That was the main reason I don't want to give up earlyprintk.

> About dts, I was planning to take the mirabox dts
> and rn102 dts and combine them, (sata + network),

Yes. That should do it.

> then try to find the digio by trial and error (is
> that dangerous?

Not dangerous if you don't have anything to loose in the HDD or USB rootfs. Poking GPIO does not cause any ireversible HW error. Just potentially crash the rootfs, so I would use a test rootfs, or a real one with nothing important on it.

> What if I set an output high as it
> actually is a closed input?)

Not a problem, IMO. But as always, there is a small unknown risk that we take in hacking.

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



Edited 1 time(s). Last edit at 01/15/2022 04:23AM by bodhi.
Re: Shuttle KS10
January 15, 2022 05:18AM
Booted the bodhi Mirabox uImage with the rootfs on flash, and I can confirm the network port works then.

Further there was some scaring log:

Will now check all file systems.
Checking all file systems.
LABEL=rootfs2 is mounted
Done checking file systems.
Log is being saved in /var/log/fsck/checkfs if that location is writable.
Cleaning up temporary files...Cleaning /tmp...done.
 /tmp.
[   24.957573][    C0] random: crng init done
[   24.990557][ T2021] blk_update_request: I/O error, dev mtdblock0, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
[   25.002799][ T2021] blk_update_request: I/O error, dev mtdblock0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[   25.013990][ T2021] Buffer I/O error on dev mtdblock0, logical block 0, async page read
[   25.022634][ T2021] blk_update_request: I/O error, dev mtdblock0, sector 1 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[   25.033763][ T2021] Buffer I/O error on dev mtdblock0, logical block 1, async page read
[   25.042391][ T2021] blk_update_request: I/O error, dev mtdblock0, sector 2 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[   25.053517][ T2021] Buffer I/O error on dev mtdblock0, logical block 2, async page read
[   25.062148][ T2021] blk_update_request: I/O error, dev mtdblock0, sector 3 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[   25.073274][ T2021] Buffer I/O error on dev mtdblock0, logical block 3, async page read
[   25.081897][ T2021] blk_update_request: I/O error, dev mtdblock0, sector 4 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[   25.093022][ T2021] Buffer I/O error on dev mtdblock0, logical block 4, async page read
[   25.101646][ T2021] blk_update_request: I/O error, dev mtdblock0, sector 5 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[   25.112771][ T2021] Buffer I/O error on dev mtdblock0, logical block 5, async page read
[   25.121393][ T2021] blk_update_request: I/O error, dev mtdblock0, sector 6 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[   25.132578][ T2021] Buffer I/O error on dev mtdblock0, logical block 6, async page read
[   25.141215][ T2021] blk_update_request: I/O error, dev mtdblock0, sector 7 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[   25.152368][ T2021] Buffer I/O error on dev mtdblock0, logical block 7, async page read
[   25.199212][ T2021] blk_update_request: I/O error, dev mtdblock2, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
[   25.211334][ T2021] Buffer I/O error on dev mtdblock2, logical block 0, async page read
[   25.220049][ T2021] Buffer I/O error on dev mtdblock2, logical block 1, async page read
Will now mount local filesystems:.

Why does it access mtdblock0? Stay away from my bootloader, please!

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

The nand is accessible, for reading at least. Made a dump from /dev/md0 using dd, and it contains recognizable strings. A strange thing is that it seems to contain the stock uImage:

# dd if=/dev/mtd0 | hexdump -C | less
00000000  27 05 19 56 ca 3d 94 64  53 d8 61 2f 00 34 31 b0  |'..V.=.dS.a/.41.|
00000010  00 00 80 00 00 00 80 00  37 ab 04 b6 05 02 02 00  |........7.......|
00000020  4c 69 6e 75 78 2d 33 2e  32 2e 33 34 00 00 00 00  |Linux-3.2.34....|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000040  00 00 a0 e1 00 00 a0 e1  00 00 a0 e1 00 00 a0 e1  |................|
*
00000060  02 00 00 ea 18 28 6f 01  00 00 00 00 b0 31 34 00  |.....(o......14.|

So where is my bootloader? This partition starts at address 0

[    5.738174][    T1] Creating 3 MTD partitions on "pxa3xx_nand-0":
[    5.744310][    T1] 0x000000000000-0x000000400000 : "U-Boot"
[    5.752251][    T1] 0x000000400000-0x000000800000 : "Linux"
[    5.761183][    T1] 0x000000800000-0x000040000000 : "Filesystem"

The stock u-boot boot params also show that the kernel starts a 0:

mtdparts=mtdparts=nand0:8m(kernel),6m(Initrd),-(rootfs)
select0=nand info
load0=nand read.e 0x02000000 0 344000
loadr0=nand read.e 0x04000000 800000 2e0000
boot=bootm 0x02000000 0x4000000
bootcmd=run beep select0 load0 loadr0 boot || run beep beep beep errled

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

[strike]Another observation: while the bodhi rn102 uImage in combination with the Debian generated uInitrd found the wifi module, the bodhi mirabox uImage doesn't.[/strike]

/Edit: nevermind, my usb rootfs didn't contain the kernel modules

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

Quote

So we cannot see what's going on during that time, i.e. is there more than "Starting kernel ..."? usually you would see a "Data Abort..." error, and would recognize that there is some address or architecture conflicts. Or the kernel has booted further to the point of kernel panic due to no rootfs, but there is no way to see that without earlyprintk

In the bootlog (bodhi Mirabox uImage) I find this:

[    4.503130][    T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    4.509158][    T1] printk: console [ttyS0] disabled
[    4.531971][    T1] d0012000.serial: ttyS0 at MMIO 0xd0012000 (irq = 20, base_baud = 12500000) is a 16550A
[    5.683265][    T1] printk: console [ttyS0] enabled

I suppose from here on earlyprintk is done, and logging is done by the 'real' serial driver? Wouldn't the log be visible from that point?



Edited 1 time(s). Last edit at 01/15/2022 09:40AM by Mijzelf.
Re: Shuttle KS10
January 15, 2022 11:14AM
Got a preliminary dtb. Copied the dts from mirabox, edited the name, memory size and mtd partitions. Added the sata part of rn102 (which is marked eSATA interface, apparently the esata is on the SoC), and removed the 2nd ethernet interface.
It boots from disk, and the nic works.

root@debian:~# lspci
00:01.0 PCI bridge: Marvell Technology Group Ltd. Device 6707 (rev 01)
00:02.0 PCI bridge: Marvell Technology Group Ltd. Device 6710 (rev 01)
01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter (rev 01)
root@debian:~# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

i2cdetect detects something on at 0x51.

And then, surprise! This box has an sd card reader. I plugged in an sd card, and
[ 1846.342946] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1846.354176] mmc0: new high speed SD card at address b368
[ 1846.377015] mmcblk0: mmc0:b368 SD    1.87 GiB 
[ 1846.387988]  mmcblk0: p1

How is that connected? Directly to the SoC?
Re: Shuttle KS10
January 15, 2022 04:09PM
Mijzelf,

Next time please post a complete serial log whenever you see errors. Oftenly, something occured before that will explain the errors. And it is always best for me to see the complete picture.


> [   25.093022][ T2021] Buffer I/O error on dev
> mtdblock0, logical block 4, async page read
> [   25.101646][ T2021] blk_update_request: I/O
> error, dev mtdblock0, sector 5 op 0x0:(READ) flags
> 0x0 phys_seg 1 prio class 0

My kernel config has CONFIG_MTD_BLOCK=y. But there is no harm in this case. It might be related to what you have below.

Quote

> The nand is accessible, for reading at least. Made
> a dump from /dev/md0 using dd, and it contains
> recognizable strings. A strange thing is that it
> seems to contain the stock uImage:

> So where is my bootloader? This partition starts
> at address 0

The MTD devices seem wrong, so we need to get that corrected first.

Quote

> The stock u-boot boot params also show that the
> kernel starts a 0:
>
> mtdparts=mtdparts=nand0:8m(kernel),6m(Initrd),-(rootfs)

The layout of this box seems to be different from the Mirabox (of course).

Quote

> [ 5.683265][ T1] printk: console [ttyS0] enabled

> I suppose from here on earlyprintk is done, and
> logging is done by the 'real' serial driver?
> Wouldn't the log be visible from that point?

Not really, we don't know where it crashed. It could have crashed before this. Or just a little bit after, and the kernel could not output the partial log before it crashed. The bottom line is to debug this OpenWrt kernel, you probably need to recompile it with DEBUG UART and earlyprintk configs. Once it works, then go back to the standard OpenWrt kernel.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Shuttle KS10
January 15, 2022 04:34PM
> Got a preliminary dtb. Copied the dts from
> mirabox, edited the name, memory size and mtd
> partitions. Added the sata part of rn102 (which is
> marked eSATA interface, apparently the
> esata is on the SoC), and removed the 2nd ethernet
> interface.
> It boots from disk, and the nic works.

Cool!


> And then, surprise! This box has an sd card
> reader. I plugged in an sd card, and
>
> How is that connected? Directly to the SoC?

Marvell SoC has MMC. So I included it in the kernel as a loadable module, in case some board uses it, like this KS10.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Shuttle KS10
January 15, 2022 05:06PM
The specs said:

Quote

1MB SPI for U-boot 2009.08 (build: 2013.07.31 Marvell version: 1.1.3 NQ)

Now I've checked stock boot log:

BootROM 1.08
Booting from SPI flash
and
[    0.000000] Kernel command line: console=ttyS0,115200 root=ubi0:rootfs ubi.mtd=3,2048 initrd=0x12000000 rootfstype=ubifs

<snip>

[    5.920588] SPI Serial flash detected @ 0xf0000000, 1024KB (16sec x 64KB)
[    5.928984] armada-nand armada-nand.0: Initialize HAL based NFC in 8bit mode with DMA Disabled using BCH 4bit ECC
[    5.940335] index=10, flash-id=f1ad
[    5.944917] NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit)
[    5.953615] Bad block table found at page 65472, version 0x01
[    5.959691] Bad block table found at page 65408, version 0x01
[    5.965913] Creating 3 MTD partitions on "armada-nand":
[    5.971179] 0x000000000000-0x000000800000 : "kernel"
[    5.977305] 0x000000800000-0x000000e00000 : "initrd"
[    5.983410] 0x000000e00000-0x000008000000 : "rootfs"

So this box has SPI flash and that's where u-boot is. NAND is only for kernel files and rootfs. They basically hid the SPI mtd from Linux.

To make u-boot mtd visible in Linux, the mtdparts should be:

mtdparts=mtdparts=pxa3xx_nand-0:8m(kernel),6m(Initrd),-(rootfs);spi1.0:1m(u-boot)

Now the u-boot mtd will be mtd3. That will keep the mtd0 to mtd2 the same name as they are.

Or if you are going to wipe and repartition NAND for OpenWrt, then make it mtd0 (keep in mind that you need a good description of the change in installation instruction so people don't assume that the stock mtds layout is still valid).

mtdparts=mtdparts=spi1.0:1m(u-boot);pxa3xx_nand-0:8m(kernel),6m(Initrd),-(rootfs)
The above will make u-boot mtd0, and shift the rest to 1,2,3.

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



Edited 3 time(s). Last edit at 01/15/2022 05:59PM by bodhi.
Re: Shuttle KS10
January 16, 2022 07:49AM
Something fishy is going on. When I add the string mtdparts to the command line, the box boots. But when I add a mtdparts=<something> I get a kernel panic. (full bootlog attached)

Begin: Mounting root file system ... /init: .: [   10.833926][    T1] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000200
[   10.843657][    T1] CPU: 0 PID: 1 Comm: init Not tainted 5.10.7-mvebu-370xp-tld-1 #1.0
[   10.851619][    T1] Hardware name: Marvell Armada 370/XP (Device Tree)
[   10.858218][    T1] [<c0113940>] (unwind_backtrace) from [<c0110000>] (show_stack+0x10/0x14)
[   10.866720][    T1] [<c0110000>] (show_stack) from [<c0acc4e8>] (panic+0xf8/0x304)
[   10.874350][    T1] [<c0acc4e8>] (panic) from [<c0128540>] (do_exit+0x1a8/0xa30)
[   10.881798][    T1] [<c0128540>] (do_exit) from [<c0129b3c>] (do_group_exit+0x54/0xe0)
[   10.889769][    T1] [<c0129b3c>] (do_group_exit) from [<c0129bd8>] (__wake_up_parent+0x0/0x14)
[   10.898440][    T1] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000200 ]---
line 239: can't open '/scripts/LABEL=rootfs': No such file or directory

init line 239 contains '. /scripts/${BOOT}'
log_begin_msg "Mounting root file system"
# Always load local and nfs (since these might be needed for /etc or
# /usr, irrespective of the boot script used to mount the rootfs).
. /scripts/local
. /scripts/nfs
. /scripts/${BOOT}

so somehow BOOT has the value LABEL=rootfs, and I can't figure out why. The string mtdparts is not in the whole initrd. I thought maybe the rootfs partition in the nand was a problem, but changing the name didn't help.

-------

Using the spiflash subsystem from u-boot and memory dump I've made a backup of the flash.

------

Tried to add the spi flash in dts:
&spi0 {
	pinctrl-0 = <&spi0_pins2>;
	pinctrl-names = "default";
	status = "okay";

	spi-flash@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "jedec,spi-nor";
		reg = <0>; /* Chip select 0 */
		spi-max-frequency = <20000000>;

		partition@0 {
			label = "u-boot";
			reg = <0x00000000 0x000c0000>;
			read-only;
		};

		partition@c0000 {
			label = "u-boot-env";
			reg = <0x000c0000 0x00010000>;
			read-only;
		};
	};
};

but that resulted in an error:

[    5.737484][    T1] spi-nor spi0.0: unrecognized JEDEC id bytes: 1c 31 14 1c 31 14
[    5.745131][    T1] spi-nor: probe of spi0.0 failed with error -2

so I need to specify the flash type, I suppose.

The PCB contains a chip labeled 'cFeon F80-100HCP', which is an 8Mbit serial flash, according to Google. This datasheet might fit. I couldn't find anything in the /drivers/spi/ directory which looks usable.
Attachments:
open | download - wrongboot.log (20 KB)
Re: Shuttle KS10
January 16, 2022 08:23AM
The gpio in- and outputs are identified and added to dts. The leds show up in /sys/class/leds, and I can toggle them with echo. The 2 buttons give 'something' when I run 'cat /dev/input/event0' and press the power or reset button.
I have identified the i2c device, it's a pcf8563 RTC. Added to dtb, and it works.

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

I can't find the poweroff gpio. I though if I flip all available gpio's as output, one would switch off the box. But it doesn't. When I now shutdown the box, I get

...
Saving the system clock to /dev/rtc0.
Hardware Clock updated to Sun Jan 16 14:58:10 CET 2022.
Will now unmount temporary filesystems:umount: /tmp unmounted
.
Will now deactivate swap:.
Will now unmount local filesystems:umount: /boot (/dev/sda1) unmounted
.
[ 2261.355631][ T2810] EXT4-fs (sda2): re-mounted. Opts: (null)
Mounting root filesystem read-only...done.
Will now halt.
[ 2261.592149][ T2815] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 2261.600762][ T2815] sd 0:0:0:0: [sda] Stopping disk
[ 2262.506618][ T2815] reboot: System halted

but I have to powercycle the box to be able to switch it on again. This is not the case with stock.

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

Further I think I have to do something with

&pinctrl {
}

which I left empty.

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

Debian doesn't react on pressing a button. Should I install/script something? Or is it the missing pinctrl?

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

Attached the dts file.
Attachments:
open | download - armada-370-shuttle-ks10.dts (3.7 KB)
Re: Shuttle KS10
January 16, 2022 10:17AM
Quote

I can't find the poweroff gpio. I though if I flip all available gpio's as output, one would switch off the box. But it doesn't.
Maybe gpio 55 has something to do with it. When I set that to 1, sometimes (as in 3 times reproducible, and then 3 times not) the box reboots.
Re: Shuttle KS10
January 16, 2022 02:27PM
Quote
bodhi

Not really, we don't know where it crashed. It could have crashed before this. Or just a little bit after, and the kernel could not output the partial log before it crashed. The bottom line is to debug this OpenWrt kernel, you probably need to recompile it with DEBUG UART and earlyprintk configs. Once it works, then go back to the standard OpenWrt kernel.

It took some time to do this, as OpenWrt kept reverting my settings (it has to be enabled in 'Global build settings'->'Kernel build options'), but finally it succeeded.
From the extracted configs.ko:

$ grep 'EARLY_PRINTK\|DEBUG_UART' 114
# CONFIG_DEBUG_UART_FLOW_CONTROL is not set
CONFIG_DEBUG_UART_8250=y
CONFIG_DEBUG_UART_PHYS=0xd0012000
CONFIG_DEBUG_UART_VIRT=0xfec12000
CONFIG_DEBUG_UART_8250_SHIFT=2
# CONFIG_DEBUG_UART_8250_WORD is not set
# CONFIG_DEBUG_UART_8250_PALMCHIP is not set
CONFIG_EARLY_PRINTK=y

But unfortunately it doesn't reveal much:

TFTP from server 172.20.172.252; our IP address is 172.20.172.108
Filename 'openwrt-mvebu-cortexa9-globalscale_mirabox-initramfs-kernel.bin'.
Load address: 0x2000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ######################
done
Bytes transferred = 5087201 (4d9fe1 hex)
Shuttle>> bootm
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   ARM OpenWrt Linux-5.10.90
   Created:      2022-01-13   8:33:29 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5087137 Bytes =  4.9 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

DTB:0x004DEBE8 (0x000033B9)
C:0x000080C0-0x004E2040->0x0119D200-0x01677180
DTB:0x01673D28 (0x00003452)
Uncompressing Linux... done, booting the kernel.

Definitely more output.

I was a bit surprised about the uImage header creation date. But I suppose it has to do with 'reproducible builds'.
Re: Shuttle KS10
January 16, 2022 04:30PM
Quote

resulted in an error:

[ 5.737484][ T1] spi-nor spi0.0: unrecognized JEDEC id bytes: 1c 31 14 1c 31 14
[ 5.745131][ T1] spi-nor: probe of spi0.0 failed with error -2

so I need to specify the flash type, I suppose.

This boot was not detecting SPI flash, so the u-boot partition does not appear. And yes, something like this. Unfortunately the stock boot log does not show the SPI flash chip name.

Example:
compatible = "mxicy,mx25l8005", "jedec,spi-nor";

Quote

The PCB contains a chip labeled 'cFeon F80-100HCP', which is an 8Mbit serial flash, according to Google. This datasheet might fit. I couldn't find anything in the /drivers/spi/ directory which looks usable.

Usually there is a way to catchall unknown SPI flash, I can't recall how that was done. I guess I can take a look at the SPI driver to refresh my memory.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Shuttle KS10
January 16, 2022 04:39PM
Quote

but I have to powercycle the box to be able to switch it on again. This is not the case with stock.

Once you defined the correct Power Off GPIO (if it is indeed using GPIO). You need to use the Power button to power on. It has a Power button?

Quote

Debian doesn't react on pressing a button. Should I install/script something? Or is it the missing pinctrl?

Install esekeyd in Debian to be able to use buttons:

https://forum.doozan.com/read.php?2,32460,32467#msg-32467

Quote

&pinctrl {
}

Yes. This should be filled in at some point to let the kernel know which pin is for which purpose. They don't have to be complete, though. Usually just enough interesting info such as power-off, restart, keys (button GPIOs).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Shuttle KS10
January 16, 2022 04:49PM
Quote

Maybe gpio 55 has something to do with it. When I set that to 1, sometimes (as in 3 times reproducible, and then 3 times not) the box reboots.

Sounds like the Restart GPIO.

Quote

Starting kernel ...

DTB:0x004DEBE8 (0x000033B9)
C:0x000080C0-0x004E2040->0x0119D200-0x01677180
DTB:0x01673D28 (0x00003452)
Uncompressing Linux... done, booting the kernel.

This could mean some conflicts regarding the load address, so it silently died (the DTB works in Debian, so it is not the culprit). The old load address used in stock might need to change in booting new kernel. But the fact that it has output the decompression output, earlyprintk works.

-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: