Welcome! Log In Create A New Profile

Advanced

uboot doesn't pass bootargs to kernel

Posted by dkuku 
uboot doesn't pass bootargs to kernel
August 13, 2017 10:05PM
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
Re: uboot doesn't pass bootargs to kernel
August 13, 2017 10:31PM
dkuku Wrote:
-------------------------------------------------------
> 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 defaul
> t -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 (SStatu
> s 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 certifica
> tes
> [    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-byt
> e 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: enab
> led, read cache: enabled, doesn't support DPO or F
> UA
> [    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 dis
> k
> [    7.566164] usb 1-1: new high-speed USB device
> number 2 using orion-ehci
> [    7.757882] usb 1-1: New USB device found, idVe
> ndor=05e3, idProduct=0608
> [    7.764632] usb 1-1: New USB device strings: Mf
> r=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 (SStatu
> s 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-by
> te 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: enab
> led, read cache: enabled, doesn't support DPO or F
> UA
> [    8.022020]  sdb: sdb1
> [    8.025810] sd 1:0:0:0: [sdb] Attached SCSI dis
> k
> [    8.030712] VFS: Cannot open root device "(null
> )" or unknown-block(0,0): error -6
> [    8.038332] Please append a correct "root=" boo
> t 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 0000616
> 0-01
> [    8.112351]
> [    8.117290] usb 1-1.4: new high-speed USB devic
> e number 3 using orion-ehci
> [    8.125797] 0810      1465138584 sdb
> [    8.125803]  driver: sd
> [    8.131976]   0811      1465137560 sdb1 0009472
> b-01
> [    8.131980]
> [    8.138413] Kernel panic - not syncing: VFS: Un
> able to mount root fs on unknown-block(0,0)
> [    8.146712] CPU: 0 PID: 1 Comm: swapper Not tai
> nted 4.12.1-kirkwood-tld-1 #1
> [    8.153788] Hardware name: Marvell Kirkwood (Fl
> attened Device Tree)
> [    8.160108] [<c010ea54>] (unwind_backtrace) fro
> m [<c010ab48>] (show_stack+0x10/0x14)
> [    8.167897] [<c010ab48>] (show_stack) from [<c0
> 1dba9c>] (panic+0xb0/0x250)
> [    8.174816] [<c01dba9c>] (panic) from [<c0c0127
> 4>] (mount_block_root+0x204/0x27c)
> [    8.182337] [<c0c01274>] (mount_block_root) fro
> m [<c0c013d8>] (mount_root+0xec/0x118)
> [    8.190201] [<c0c013d8>] (mount_root) from [<c0
> c01528>] (prepare_namespace+0x124/0x184)
> [    8.198242] [<c0c01528>] (prepare_namespace) fr
> om [<c0c00e90>] (kernel_init_freeable+0x210/0x260)
> [    8.207160] [<c0c00e90>] (kernel_init_freeable)
> from [<c0833200>] (kernel_init+0x8/0x10c)
> [    8.215380] [<c0833200>] (kernel_init) from [<c
> 01070f0>] (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, id
> Vendor=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: 2E515D0000
> 0011D9
> [    8.412091] usb-storage 1-1.4:1.0: USB Mass Sto
> rage device detected
> [    8.436180] scsi host2: usb-storage 1-1.4:1.0
> [    9.457339] scsi 2:0:0:0: Direct-Access     Gen
> eral  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 p
> age found
> [    9.521875] sd 2:0:0:0: [sdc] Assuming drive ca
> che: write through
> [    9.550659]  sdc: sdc1
> [    9.556413] sd 2:0:0:0: [sdc] Attached SCSI rem
> ovable 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=" boo
> t 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 sto
> p; 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; ru
> n 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),0x800
> 00(stock_uboot_env),0x80000(key_store),0x80000(inf
> o),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(root
> fs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
> partition=nand0,2
> rootdelay=2
> rootfstype=ext2
> sata_boot=mw 0x800000 0 1; run sata_load_uimage; i
> f run sata_load_uinitrd; then bootm 0x800000 0x110
> 0000; else bootm 0x800000; fi
> sata_init=ide reset
> sata_load_uimage=ext2load ide $device 0x800000 /bo
> ot/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=$r
> ootfstype $mtdparts
> set_bootargs_usb=setenv bootargs console=$console
> root=$usb_root rootdelay=$rootdelay rootfstype=$ro
> otfstype $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 dev
> type 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/uE
> nv.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 0x110000
> 0 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 /boo
> t/uImage
> usb_load_uinitrd=ext2load usb $device 0x1100000 /b
> oot/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) foun
> d
> scanning usb for storage devices... 1 Stora
> ge Device(s) found
> 
> Partition Map for USB device 0  --   Partition Typ
> e: DOS
> 
> Part    Start Sector    Num Sectors     UUID
> Type
> 1     32              31299552        583ec236-0
> 1     83
> loading envs from usb 0 ...
> 73 bytes read in 284 ms (0 Bytes/s)
> importing envs ...
> ## Warning: Input data exceeds 1048576 bytes - tru
> ncated
> ## Info: input data size = 1048578 = 0x100002
> bootargs=console=ttyS0,115200 root=LABEL=USBROOT r
> ootdelay=2 rootfstype=ext2 mtdparts=orion_nand:0x1
> 00000(uboot),0x80000(stock_uboot_env),0x80000(key_
> store),0x80000(info),0xA00000(etc),0xA00000(kernel
> _1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC000
> 0(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 (uncompres
> sed)
> Data Size:    3835219 Bytes = 3.7 MiB
> Load Address: 00008000
> Entry Point:  00008000
> Verifying Checksum ... OK
> ## Loading init Ramdisk from Legacy Image at 01100
> 000 ...
> 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, diff
> erent root parameters root=LABEL=USBROOT , root=LA
> BEL=rootfs (changed label of course), root=/dev/sd
> b1, sdc1, updated uboof from 15.10 to 16.05, downg
> raded kernel to 4.10.9, created /boot/uEnv.txt wit
> h bootargs and manually set bootargs from commandl
> ine before run bootcmd_usb command and always th
> e 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 - tru
> ncated
> ## Info: input data size = 1048578 = 0x100002
>
> but I don't have any Idea where it's from

Your problem seems to be quite simple. But I need to see the entire serial console log to be sure. In a booting problem like this, the entire serial console log is a must (fragments of the log is never good enough).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: uboot doesn't pass bootargs to kernel
August 14, 2017 06:36AM
@bohdi
Hi, I was using screen for serial connection and it gave me just 1 screen of output ;) this is from minicom:
Maybe as a walkaround is there a option to hardcode the commandline somewhere? I know that when compiling kernel there is an option for that. what about device tree ?



U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:52:06 -0700)
ZyXEL NSA320 2-Bay Power Media Server

SoC:   Kirkwood 88F6281_A1
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  6


 5










































                                                                                CTRL-A Z for help | 115200 8N1 | NOR | Minicom 2.7 | VT102 | Online 0:0 | ttyUSB0
 0
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 ...
77 bytes read in 285 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=12 rootfstype=ext2 m)
13691 bytes read in 936 ms (13.7 KiB/s)
3835283 bytes read in 431 ms (8.5 MiB/s)
7245696 bytes read in 559 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
   Created:      2017-07-24   0:18:23 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7245632 Bytes = 6.9 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 0f917000, end 0fffff40 ... OK
   Loading Device Tree to 0f910000, end 0f91657a ... OK
Using machid 0x118f from environment

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.12.1-kirkwood-tld-1 (root@tldDebian) (gcc versio7
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=000539f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Zyxel NSA320
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pa8
[    0.000000] Kernel command line: console=ttyS0,115200
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 506336K/524288K available (8192K kernel code, 716K rwdat)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0db3274   ( 717 kB)
[    0.000000]        .bss : 0xc0db9b9c - 0xc0e01e60   ( 289 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xfs
[    0.000008] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 1073s
[    0.000043] Switching to timer-based delay loop, resolution 5ns
[    0.000509] Console: colour dummy device 80x30
[    0.000542] Calibrating delay loop (skipped), value calculated using timer f)
[    0.000565] pid_max: default: 32768 minimum: 301
[    0.000764] Security Framework initialized
[    0.000885] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000904] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001812] CPU: Testing write buffer coherency: ok
[    0.002802] Setting up static identity map for 0x100000 - 0x100058
[    0.003094] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.006213] devtmpfs: initialized
[    0.011020] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ms
[    0.011046] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.011429] prandom: seed boundary self test passed
[    0.015165] prandom: 100 self tests passed
[    0.015177] pinctrl core: initialized pinctrl subsystem
[    0.016328] NET: Registered protocol family 16
[    0.016712] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.018312] cpuidle: using governor ladder
[    0.018382] cpuidle: using governor menu
[    0.018749] Feroceon L2: Enabling L2
[    0.018795] Feroceon L2: Cache support initialised.
[    0.019187] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet
[    0.024778] No ATAGs?
[    0.034247] vgaarb: loaded
[    0.034567] SCSI subsystem initialized
[    0.035046] usbcore: registered new interface driver usbfs
[    0.035124] usbcore: registered new interface driver hub
[    0.035216] usbcore: registered new device driver usb
[    0.036128] clocksource: Switched to clocksource orion_clocksource
[    0.124905] VFS: Disk quotas dquot_6.6.0
[    0.124985] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.135585] NET: Registered protocol family 2
[    0.136355] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.136416] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.136469] TCP: Hash tables configured (established 4096 bind 4096)
[    0.136556] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.136580] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.136753] NET: Registered protocol family 1
[    0.137161] RPC: Registered named UNIX socket transport module.
[    0.137173] RPC: Registered udp transport module.
[    0.137181] RPC: Registered tcp transport module.
[    0.137188] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.137481] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.138264] audit: initializing netlink subsys (disabled)
[    0.138679] Initialise system trusted keyrings
[    0.138753] Key type blacklist registered
[    0.138844] audit: type=2000 audit(0.132:1): state=initialized audit_enabled1
[    0.138918] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.138999] zbud: loaded
[    0.139959] NFS: Registering the id_resolver key type
[    0.139986] Key type id_resolver registered
[    0.139994] Key type id_legacy registered
[    0.140019] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.140029] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.140224] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.140418] fuse init (API version 7.26)
[    0.140749] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.140959] orangefs_init: module version upstream loaded
[    0.140970] SGI XFS with ACLs, security attributes, realtime, no debug enabld
[    2.556137] random: fast init done
[    5.976375] Key type asymmetric registered
[    5.976391] Asymmetric key parser 'x509' registered
[    5.976455] Block layer SCSI generic (bsg) driver version 0.4 loaded (major )
[    5.976466] io scheduler noop registered
[    5.976474] io scheduler deadline registered
[    5.976563] io scheduler cfq registered (default)
[    5.977783] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl drir
[    5.979671] mvebu-pcie mbus@f1000000:pcie-controller@82000000: PCI host brid0
[    5.979693] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    5.979706] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    5.979720] pci_bus 0000:00: root bus resource [bus 00-ff]
[    5.980055] PCI: bus0: Fast back to back transfers disabled
[    5.980080] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reg
[    5.980243] PCI: bus1: Fast back to back transfers enabled
[    5.980317] pci 0000:00:01.0: PCI bridge to [bus 01]
[    5.980884] mv_xor f1060800.xor: Marvell shared XOR driver
[    6.036872] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg )
[    6.037102] mv_xor f1060900.xor: Marvell shared XOR driver
[    6.096860] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg )
[    6.097316] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    6.098654] console [ttyS0] disabled
[    6.098719] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud =A
[    6.734129] console [ttyS0] enabled
[    6.746046] loop: module loaded
[    6.749844] sata_mv f1080000.sata: slots 32 ports 2
[    6.757582] scsi host0: sata_mv
[    6.761183] scsi host1: sata_mv
[    6.764581] ata1: SATA max UDMA/133 irq 33
[    6.768746] ata2: SATA max UDMA/133 irq 33
[    6.773621] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    6.780101] nand: Samsung NAND 128MiB 3,3V 8-bit
[    6.784738] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB si4
[    6.792372] Scanning device for bad blocks
[    6.817641] Bad eraseblock 219 at 0x000001b60000
[    6.887753] Bad eraseblock 900 at 0x000007080000
[    6.904281] 9 ofpart partitions found on MTD device orion_nand
[    6.910161] Creating 9 MTD partitions on "orion_nand":
[    6.915330] 0x000000000000-0x000000100000 : "uboot"
[    6.921565] 0x000000100000-0x000000180000 : "uboot_env"
[    6.928187] 0x000000180000-0x000000200000 : "key_store"
[    6.934740] 0x000000200000-0x000000280000 : "info"
[    6.940714] 0x000000280000-0x000000c80000 : "etc"
[    6.946643] 0x000000c80000-0x000001680000 : "kernel_1"
[    6.953017] 0x000001680000-0x000004640000 : "rootfs1"
[    6.959647] 0x000004640000-0x000005040000 : "kernel_2"
[    6.966099] 0x000005040000-0x000008000000 : "rootfs2"
[    6.974039] libphy: Fixed MDIO Bus: probed
[    6.979053] libphy: orion_mdio_bus: probed
[    6.984025] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    7.086620] mv643xx_eth: Set the PHY to fix link down
[    7.087319] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC addres7
[    7.101315] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    7.107988] ehci-pci: EHCI PCI platform driver
[    7.112509] ehci-orion: EHCI orion driver
[    7.116763] orion-ehci f1050000.ehci: EHCI Host Controller
[    7.122298] orion-ehci f1050000.ehci: new USB bus registered, assigned bus n1
[    7.130269] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    7.166160] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    7.172444] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    7.179297] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber1
[    7.186578] usb usb1: Product: EHCI Host Controller
[    7.191474] usb usb1: Manufacturer: Linux 4.12.1-kirkwood-tld-1 ehci_hcd
[    7.198225] usb usb1: SerialNumber: f1050000.ehci
[    7.203577] hub 1-0:1.0: USB hub found
[    7.207436] hub 1-0:1.0: 1 port detected
[    7.211990] usbcore: registered new interface driver usb-storage
[    7.218427] mousedev: PS/2 mouse device common for all mice
[    7.224302] rtc-mv f1010300.rtc: invalid RTC date, resetting to January 1st,3
[    7.232183] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[    7.239277] i2c /dev entries driver
[    7.245534] rtc-pcf8563 0-0051: low voltage detected, date/time is not relia.
[    7.253209] rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc1
[    7.263188] hidraw: raw HID events driver (C) Jiri Kosina
[    7.269032] drop_monitor: Initializing network drop monitor service
[    7.275562] NET: Registered protocol family 17
[    7.280090] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl F300)
[    7.286876] Key type dns_resolver registered
[    7.291240] ata1.00: ATA-8: ST3500312CS, SC13, max UDMA/133
[    7.291248] ata1.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    7.304853] registered taskstats version 1
[    7.309075] ata1.00: configured for UDMA/133
[    7.313538] Loading compiled-in X.509 certificates
[    7.318833] scsi 0:0:0:0: Direct-Access     ATA      ST3500312CS      SC13 P5
[    7.320300] sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466)
[    7.320377] sd 0:0:0:0: [sda] Write Protect is off
[    7.320515] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doeA
[    7.351859] zswap: loaded using pool lzo/zbud
[    7.358624] Key type big_key registered
[    7.364322] Key type encrypted registered
[    7.369775] rtc-mv f1010300.rtc: setting system clock to 2013-01-01 17:59:04)
[    7.378573]  sda: sda1
[    7.380172] sd 0:0:0:0: [sda] Attached SCSI disk
[    7.566157] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    7.757906] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    7.764653] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    7.771862] usb 1-1: Product: USB2.0 Hub
[    7.776701] hub 1-1:1.0: USB hub found
[    7.780780] hub 1-1:1.0: 4 ports detected
[    7.826173] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    7.866207] ata2.00: ATA-8: ST31500341AS, CC1H, max UDMA/133
[    7.871898] ata2.00: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    7.936211] ata2.00: configured for UDMA/133
[    7.951062] scsi 1:0:0:0: Direct-Access     ATA      ST31500341AS     CC1H P5
[    7.960303] sd 1:0:0:0: [sdb] 2930277168 512-byte logical blocks: (1.50 TB/1)
[    7.968532] sd 1:0:0:0: [sdb] Write Protect is off
[    7.973469] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doeA
[    8.009662]  sdb: sdb1
[    8.013447] sd 1:0:0:0: [sdb] Attached SCSI disk
[    8.018349] VFS: Cannot open root device "(null)" or unknown-block(0,0): err6
[    8.025894] Please append a correct "root=" boot option; here are the availa:
[    8.034349] 1f00            1024 mtdblock0
[    8.034354]  (driver?)
[    8.041058] 1f01             512 mtdblock1
[    8.041063]  (driver?)
[    8.047714] 1f02             512 mtdblock2
[    8.047719]  (driver?)
[    8.054285] 1f03             512 mtdblock3
[    8.054289]  (driver?)
[    8.060888] 1f04           10240 mtdblock4
[    8.060892]  (driver?)
[    8.067482] 1f05           10240 mtdblock5
[    8.067485]  (driver?)
[    8.074063] 1f06           48896 mtdblock6
[    8.074067]  (driver?)
[    8.080655] 1f07           10240 mtdblock7
[    8.080659]  (driver?)
[    8.087249] 1f08           48896 mtdblock8
[    8.087253]  (driver?)
[    8.093821] 0800       488386584 sda
[    8.093825]  driver: sd
[    8.099970]   0801       488385560 sda1 00006160-01
[    8.099974]
[    8.106405] usb 1-1.4: new high-speed USB device number 3 using orion-ehci
[    8.113386] 0810      1465138584 sdb
[    8.113392]  driver: sd
[    8.119582]   0811      1465137560 sdb1 0009472b-01
[    8.119586]
[    8.125999] Kernel panic - not syncing: VFS: Unable to mount root fs on unkn)
[    8.134299] CPU: 0 PID: 1 Comm: swapper Not tainted 4.12.1-kirkwood-tld-1 #1
[    8.141376] Hardware name: Marvell Kirkwood (Flattened Device Tree)
[    8.147695] [<c010ea54>] (unwind_backtrace) from [<c010ab48>] (show_stack+0x)
[    8.155485] [<c010ab48>] (show_stack) from [<c01dba9c>] (panic+0xb0/0x250)
[    8.162404] [<c01dba9c>] (panic) from [<c0c01274>] (mount_block_root+0x204/0)
[    8.169925] [<c0c01274>] (mount_block_root) from [<c0c013d8>] (mount_root+0x)
[    8.177799] [<c0c013d8>] (mount_root) from [<c0c01528>] (prepare_namespace+0)
[    8.185838] [<c0c01528>] (prepare_namespace) from [<c0c00e90>] (kernel_init_)
[    8.194756] [<c0c00e90>] (kernel_init_freeable) from [<c0833200>] (kernel_in)
[    8.202975] [<c0833200>] (kernel_init) from [<c01070f0>] (ret_from_fork+0x14)
[    8.210592] ---[ end Kernel panic - not syncing: VFS: Unable to mount root f)
[    8.337401] usb 1-1.4: New USB device found, idVendor=8644, idProduct=8005
[    8.344326] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumbe3
[    8.366147] usb 1-1.4: Product: USB Flash Disk
[    8.372016] usb 1-1.4: Manufacturer: General
[    8.396146] usb 1-1.4: SerialNumber: 2E515D00000011D9
[    8.402118] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[    8.426175] scsi host2: usb-storage 1-1.4:1.0
[    9.457364] scsi 2:0:0:0: Direct-Access     General  USB Flash Disk   1.00 P2
[    9.477824] sd 2:0:0:0: [sdc] 31299584 512-byte logical blocks: (16.0 GB/14.)
[    9.496185] sd 2:0:0:0: [sdc] Write Protect is off
[    9.501028] sd 2:0:0:0: [sdc] Mode Sense: 03 00 00 00
[    9.516558] sd 2:0:0:0: [sdc] No Caching mode page found
[    9.521897] sd 2:0:0:0: [sdc] Assuming drive cache: write through
[    9.550559]  sdc: sdc1
[    9.556312] sd 2:0:0:0: [sdc] Attached SCSI removable disk
also when I deleted uEnv.txt with just 1 line this error dissapered
maybe this is some clue?
73 bytes read in 284 ms (0 Bytes/s)
importing envs ...
## Warning: Input data exceeds 1048576 bytes - truncated
## Info: input data size = 1048578 = 0x100002



Edited 1 time(s). Last edit at 08/14/2017 06:55AM by dkuku.
Re: uboot doesn't pass bootargs to kernel
August 14, 2017 05:14PM
Hi dkuku,

> Maybe as a walkaround is there a option to hardcod
> e the commandline somewhere? I know that when comp
> iling kernel there is an option for that. what abo
> ut device tree ?

When you run my u-boot and kernel releases, there will never be needs to hardcode bootargs!

The problem was that you had the DTB embbded inside uImage. That was the reason bootargs was messed up when you load the DTB from u-boot.

Step 4 said:

Quote

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

So mount the drive on a different box and reverse the step:

cd /media/sdb1/boot
cp -a uImage uImage.nsa320
cp -a uImage.orig uImage
sync

And plug it back in the NSA320 and restart.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: uboot doesn't pass bootargs to kernel
August 14, 2017 07:03PM
And by the way, this error is not important. But it indicated that you don't have the latest default envs for U-Boot 2016.05-tld-1. Either you did not flash it, or they have been changed. You shoud not see this with the latest envs.

73 bytes read in 284 ms (0 Bytes/s)
importing envs ...
## Warning: Input data exceeds 1048576 bytes - truncated
## Info: input data size = 1048578 = 0x100002

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: uboot doesn't pass bootargs to kernel
August 14, 2017 08:33PM
Will try this when I get home,
also with the ubot env i had it loaded but then flashed new uboot and reset this to default envs from uboot with env command because too much clutter and i was thinking it helps ;)
Re: uboot doesn't pass bootargs to kernel
August 15, 2017 08:25AM
@bohdi
Big thanks, I managed to get it running but still have an error later - the command line differs from what I have in uboot


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.22.1 (Debian 1:1.22.0-19+b3) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs) cat /proc/cmdline
console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 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)
and uboot generates (run set_bootcmd_usb then saveenv)
bootargs=console=ttyS0,115200 root=LABEL=USBROOT rootdelay=5 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)
when I changed the label of usb drive and in uboot to rootfs it booted bot still the /proc/cmdline is different from uboot

root@debian:~# cat /proc/cmdline
console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 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)
For now it's not a problem, but we have to be aware of this, maybe you can add some info to the debian thread
Re: uboot doesn't pass bootargs to kernel
August 15, 2017 04:42PM
dkuku,

> Big thanks, I managed to get it running but still
> have an error later - the command line differs fro
> m what I have in uboot

Cool.

> For now it's not a problem, but we have to be awar
> e of this, maybe you can add some info to the debi
> an thread

It is a requirement to have label named rootfs if you run the new u-boot with its default setting for bootargs root=LABEL=rootfs. Of course you can set it to anything you want in both palces.

It's in the installation instruction, you've just missed that part:

Quote

Updated 24 Jul 2017:

Basic Debian stretch Kirkwood rootfs for most Kirwood plugs:

...

1. Format a new USB drive with a single Ext3 partition, and label it rootfs. If you are running the latest U-Boot for Kirkwood then you can use Ext4.

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

Your Email:


Subject:


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