Welcome! Log In Create A New Profile

Advanced

U-Boot Kirkwood - NSA310 - nandump segfault

Posted by kiesel 
U-Boot Kirkwood - NSA310 - nandump segfault
March 01, 2020 03:47PM
Hi,

I am trying to flash a Zyxel NSA310 that is branded as a "TDC HomeDisk" (Denmark).

I uart-booted a new uboot and tried out the first commands if the 2017.07 U-Boot Kirkwood-Thread.

/mnt/testmount/tools # cat /etc/fw_env.config 
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundand
# environment sector is assumed present.
# Notice, that the "Number of sectors" is ignored on NOR.

# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
# NAND example
/dev/mtd1		0x0000		0x20000		0x20000			4

The guide says this line should be different (mtd0 instead of mtd0), can I continue with this?

The partitions are different, but according to the guide this is to be expected of NSA3xx devices:

/mnt/testmount/tools # cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00100000 00020000 "uboot"
mtd1: 00080000 00020000 "uboot_env"
mtd2: 00080000 00020000 "key_store"
mtd3: 00080000 00020000 "info"
mtd4: 00a00000 00020000 "etc"
mtd5: 00a00000 00020000 "kernel_1"
mtd6: 02fc0000 00020000 "rootfs1"
mtd7: 00a00000 00020000 "kernel_2"
mtd8: 02fc0000 00020000 "rootfs2"

But what's an immediate showstopper was this segfault I got while running nandump from my USB stick.

/mnt/testmount/tools # ./nanddump --noecc --omitoob -l 0x80000 -f mtd0 /dev/mtd0Segmentation fault


This is from the boot of the original uboot:

20:37:30.619 ->         |  \/  | __ _ _ ____   _____| | |
20:37:30.619 ->         | |\/| |/ _` | '__\ \ / / _ \ | |
20:37:30.619 ->         | |  | | (_| | |   \ V /  __/ | |
20:37:30.619 ->         |_|  |_|\__,_|_|    \_/ \___|_|_|
20:37:30.619 ->  _   _     ____              _
20:37:30.619 -> | | | |   | __ )  ___   ___ | |_ 
20:37:30.619 -> | | | |___|  _ \ / _ \ / _ \| __| 
20:37:30.619 -> | |_| |___| |_) | (_) | (_) | |_ 
20:37:30.619 ->  \___/    |____/ \___/ \___/ \__| 
20:37:30.619 ->  ** MARVELL BOARD: RD-88F6281A LE 
20:37:30.619 -> 
20:37:30.619 -> U-Boot 1.1.4 (Feb 22 2011 - 10:31:35) Marvell version: 3.4.19
20:37:30.619 -> 
20:37:30.619 -> U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFEE0
20:37:30.685 -> 
20:37:30.685 -> Soc: 88F6281 A1 (DDR2)
20:37:30.685 -> CPU running @ 1200Mhz L2 running @ 400Mhz
20:37:30.685 -> SysClock = 400Mhz , TClock = 200Mhz 
20:37:30.685 -> 
20:37:30.685 -> DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
20:37:30.685 -> DRAM CS[0] base 0x00000000   size 256MB 
20:37:30.685 -> DRAM Total size 256MB  16bit width
20:37:30.685 -> Addresses 10M - 0M are saved for the U-Boot usage.
20:37:30.685 -> Mem malloc Initialization (10M - 7M): Done
20:37:30.738 -> NAND:128 MB
20:37:31.781 -> Flash:  0 kB
20:37:31.814 -> 
20:37:31.814 -> CPU : Marvell Feroceon (Rev 1)
20:37:32.379 -> Kernel address is 0xc80000.
20:37:32.379 -> 
20:37:32.379 -> Streaming disabled 
20:37:32.379 -> Write allocate disabled
20:37:32.379 -> 
20:37:32.379 -> Module 0 is RGMII
20:37:32.379 -> Module 1 is TDM
20:37:32.379 -> 
20:37:32.379 -> USB 0: host mode
20:37:32.911 -> PEX 0: PCI Express Root Complex Interface
20:37:32.911 -> PEX interface detected Link X1
20:37:32.944 -> Net:   egiga0, egiga1 [PRIME]
20:37:32.977 -> Hit any key to stop autoboot:  2  1  0 
20:37:34.969 -> 
20:37:34.969 -> NAND read: device 0 offset 0xc80000, size 0xa00000
20:37:35.002 -> 
20:37:35.002 -> 
Reading data from 0xc80000 --   0% complete.
[...]
Reading data from 0x167f800 -- 100% complete.
20:37:41.976 ->  10485760 bytes read: OK
20:37:41.976 -> ## Booting image at 02000000 ...
20:37:41.976 ->    Image Name:   Linux-2.6.22.18
20:37:41.976 ->    Created:      2011-02-22   3:33:51 UTC
20:37:41.976 ->    Image Type:   ARM Linux Kernel Image (uncompressed)
20:37:41.976 ->    Data Size:    5701144 Bytes =  5.4 MB
20:37:41.976 ->    Load Address: 00008000
20:37:41.976 ->    Entry Point:  00008000
20:37:41.976 ->    Verifying Checksum ... OK
20:37:43.304 -> OK
20:37:43.304 -> 
20:37:43.304 -> Starting kernel ...


Can I flash this box at all?

All internal partitions are mounted as ro, is that normal? I couldn't copy the tools folder to the internal disk to ditch the USB-drive:

/mnt/testmount/tools # mount
rootfs on / type rootfs (rw)
/proc on /proc type proc (rw)
/sys on /sys type sysfs (rw)
none on /proc/bus/usb type usbfs (rw)
/dev/mtdblock6 on /zyxel/mnt/nand type yaffs2 (ro)
/dev/sda1 on /zyxel/mnt/sysdisk type ext3 (ro,data=ordered)
/dev/loop0 on /ram_bin type ext2 (ro)
/dev/loop0 on /usr type ext2 (ro)
/dev/loop0 on /lib/security type ext2 (ro)
/dev/loop0 on /lib/modules type ext2 (ro)
/dev/ram0 on /tmp/tmpfs type tmpfs (rw)
/dev/ram0 on /usr/local/etc type tmpfs (rw)
/dev/ram0 on /usr/local/var type tmpfs (rw)
/dev/mtdblock4 on /etc/zyxel type yaffs2 (rw)
/dev/md0 on /i-data/3c7e9e7c type xfs (rw,usrquota,nouuid)
/dev/md0 on /i-data/3c7e9e7c/.media/mbvideo/Musik type xfs (rw,usrquota,nouuid)
/dev/md0 on /i-data/3c7e9e7c/.media/mbvideo/Billeder type xfs (rw,usrquota,nouuid)
/dev/md0 on /i-data/3c7e9e7c/.media/mbvideo/Videoer type xfs (rw,usrquota,nouuid)
/dev/md0 on /i-data/3c7e9e7c/.media/mbvideo/Dokumenter type xfs (rw,usrquota,nouuid)
/dev/md0 on /usr/local/apache/web_framework/data/cache type xfs (rw,usrquota,nouuid)
/dev/mtdblock4 on /usr/local/apache/web_framework/data/config type yaffs2 (rw)
/dev/md0 on /usr/local/zy-pkgs type xfs (rw,usrquota,nouuid)
/dev/md0 on /etc/zyxel/zy-pkgs type xfs (rw,usrquota,nouuid)
/dev/md0 on /usr/local/apache/htdocs/zyxel/pkg type xfs (rw,usrquota,nouuid)
/dev/sdb1 on /mnt/testmount type ext3 (rw,data=ordered)
/mnt/testmount/tools #

I am happy about any help! Thanks!
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 01, 2020 05:15PM
kiesel,

> I uart-booted a new uboot and tried out the first
> commands if the 2017.07 U-Boot Kirkwood-Thread.

> The guide says this line should be different (mtd0
> instead of mtd0), can I continue with this?

It is OK. fw_env.config is only relevant when you read and modify envs while in Debian. It does not effect flashing new uboot. Later after you've flashed new uboot, you can adjust this file so you can see the envs.

>
> The partitions are different, but according to the
> guide this is to be expected of NSA3xx devices:
>
>
> /mnt/testmount/tools # cat /proc/mtd 
> dev:    size   erasesize  name
> mtd0: 00100000 00020000 "uboot"
> mtd1: 00080000 00020000 "uboot_env"
> mtd2: 00080000 00020000 "key_store"
> mtd3: 00080000 00020000 "info"
> mtd4: 00a00000 00020000 "etc"
> mtd5: 00a00000 00020000 "kernel_1"
> mtd6: 02fc0000 00020000 "rootfs1"
> mtd7: 00a00000 00020000 "kernel_2"
> mtd8: 02fc0000 00020000 "rootfs2"
>

Yes. The mtd partitions must be the same as stock mtds.

>
> But what's an immediate showstopper was this
> segfault I got while running nandump from my USB
> stick.

Do you have serial console? if you do, please boot and post the entire boot log from u-boot banner until you are in Debian, are you running Debian or stock OS?

And also post
cat /proc/mtd

If you don't have serial console, then post
dmesg
cat /proc/mtd

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 02, 2020 12:40AM
Thank you for your reply.

Here is the serial monitor output of the branded firmware

07:36:33.516 -> ⸮
07:36:33.516 ->          __  __                      _ _
07:36:33.516 ->         |  \/  | __ _ _ ____   _____| | |
07:36:33.516 ->         | |\/| |/ _` | '__\ \ / / _ \ | |
07:36:33.516 ->         | |  | | (_| | |   \ V /  __/ | |
07:36:33.516 ->         |_|  |_|\__,_|_|    \_/ \___|_|_|
07:36:33.516 ->  _   _     ____              _
07:36:33.516 -> | | | |   | __ )  ___   ___ | |_ 
07:36:33.516 -> | | | |___|  _ \ / _ \ / _ \| __| 
07:36:33.516 -> | |_| |___| |_) | (_) | (_) | |_ 
07:36:33.516 ->  \___/    |____/ \___/ \___/ \__| 
07:36:33.516 ->  ** MARVELL BOARD: RD-88F6281A LE 
07:36:33.516 -> 
07:36:33.516 -> U-Boot 1.1.4 (Feb 22 2011 - 10:31:35) Marvell version: 3.4.19
07:36:33.516 -> 
07:36:33.516 -> U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFEE0
07:36:33.547 -> 
07:36:33.547 -> Soc: 88F6281 A1 (DDR2)
07:36:33.547 -> CPU running @ 1200Mhz L2 running @ 400Mhz
07:36:33.547 -> SysClock = 400Mhz , TClock = 200Mhz 
07:36:33.547 -> 
07:36:33.547 -> DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
07:36:33.547 -> DRAM CS[0] base 0x00000000   size 256MB 
07:36:33.547 -> DRAM Total size 256MB  16bit width
07:36:33.547 -> Addresses 10M - 0M are saved for the U-Boot usage.
07:36:33.547 -> Mem malloc Initialization (10M - 7M): Done
07:36:33.597 -> NAND:128 MB
07:36:34.677 -> Flash:  0 kB
07:36:34.710 -> 
07:36:34.710 -> CPU : Marvell Feroceon (Rev 1)
07:36:35.242 -> Kernel address is 0xc80000.
07:36:35.275 -> 
07:36:35.275 -> Streaming disabled 
07:36:35.275 -> Write allocate disabled
07:36:35.275 -> 
07:36:35.275 -> Module 0 is RGMII
07:36:35.275 -> Module 1 is TDM
07:36:35.275 -> 
07:36:35.275 -> USB 0: host mode
07:36:35.774 -> PEX 0: PCI Express Root Complex Interface
07:36:35.774 -> PEX interface detected Link X1
07:36:35.807 -> Net:   egiga0, egiga1 [PRIME]
07:36:35.840 -> Hit any key to stop autoboot:  2  1  0 
07:36:37.867 -> 
07:36:37.867 -> NAND read: device 0 offset 0xc80000, size 0xa00000
07:36:37.867 -> 
07:36:37.867 -> 
Reading data from 0xc80000 --   0% complete.
Reading data from 0xc99800 --   1% complete.
Reading data from 0xcb3000 --   2% complete.
Reading data from 0xccc800 --   3% complete.
Reading data from 0xce6000 --   4% complete.
Reading data from 0xcff800 --   5% complete.
Reading data from 0xd19800 --   6% complete.
Reading data from 0xd33000 --   7% complete.
Reading data from 0xd4c800 --   8% complete.
Reading data from 0xd66000 --   9% complete.
Reading data from 0xd7f800 --  10% complete.
Reading data from 0xd99800 --  11% complete.
Reading data from 0xdb3000 --  12% complete.
Reading data from 0xdcc800 --  13% complete.
Reading data from 0xde6000 --  14% complete.
Reading data from 0xdff800 --  15% complete.
Reading data from 0xe19800 --  16% complete.
Reading data from 0xe33000 --  17% complete.
Reading data from 0xe4c800 --  18% complete.
Reading data from 0xe66000 --  19% complete.
Reading data from 0xe7f800 --  20% complete.
Reading data from 0xe99800 --  21% complete.
Reading data from 0xeb3000 --  22% complete.
Reading data from 0xecc800 --  23% complete.
Reading data from 0xee6000 --  24% complete.
Reading data from 0xeff800 --  25% complete.
Reading data from 0xf19800 --  26% complete.
Reading data from 0xf33000 --  27% complete.
Reading data from 0xf4c800 --  28% complete.
Reading data from 0xf66000 --  29% complete.
Reading data from 0xf7f800 --  30% complete.
Reading data from 0xf99800 --  31% complete.
Reading data from 0xfb3000 --  32% complete.
Reading data from 0xfcc800 --  33% complete.
Reading data from 0xfe6000 --  34% complete.
Reading data from 0xfff800 --  35% complete.
Reading data from 0x1019800 --  36% complete.
Reading data from 0x1033000 --  37% complete.
Reading data from 0x104c800 --  38% complete.
Reading data from 0x1066000 --  39% complete.
Reading data from 0x107f800 --  40% complete.
Reading data from 0x1099800 --  41% complete.
Reading data from 0x10b3000 --  42% complete.
Reading data from 0x10cc800 --  43% complete.
Reading data from 0x10e6000 --  44% complete.
Reading data from 0x10ff800 --  45% complete.
Reading data from 0x1119800 --  46% complete.
Reading data from 0x1133000 --  47% complete.
Reading data from 0x114c800 --  48% complete.
Reading data from 0x1166000 --  49% complete.
Reading data from 0x117f800 --  50% complete.
Reading data from 0x1199800 --  51% complete.
Reading data from 0x11b3000 --  52% complete.
Reading data from 0x11cc800 --  53% complete.
Reading data from 0x11e6000 --  54% complete.
Reading data from 0x11ff800 --  55% complete.
Reading data from 0x1219800 --  56% complete.
Reading data from 0x1233000 --  57% complete.
Reading data from 0x124c800 --  58% complete.
Reading data from 0x1266000 --  59% complete.
Reading data from 0x127f800 --  60% complete.
Reading data from 0x1299800 --  61% complete.
Reading data from 0x12b3000 --  62% complete.
Reading data from 0x12cc800 --  63% complete.
Reading data from 0x12e6000 --  64% complete.
Reading data from 0x12ff800 --  65% complete.
Reading data from 0x1319800 --  66% complete.
Reading data from 0x1333000 --  67% complete.
Reading data from 0x134c800 --  68% complete.
Reading data from 0x1366000 --  69% complete.
Reading data from 0x137f800 --  70% complete.
Reading data from 0x1399800 --  71% complete.
Reading data from 0x13b3000 --  72% complete.
Reading data from 0x13cc800 --  73% complete.
Reading data from 0x13e6000 --  74% complete.
Reading data from 0x13ff800 --  75% complete.
Reading data from 0x1419800 --  76% complete.
Reading data from 0x1433000 --  77% complete.
Reading data from 0x144c800 --  78% complete.
Reading data from 0x1466000 --  79% complete.
Reading data from 0x147f800 --  80% complete.
Reading data from 0x1499800 --  81% complete.
Reading data from 0x14b3000 --  82% complete.
Reading data from 0x14cc800 --  83% complete.
Reading data from 0x14e6000 --  84% complete.
Reading data from 0x14ff800 --  85% complete.
Reading data from 0x1519800 --  86% complete.
Reading data from 0x1533000 --  87% complete.
Reading data from 0x154c800 --  88% complete.
Reading data from 0x1566000 --  89% complete.
Reading data from 0x157f800 --  90% complete.
Reading data from 0x1599800 --  91% complete.
Reading data from 0x15b3000 --  92% complete.
Reading data from 0x15cc800 --  93% complete.
Reading data from 0x15e6000 --  94% complete.
Reading data from 0x15ff800 --  95% complete.
Reading data from 0x1619800 --  96% complete.
Reading data from 0x1633000 --  97% complete.
Reading data from 0x164c800 --  98% complete.
Reading data from 0x1666000 --  99% complete.
Reading data from 0x167f800 -- 100% complete.
07:36:44.844 ->  10485760 bytes read: OK
07:36:44.844 -> ## Booting image at 02000000 ...
07:36:44.844 ->    Image Name:   Linux-2.6.22.18
07:36:44.844 ->    Created:      2011-02-22   3:33:51 UTC
07:36:44.844 ->    Image Type:   ARM Linux Kernel Image (uncompressed)
07:36:44.844 ->    Data Size:    5701144 Bytes =  5.4 MB
07:36:44.844 ->    Load Address: 00008000
07:36:44.844 ->    Entry Point:  00008000
07:36:44.844 ->    Verifying Checksum ... OK
07:36:46.207 -> OK
07:36:46.207 -> 
07:36:46.207 -> Starting kernel ...
07:36:46.207 -> 
07:36:46.207 -> Uncompressing Linux..................................................................................................................................................................................................................................................................... done, booting the kernel.
07:36:46.805 -> 
Linux version 2.6.22.18 (root@Neo) (gcc version 3.4.3 (MontaVista 3.4.3-25.0.70.0501961 2005-12-18)) #2 Tue Feb 22 11:33:29 CST 2011
07:36:48.267 -> CPU: ARM926EJ-S [56251311] revision 1 (ARMv5TE), cr=00053977
07:36:48.267 -> Machine: Feroceon-KW
07:36:48.267 -> Using UBoot passing parameters structure
07:36:48.267 -> Memory policy: ECC disabled, Data cache writeback
07:36:48.267 -> CPU0: D VIVT write-back cache
07:36:48.267 -> CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
07:36:48.267 -> CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
07:36:48.267 -> Built 1 zonelists.  Total pages: 65024
07:36:48.334 -> Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
07:36:48.334 -> PID hash table entries: 1024 (order: 10, 4096 bytes)
07:36:48.334 -> Console: colour dummy device 80x30
07:36:48.334 -> Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
07:36:48.334 -> Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
07:36:48.334 -> Memory: 256MB 0MB 0MB 0MB = 256MB total
07:36:48.367 -> Memory: 251392KB available (4832K code, 403K data, 3116K init)
07:36:48.367 -> Mount-cache hash table entries: 512
07:36:48.367 -> CPU: Testing write buffer coherency: ok
07:36:48.367 -> NET: Registered protocol family 16
07:36:48.367 -> 
07:36:48.367 -> CPU Interface
07:36:48.367 -> -------------
07:36:48.367 -> SDRAM_CS0 ....base 00000000, size 256MB 
07:36:48.367 -> SDRAM_CS1 ....disable
07:36:48.367 -> SDRAM_CS2 ....disable
07:36:48.367 -> SDRAM_CS3 ....disable
07:36:48.367 -> PEX0_MEM ....base e8000000, size 128MB 
07:36:48.367 -> PEX0_IO ....base f2000000, size   1MB 
07:36:48.367 -> INTER_REGS ....base f1000000, size   1MB 
07:36:48.367 -> NFLASH_CS ....base fa000000, size   2MB 
07:36:48.400 -> SPI_CS ....base f4000000, size  16MB 
07:36:48.400 -> BOOT_ROM_CS ....no such
07:36:48.400 -> DEV_BOOTCS ....no such
07:36:48.400 -> CRYPT_ENG ....base f0000000, size   2MB 
07:36:48.400 -> 
07:36:48.400 ->   Marvell Development Board (LSP Version KW_LSP_4.2.7)-- RD-88F6281A  Soc: MV88F6281 Rev 3 LE
07:36:48.400 -> 
07:36:48.400 ->  Detected Tclk 200000000 and SysClk 400000000 
07:36:48.400 -> Marvell USB EHCI Host controller #0: c0a9a600
07:36:48.400 -> PEX0 interface detected Link X1
07:36:48.400 -> PCI: bus0: Fast back to back transfers disabled
07:36:48.400 -> SCSI subsystem initialized
07:36:48.400 -> usbcore: registered new interface driver usbfs
07:36:48.467 -> usbcore: registered new interface driver hub
07:36:48.467 -> usbcore: registered new device driver usb
07:36:48.467 -> NET: Registered protocol family 2
07:36:48.467 -> Time: kw_clocksource clocksource has been installed.
07:36:48.467 -> IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
07:36:48.467 -> TCP established hash table entries: 8192 (order: 4, 65536 bytes)
07:36:48.467 -> TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
07:36:48.467 -> TCP: Hash tables configured (established 8192 bind 8192)
07:36:48.467 -> TCP reno registered
07:36:48.467 -> RTC registered
07:36:48.467 -> Use the XOR engines (acceleration) for enhancing the following functions:
07:36:48.500 ->   o RAID 5 Xor calculation
07:36:48.500 ->   o kernel memcpy
07:36:48.500 ->   o kenrel memzero
07:36:48.500 -> Number of XOR engines to use: 4
07:36:48.500 -> cesadev_init(c0011f5c)
07:36:48.500 -> mvCesaInit: sessions=640, queue=64, pSram=f0000000
07:36:48.500 -> Warning: TS unit is powered off.
07:36:48.500 -> gpio_dev = fe00000
07:36:48.500 -> LED_SET_CTL_IOC_NUM= 6702
07:36:48.500 -> High gpio polarity = 50 
07:36:48.500 -> High gpio polarity = 70 
07:36:48.500 -> Enable Interrupt
07:36:48.500 -> mv88f6281_wdt: Watchdog Timer timeout = 8 sec.
07:36:48.500 -> mv88f6281_wdt: HW Watchdog timeout    = 15 sec.
07:36:48.500 -> VFS: Disk quotas dquot_6.5.1
07:36:48.533 -> Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
07:36:48.533 -> Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
07:36:48.533 -> JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
07:36:48.533 -> fuse init (API version 7.8)
07:36:48.533 -> SGI XFS with large block numbers, no debug enabled
07:36:48.533 -> SGI XFS Quota Management subsystem
07:36:48.533 -> yaffs Feb 10 2011 21:07:53 Installing. 
07:36:48.533 -> io scheduler noop registered
07:36:48.533 -> io scheduler cfq registered (default)
07:36:48.533 -> Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
07:36:48.533 -> serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
07:36:48.600 -> serial8250.0: ttyS1 at MMIO 0xf1012100 (irq = 34) is a 16550A
07:36:48.600 -> RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
07:36:48.600 -> loop: module loaded
07:36:48.600 -> Loading Marvell Ethernet Driver:
07:36:48.600 ->   o Cached descriptors in DRAM
07:36:48.600 ->   o DRAM SW cache-coherency
07:36:48.600 ->   o Single RX Queue support - ETH_DEF_RXQ=0
07:36:48.600 ->   o Single TX Queue support - ETH_DEF_TXQ=0
07:36:48.600 ->   o TCP segmentation offload enabled
07:36:48.600 ->   o Receive checksum offload enabled
07:36:48.600 ->   o Transmit checksum offload enabled
07:36:48.633 ->   o Network Fast Processing (Routing) supported
07:36:48.633 ->   o Proc tool API enabled
07:36:48.633 ->   o Rx descripors: q0=128
07:36:48.633 ->   o Tx descripors: q0=532
07:36:48.633 ->   o Loading network interface(s):
07:36:48.633 -> eth_get_config: Unexpected port number 0
07:36:48.633 -> EthPort #0: Bad initialization parameters
07:36:48.633 -> eth port=0: load failed
07:36:48.633 -> eth_init_module: can't init eth_hal driver
07:36:48.633 -> Intel(R) PRO/1000 Network Driver - version 7.3.20-k2-NAPI
07:36:48.633 -> Copyright (c) 1999-2006 Intel Corporation.
07:36:48.633 -> e100: Intel(R) PRO/100 Network Driver, 3.5.17-k4-NAPI
07:36:48.633 -> e100: Copyright(c) 1999-2006 Intel Corporation
07:36:48.666 -> Integrated Sata device found
07:36:53.651 -> scsi0 : Marvell SCSI to SATA adapter
07:36:53.684 -> scsi1 : Marvell SCSI to SATA adapter
07:36:54.215 -> scsi 0:0:0:0: Direct-Access     WDC      WD5000AAKX-001CA 15.0 PQ: 0 ANSI: 5
07:36:54.248 -> EnablePowerSaving 
07:36:54.248 -> PowerSavingTime = 15
07:36:54.248 -> ///////////////////////////////////		init sd 		
07:36:54.248 -> sd 0:0:0:0: [sda] 976773168 512-byte hardware sectors (500108 MB)
07:36:54.248 -> sd 0:0:0:0: [sda] Write Protect is off
07:36:54.248 -> sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
07:36:54.248 -> sd 0:0:0:0: [sda] 976773168 512-byte hardware sectors (500108 MB)
07:36:54.248 -> sd 0:0:0:0: [sda] Write Protect is off
07:36:54.248 -> sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
07:36:54.315 ->  sda: sda1 sda2
07:36:54.315 -> sd 0:0:0:0: [sda] Attached SCSI disk
07:36:54.315 -> sd 0:0:0:0: Attached scsi generic sg0 type 0
07:36:54.315 -> NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c $Revision: 1.41 $
07:36:54.315 -> NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
07:36:54.315 -> Scanning device for bad blocks
07:36:54.315 -> Bad eraseblock 76 at 0x00980000
07:36:54.315 -> Bad eraseblock 281 at 0x02320000
07:36:54.315 -> Bad eraseblock 494 at 0x03dc0000
07:36:54.348 -> Bad eraseblock 703 at 0x057e0000
07:36:54.415 -> 9 cmdlinepart partitions found on MTD device nand_mtd
07:36:54.415 -> Using command line partition definition
07:36:54.415 -> Creating 9 MTD partitions on "nand_mtd":
07:36:54.415 -> 0x00000000-0x00100000 : "uboot"
07:36:54.415 -> 0x00100000-0x00180000 : "uboot_env"
07:36:54.415 -> 0x00180000-0x00200000 : "key_store"
07:36:54.415 -> 0x00200000-0x00280000 : "info"
07:36:54.415 -> 0x00280000-0x00c80000 : "etc"
07:36:54.415 -> 0x00c80000-0x01680000 : "kernel_1"
07:36:54.415 -> 0x01680000-0x04640000 : "rootfs1"
07:36:54.415 -> 0x04640000-0x05040000 : "kernel_2"
07:36:54.415 -> 0x05040000-0x08000000 : "rootfs2"
07:36:54.415 -> ehci_marvell ehci_marvell.70059: Marvell Orion EHCI
07:36:54.448 -> ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1
07:36:54.448 -> ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100
07:36:54.482 -> ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
07:36:54.482 -> usb usb1: configuration #1 chosen from 1 choice
07:36:54.482 -> hub 1-0:1.0: USB hub found
07:36:54.482 -> hub 1-0:1.0: 1 port detected
07:36:54.582 -> USB Universal Host Controller Interface driver v3.0
07:36:54.880 -> usb 1-1: new high speed USB device using ehci_marvell and address 2
07:36:55.047 -> In hub_port_init, and number is 0, retry 0, port 1 .....
07:36:55.047 -> usb 1-1: configuration #1 chosen from 1 choice
07:36:55.047 -> hub 1-1:1.0: USB hub found
07:36:55.047 -> hub 1-1:1.0: 4 ports detected
07:36:55.146 -> usbcore: registered new interface driver usblp
07:36:55.180 -> drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
07:36:55.180 -> Initializing USB Mass Storage driver...
07:36:55.180 -> usbcore: registered new interface driver usb-storage
07:36:55.180 -> USB Mass Storage support registered.
07:36:55.180 -> mice: PS/2 mouse device common for all mice
07:36:55.180 -> i2c /dev entries driver
07:36:55.180 -> i2c-adapter i2c-0: Unrecognized version/stepping 0x69 Defaulting to Generic LM85.
07:36:55.180 -> hwmon-vid: Unknown VRM version of your CPU
07:36:55.180 -> md: linear personality registered for level -1
07:36:55.180 -> md: raid0 personality registered for level 0
07:36:55.213 -> md: raid1 personality registered for level 1
07:36:55.379 -> raid6: int32x1     95 MB/s
07:36:55.512 -> raid6: int32x2    138 MB/s
07:36:55.711 -> raid6: int32x4    125 MB/s
07:36:55.910 -> raid6: int32x8    111 MB/s
07:36:55.910 -> raid6: using algorithm int32x2 (138 MB/s)
07:36:55.910 -> md: raid6 personality registered for level 6
07:36:55.910 -> md: raid5 personality registered for level 5
07:36:55.910 -> md: raid4 personality registered for level 4
07:36:55.910 -> raid5: measuring checksumming speed
07:36:55.943 ->    arm4regs  :  1090.800 MB/sec
07:36:55.977 ->    8regs     :   653.600 MB/sec
07:36:56.076 ->    32regs    :   884.400 MB/sec
07:36:56.076 -> raid5: using function: arm4regs (1090.800 MB/sec)
07:36:56.076 -> device-mapper: ioctl: 4.11.0-ioctl (2006-10-12) initialised: dm-devel@redhat.com
07:36:56.076 -> usbcore: registered new interface driver hiddev
07:36:56.076 -> usbcore: registered new interface driver usbhid
07:36:56.076 -> drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
07:36:56.076 -> TCP cubic registered
07:36:56.076 -> NET: Registered protocol family 1
07:36:56.076 -> NET: Registered protocol family 17
07:36:56.076 -> Freeing init memory: 3116K
07:36:56.142 -> *** Stage 1: Setup system and device drivers ***
07:36:56.575 -> r8168 Gigabit Ethernet driver 8.012.00-NAPI loaded
07:36:56.641 -> pci_resource_start(pdev, 2) = e8014000 
07:36:56.641 -> r8168 0000:00:01.0: no MSI. Back to INTx.
07:36:56.641 ->  Set LED ... 
07:36:56.641 -> r8168: This product is covered by one or more of the following patents: US5,307,459, US5,434,872, US5,732,094, US6,570,884, US6,115,776, and US6,327,625.
07:36:56.641 -> eth0: RTL8168B/8111B at 0xd0854000, 00:00:00:00:00:30, IRQ 9
07:36:56.641 -> ioaddr = d0854000
07:36:56.708 -> r8168  Copyright (C) 2009  Realtek NIC software team <nicfae@realtek.com> 
07:36:56.708 ->  This program comes with ABSOLUTELY NO WARRANTY; for details, please see http://www.gnu.org/licenses/. 
07:36:56.708 ->  This is free software, and you are welcome to redistribute it under certain conditions; see http://www.gnu.org/licenses/. 
07:36:56.774 -> r8168: egiga0: link down
07:36:56.807 -> hwclock: settimeofday() failed: Invalid argument
07:36:57.007 -> *** Stage 2: Prepare the root file system ***
07:36:57.040 -> Mount system partition...
07:36:57.040 -> yaffs: dev is 32505862 name is "mtdblock6"
07:36:57.040 -> yaffs: passed flags ""
07:36:57.040 -> yaffs: Attempting MTD mount on 31.6, "mtdblock6"
07:36:57.073 -> block 102 is bad
07:36:57.073 -> block 315 is bad
07:36:57.904 -> yaffs_read_super: isCheckpointed 0
07:36:58.004 -> e2fsck 1.38 (30-Jun-2005)
07:36:58.037 -> /dev/sda1: clean, 13/128520 files, 506601/514048 blocks
07:36:58.037 -> kjournald starting.  Commit interval 5 seconds
07:36:58.037 -> EXT3-fs: mounted filesystem with ordered data mode.
07:36:58.137 -> kjournald starting.  Commit interval 5 seconds
07:36:58.137 -> EXT3-fs: mounted filesystem with ordered data mode.
07:36:58.170 -> /dev/sda1 /zyxel/mnt/sysdisk ext3 ro,data=ordered 0 0
07:36:58.170 -> 0
07:36:58.170 -> Boot from disk
07:36:59.998 -> Checksum of sysdisk.img : 7ddf39bd27e18147c31a7d325e5acc98
07:36:59.998 -> Checksum from INFO  : 7ddf39bd27e18147c31a7d325e5acc98
07:36:59.998 -> Checksum pass!
07:36:59.998 -> Mount system disk image ...
07:37:00.030 -> cp: /ram_bin/bin/*: No such file or directory
07:37:00.097 -> yaffs: dev is 32505860 name is "mtdblock4"
07:37:00.130 -> yaffs: passed flags ""
07:37:00.130 -> yaffs: Attempting MTD mount on 31.4, "mtdblock4"
07:37:00.130 -> yaffs: restored from checkpoint
07:37:00.130 -> yaffs_read_super: isCheckpointed 1
07:37:00.163 -> /etc/zyxel/conf exist..
07:37:00.230 -> *** Stage 3: Start services on HDD ***
07:37:00.263 -> NTFS driver 2.1.28 [Flags: R/O MODULE].
07:37:00.297 -> tntfs: module license 'Commercial. For support email tntfs-support@tuxera.com.' taints kernel.
07:37:00.297 -> Tuxera NTFS driver 3010.9.16 [Flags: R/W MODULE].
07:37:00.330 -> modprobe: module fuse not found.
07:37:00.330 -> modprobe: failed to load module fuse
07:37:00.430 -> Starting PID Fan Control..
07:37:00.430 -> P:20, I:1, D:5, SampleRate:10 seconds, ST_CPU:46, ST_ADT7463:46, ST_DauBoard:46 
07:37:00.430 -> Wt_CPU:0, Wt_ADT7463:0, Wt_DauBoard:1
07:37:00.430 -> Tolerance:1 MinPwm:0x40 
07:37:00.430 -> 
07:37:03.452 -> sda
07:37:03.452 -> checking sda
07:37:03.518 -> Trying to mount /dev/sda1
07:37:03.551 -> mount: /dev/sda1 already mounted or /mnt/parnerkey busy
07:37:03.551 -> mount: according to mtab, /dev/sda1 is mounted on /zyxel/mnt/sysdisk
07:37:03.551 -> Fail to mount /dev/sda1
07:37:03.551 -> Press ENTER to continue...
07:37:03.551 -> Starting zylogd...
07:37:03.584 ->  zylog starts.
07:37:03.584 -> Starting uamd...
07:37:13.715 -> Starting ZySH daemon and client...
07:37:13.715 -> Start NSA-220 system daemon....
07:37:13.715 ->  Start ZySH daemon
07:37:13.782 -> zyshd: version 2.0.0 (build: 18:01:49 Feb  9 2011)
07:37:13.782 -> % zylog init start 
07:37:13.782 -> cat: /var/run/syslog-ng.pid: No such file or directory
07:37:13.782 -> Try to KILL SIGHUP to syslog-ng: pid=0
07:37:13.782 -> syslog-ng not running, start /usr/sbin/syslog-ng
07:37:13.815 -> Dec 29 00:31:00 (none) syslog-ng[1110]: syslog-ng starting up; version='2.0.10'
07:37:13.848 -> zyio_open_config success. (/etc/__system_default.xml, 0)
07:37:13.848 -> zyio_open_config success. (/etc/zyxel/conf/__system_default_device_ha.xml, 0)
07:37:13.848 -> /usr/sbin/zic -d /etc /var/zyxel/myzone_rule
07:37:13.848 -> /bin/ln -s -f /etc/MyZone /etc/localtime
07:37:13.848 -> /bin/hostname HomeDisk
07:37:13.914 -> Usage: umount [-hV]
07:37:13.914 ->        umount -a [-f] [-r] [-n] [-v] [-t vfstypes] [-O opts]
07:37:13.914 ->        umount [-f] [-F] [-r] [-n] [-v] special | node...
07:37:13.948 -> Usage: umount [-hV]
07:37:13.948 ->        umount -a [-f] [-r] [-n] [-v] [-t vfstypes] [-O opts]
07:37:13.948 ->        umount [-f] [-F] [-r] [-n] [-v] special | node...
07:37:13.981 -> BusyBox v1.1.1 (2011.01.26-03:51+0000) multi-call binary
07:37:13.981 -> 
07:37:13.981 -> Usage: rmdir [OPTION]... DIRECTORY...
07:37:13.981 -> 
07:37:13.981 -> sh: cannot create /i-data/.zyxel/close_ftp_mapping: Directory nonexistent
07:37:14.977 -> Init SMB DB access... 
07:37:15.011 -> rm: cannot remove `/var/log/samba/smb.db': No such file or directory
07:37:16.074 -> zyio_container_create_template(/etc/__system_default.xml): scope:[network/wlan] list:[wlan_list] type:[wlan_t] is not existed
07:37:18.897 -> Assemble volume....
07:37:18.930 -> [1153] server write-only FIFO is opened (fd=6)
07:37:18.930 -> [1153] server read-only FIFO is opened (fd=7)
07:37:18.930 -> [1153] server error read-only FIFO is opened (fd=8)
07:37:18.930 -> argc = 1,  func = 277
07:37:19.096 -> md: md0 stopped.
07:37:19.096 -> md: bind<sda2>
07:37:19.129 -> cat: /tmp/mduuid.map: No such file or directory
07:37:19.163 -> Filesystem "md0": Disabling barriers, not supported by the underlying device
07:37:19.196 -> XFS mounting filesystem md0
07:37:19.429 ->  Startup config
07:37:19.462 -> POLLHUP on 7
07:37:19.462 ->   pid = 1153
07:37:19.462 -> [1153] is disconnected
07:37:19.462 -> [1205] server write-only FIFO is opened (fd=6)
07:37:19.462 -> [1205] server read-only FIFO is opened (fd=7)
07:37:19.462 -> [1205] server error read-only FIFO is opened (fd=8)
07:37:19.462 -> argc = 1,  func = 14
07:37:19.462 -> argc = 1,  func = 17
07:37:19.462 -> argc = 1,  func = 650
07:37:19.528 -> argc = 2,  func = 104
07:37:19.528 -> argid[1]: 1069; argv[1]: ge1
07:37:19.528 -> argc = 6,  func = 108
07:37:19.528 -> argid[1]: 1069; argv[1]: ge1
07:37:19.528 -> argid[2]: 313; argv[2]: ip
07:37:19.528 -> argid[3]: 434; argv[3]: address
07:37:19.528 -> argid[4]: 1062; argv[4]: 192.168.1.5
07:37:19.528 -> argid[5]: 1062; argv[5]: 255.255.255.0
07:37:19.528 -> argc = 5,  func = 109
07:37:19.528 -> argid[1]: 1069; argv[1]: ge1
07:37:19.528 -> argid[2]: 313; argv[2]: ip
07:37:19.528 -> argid[3]: 542; argv[3]: gateway
07:37:19.528 -> argid[4]: 1062; argv[4]: 192.168.1.1
07:37:19.528 -> argc = 4,  func = 106
07:37:19.528 -> argid[1]: 1069; argv[1]: ge1
07:37:19.528 -> argid[2]: 540; argv[2]: mtu
07:37:19.528 -> argid[3]: 1386; argv[3]: 1500
07:37:19.561 -> argc = 3,  func = 105
07:37:19.561 -> argid[1]: 1069; argv[1]: ge1
07:37:19.561 -> argid[2]: 350; argv[2]: exit
07:37:19.561 -> argc = 2,  func = 427
07:37:19.561 -> argid[1]: 1062; argv[1]: 192.168.1.1
07:37:19.561 -> argc = 4,  func = 429
07:37:19.561 -> argid[1]: 867; argv[1]: fetch
07:37:19.561 -> argid[2]: 868; argv[2]: manually
07:37:19.561 -> argid[3]: 1069; argv[3]: ge1
07:37:21.587 -> /bin/rm -f /var/zyxel/zysh/egiga0.metric
07:37:21.587 -> argc = 7,  func = 77
07:37:21.587 -> argid[1]: 267; argv[1]: mail
07:37:21.587 -> argid[2]: 1379; argv[2]: 1
07:37:21.587 -> argid[3]: 435; argv[3]: category
07:37:21.587 -> argid[4]: 375; argv[4]: all
07:37:21.587 -> argid[5]: 461; argv[5]: level
07:37:21.587 -> argid[6]: 478; argv[6]: alert
07:37:21.587 -> mail server '1' log_category(all) is:alert 
07:37:21.587 -> argc = 7,  func = 77
07:37:21.587 -> argid[1]: 267; argv[1]: mail
07:37:21.587 -> argid[2]: 1379; argv[2]: 1
07:37:21.587 -> argid[3]: 435; argv[3]: category
07:37:21.587 -> argid[4]: 375; argv[4]: all
07:37:21.587 -> argid[5]: 461; argv[5]: level
07:37:21.587 -> argid[6]: 375; argv[6]: all
07:37:21.587 -> mail server '1' log_category(all) is:all 
07:37:21.620 -> argc = 2,  func = 68
07:37:21.620 -> argid[1]: 1061; argv[1]: ntp1.tele.dk
07:37:21.620 -> argc = 2,  func = 60
07:37:21.620 -> argid[1]: 1112; argv[1]: +0100
07:37:21.620 -> /usr/sbin/zic -d /etc /var/zyxel/myzone_rule
07:37:21.620 -> /bin/ln -s -f /etc/MyZone /etc/localtime
07:37:21.620 -> argc = 1,  func = 72
07:37:21.620 -> /usr/sbin/ntpdate_agent ntp1.tele.dk
07:37:21.620 -> argc = 4,  func = 343
07:37:21.620 -> argid[1]: 1205; argv[1]: "CET"
07:37:21.620 -> argid[2]: 593; argv[2]: in
07:37:21.620 -> argid[3]: 1206; argv[3]: "Brussels,Copenhagen,Madrid,Paris"
07:37:21.687 -> argc = 2,  func = 192
07:37:21.687 -> argid[1]: 1122; argv[1]: "admin"
07:37:21.753 -> argc = 5,  func = 193
07:37:21.753 -> argid[1]: 1122; argv[1]: "admin"
07:37:21.753 -> argid[2]: 1390; argv[2]: 501
07:37:21.753 -> argid[3]: 363; argv[3]: password
07:37:21.753 -> argid[4]: 1145; argv[4]: A3D1E87994E85270C482C03F54CDB5D9:F9F5B7CD7933221687A0AAA18F67C9A9
07:37:21.886 -> enter smb_db_update_user
07:37:21.886 -> argc = 5,  func = 193
07:37:21.919 -> argid[1]: 1122; argv[1]: "admin"
07:37:21.919 -> argid[2]: 1390; argv[2]: 501
07:37:21.919 -> argid[3]: 633; argv[3]: type
07:37:21.919 -> argid[4]: 634; argv[4]: admin
07:37:21.919 -> enter smb_db_update_user
07:37:21.919 -> argc = 5,  func = 194
07:37:21.919 -> argid[1]: 1122; argv[1]: "admin"
07:37:21.919 -> argid[2]: 1390; argv[2]: 501
07:37:21.919 -> argid[3]: 638; argv[3]: shpass
07:37:21.919 -> argid[4]: 1148; argv[4]:  $1$$O50.7sajoawk19kwSgxsz0
07:37:21.919 -> shpass : $1$$O50.7sajoawk19kwSgxsz0
07:37:21.919 -> argc = 4,  func = 189
07:37:21.919 -> argid[1]: 1122; argv[1]: "admin"
07:37:21.919 -> argid[2]: 1390; argv[2]: 501
07:37:21.919 -> argid[3]: 350; argv[3]: exit
07:37:21.919 -> argc = 6,  func = 174
07:37:21.952 -> argid[1]: 456; argv[1]: share
07:37:21.952 -> argid[2]: 626; argv[2]: save
07:37:21.952 -> argid[3]: 1150; argv[3]: "HomeDisk"
07:37:21.952 -> argid[4]: 395; argv[4]: path
07:37:21.952 -> argid[5]: 1152; argv[5]: "/i-data/md0/HomeDisk"
07:37:21.952 -> argc = 7,  func = 175
07:37:21.952 -> argid[1]: 456; argv[1]: share
07:37:21.952 -> argid[2]: 626; argv[2]: save
07:37:21.952 -> argid[3]: 1150; argv[3]: "HomeDisk"
07:37:21.952 -> argid[4]: 395; argv[4]: path
07:37:21.952 -> argid[5]: 1152; argv[5]: "/i-data/md0/HomeDisk"
07:37:21.952 -> argid[6]: 612; argv[6]: media-server
07:37:21.952 -> argc = 7,  func = 163
07:37:21.952 -> argid[1]: 456; argv[1]: share
07:37:21.952 -> argid[2]: 626; argv[2]: save
07:37:22.018 -> argid[3]: 1150; argv[3]: "HomeDisk"
07:37:22.018 -> argid[4]: 395; argv[4]: path
07:37:22.018 -> argid[5]: 1152; argv[5]: "/i-data/md0/HomeDisk"
07:37:22.018 -> argid[6]: 350; argv[6]: exit
07:37:22.018 -> RegenSmbConfigFile:2114 Close file ok
07:37:22.018 -> argc = 6,  func = 174
07:37:22.018 -> argid[1]: 456; argv[1]: share
07:37:22.018 -> argid[2]: 626; argv[2]: save
07:37:22.018 -> argid[3]: 1150; argv[3]: "admin"
07:37:22.018 -> argid[4]: 395; argv[4]: path
07:37:22.018 -> argid[5]: 1152; argv[5]: "/i-data/md0/admin"
07:37:22.018 -> argc = 7,  func = 163
07:37:22.018 -> argid[1]: 456; argv[1]: share
07:37:22.018 -> argid[2]: 626; argv[2]: save
07:37:22.018 -> argid[3]: 1150; argv[3]: "admin"
07:37:22.052 -> argid[4]: 395; argv[4]: path
07:37:22.052 -> argid[5]: 1152; argv[5]: "/i-data/md0/admin"
07:37:22.052 -> argid[6]: 350; argv[6]: exit
07:37:22.052 -> RegenSmbConfigFile:2114 Close file ok
07:37:22.052 -> argc = 2,  func = 399
07:37:22.052 -> argid[1]: 1219; argv[1]: default
07:37:22.218 -> argc = 2,  func = 396
07:37:22.218 -> argid[1]: 1226; argv[1]: yes
07:37:22.218 -> argc = 1,  func = 519
07:37:22.549 -> Jan  1 00:59:59 (none) mt-daapd[1335]: Starting rendezvous daemon
07:37:22.616 -> Jan  1 00:59:59 (none) mt-daapd[1339]: Starting signal handler
07:37:23.612 -> Jan  1 00:59:59 (none) mt-daapd[1339]: Loading playlists
07:37:23.678 -> Jan  1 00:59:59 (none) mt-daapd[1339]: Initializing database
07:37:23.678 -> Jan  1 00:59:59 (none) mt-daapd[1339]: Starting mp3 scan
07:37:23.678 -> Jan  1 00:59:59 (none) mt-daapd[1339]: Starting web server from /usr/local/apache/htdocs/zyxel on port 3689
07:37:23.678 -> Jan  1 00:59:59 (none) mt-daapd[1339]: Registering rendezvous names
07:37:23.678 -> Jan  1 00:59:59 (none) mt-daapd[1339]: Scanned 0 songs in  1 seconds
07:37:24.509 -> Starting iTune SDisablePowerSaving
07:37:24.509 -> erver: 
07:37:24.509 ->   CheckTimerState = 1
07:37:24.575 ->  /i-data/md0/.zyEnablePowerSaving 
07:37:24.575 -> xel existing: /iPowerSavingTime = 15
07:37:24.575 -> -data/md0/.zyxel exist
07:37:24.575 -> iTunes starting OK
07:37:24.575 -> Successfully starting iTunes server!
07:37:24.575 -> argc = 2,  func = 146
07:37:24.575 -> argid[1]: 1137; argv[1]: 15
07:37:24.575 -> test0
07:37:24.575 -> Test1
07:37:24.575 -> Test2
07:37:24.575 -> Test3:
07:37:24.575 -> argc = 5,  func = 168
07:37:24.575 -> argid[1]: 456; argv[1]: share
07:37:24.575 -> argid[2]: 615; argv[2]: recycle-bin
07:37:24.575 -> argid[3]: 620; argv[3]: expireday
07:37:24.575 -> argid[4]: 1389; argv[4]: 45
07:37:24.575 -> argc = 2,  func = 160
07:37:24.575 -> argid[1]: 1142; argv[1]: d
07:37:24.575 -> exec_cmd complete
07:37:24.575 -> eth status = Wake-onpumbg 
07:37:24.608 -> ethtest0
07:37:24.608 -> Test1
07:37:24.608 -> Test2
07:37:24.608 -> Test3:
07:37:24.608 -> eth cmd = /sbin/ethtool -s egiga0 wol d
07:37:24.608 -> argc = 2,  func = 18
07:37:24.608 -> argid[1]: 350; argv[1]: exit
07:37:24.608 -> argc = 1,  func = 20
07:37:24.608 -> POLLHUP on 7
07:37:24.608 ->   pid = 1205
07:37:24.608 -> [1205] is disconnected
07:37:24.608 -> TDC Style Detected, overwrite admin's password
07:37:24.674 -> [1407] server write-only FIFO is opened (fd=6)
07:37:24.674 -> [1407] server read-only FIFO is opened (fd=7)
07:37:24.674 -> [1407] server error read-only FIFO is opened (fd=8)
07:37:24.674 -> argc = 6,  func = 190
07:37:24.674 -> argid[1]: 363; argv[1]: password
07:37:24.674 -> argid[2]: 616; argv[2]: modify
07:37:24.674 -> argid[3]: 1122; argv[3]: "admin"
07:37:24.674 -> argid[4]: 1144; argv[4]: "33D67NTk"
07:37:24.674 -> argid[5]: 1143; argv[5]: RaidLing
07:37:24.774 -> enter smb_db_update_user
07:37:24.808 -> POLLHUP on 7
07:37:24.808 ->   pid = 1407
07:37:24.808 -> [1407] is disconnected
07:37:24.841 -> ---> Starting upgrade_firmware.sh at 1920-12-29 01:31:11
07:37:24.907 -> ---> Starting upgrade_firmware.sh at 1920-12-29 01:31:11
07:37:24.907 -> cat: /tmp/fwupgrade/fwlog: No such file or directory
07:37:24.907 -> [: -1: unknown operand
07:37:24.907 -> rm: cannot remove `/i-data/.zyxel/zyfw/zyfw_info': No such file or directory
07:37:24.907 -> rm: cannot remove `/tmp/zyfw_info': No such file or directory
07:37:24.907 -> ---> download firmware information
07:37:24.907 -> rm: cannot remove `/tmp/zyfw_dl_errno': No such file or directory
07:37:24.907 -> [1441] server write-only FIFO is opened (fd=6)
07:37:24.940 -> [1441] server read-only FIFO is opened (fd=7)
07:37:24.940 -> [1441] server error read-only FIFO is opened (fd=8)
07:37:24.940 -> argc = 2,  func = 637
07:37:24.940 -> argid[1]: 1343; argv[1]: 1
07:37:24.940 -> Result: Download
07:37:24.940 -> LastUpdated: N/A
07:37:24.940 -> Model: N/A
07:37:24.940 -> FW file: N/A
07:37:24.940 -> FW version: N/A
07:37:24.940 -> Revision: N/A
07:37:24.940 -> Release date: N/A
07:37:24.940 -> Release note: N/A
07:37:24.940 -> Size: N/A
07:37:24.940 -> Checksum: N/A
07:37:24.940 -> POLLHUP on 7
07:37:24.940 ->   pid = 1441
07:37:24.940 -> [1441] is disconnected
07:37:24.940 -> ---> make sure process to download fwInfo is finished
07:37:25.007 -> du: /i-data/md0/.zyxel/clidump.gui: No such file or directory
07:37:25.007 -> [: 10240: unknown operand
07:37:25.073 -> du: /i-data/.zyxel/twonkymedia.log: No such file or directory
07:37:25.107 -> [: 10240: unknown operand
07:37:25.107 -> du: /i-data/.zyxel/cdsdaemon.log: No such file or directory
07:37:25.107 -> [: 10240: unknown operand
07:37:25.107 -> configure terminal ip smb internal enable "/i-data/md0"
07:37:25.140 -> [1490] server write-only FIFO is opened (fd=6)
07:37:25.173 -> [1490] server read-only FIFO is opened (fd=7)
07:37:25.173 -> [1490] server error read-only FIFO is opened (fd=8)
07:37:25.173 -> argc = 4,  func = 180
07:37:25.173 -> argid[1]: 630; argv[1]: internal
07:37:25.173 -> argid[2]: 302; argv[2]: enable
07:37:25.173 -> argid[3]: 1164; argv[3]: "/i-data/md0"
07:37:25.173 -> RegenSmbConfigFile:2114 Close file ok
07:37:25.173 -> POLLHUP on 7
07:37:25.173 ->   pid = 1490
07:37:25.173 -> [1490] is disconnected
07:37:25.173 -> Starting smbd...
07:37:25.306 -> Starting nmbd...
07:37:25.472 -> readlink: /i-data/md1: No such file or directory
07:37:25.472 -> configure terminal ip smb internal disable "/i-data/md1"
07:37:25.472 -> [1501] server write-only FIFO is opened (fd=6)
07:37:25.539 -> [1501] server read-only FIFO is opened (fd=7)
07:37:25.539 -> [1501] server error read-only FIFO is opened (fd=8)
07:37:25.539 -> argc = 4,  func = 181
07:37:25.539 -> argid[1]: 630; argv[1]: internal
07:37:25.539 -> argid[2]: 303; argv[2]: disable
07:37:25.539 -> argid[3]: 1164; argv[3]: "/i-data/md1"
07:37:25.539 -> RegenSmbConfigFile:2114 Close file ok
07:37:25.539 -> POLLHUP on 7
07:37:25.539 ->   pid = 1501
07:37:25.539 -> [1501] is disconnected
07:37:25.539 -> configure terminal ip smb internal enable "/i-data/3c7e9e7c"
07:37:25.539 -> [1509] server write-only FIFO is opened (fd=6)
07:37:25.572 -> [1509] server read-only FIFO is opened (fd=7)
07:37:25.572 -> [1509] server error read-only FIFO is opened (fd=8)
07:37:25.572 -> argc = 4,  func = 180
07:37:25.572 -> argid[1]: 630; argv[1]: internal
07:37:25.572 -> argid[2]: 302; argv[2]: enable
07:37:25.572 -> argid[3]: 1164; argv[3]: "/i-data/3c7e9e7c"
07:37:25.572 -> RegenSmbConfigFile:2114 Close file ok
07:37:25.572 -> POLLHUP on 7
07:37:25.572 ->   pid = 1509
07:37:25.572 -> [1509] is disconnected
07:37:25.638 -> Starting crond ...
07:37:26.136 -> Adding 524280k swap on /i-data/.zyxel/swap_ul6545p.  Priority:-1 extents:1 across:524280k
07:37:26.170 ->  1442 root       1740 S < /bin/zyfw_downloader http://firmware.tdconline.dk/NSA
07:37:26.170 ->   ---> still downloading, wait 2 second
07:37:26.170 -> storage_gen_swap.sh:/zyxel/mnt/sysdisk/swap_ul6545p exists
07:37:26.203 -> GMT offset=3600s
07:37:26.203 -> setting system time zone to tz_minuteswest=-60
07:37:26.336 -> [1613] server write-only FIFO is opened (fd=6)
07:37:26.336 -> [1613] server read-only FIFO is opened (fd=7)
07:37:26.336 -> [1613] server error read-only FIFO is opened (fd=8)
07:37:26.369 -> argc = 2,  func = 348
07:37:26.369 -> argid[1]: 1207; argv[1]: former
07:37:26.369 -> POLLHUP on 7
07:37:26.369 ->   pid = 1613
07:37:26.369 -> [1613] is disconnected
07:37:26.535 -> Dec 29 01:31:13 (none) syslog-ng[1110]: Termination requested via signal, terminating;
07:37:26.535 -> Dec 29 01:31:13 (none) syslog-ng[1110]: syslog-ng shutting down; version='2.0.10'
07:37:26.535 -> killall: webdisk_hook: no process killed
07:37:26.967 -> /usr/python-2.6.2/lib/python2.6/site-packages/flickrapi/__init__.py:45: DeprecationWarning: the md5 module is deprecated; use hashlib instead
07:37:27.531 -> killall: webdisk_hook: no process killed
07:37:27.597 -> Dec 29 01:31:14 HomeDisk syslog-ng[1649]: syslog-ng starting up; version='2.0.10'
07:37:28.229 ->  1442 root       1740 S < /bin/zyfw_downloader http://firmware.tdconline.dk/NSA
07:37:28.229 ->   ---> still downloading, wait 2 second
07:37:28.627 -> [webdisk.h]init_backup_db(509): CREATE TABLE IF NOT EXISTS backup (	seq_num INTEGER PRIMARY KEY,	action TEXT,	old_name TEXT,	old_parent TEXT,	old_path TEXT,	new_name TEXT,	new_parent TEXT,	new_path TEXT,	type TEXT,	size INTEGER,	m_date INTEGER,	d_date INTEGER,	fsync INTEGER,	flocalD INTEGER,	fremoteD INTEGER,	errCount INTEGER,	w_name TEXT,	w_parent TEXT,	w_path TEXT,	file_id INTEGER,	id_parent INTEGER,	checksum TEXT);
07:37:28.660 -> [webdisk.h]init_backup_db(517): CREATE INDEX IF NOT EXISTS seq_num on backup (seq_num);
07:37:28.660 -> [webdisk_maintain.c]main(834): delete from backup where d_date < -1551742125 and fsync=1 and flocalD=1 and fremoteD=1
07:37:28.693 -> [webdisk_maintain.c]main(843): vacuum backup
07:37:30.154 -> Starting Web Server...
07:37:30.254 ->  1442 root       1740 S < /bin/zyfw_downloader http://firmware.tdconline.dk/NSA
07:37:30.254 ->   ---> still downloading, wait 2 second
07:37:31.350 -> Jan  1 00:59:59 HomeDisk httpd[1720]: [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
07:37:31.350 -> Jan  1 00:59:59 HomeDisk httpd[1720]: [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
07:37:31.350 -> Jan  1 00:59:59 HomeDisk httpd[1720]: [warn] RSA server certificate CommonName (CN) `HomeDisk' does NOT match server name!?
07:37:31.350 -> Jan  1 00:59:59 HomeDisk httpd[1720]: [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
07:37:31.350 -> Jan  1 00:59:59 HomeDisk httpd[1720]: [warn] RSA server certificate CommonName (CN) `HomeDisk' does NOT match server name!?
07:37:31.350 -> Jan  1 00:59:59 HomeDisk httpd[1720]: [error] mod_auth_zyxel: initialized.
07:37:31.682 -> Jan  1 00:59:59 HomeDisk httpd[1729]: [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
07:37:31.715 -> Jan  1 00:59:59 HomeDisk httpd[1729]: [warn] RSA server certificate CommonName (CN) `HomeDisk' does NOT match server name!?
07:37:31.715 -> Jan  1 00:59:59 HomeDisk httpd[1729]: [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
07:37:31.715 -> Jan  1 00:59:59 HomeDisk httpd[1729]: [warn] RSA server certificate CommonName (CN) `HomeDisk' does NOT match server name!?
07:37:31.715 -> Jan  1 00:59:59 HomeDisk httpd[1729]: [error] mod_auth_zyxel: initialized.
07:37:32.313 ->  1442 root       1740 S < /bin/zyfw_downloader http://firmware.tdconline.dk/NSA
07:37:32.346 ->   ---> still downloading, wait 2 second
07:37:32.811 -> ===> Starting schedule_controller ...
07:37:32.877 -> killall: timer_source: no process killed
07:37:32.910 -> Starting "/etc/init.d/zypkg_controller.sh".
07:37:32.943 -> Starting to set up zy-pkgs environment ...
07:37:33.043 -> cp: /etc/zyxel/zy-pkgs/*: No such file or directory
07:37:33.109 -> du: /usr/local/zy-pkgs/tmp/zypkg.log: No such file or directory
07:37:33.109 -> [: 10240: unknown operand
07:37:33.109 -> Finish "/etc/init.d/zypkg_controller.sh".
07:37:33.142 -> Starting "/etc/init.d/zypkg_controller.sh".
07:37:33.142 -> Starting all zypkgs via "/etc/init.d/zypkg_controller.sh" ...
07:37:33.275 -> - starting package "PHP-MySQL-phpMyAdmin" ...
07:37:33.275 -> ---> Error: start-up program "/usr/local/zy-pkgs/etc/init.d/PHP-MySQL-phpMyAdmin" is not existed or not excutable
07:37:33.309 -> - starting package "SqueezeCenter" ...
07:37:33.342 -> ---> Error: start-up program "/usr/local/zy-pkgs/etc/init.d/SqueezeCenter" is not existed or not excutable
07:37:33.375 -> - starting package "SMART" ...
07:37:33.408 -> ---> Error: start-up program "/usr/local/zy-pkgs/etc/init.d/SMART" is not existed or not excutable
07:37:33.441 -> /etc/init.d/zypkg_controller.sh: /etc/init.d/zypkg_controller.sh: 491: cannot open /i-data/md0/admin/zy-pkgs/USRPKG_DEPS_START: No such file
07:37:33.441 -> Finish "/etc/init.d/zypkg_controller.sh".
07:37:33.474 -> rm: cannot remove `/i-data/md0/HomeDisk/start.htm': No such file or directory
07:37:33.707 -> Starting app_wd...
07:37:33.773 ->  core_checksum : 60e5ac84547193df98917040f063855e
07:37:33.807 ->  fwversion : V3.34(AFN.2)
07:37:33.807 ->  img_checksum : 7ddf39bd27e18147c31a7d325e5acc98
07:37:33.807 ->  modelid : DA01
07:37:33.807 ->  revision : 29152
07:37:33.807 ->  romfile_checksum : 1A7D
07:37:33.840 ->  zld_checksum : 72ff7c00ebca9f21c3129d854d47cdb7
07:37:33.873 -> [1976] server write-only FIFO is opened (fd=6)
07:37:33.873 -> [1976] server read-only FIFO is opened (fd=7)
07:37:33.873 -> [1976] server error read-only FIFO is opened (fd=8)
07:37:33.873 -> argc = 2,  func = 641
07:37:33.873 -> argid[1]: 1346; argv[1]: enable
07:37:33.939 -> Result: Success
07:37:33.939 -> POLLHUP on 7
07:37:33.939 ->   pid = 1976
07:37:33.939 -> [1976] is disconnected
07:37:33.939 -> led_state_map_addr = 46
07:37:33.939 -> Jan  1 00:59:59 HomeDisk linuxrc: Starting pid 1
07:37:34.935 -> HomeDisk login: Jan  1 00:59:59 HomeDisk ntpdate[1241]: no servers can be used, exiting

Please let me know if this isn't enough.

If you do a search for admin you'll find where the branded firmware overwrites the admin password of the original firmware.
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 02, 2020 01:09AM
So you are flashing from inside stock OS.

Quote

/mnt/testmount/tools # ./nanddump --noecc --omitoob -l 0x80000 -f mtd0 /dev/mtd0Segmentation fault

This means this nanddump can not be executed in stock OS. Which nanddump you are using? is that from here in the instruction?

Quote
https://forum.doozan.com/read.php?3,12381
A. Flashing Instruction:


Installation is the same for each u-Boot image, the instruction below is written to include all boxes. So choose the platform name that you are installing for, and copy/paste the appropriate commands.

If you are running kernel that do not provide mtd-utils and uboot-tools (fw_setenv, fw_printenv, flash_erase, nandwrite), you can download the NAND and U-Boot tools binaries here in this thread.

In stock OS, dmesg show your mtds are OK, as expected. But as a precaution, also get this information:

cat /proc/mtd

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 02, 2020 02:26AM
I am using the tools from "https://forum.doozan.com/read.php?3,27280"; which I copied onto an ext3-formatted usb stick.

The NSA310 listed the stick as /dev/sdb1 and it said it mounted it at /mnt/sdb1 but the folder /mnt/sdb1 was empty (probably because the whole filesystem is read-only. So I mounted it manually to /mnt/testmount and that is from where I tried to run the nandump.

I am not near the nas atm, so I'll have to run

cat /proc/mtd

when I get home. Thank you for your help!
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 02, 2020 01:11PM
Here is the output:

20:08:59.444 -> /mnt/sdb1 $ cat /proc/mtd
20:10:16.720 -> dev:    size   erasesize  name
20:10:16.720 -> mtd0: 00100000 00020000 "uboot"
20:10:16.720 -> mtd1: 00080000 00020000 "uboot_env"
20:10:16.720 -> mtd2: 00080000 00020000 "key_store"
20:10:16.720 -> mtd3: 00080000 00020000 "info"
20:10:16.720 -> mtd4: 00a00000 00020000 "etc"
20:10:16.720 -> mtd5: 00a00000 00020000 "kernel_1"
20:10:16.720 -> mtd6: 02fc0000 00020000 "rootfs1"
20:10:16.720 -> mtd7: 00a00000 00020000 "kernel_2"
20:10:16.720 -> mtd8: 02fc0000 00020000 "rootfs2"
20:10:16.720 -> /mnt/sdb1 $

/edit: Should I try installing the rootfs first and update uboot later?

/edit: Hmm, ok, I created an usb stick as described (with the 25th of august version) but when I boot up the nsa310 it ignores the usb stick



Edited 4 time(s). Last edit at 03/02/2020 02:26PM by kiesel.
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 02, 2020 03:29PM
Ok, so the problem with the segfault seems to have been caused by the branded firmware (even though I ran it as root, uid=1). I debranded the firmware using the instructions from here

Forum

(post3)

and the files which I luckily found here:
Mega
OR!
Google Drive

I used the google drive link but they seem to be the same kit.

I am linking them here because I had a really hard time finding them and I hope it might save somebody else the trouble.

With this I am getting:

 ./nanddump --noecc --omitoo
b -l 0x80000 -f mtd0 /dev/mtd0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00080000...


The rest will be done tomorrow.

Can I go ahead with this output?

/e-data/fdea004f-2f09-4f53-87a4-c2bac9d87cbf/tools # cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "uboot"
mtd1: 00080000 00020000 "uboot_env"
mtd2: 00080000 00020000 "key_store"
mtd3: 00080000 00020000 "info"
mtd4: 00a00000 00020000 "etc"
mtd5: 00a00000 00020000 "kernel_1"
mtd6: 02fc0000 00020000 "rootfs1"
mtd7: 00a00000 00020000 "kernel_2"
mtd8: 02fc0000 00020000 "rootfs2"
/e-data/fdea004f-2f09-4f53-87a4-c2bac9d87cbf/tools # cat /etc/fw_env.config
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundand
# environment sector is assumed present.
# Notice, that the "Number of sectors" is ignored on NOR.

# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
# NAND example
/dev/mtd1               0x0000          0x20000         0x20000                 4

/e-data/fdea004f-2f09-4f53-87a4-c2bac9d87cbf/tools #



Edited 1 time(s). Last edit at 03/02/2020 03:32PM by kiesel.
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 02, 2020 05:23PM
kiesel,


> With this I am getting:
>
>
>  ./nanddump --noecc --omitoo
> b -l 0x80000 -f mtd0 /dev/mtd0
> Block size 131072, page size 2048, OOB size 64
> Dumping data starting at 0x00000000 and ending at
> 0x00080000...
>

Looks OK.

> # cat /proc/mtd
> dev: size erasesize name
> mtd0: 00100000 00020000 "uboot"
> mtd1: 00080000 00020000 "uboot_env"
> mtd2: 00080000 00020000 "key_store"
> mtd3: 00080000 00020000 "info"
> mtd4: 00a00000 00020000 "etc"
> mtd5: 00a00000 00020000 "kernel_1"
> mtd6: 02fc0000 00020000 "rootfs1"
> mtd7: 00a00000 00020000 "kernel_2"
> mtd8: 02fc0000 00020000 "rootfs2"

The above looks OK, too.


> # cat /etc/fw_env.config
> # Configuration file for fw_(printenv/saveenv)
> utility.
> # Up to two entries are valid, in this case the
> redundand
> # environment sector is assumed present.
> # Notice, that the "Number of sectors" is ignored
> on NOR.
>
> # MTD device name Device offset Env. size
> Flash sector size Number of sectors
> # NAND example
> /dev/mtd1 0x0000 0x20000
> 0x20000 4
>

The above fw_env.config can be adjusted after flashing u-boot image and u-boot envs image.


07:36:54.315 -> NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
07:36:54.315 -> Scanning device for bad blocks
07:36:54.315 -> Bad eraseblock 76 at 0x00980000
07:36:54.315 -> Bad eraseblock 281 at 0x02320000
07:36:54.315 -> Bad eraseblock 494 at 0x03dc0000
07:36:54.348 -> Bad eraseblock 703 at 0x057e0000
07:36:54.415 -> 9 cmdlinepart partitions found on MTD device nand_mtd

The bad blocks showed in dmesg, but they are far away from the 1st 1MB in NAND.

So it is OK to flash new u-boot.

Remember, since you don't have serial console, you need to be extra careful. If you'd like, post the entire flashing session log here, I can double check it before you reboot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 03, 2020 01:23AM
Thank you for your help! I will be very careful. I have a serial console. I mean I connected my FTDI adapter to the internal pins and issue commands using minicom, that's what you mean, right?
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 03, 2020 02:08AM
kiesel,

> Thank you for your help! I will be very careful. I
> have a serial console. I mean I connected my FTDI
> adapter to the internal pins and issue commands
> using minicom, that's what you mean, right?

Yes, exactly. That's serial console.

And in the u-boot installation instruction, I recommend users to try UART booting first, if they have serial console.

Quote

UART Booting: If possible, try to test this boot image with UART booting before flashing to NAND. See davygravy's UART booting using kwboot instruction here in this thread. The latest u-boot image released here should be used for UART booting, if your box is the type that supports it (these do not: Dockstar, Pogo E02, iConnect).

UART booting meaning you connect serial console, but instead of running minicom/piccom, you would run kwboot to load the new u-boot image through the serial port and run it. This is the rescue path, in case your flashing session is running into problem (such as power outage, power surge,...), or you mistakenly flashed a wrong image.

Here is an example unbricking NSA325 (a close cousin of this NSA310) with kwboot:

https://forum.doozan.com/read.php?3,51739,51919#msg-51919

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 03, 2020 01:13PM
Unfortunately I ran into a problem:

device ide 0:1
** File not found /boot/uImage **
device ide 1:1
** Bad device ide 1 **
device ide 2:1
** Bad device ide 2 **
device ide 3:1
** Bad device ide 3 **
Scan device mmc
Unknown command 'mmc' - try 'help'
device mmc 0:1
** Bad device mmc 0 **
device mmc 1:1
** Bad device mmc 1 **
device mmc 2:1
** Bad device mmc 2 **
device mmc 3:1
** Bad device mmc 3 **
loading uImage ...
** Bad device usb 0 **
loading uInitrd ...
** Bad device usb 0 **
loading DTB ...
** Bad device usb 0 **
Wrong Image Format for bootm command
Error occured, error code = 112
ERROR: can't get kernel image!
NSA310>

I am guessing this is related to the fact that my box was running kernel 2.6? As said in the doc I deleted the dtb file env. On the bright side I did see

U-Boot 2017.07-tld-1 (….)
<your box name>


Should I unbrick the box or is there something that can/should be done from here?
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 03, 2020 05:30PM
> I am guessing this is related to the fact that my
> box was running kernel 2.6?

Yes. Usually you would install Debian rootfs and boot with it (Otherwise there is no need to upgrade u-boot)

See the latest rootfs:

https://forum.doozan.com/read.php?2,12096

Scroll down to


Quote

Updated 25 Aug 2019:

Basic Debian buster Kirkwood rootfs for most Kirwood plugs:

- tarball size: 209M
- install size: 536M
- The init system used in this rootfs is sysvinit . To boot with systemd, see note 2 below.
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, nfs server/client, iperf, ethtool, sysvinit-core, sysvinit, sysvinit-utils, u-boot-tools, and mtd-utils.
- see LED controls in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root

Download at Dropbox:

Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2

md5:
cd8ad170aa1a9fdc2a0a1c43ab1c0721
sha256:
8ccbbced367b4c2bf3728262e882f8232aff0fecd1c0c767219a0cab49a0b9bf

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 04, 2020 01:21PM
I followed the instructions but the device doesn't boot.

SoC:   Kirkwood 88F6281_A1
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
PHY reset timed out
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0 
Initializing devices...
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD5000AAKX-001CA0  Firm: 15.01H15 Ser#:  WD-WCAYUL098558
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
Unknown command 'mmc' - try 'help'
Loading envs from usb 0...
** File not found /boot/uEnv.txt **
Loading envs from usb 1...
** Bad device usb 1 **
Loading envs from usb 2...
** Bad device usb 2 **
Loading envs from usb 3...
** Bad device usb 3 **
Loading envs from ide 0...
** File not found /boot/uEnv.txt **
Loading envs from ide 1...
** Bad device ide 1 **
Loading envs from ide 2...
** Bad device ide 2 **
Loading envs from ide 3...
** Bad device ide 3 **
Loading envs from mmc 0...
** Bad device mmc 0 **
Loading envs from mmc 1...
** Bad device mmc 1 **
Loading envs from mmc 2...
** Bad device mmc 2 **
Loading envs from mmc 3...
** Bad device mmc 3 **
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 723 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
4963680 bytes read in 911 ms (5.2 MiB/s)
loading uInitrd ...
9713936 bytes read in 846 ms (11 MiB/s)
loading DTB ...
** No boot file defined **
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.2.9-kirkwood-tld-1
   Created:      2019-08-25   2:22:31 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4963616 Bytes = 4.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.2.9-kirkwood-tld-1
   Created:      2019-08-25   2:22:50 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9713872 Bytes = 9.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
   Loading Ramdisk to 0f1ca000, end 0fb0d8d0 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Error: invalid dtb and unrecognized/unsupported machine ID
  r1=0x00000fb6, r2=0x00000100
  r2[]=05 00 00 00 01 00 41 54 00 00 00 00 00 00 00 00
Available machine support:

ID (hex)	NAME
ffffffff	Generic DT based system
ffffffff	Marvell Kirkwood (Flattened Device Tree)

Please check your kernel config and/or bootloader.

Is this because I didn't set a dtb? Should I do step 5 of the rootfs installation because it didn't work when flashing uboot?

/edit: Ok, so that gave me at least a busybox shell

Begin: Running /scripts/local-block ... done.
done.
Gave up waiting for root file system device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  LABEL=rootfs does not exist.  Dropping to a shell!


BusyBox v1.30.1 (Debian 1:1.30.1-4) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs) ls
bin      dev      init     proc     run      scripts  tmp      var
conf     etc      lib      root     sbin     sys      usr
(initramfs) mount
rootfs on / type rootfs (rw)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=117388k,nr_inodes=29347,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=24532k,mode=755)
(initramfs) ls /etc/
fstab          ld.so.conf     modprobe.d/    udev/
ld.so.cache    ld.so.conf.d/  mtab

But I am not sure how to proceed from here.

/edit: I did not persist the label in gparted when I created the USB stick -.- sorry.

I booted into debian now, but no eth connection is showing. Let's see what I can do.

/edit2: It seems the connection has been renamed to enp1s0 should that be fixed?

The mac address is also pretty weird (00:00:00:00:00:30) even though it's set in fw_printenv:

root@debian:~# fw_printenv ethaddr
ethaddr=52:3b:20:9c:11:51
root@debian:~#

/edit3: So I updated to 5.5.1 and everything is working perfectly, thanks! I somehow (mistakenly) suspected to find an installer which would let me format the internal HDD of the nas and install everything there. What's the recommended way of doing that? Is the easiest way to take the HDD out and hook it up to my laptop or should I partition everything via the serial console/ssh?

Thank you so much for your help!



Edited 6 time(s). Last edit at 03/04/2020 03:21PM by kiesel.
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 04, 2020 05:51PM
kiesel,

> /edit3: So I updated to 5.5.1 and everything is
> working perfectly, thanks! I somehow (mistakenly)
> suspected to find an installer which would let me
> format the internal HDD of the nas and install
> everything there.

> Is the easiest way to take the HDD
> out and hook it up to my laptop or should I
> partition everything via the serial console/ssh?

You can either do this while SSH in the NSA310 with USB rootfs running. Or you can take it out to other Linux box. See here for example:

https://forum.doozan.com/read.php?2,96569,97274#msg-97274

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 06, 2020 01:31AM
Everything works perfectly now. Thank you so much for your help!

Have a nice weekend!
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 06, 2020 02:15AM
Cool!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 07, 2020 03:10PM
I was a bit too quick there.

I moved everything to the internal HDD but I only just now realized the NAS doesn't boot without the stick.

root@debian:/boot# parted -l
Model: ATA WDC WD5000AAKX-0 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system     Flags
 1      1049kB  16.9GB  16.9GB  primary  ext4
 2      16.9GB  21.2GB  4295MB  primary  linux-swap(v1)
 3      21.2GB  500GB   479GB   primary  ext4


Model:   (scsi)
Disk /dev/sdb: 8167MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  8166MB  8165MB  primary  ext4


Error: /dev/mtdblock2: unrecognised disk label
Model: Unknown (unknown)                                                  
Disk /dev/mtdblock2: 33.6MB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags: 

Error: /dev/mtdblock0: unrecognised disk label
Model: Unknown (unknown)                                                  
Disk /dev/mtdblock0: 1049kB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags: 

Error: /dev/mtdblock3: unrecognised disk label
Model: Unknown (unknown)                                                  
Disk /dev/mtdblock3: 95.4MB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags: 

Error: /dev/mtdblock1: unrecognised disk label
Model: Unknown (unknown)                                                  
Disk /dev/mtdblock1: 4194kB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags: 

root@debian:/boot#

As you can see the internal HDD is sda and the USB stick is sdb.

sdb isn't mounted
root@debian:/boot# mount|grep sdb
root@debian:/boot#

And the labels are right:

root@debian:/boot# ls -l /dev/disk/by-label
total 0
drwxr-xr-x 2 root root  80 Mar  7 13:04 .
drwxr-xr-x 7 root root 140 Mar  7 13:04 ..
lrwxrwxrwx 1 root root  10 Mar  7 13:08 rootfs -> ../../sda1
lrwxrwxrwx 1 root root  10 Mar  7 13:08 rootfs_bu -> ../../sdb1
root@debian:/boot#

This is the fstab

root@debian:/boot# cat /etc/fstab 
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
LABEL=rootfs    /               ext4    noatime,errors=remount-ro 0 1
/dev/sda3    /media/daten    ext4    defaults    0    1
UUID=9e41369a-fb52-4f05-b1d1-0e3f2cabb176 none   swap    sw      0       0
tmpfs          /tmp            tmpfs   defaults          0       0
root@debian:/boot#

Are there any kirkwood specific settings I am overlooking?
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 07, 2020 04:45PM
kiesel,

With USB drive removed, the HDD rootfs attched. Power up, interrupt serial console and

printenv
boot

And post the entire serial console log here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 08, 2020 02:00PM
Hi Bodhi,

please find the output here:


printenv:
NSA310> printenv
arcNumber=4022
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-nsa310.dtb
load_dtb_addr=0x1c00000
load_initrd=ext2load usb 0:1 0x1100000 /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts init=/bin/systemd
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=echo Initializing devices...; setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices; do for disknum in $disks; do if test $uenv_loaded -eq 0; then setenv device_type $devtype; setenv disk_number $disknum; run uenv_read; fi; done; done;
uenv_read=echo Loading envs from $device_type $disk_number...; if load $device_type  $disk_number:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; echo ... envs loaded; fi
usb_boot=run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi
usb_ready_retry=15

Environment size: 2854/131068 bytes
NSA310>

boot:
NSA310> boot
Initializing devices...
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD5000AAKX-001CA0  Firm: 15.01H15 Ser#:  WD-WCAYUL098558
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
Unknown command 'mmc' - try 'help'
Loading envs from usb 0...
** Bad device usb 0 **
Loading envs from usb 1...
** Bad device usb 1 **
Loading envs from usb 2...
** Bad device usb 2 **
Loading envs from usb 3...
** Bad device usb 3 **
Loading envs from ide 0...
** File not found /boot/uEnv.txt **
Loading envs from ide 1...
** Bad device ide 1 **
Loading envs from ide 2...
** Bad device ide 2 **
Loading envs from ide 3...
** Bad device ide 3 **
Loading envs from mmc 0...
** Bad device mmc 0 **
Loading envs from mmc 1...
** Bad device mmc 1 **
Loading envs from mmc 2...
** Bad device mmc 2 **
Loading envs from mmc 3...
** Bad device mmc 3 **
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD5000AAKX-001CA0  Firm: 15.01H15 Ser#:  WD-WCAYUL098558
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
device ide 0:1
1 bytes read in 47 ms (0 Bytes/s)
Found bootable drive on ide 0
** Bad device usb 0 **
** Bad device usb 0 **
** Bad device usb 0 **
Wrong Image Format for bootm command
Error occured, error code = 112
ERROR: can't get kernel image!
NSA310> 

Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 08, 2020 06:01PM
It seems your envs are messed up. You must have been changing them?

Power up, interrupt serial console.
ver
setenv load_dtb 'echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file'
setenv load_initrd 'echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd'
setenv load_uimage 'echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage'
printenv
boot

And please post the entire serial console log (from the u-boot banner).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 09, 2020 02:09PM
I must have then... I thought I followed the instructions to the letter.

The weird question mark is the u-boot banner I think? That's all I am getting, no splash screen anymore. I thought that was normal.

Thank you for your help!

�

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:54:15 -0700)
ZyXEL NSA310 1-Bay Power Media Server 


SoC:   Kirkwood 88F6281_A1
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
PHY reset timed out
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0 
NSA310> ver

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:54:15 -0700)
ZyXEL NSA310 1-Bay Power Media Server 

gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
NSA310> setenv load_dtb 'echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file'
NSA310> setenv load_initrd 'echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd'
NSA310> setenv load_uimage 'echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage'
NSA310> printenv
arcNumber=4022
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts init=/bin/systemd
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=echo Initializing devices...; setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices; do for disknum in $disks; do if test $uenv_loaded -eq 0; then setenv device_type $devtype; setenv disk_number $disknum; run uenv_read; fi; done; done;
uenv_read=echo Loading envs from $device_type $disk_number...; if load $device_type  $disk_number:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; echo ... envs loaded; fi
usb_boot=run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi
usb_ready_retry=15

Environment size: 2954/131068 bytes
NSA310> boot
Initializing devices...
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD5000AAKX-001CA0  Firm: 15.01H15 Ser#:  WD-WCAYUL098558
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
Unknown command 'mmc' - try 'help'
Loading envs from usb 0...
** Bad device usb 0 **
Loading envs from usb 1...
** Bad device usb 1 **
Loading envs from usb 2...
** Bad device usb 2 **
Loading envs from usb 3...
** Bad device usb 3 **
Loading envs from ide 0...
** File not found /boot/uEnv.txt **
Loading envs from ide 1...
** Bad device ide 1 **
Loading envs from ide 2...
** Bad device ide 2 **
Loading envs from ide 3...
** Bad device ide 3 **
Loading envs from mmc 0...
** Bad device mmc 0 **
Loading envs from mmc 1...
** Bad device mmc 1 **
Loading envs from mmc 2...
** Bad device mmc 2 **
Loading envs from mmc 3...
** Bad device mmc 3 **
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD5000AAKX-001CA0  Firm: 15.01H15 Ser#:  WD-WCAYUL098558
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
device ide 0:1
1 bytes read in 47 ms (0 Bytes/s)
Found bootable drive on ide 0
loading uImage ...
5202928 bytes read in 1097 ms (4.5 MiB/s)
loading uInitrd ...
9743560 bytes read in 2096 ms (4.4 MiB/s)
loading DTB ...
** No boot file defined **
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.5.1-kirkwood-tld-1
   Created:      2020-03-04  20:55:12 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5202864 Bytes = 5 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.5.1-kirkwood-tld-1
   Created:      2020-03-04  20:55:42 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9743496 Bytes = 9.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
   Loading Ramdisk to 0f1c2000, end 0fb0cc88 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Error: invalid dtb and unrecognized/unsupported machine ID
  r1=0x00000fb6, r2=0x00000100
  r2[]=05 00 00 00 01 00 41 54 00 00 00 00 00 00 00 00
Available machine support:

ID (hex)	NAME
ffffffff	Generic DT based system
ffffffff	Marvell Kirkwood (Flattened Device Tree)

Please check your kernel config and/or bootloader.
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 09, 2020 05:36PM
kiesel,

I see. The envs change you've made was when you create the rootfs to boot with stock u-boot. Now you are booting with new u-boot, the envs must conform to the new booting sequence.

And the new error above was because the rootfs were prepared to boot with stock u-boot. So no you need to reverse uImage to be the original.

With your USB rootfs plugged in, power up, interrupt serial console and enter the envs again

setenv devices 'usb ide'
setenv bootdev usb
setenv load_dtb 'echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file'
setenv load_initrd 'echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd'
setenv load_uimage 'echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage'
boot

Let it boot all the way into Debian. Log in.

Mount the HDD partition:

mkdir -p /media/sda1
mount -o noatime /dev/sda1 /media/sda1

Reverse uImage to the original.

cd /media/sda1/boot
cp -a uImage uImage.nsa310_with_dtb
cp -a uImage.orig uImage
sync
ls -lart /media/sda1/boot

If you cannot do the above steps (seeing errors) then stop and post back here. Else continue.

And shutdown the box.

shutdown -h now


Remove the USB drive. Power up and set up HDD booting as before.

setenv devices 'ide usb'
setenv bootdev ide
setenv load_dtb 'echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file'
setenv load_initrd 'echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd'
setenv load_uimage 'echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage'
boot

Once it boots into HDD rootfs, post back and I show you a couple more things to do to complete.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 10, 2020 02:01PM
Running the first set of commands fails:

NSA310> setenv devices 'usb ide'
NSA310> setenv bootdev usb
NSA310> setenv load_dtb 'echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file'
NSA310> setenv load_initrd 'echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd'
NSA310> setenv load_uimage 'echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage'
NSA310> boot
Initializing devices...
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD5000AAKX-001CA0  Firm: 15.01H15 Ser#:  WD-WCAYUL098558
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
Loading envs from usb 0...
** File not found /boot/uEnv.txt **
Loading envs from usb 1...
** Bad device usb 1 **
Loading envs from usb 2...
** Bad device usb 2 **
Loading envs from usb 3...
** Bad device usb 3 **
Loading envs from ide 0...
** File not found /boot/uEnv.txt **
Loading envs from ide 1...
** Bad device ide 1 **
Loading envs from ide 2...
** Bad device ide 2 **
Loading envs from ide 3...
** Bad device ide 3 **
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 723 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
5202928 bytes read in 919 ms (5.4 MiB/s)
loading uInitrd ...
9743560 bytes read in 849 ms (10.9 MiB/s)
loading DTB ...
** No boot file defined **
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.5.1-kirkwood-tld-1
   Created:      2020-03-04  20:55:12 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5202864 Bytes = 5 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.5.1-kirkwood-tld-1
   Created:      2020-03-04  20:55:42 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9743496 Bytes = 9.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
   Loading Ramdisk to 0f1c2000, end 0fb0cc88 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Error: invalid dtb and unrecognized/unsupported machine ID
  r1=0x00000fb6, r2=0x00000100
  r2[]=05 00 00 00 01 00 41 54 00 00 00 00 00 00 00 00
Available machine support:

ID (hex)	NAME
ffffffff	Generic DT based system
ffffffff	Marvell Kirkwood (Flattened Device Tree)

Please check your kernel config and/or bootloader.
I can start without any intervention from USB though, was that the goal?

/edit: For comparison, these are the envs when the device boots:

NSA310> printenv
arcNumber=4022
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-nsa310.dtb
load_dtb_addr=0x1c00000
load_initrd=ext2load usb 0:1 0x1100000 /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts init=/bin/systemd
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=echo Initializing devices...; setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices; do for disknum in $disks; do if test $uenv_loaded -eq 0; then setenv device_type $devtype; setenv disk_number $disknum; run uenv_read; fi; done; done;
uenv_read=echo Loading envs from $device_type $disk_number...; if load $device_type  $disk_number:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; echo ... envs loaded; fi
usb_boot=run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi
usb_ready_retry=15

Environment size: 2854/131068 bytes
NSA310>



Edited 1 time(s). Last edit at 03/10/2020 02:03PM by kiesel.
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 10, 2020 05:30PM
kiesel,

Try again:

setenv devices 'ide usb'
setenv bootdev ide
setenv dtb_file '/boot/dts/kirkwood-nsa310.dtb'
setenv load_dtb 'echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file'
setenv load_initrd 'echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd'
setenv load_uimage 'echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage'
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 11, 2020 02:21PM
That boots, but from the HDD.

I thought I had to boot from USB first to change the uImage on the HDD? I can't switch the images in a live system, can I?

The plan is to change the uImage on the HDD back to the older one, right?

/edit: I noticed that dtb_file wasn't set, so after setting it I was able to boot from USB

setenv dtb_file /boot/dts/kirkwood-nsa310.dtb

I successfully followed the rest of the steps, I can boot from HDD without the USB key now, thank you very much!

Is updating the kernel part of the rest of the steps?

root@debian:~# uname -a
Linux debian 5.2.9-kirkwood-tld-1 #1 PREEMPT Sat Aug 17 15:00:56 PDT 2019 armv5tel GNU/Linux



Edited 2 time(s). Last edit at 03/11/2020 02:57PM by kiesel.
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 11, 2020 06:20PM
kiesel,

> I successfully followed the rest of the steps, I
> can boot from HDD without the USB key now, thank
> you very much!

Cool!

Now you need to save the envs to make it permanent, either by setting them in Debian, or come back to serial console and save them.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 12, 2020 03:32AM
Thanks, I will figure out how to save the envs.

About the kernel: Can I just follow the normal update procedure to get to 5.5.1?
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 12, 2020 04:00AM
kiesel,

> Thanks, I will figure out how to save the envs.
>

OK. if you are not sure, post the quetion!

> About the kernel: Can I just follow the normal
> update procedure to get to 5.5.1?

Yes, now it is a normal update procedure. You don't append DTB to uImage (i.e don't do Step 4b). Upgrade kernel and do Step 4a. And you are booting with new u-boot now so just regenerate the uImage and uInitrd (no need to change any envs).

Quote

4b. Boot with DTB file embedded in the kernel image (no U-Boot envs changes are needed if your system already booting on USB or HDD). Again, this step 4b is for stock U-Boot only.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 12, 2020 03:44PM
I am sorry that this seems like a never ending story, but I am getting a kernel panic.

NSA310> boot
Initializing devices...

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD5000AAKX-001CA0  Firm: 15.01H15 Ser#:  WD-WCAYUL098558
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found
Loading envs from ide 0...
** File not found /boot/uEnv.txt **
Loading envs from ide 1...
** Bad device ide 1 **
Loading envs from ide 2...
** Bad device ide 2 **
Loading envs from ide 3...
** Bad device ide 3 **
Loading envs from usb 0...
** File not found /boot/uEnv.txt **
Loading envs from usb 1...
** Bad device usb 1 **
Loading envs from usb 2...
** Bad device usb 2 **
Loading envs from usb 3...
** Bad device usb 3 **
running scan_disk ...
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD5000AAKX-001CA0  Firm: 15.01H15 Ser#:  WD-WCAYUL098558
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
device ide 0:1
1 bytes read in 53 ms (0 Bytes/s)
Found bootable drive on ide 0
loading uImage ...
5202928 bytes read in 1096 ms (4.5 MiB/s)
loading uInitrd ...
9138783 bytes read in 1885 ms (4.6 MiB/s)
loading DTB /boot/dts/kirkwood-nsa310.dtb ...
12568 bytes read in 27 ms (454.1 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.5.1-kirkwood-tld-1
   Created:      2020-02-07  16:13:19 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5202864 Bytes = 5 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.5.1-kirkwood-tld-1
   Created:      2020-02-07  16:13:27 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9138719 Bytes = 8.7 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 0f256000, end 0fb0d21f ... OK
   Loading Device Tree to 0f24f000, end 0f255117 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.5.1-kirkwood-tld-1 (root@tldDebian) (gcc version 8.3.0 (Debian 8.3.0-6)) #1.0 PREEMPT Sat Feb 1 22:28:36 PST 2020
[    0.000000][    T0] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000][    T0] CPU: VIVT data cache, VIVT instruction cache
[    0.000000][    T0] OF: fdt: Machine model: ZyXEL NSA310
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 65024
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data) init=/bin/systemd
[    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: 234256K/262144K available (9216K kernel code, 926K rwdata, 3860K rodata, 1024K init, 296K bss, 27888K reserved, 0K cma-reserved)
[    0.000000][    T0] random: get_random_u32 called from ____cache_alloc+0x470/0x80c with crng_init=0
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0] 	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] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000009][    T0] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000052][    T0] Switching to timer-based delay loop, resolution 5ns
[    0.000837][    T0] Console: colour dummy device 80x30
[    0.000890][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000916][    T0] pid_max: default: 32768 minimum: 301
[    0.001293][    T0] LSM: Security Framework initializing
[    0.001465][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001492][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001646][    T0] *** VALIDATE tmpfs ***
[    0.002523][    T0] *** VALIDATE proc ***
[    0.002784][    T0] *** VALIDATE cgroup1 ***
[    0.002810][    T0] *** VALIDATE cgroup2 ***
[    0.002920][    T0] CPU: Testing write buffer coherency: ok
[    0.004892][    T1] Setting up static identity map for 0x100000 - 0x100058
[    0.005205][    T1] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.005526][    T1] rcu: Hierarchical SRCU implementation.
[    0.008235][    T1] devtmpfs: initialized
[    0.015506][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.015545][    T1] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.015831][    T1] xor: measuring software checksum speed
[    0.110127][    T1]    arm4regs  :  1088.400 MB/sec
[    0.210083][    T1]    8regs     :   653.600 MB/sec
[    0.310081][    T1]    32regs    :   950.000 MB/sec
[    0.310100][    T1] xor: using function: arm4regs (1088.400 MB/sec)
[    0.310121][    T1] prandom: seed boundary self test passed
[    0.314299][    T1] prandom: 100 self tests passed
[    0.314310][    T1] pinctrl core: initialized pinctrl subsystem
[    0.315285][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    0.315981][    T1] NET: Registered protocol family 16
[    0.316744][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.317742][    T1] audit: initializing netlink subsys (disabled)
[    0.319179][   T14] audit: type=2000 audit(0.310:1): state=initialized audit_enabled=0 res=1
[    0.319313][    T1] cpuidle: using governor ladder
[    0.319400][    T1] cpuidle: using governor menu
[    0.319955][    T1] Feroceon L2: Enabling L2
[    0.320007][    T1] Feroceon L2: Cache support initialised.
[    0.326213][    T1] No ATAGs?
[    2.560060][    C0] random: fast init done
[    5.400337][    T1] raid6: int32x8  gen()   105 MB/s
[    5.570404][    T1] raid6: int32x8  xor()    65 MB/s
[    5.740276][    T1] raid6: int32x4  gen()   106 MB/s
[    5.910400][    T1] raid6: int32x4  xor()    69 MB/s
[    6.080318][    T1] raid6: int32x2  gen()   132 MB/s
[    6.250293][    T1] raid6: int32x2  xor()    94 MB/s
[    6.420421][    T1] raid6: int32x1  gen()   100 MB/s
[    6.590440][    T1] raid6: int32x1  xor()    69 MB/s
[    6.590451][    T1] raid6: using algorithm int32x2 gen() 132 MB/s
[    6.590460][    T1] raid6: .... xor() 94 MB/s, rmw enabled
[    6.590468][    T1] raid6: using intx1 recovery algorithm
[    6.590759][    T1] vgaarb: loaded
[    6.591366][    T1] SCSI subsystem initialized
[    6.591904][    T1] usbcore: registered new interface driver usbfs
[    6.591973][    T1] usbcore: registered new interface driver hub
[    6.592063][    T1] usbcore: registered new device driver usb
[    6.592273][    T1] pps_core: LinuxPPS API ver. 1 registered
[    6.592285][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    6.592314][    T1] PTP clock support registered
[    6.593837][    T1] clocksource: Switched to clocksource orion_clocksource
[    7.933973][    T1] *** VALIDATE bpf ***
[    7.934441][    T1] VFS: Disk quotas dquot_6.6.0
[    7.934534][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    7.934641][    T1] *** VALIDATE ramfs ***
[    7.945364][    T1] NET: Registered protocol family 2
[    7.946260][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    7.946302][    T1] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    7.946344][    T1] TCP bind hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    7.946376][    T1] TCP: Hash tables configured (established 2048 bind 2048)
[    7.946520][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    7.946552][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    7.946786][    T1] NET: Registered protocol family 1
[    7.947549][    T1] RPC: Registered named UNIX socket transport module.
[    7.947563][    T1] RPC: Registered udp transport module.
[    7.947572][    T1] RPC: Registered tcp transport module.
[    7.947580][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    7.947595][    T1] PCI: CLS 0 bytes, default 32
[    7.947931][    T1] Trying to unpack rootfs image as initramfs...
[    7.950306][    T1] Initramfs unpacking failed: broken padding
[    7.975897][    T1] Freeing initrd memory: 8928K
[    7.976089][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    7.977434][    T1] Initialise system trusted keyrings
[    7.977493][    T1] Key type blacklist registered
[    7.977728][    T1] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    7.977836][    T1] zbud: loaded
[    7.979094][    T1] NFS: Registering the id_resolver key type
[    7.979128][    T1] Key type id_resolver registered
[    7.979138][    T1] Key type id_legacy registered
[    7.979162][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    7.979180][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    7.979612][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    7.980087][    T1] *** VALIDATE jffs2 ***
[    7.980105][    T1] fuse: init (API version 7.31)
[    7.980126][    T1] *** VALIDATE fuse ***
[    7.980140][    T1] *** VALIDATE fuse ***
[    7.980529][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    7.980748][    T1] orangefs_init: module version upstream loaded
[    7.980762][    T1] SGI XFS with ACLs, security attributes, realtime, scrub, quota, no debug enabled
[    7.981515][    T1] *** VALIDATE xfs ***
[    8.019067][    T1] async_tx: api initialized (async)
[    8.019092][    T1] Key type asymmetric registered
[    8.019102][    T1] Asymmetric key parser 'x509' registered
[    8.019161][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    8.020743][    T1] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    8.022227][    T1] mvebu-gpio f1010140.gpio: IRQ index 3 not found
[    8.022846][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    8.022869][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    8.022885][    T1] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    8.022900][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    8.023023][    T1] pci 0000:00:01.0: [11ab:6281] type 01 class 0x060400
[    8.023065][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    8.024608][    T1] PCI: bus0: Fast back to back transfers disabled
[    8.024638][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    8.024871][    T1] pci 0000:01:00.0: [10ec:8168] type 00 class 0x020000
[    8.024915][    T1] pci 0000:01:00.0: reg 0x10: [io  0x0000-0x00ff]
[    8.024946][    T1] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00000fff 64bit pref]
[    8.024971][    T1] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref]
[    8.024992][    T1] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    8.025099][    T1] pci 0000:01:00.0: supports D1 D2
[    8.025114][    T1] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    8.055081][    T1] PCI: bus1: Fast back to back transfers disabled
[    8.055111][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    8.055322][    T1] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    8.055340][    T1] pci 0000:00:01.0: BAR 13: assigned [io  0x10000-0x10fff]
[    8.055357][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xe0100000-0xe01007ff pref]
[    8.055380][    T1] pci 0000:01:00.0: BAR 6: assigned [mem 0xe0000000-0xe000ffff pref]
[    8.055397][    T1] pci 0000:01:00.0: BAR 4: assigned [mem 0xe0010000-0xe0013fff 64bit pref]
[    8.055423][    T1] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0014000-0xe0014fff 64bit pref]
[    8.055447][    T1] pci 0000:01:00.0: BAR 0: assigned [io  0x10000-0x100ff]
[    8.055464][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    8.055479][    T1] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    8.055497][    T1] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    8.055615][    T1] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    8.056182][    T1] mv_xor f1060800.xor: Marvell shared XOR driver
[    8.114886][    T1] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    8.117463][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[    8.174859][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    8.177738][    T1] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    8.179145][    T1] printk: console [ttyS0] disabled
[    8.179244][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    9.185997][    T1] printk: console [ttyS0] enabled
[    9.199438][    T1] loop: module loaded
[    9.203981][    T1] sata_mv f1080000.sata: slots 32 ports 2
[    9.213237][    T1] scsi host0: sata_mv
[    9.217750][    T1] scsi host1: sata_mv
[    9.221880][    T1] ata1: SATA max UDMA/133 irq 32
[    9.226762][    T1] ata2: SATA max UDMA/133 irq 32
[    9.232601][    T1] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    9.239815][    T1] nand: Samsung NAND 128MiB 3,3V 8-bit
[    9.245186][    T1] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    9.253501][    T1] Scanning device for bad blocks
[    9.265690][    T1] Bad eraseblock 76 at 0x000000980000
[    9.290583][    T1] Bad eraseblock 281 at 0x000002320000
[    9.316350][    T1] Bad eraseblock 494 at 0x000003dc0000
[    9.341727][    T1] Bad eraseblock 703 at 0x0000057e0000
[    9.377856][    T1] 4 cmdlinepart partitions found on MTD device orion_nand
[    9.384874][    T1] Creating 4 MTD partitions on "orion_nand":
[    9.390754][    T1] 0x000000000000-0x000000100000 : "u-boot"
[    9.397942][    T1] 0x000000100000-0x000000500000 : "uImage"
[    9.405061][    T1] 0x000000500000-0x000002500000 : "rootfs"
[    9.412244][    T1] 0x000002500000-0x000008000000 : "data"
[    9.420860][    T1] libphy: Fixed MDIO Bus: probed
[    9.426504][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    9.433797][    T1] ehci-pci: EHCI PCI platform driver
[    9.439052][    T1] ehci-orion: EHCI orion driver
[    9.444012][    T1] orion-ehci f1050000.ehci: EHCI Host Controller
[    9.450257][    T1] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    9.458929][    T1] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    9.493862][    T1] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    9.500913][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.05
[    9.509968][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    9.517965][    T1] usb usb1: Product: EHCI Host Controller
[    9.523592][    T1] usb usb1: Manufacturer: Linux 5.5.1-kirkwood-tld-1 ehci_hcd
[    9.530981][    T1] usb usb1: SerialNumber: f1050000.ehci
[    9.537135][    T1] hub 1-0:1.0: USB hub found
[    9.541683][    T1] hub 1-0:1.0: 1 port detected
[    9.547201][    T1] usbcore: registered new interface driver usb-storage
[    9.554416][    T1] mousedev: PS/2 mouse device common for all mice
[    9.561537][    T1] rtc-mv f1010300.rtc: registered as rtc0
[    9.567431][    T1] i2c /dev entries driver
[    9.573220][    T1] device-mapper: uevent: version 1.0.3
[    9.578998][    T1] device-mapper: ioctl: 4.41.0-ioctl (2019-09-16) initialised: dm-devel@redhat.com
[    9.588678][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[    9.596014][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[    9.603359][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[    9.610809][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[    9.617662][    T1] device-mapper: raid: Loading target version 1.15.0
[    9.626795][    T1] hid: raw HID events driver (C) Jiri Kosina
[    9.633007][    T1] exFAT: Version 1.3.0
[    9.637088][    T1] drop_monitor: Initializing network drop monitor service
[    9.644406][    T1] NET: Registered protocol family 17
[    9.649839][    T1] Key type dns_resolver registered
[    9.655505][    T1] registered taskstats version 1
[    9.660325][    T1] Loading compiled-in X.509 certificates
[    9.665989][    T1] zswap: loaded using pool lzo/zbud
[    9.671275][    T1] Key type ._fscrypt registered
[    9.676036][    T1] Key type .fscrypt registered
[    9.702368][    T1] Key type big_key registered
[    9.710651][    T1] Key type encrypted registered
[    9.718528][    T1] Waiting 10 sec before mounting root device...
[    9.733929][  T118] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    9.745500][  T118] ata1.00: ATA-8: WDC WD5000AAKX-001CA0, 15.01H15, max UDMA/133
[    9.753023][  T118] ata1.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    9.765200][  T118] ata1.00: configured for UDMA/133
[    9.780747][    T7] scsi 0:0:0:0: Direct-Access     ATA      WDC WD5000AAKX-0 1H15 PQ: 0 ANSI: 5
[    9.790908][  T122] sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[    9.799729][  T122] sd 0:0:0:0: [sda] Write Protect is off
[    9.805474][  T122] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    9.829226][  T122]  sda: sda1 sda2 sda3
[    9.835223][  T122] sd 0:0:0:0: [sda] Attached SCSI disk
[    9.913875][    T5] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    9.965816][    T5] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice=77.63
[    9.974771][    T5] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    9.982660][    T5] usb 1-1: Product: USB2.0 Hub
[    9.988114][    T5] hub 1-1:1.0: USB hub found
[    9.992939][    T5] hub 1-1:1.0: 4 ports detected
[   10.135492][  T120] ata2: SATA link down (SStatus 0 SControl F300)
[   10.313868][    T5] usb 1-1.3: new high-speed USB device number 3 using orion-ehci
[   10.366188][    T5] usb 1-1.3: New USB device found, idVendor=090c, idProduct=1000, bcdDevice=11.00
[   10.375313][    T5] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   10.383379][    T5] usb 1-1.3: SerialNumber: T1205060000776
[   10.389775][    T5] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[   10.397305][    T5] scsi host2: usb-storage 1-1.3:1.0
[   11.638681][   T22] scsi 2:0:0:0: Direct-Access                               1100 PQ: 0 ANSI: 4
[   11.649234][  T122] sd 2:0:0:0: [sdb] 15950592 512-byte logical blocks: (8.17 GB/7.61 GiB)
[   11.658220][  T122] sd 2:0:0:0: [sdb] Write Protect is off
[   11.664343][  T122] sd 2:0:0:0: [sdb] No Caching mode page found
[   11.670387][  T122] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[   11.681588][  T122]  sdb: sdb1
[   11.687848][  T122] sd 2:0:0:0: [sdb] Attached SCSI removable disk
[   20.323944][    T1] md: Waiting for all devices to be available before autodetect
[   20.331485][    T1] md: If you don't use raid, use raid=noautodetect
[   20.338790][    T1] md: Autodetecting RAID arrays.
[   20.343606][    T1] md: autorun ...
[   20.347187][    T1] md: ... autorun DONE.
[   20.351442][    T1] VFS: Cannot open root device "LABEL=rootfs" or unknown-block(0,0): error -6
[   20.360248][    T1] Please append a correct "root=" boot option; here are the available partitions:
[   20.369431][    T1] 1f00            1024 mtdblock0 
[   20.369434][    T1]  (driver?)
[   20.377457][    T1] 1f01            4096 mtdblock1 
[   20.377460][    T1]  (driver?)
[   20.385469][    T1] 1f02           32768 mtdblock2 
[   20.385472][    T1]  (driver?)
[   20.393437][    T1] 1f03           93184 mtdblock3 
[   20.393439][    T1]  (driver?)
[   20.401435][    T1] 0800       488386584 sda 
[   20.401439][    T1]  driver: sd
[   20.408994][    T1]   0801        16547840 sda1 00000000-01
[   20.408997][    T1] 
[   20.416816][    T1]   0802         4194304 sda2 00000000-02
[   20.416818][    T1] 
[   20.424630][    T1]   0803       467643416 sda3 00000000-03
[   20.424633][    T1] 
[   20.432425][    T1] 0810         7975296 sdb 
[   20.432428][    T1]  driver: sd
[   20.439985][    T1]   0811         7973888 sdb1 6633f146-01
[   20.439988][    T1] 
[   20.447798][    T1] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[   20.456806][    T1] CPU: 0 PID: 1 Comm: swapper Not tainted 5.5.1-kirkwood-tld-1 #1.0
[   20.464665][    T1] Hardware name: Marvell Kirkwood (Flattened Device Tree)
[   20.471688][    T1] [<8010f668>] (unwind_backtrace) from [<8010b9f4>] (show_stack+0x10/0x14)
[   20.480170][    T1] [<8010b9f4>] (show_stack) from [<80119e8c>] (panic+0xfc/0x328)
[   20.487789][    T1] [<80119e8c>] (panic) from [<80f0157c>] (mount_block_root+0x1c8/0x260)
[   20.496007][    T1] [<80f0157c>] (mount_block_root) from [<80f01704>] (mount_root+0xf0/0x130)
[   20.504578][    T1] [<80f01704>] (mount_root) from [<80f01888>] (prepare_namespace+0x144/0x180)
[   20.513323][    T1] [<80f01888>] (prepare_namespace) from [<80f010a4>] (kernel_init_freeable+0x144/0x1a0)
[   20.522950][    T1] [<80f010a4>] (kernel_init_freeable) from [<809d9904>] (kernel_init+0x8/0x10c)
[   20.531873][    T1] [<809d9904>] (kernel_init) from [<801010e0>] (ret_from_fork+0x14/0x34)
[   20.540173][    T1] Exception stack(0x8ec3dfb0 to 0x8ec3dff8)
[   20.545948][    T1] dfa0:                                     00000000 00000000 00000000 00000000
[   20.554861][    T1] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   20.563773][    T1] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[   20.571125][    T1] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

I thought at first that sda1 didn't have the rootfs label, but it does:

root@debian:~# lsblk -o name,label
NAME      LABEL
sda       
|-sda1    rootfs
|-sda2    
`-sda3    
sdb       
`-sdb1    rootfs
mtdblock0 
mtdblock1 
mtdblock2 
mtdblock3 
root@debian:~#

I booted to USB, used the uImage backup I had and started from HDD again, but I get the same result.

These are the envs I am using:

NSA310> printenv
dtb_file=/boot/dts/kirkwood-nsa310.dtb
arcNumber=4022
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=ide
device=0:1
devices=ide usb
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-nsa310.dtb
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts init=/bin/systemd
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=echo Initializing devices...; setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices; do for disknum in $disks; do if test $uenv_loaded -eq 0; then setenv device_type $devtype; setenv disk_number $disknum; run uenv_read; fi; done; done;
uenv_read=echo Loading envs from $device_type $disk_number...; if load $device_type  $disk_number:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; echo ... envs loaded; fi
usb_boot=run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi
usb_ready_retry=15

Environment size: 3033/131068 bytes

Any idea what's wrong?
Re: U-Boot Kirkwood - NSA310 - nandump segfault
March 12, 2020 06:59PM
Power up, interrupt serial console and

setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts'

And then
boot

And post the entire serial console log.

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

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: