Hi, I'm fighting half of the day and slowly giving up.
Nsa320 with latest debian and kernel on usb stick and latest uboot with default settings (env default -a). When booting I get an error:
[ 7.268011] NET: Registered protocol family 17
[ 7.272551] Key type dns_resolver registered
[ 7.276898] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl F300)
[ 7.284314] registered taskstats version 1
[ 7.288536] ata1.00: ATA-8: ST3500312CS, SC13, max UDMA/133
[ 7.288543] ata1.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[ 7.301440] Loading compiled-in X.509 certificates
[ 7.306346] ata1.00: configured for UDMA/133
[ 7.310872] zswap: loaded using pool lzo/zbud
[ 7.316568] scsi 0:0:0:0: Direct-Access ATA ST3500312CS SC13 PQ: 0 ANSI: 5
[ 7.326019] sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[ 7.334578] sd 0:0:0:0: [sda] Write Protect is off
[ 7.340585] Key type big_key registered
[ 7.345054] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 7.355665] Key type encrypted registered
[ 7.361099] rtc-mv f1010300.rtc: setting system clock to 2013-01-02 01:55:49 UTC (1357091749)
[ 7.424427] sda: sda1
[ 7.428526] sd 0:0:0:0: [sda] Attached SCSI disk
[ 7.566164] usb 1-1: new high-speed USB device number 2 using orion-ehci
[ 7.757882] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[ 7.764632] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 7.771841] usb 1-1: Product: USB2.0 Hub
[ 7.776681] hub 1-1:1.0: USB hub found
[ 7.780756] hub 1-1:1.0: 4 ports detected
[ 7.836182] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[ 7.876216] ata2.00: ATA-8: ST31500341AS, CC1H, max UDMA/133
[ 7.881904] ata2.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[ 7.946219] ata2.00: configured for UDMA/133
[ 7.961060] scsi 1:0:0:0: Direct-Access ATA ST31500341AS CC1H PQ: 0 ANSI: 5
[ 7.970309] sd 1:0:0:0: [sdb] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB)
[ 7.978536] sd 1:0:0:0: [sdb] Write Protect is off
[ 7.983473] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 8.022020] sdb: sdb1
[ 8.025810] sd 1:0:0:0: [sdb] Attached SCSI disk
[ 8.030712] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[ 8.038332] Please append a correct "root=" boot option; here are the available partitions:
[ 8.046844] 1f00 1024 mtdblock0
[ 8.046850] (driver?)
[ 8.053454] 1f01 512 mtdblock1
[ 8.053459] (driver?)
[ 8.060073] 1f02 512 mtdblock2
[ 8.060077] (driver?)
[ 8.066683] 1f03 512 mtdblock3
[ 8.066687] (driver?)
[ 8.073255] 1f04 10240 mtdblock4
[ 8.073258] (driver?)
[ 8.079848] 1f05 10240 mtdblock5
[ 8.079852] (driver?)
[ 8.086450] 1f06 48896 mtdblock6
[ 8.086454] (driver?)
[ 8.093022] 1f07 10240 mtdblock7
[ 8.093026] (driver?)
[ 8.099608] 1f08 48896 mtdblock8
[ 8.099612] (driver?)
[ 8.106201] 0800 488386584 sda
[ 8.106206] driver: sd
[ 8.112348] 0801 488385560 sda1 00006160-01
[ 8.112351]
[ 8.117290] usb 1-1.4: new high-speed USB device number 3 using orion-ehci
[ 8.125797] 0810 1465138584 sdb
[ 8.125803] driver: sd
[ 8.131976] 0811 1465137560 sdb1 0009472b-01
[ 8.131980]
[ 8.138413] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 8.146712] CPU: 0 PID: 1 Comm: swapper Not tainted 4.12.1-kirkwood-tld-1 #1
[ 8.153788] Hardware name: Marvell Kirkwood (Flattened Device Tree)
[ 8.160108] [<c010ea54>] (unwind_backtrace) from [<c010ab48>] (show_stack+0x10/0x14)
[ 8.167897] [<c010ab48>] (show_stack) from [<c01dba9c>] (panic+0xb0/0x250)
[ 8.174816] [<c01dba9c>] (panic) from [<c0c01274>] (mount_block_root+0x204/0x27c)
[ 8.182337] [<c0c01274>] (mount_block_root) from [<c0c013d8>] (mount_root+0xec/0x118)
[ 8.190201] [<c0c013d8>] (mount_root) from [<c0c01528>] (prepare_namespace+0x124/0x184)
[ 8.198242] [<c0c01528>] (prepare_namespace) from [<c0c00e90>] (kernel_init_freeable+0x210/0x260)
[ 8.207160] [<c0c00e90>] (kernel_init_freeable) from [<c0833200>] (kernel_init+0x8/0x10c)
[ 8.215380] [<c0833200>] (kernel_init) from [<c01070f0>] (ret_from_fork+0x14/0x24)
[ 8.222995] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 8.347378] usb 1-1.4: New USB device found, idVendor=8644, idProduct=8005
[ 8.354305] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 8.376154] usb 1-1.4: Product: USB Flash Disk
[ 8.382022] usb 1-1.4: Manufacturer: General
[ 8.406153] usb 1-1.4: SerialNumber: 2E515D00000011D9
[ 8.412091] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[ 8.436180] scsi host2: usb-storage 1-1.4:1.0
[ 9.457339] scsi 2:0:0:0: Direct-Access General USB Flash Disk 1.00 PQ: 0 ANSI: 2
[ 9.477695] sd 2:0:0:0: [sdc] 31299584 512-byte logical blocks: (16.0 GB/14.9 GiB)
[ 9.496191] sd 2:0:0:0: [sdc] Write Protect is off
[ 9.501031] sd 2:0:0:0: [sdc] Mode Sense: 03 00 00 00
[ 9.516534] sd 2:0:0:0: [sdc] No Caching mode page found
[ 9.521875] sd 2:0:0:0: [sdc] Assuming drive cache: write through
[ 9.550659] sdc: sdc1
[ 9.556413] sd 2:0:0:0: [sdc] Attached SCSI removable disk
[ 102.316188] random: crng init done
[ 8.029417] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[ 8.037037] Please append a correct "root=" boot option; here are the available partitions:
I understand it so that the kernel doesn't get the root parameter in commandline
thats my env
NSA320> printenv
arcNumber=3956
baudrate=115200
bootcmd=run bootcmd_uenv; run bootcmd_usb; usb stop; run bootcmd_sata; reset
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
ethaddr=b6:d0:5e:0f:a1:17
led_error=orange blinking
led_exit=green off
led_init=green blinking
machid=118f
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
partition=nand0,2
rootdelay=2
rootfstype=ext2
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
stderr=serial
stdin=serial
stdout=serial
uenv_import=echo importing envs ...; env import -t 0x810000
uenv_load=usb start; setenv uenv_loaded 0; for devtype in usb; do for disknum in 0; do run uenv_read_disk; done; done
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x810000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if $devtype part $disknum; then run uenv_read; fi
usb_boot=run usb_load_dtb; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi
usb_init=usb start
usb_load_dtb=ext2load usb $device 0x1c00000 /boot/dts/kirkwood-nsa320.dtb
usb_load_uimage=ext2load usb $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
usb_root=LABEL=USBROOT
Environment size: 2188/131068 bytes
I edited it a bit so it shows the bootargs before booting the kernel and it seems ok.
NSA320> setenv bootcmd_usb 'run usb_init; run set_bootargs_usb; printenv bootargs; run usb_boot'
NSA320> saveenv
Saving Environment to NAND...
Erasing NAND...
Erasing at 0xc0000 -- 100% complete.
Writing to NAND... OK
NSA320> boot
starting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
Partition Map for USB device 0 -- Partition Type: DOS
Part Start Sector Num Sectors UUID Type
1 32 31299552 583ec236-01 83
loading envs from usb 0 ...
73 bytes read in 284 ms (0 Bytes/s)
importing envs ...
## Warning: Input data exceeds 1048576 bytes - truncated
## Info: input data size = 1048578 = 0x100002
bootargs=console=ttyS0,115200 root=LABEL=USBROOT rootdelay=2 rootfstype=ext2 mtdparts=orion_nand:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
13691 bytes read in 936 ms (13.7 KiB/s)
3835283 bytes read in 430 ms (8.5 MiB/s)
7245696 bytes read in 558 ms (12.4 MiB/s)
## Booting kernel from Legacy Image at 00800000 ...
Image Name: Linux-4.12.1-kirkwood-tld-1
Created: 2017-08-14 1:30:51 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3835219 Bytes = 3.7 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
Image Name: initramfs-4.12.1-kirkwood-tld-1
....................
and still the same error:
I tried it on ext4 and ext2, usb and sd card, different root parameters root=LABEL=USBROOT , root=LABEL=rootfs (changed label of course), root=/dev/sdb1, sdc1, updated uboof from 15.10 to 16.05, downgraded kernel to 4.10.9, created /boot/uEnv.txt with bootargs and manually set bootargs from commandline before run bootcmd_usb command and always the same error.
One thing which I see now is
73 bytes read in 284 ms (0 Bytes/s)
importing envs ...
## Warning: Input data exceeds 1048576 bytes - truncated
## Info: input data size = 1048578 = 0x100002
but I don't have any Idea where it's from