Welcome! Log In Create A New Profile

Advanced

Issue booting after uboot update

Posted by Bennytheben 
Bennytheben
Issue booting after uboot update
April 14, 2018 10:48AM
Using Bodhi's excellent instructions I've booted the Debian rootfs from USB and updated to the latest kernel - Linux stora 4.15.2-kirkwood-tld-1

My original uboot system was: U-Boot 1.1.4 (Sep 4 2009 - 09:36:11) Marvell version: 3.4.14
and I'm updating to uboot.2017.07-tld-1.netgear_ms2110.mtd0.kwb

I've got a serial console and I tested with UART and booted successfully so I went ahead with the flashing process.

Following the guide I got to the stage where I check for bad blocks...
root@stora:~# dmesg | grep -i 'bad'
[    8.151723] Scanning device for bad blocks
[    8.204418] Bad eraseblock 448 at 0x000003800000
[    8.215826] Bad eraseblock 511 at 0x000003fe0000
[    8.269987] Bad eraseblock 969 at 0x000007920000
[    8.283464] Bad eraseblock 1051 at 0x000008360000
[    8.295284] Bad eraseblock 1117 at 0x000008ba0000
[    8.342523] Bad eraseblock 1510 at 0x00000bcc0000
[    8.398180] Bad eraseblock 1979 at 0x00000f760000
You say blocks 0 - 7 are the ones to watch out for. I'm not sure if you're referring to the first number (in decimal) or the hex number (which I don't know how to read), but I assumed you meant the decimal number and went ahead to the next step. Maybe you could make the instructions slightly clearer for people who are newbies to this area like me?

At step 7 I got unexpected output:
root@stora:~# flash_erase /dev/mtd0 0 4
Erasing 128 Kibyte @ 465f5c00000064 --  4 % complete 
root@stora:~#

At step 8 it's similar:
root@stora:/tmp# /usr/sbin/flash_erase /dev/mtd0 0xc0000 1
Erasing 128 Kibyte @ 47af5c00000064 --  7 % complete
...but I completed all of the steps and rebooted and uboot has been upgraded successfully!

It loads the kernel and initrd and Debian starts booting, but then it gets stuck -
[   10.342612] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[   10.350137] Please append a correct "root=" boot option; here are the available partitions:
[   10.358656] 1f00            1024 mtdblock0
[   10.358662]  (driver?)
[   10.365300] 1f01            6144 mtdblock1
[   10.365305]  (driver?)
[   10.371921] 1f02          254976 mtdblock2
[   10.371926]  (driver?)
[   10.378498] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

It seems that uboot knows where to find and load the kernel, but the kernel isn't accepting the 'root' part from this environment var:
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params

When I replace 'root=LABEL=rootfs' with 'root=/dev/sda1' it boots Debian correctly, but when I plug the hard disks back in the block devices are numbered randomly and then a similar issue occurs. I updated /etc/fstab to use a UUID instead of /dev/sdX but is there a way to do this in the uboot args as well seeing as the label isn't working?

When the USB stick is plugged into my computer -
$ blkid
/dev/sdb1: LABEL="rootfs" UUID="4be089b4-752a-4ea9-b021-b1d88fff3857" SEC_TYPE="ext2" TYPE="ext3" PARTUUID="96dd54ae-01"

Any help would be greatly appreciated.
Bennytheben
Re: Issue booting after uboot update
April 14, 2018 10:52AM
Here is the full printenv in case that's useful
Netgear Stora> printenv
arcNumber=2743
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=3
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-netgear_stora_ms2000.dtb
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.1.253
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-netgear_stora_ms2000.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 $custom_params
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=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 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  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: 2909/131068 bytes
Re: Issue booting after uboot update
April 14, 2018 05:52PM
Bennytheben,

> You say blocks 0 - 7 are the ones to watch out
> for. I'm not sure if you're referring to the first
> number (in decimal) or the hex number (which I
> don't know how to read), but I assumed you meant
> the decimal number and went ahead to the next
> step. Maybe you could make the instructions
> slightly clearer for people who are newbies to
> this area like me?

You should read the instruction a little more carefully :) The bad block number in this example is block 3.

Quote

4. Be sure there is no bad block in the first 1M of your NAND (check dmesg). This is very important, if there is bad block in the first 1M (8 blocks), don't flash u-boot, because you will almost certainly brick your box. Please post your question here (there is a work around for it).

Example of bad block in mtd0:
dmesg | grep -i 'bad'

[ 2.413231] Scanning device for bad blocks
[ 2.417731] Bad eraseblock 3 at 0x000000060000

This bad block is the 4th block which resides within mtd0 (block 0 to block 7). So u-boot should not be flashed.


> At step 7 I got unexpected output:
>
> root@stora:~# flash_erase /dev/mtd0 0 4
> Erasing 128 Kibyte @ 465f5c00000064 --  4 %
> complete 
> root@stora:~# 
>
>
> At step 8 it's similar:
>
> root@stora:/tmp# /usr/sbin/flash_erase /dev/mtd0
> 0xc0000 1
> Erasing 128 Kibyte @ 47af5c00000064 --  7 %
> complete
>
> ...but I completed all of the steps and rebooted
> and uboot has been upgraded successfully!
>

Those were misleading outputs from the latest flash_erase binary. We have no way to make it looks correct, atm.

> When I replace 'root=LABEL=rootfs' with
> 'root=/dev/sda1' it boots Debian correctly, but
> when I plug the hard disks back in the block
> devices are numbered randomly and then a similar
> issue occurs. I updated /etc/fstab to use a UUID
> instead of /dev/sdX but is there a way to do this
> in the uboot args as well seeing as the label
> isn't working?
>

There is no need to use UUID or PARTUUID at all.

As long as your bootargs has root=LABEL=rootfs, your USB drive partition has the label rootfs, and it is the only rootfs in the system. It will boot correctly.

See the instruction

Quote

8. Flashing default u-boot envs image (if you are upgrading from 2016.05-tld-1 u-boot, you can skip this step 8).

As described in step 1, u-boot envs must be defined in /etc/fw_env.config as

# MTD device name Device offset Env. size Flash sector size Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000

This default envs image supports booting with multiple disk drives (and hubs) attached. The disk drives could be any type (usb, sata, sd card). The scanning logic and default envs were set to automatically boot the box with the following required configuration:

For whatever reason, if you can't set up your configuration to satisfy the following 4 requirements, then don't flash this defaut envs image. It might not boot properly. In this case, section C below can be used to tailor the envs to your specific configuration.

r1. There must be only one partition among all partitions from all drives that contains the kernel files. The 2 kernel files are /boot/uImage and /boot/uInitrd.
r2. The partition that contains the 2 kernel files must be partition 1 in a disk drive
r3. The partition that contains the rootfs must be labeled rootfs
r4. The rootfs partition is recommended to be type Ext3 (this is not a hard requirement, ext4 should boot OK, but Ext3 will ensure no problem).

So the bottom line is if you have only one rootfs in a single Ext3 partition, which is labeled as rootfs, then you're all set.



What is inside the hard disk?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Issue booting after uboot update
April 15, 2018 04:52AM
Thank you for your quick response!

I forgot to mention I had the same issue where Debian couldn't find the USB drive labelled 'rootfs' before updating, but I was hoping that updating uboot would resolve it.

I've checked again and as far as I can tell all of those requirements are met.

USB stick mounted on my Ubuntu machine -
ben@xameroth:~$ cat /media/ben/rootfs/etc/fw_env.config 
# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000

In gParted it reports that it's an 'msdos' partition table and there's only one ~16GB partition, ext3, labelled 'rootfs'. It's a brand new SanDisk USB 3.0 thumb drive that I got for this purpose.

When I had Debian running yesterday I was getting a lot of 'usb 1-1: reset high-speed USB device number 2 using orion-ehci' messages when there was a lot of I/O (eg. installing packages in apt). I did some research online and figured it might be that the motherboard/USB port is very old and doesn't actually support USB 2.0 and it doesn't get enough power when the system tries to use it in high-speed mode. It caused kernel panics and data loss (and a broken system). I reinstalled the rootfs and then followed the suggestions of some posts online and blacklisted the modules 'ehci_hcd' and 'orion-ehci', and the system was very stable after that.

I've got two 2TB SATA drives in RAID1 (mirrored) configuration which were set up using the Stora's stock OS (does that use XFS for this?). I use them for backups and my media library. I'm pretty sure the stock OS puts /boot/ and kernel images on internal flash memory (NAND?) so I think that's requirement #1 met.
Quote

r1. There must be only one partition among all partitions from all drives that contains the kernel files. The 2 kernel files are /boot/uImage and /boot/uInitrd.

...unless there are still kernels from the stock OS on nand, and it's getting confused by that?

I think the uboot kernel image I'm using at the moment still has the dtb embedded from when I was booting with the old uboot. Would that make any difference?

Any ideas?



Edited 4 time(s). Last edit at 04/15/2018 05:16AM by bennytheben.
Re: Issue booting after uboot update
April 15, 2018 05:44PM
bennytheben,

This should be easy to solve since you have serial console.

With serial console connected, and both the USB rootfs and the HDD attached, power up. Interrupt serial console, and

printenv
boot

Please post the entire serial console log here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Issue booting after uboot update
April 16, 2018 03:32AM
Hi Bodhi,

here it is... hope you can help :-)

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:38:05 -0700)
Netgear Stora MS2110

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
PHY reset timed out
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  3  0 
Netgear Stora> printenv
arcNumber=2743
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=3
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-netgear_stora_ms2000.dtb
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.1.253
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-netgear_stora_ms2000.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 $custom_params
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=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 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  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: 2909/131068 bytes
Netgear Stora> boot
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 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: OK 
  Device 0: Model: ST2000DM001-1ER164 Firm: CC26 Ser#: Z4Z47BDE
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)
  Device 1: Model: ST2000DM001-9YN164 Firm: CC4H Ser#: Z1E16PM5
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)
Unknown command 'mmc' - try 'help'

Partition Map for USB device 0  --   Partition Type: DOS

PartStart SectorNum SectorsUUIDType
  132        30031218  96dd54ae-0183

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** File not found /boot/uEnv.txt **

Partition Map for IDE device 0  --   Partition Type: DOS

PartStart SectorNum SectorsUUIDType
  11         390625000000091b90-01fd


Partition Map for IDE device 1  --   Partition Type: DOS

PartStart SectorNum SectorsUUIDType
  11         390625000000075d10-01fd
Unknown command 'mmc' - try 'help'
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 692 ms (0 Bytes/s)
Found bootable drive on usb 0
3937909 bytes read in 911 ms (4.1 MiB/s)
7861543 bytes read in 933 ms (8 MiB/s)
11869 bytes read in 2614 ms (3.9 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.15.2-kirkwood-tld-1
   Created:      2018-04-14  12:53:11 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3937845 Bytes = 3.8 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.15.2-kirkwood-tld-1
   Created:      2018-04-14  12:53:16 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7861479 Bytes = 7.5 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 03880000, end 03fff4e7 ... OK
   Loading Device Tree to 0387a000, end 0387fe5c ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.2-kirkwood-tld-1 (root@tldDebian) (gcc version 6.3.0 20170516 (Debian 6.3.0-18)) #1 PREEMPT Fri Feb 9 01:52:00 PST 2018
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: NETGEAR MS2000 / MS2110 aka Stora
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200n8 earlyprintk
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 116500K/131072K available (8192K kernel code, 750K rwdata, 2068K rodata, 1024K init, 282K bss, 14572K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (9184 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 751 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 283 kB)
[    0.000000] random: get_random_u32 called from cache_alloc_refill+0x368/0x8cc with crng_init=0
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Tasks RCU enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000012] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.007907] Switching to timer-based delay loop, resolution 5ns
[    0.014470] Console: colour dummy device 80x30
[    0.019027] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.029662] pid_max: default: 32768 minimum: 301
[    0.034490] Security Framework initialized
[    0.038834] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.045500] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.053797] CPU: Testing write buffer coherency: ok
[    0.060007] Setting up static identity map for 0x100000 - 0x100058
[    0.066539] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.072075] Hierarchical SRCU implementation.
[    0.080451] devtmpfs: initialized
[    0.089580] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.099578] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.106176] prandom: seed boundary self test passed
[    0.116174] prandom: 100 self tests passed
[    0.120341] pinctrl core: initialized pinctrl subsystem
[    0.126938] NET: Registered protocol family 16
[    0.131974] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.139648] audit: initializing netlink subsys (disabled)
[    0.146320] audit: type=2000 audit(0.130:1): state=initialized audit_enabled=0 res=1
[    0.154264] cpuidle: using governor ladder
[    0.154330] cpuidle: using governor menu
[    0.154839] Feroceon L2: Enabling L2
[    0.154880] Feroceon L2: Cache support initialised.
[    0.155318] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.161289] No ATAGs?
[    0.198085] vgaarb: loaded
[    0.198461] SCSI subsystem initialized
[    0.198940] usbcore: registered new interface driver usbfs
[    0.199001] usbcore: registered new interface driver hub
[    0.199087] usbcore: registered new device driver usb
[    0.200207] clocksource: Switched to clocksource orion_clocksource
[    0.342602] VFS: Disk quotas dquot_6.6.0
[    0.346630] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.364427] NET: Registered protocol family 2
[    0.369683] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.376751] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.383171] TCP: Hash tables configured (established 1024 bind 1024)
[    0.389646] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.395553] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.402105] NET: Registered protocol family 1
[    0.406981] RPC: Registered named UNIX socket transport module.
[    0.413022] RPC: Registered udp transport module.
[    0.417751] RPC: Registered tcp transport module.
[    0.422517] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.429377] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.437081] Initialise system trusted keyrings
[    0.441692] Key type blacklist registered
[    0.445901] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.452551] zbud: loaded
[    0.456141] NFS: Registering the id_resolver key type
[    0.461320] Key type id_resolver registered
[    0.465519] Key type id_legacy registered
[    0.469562] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.476380] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.483111] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.490456] fuse init (API version 7.26)
[    0.494805] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.501524] orangefs_init: module version upstream loaded
[    0.506948] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    1.280214] random: fast init done
[    7.657568] Key type asymmetric registered
[    7.662024] Asymmetric key parser 'x509' registered
[    7.666990] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    7.674587] io scheduler noop registered
[    7.678530] io scheduler deadline registered
[    7.682993] io scheduler cfq registered (default)
[    7.689198] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    7.699044] mvebu-pcie mbus@f1000000:pcie-controller@82000000: PCI host bridge to bus 0000:00
[    7.707705] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    7.714036] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    7.720973] pci_bus 0000:00: root bus resource [bus 00-ff]
[    7.726862] PCI: bus0: Fast back to back transfers disabled
[    7.732516] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    7.740749] PCI: bus1: Fast back to back transfers enabled
[    7.746317] pci 0000:00:01.0: PCI bridge to [bus 01]
[    7.752035] mv_xor f1060800.xor: Marvell shared XOR driver
[    7.821168] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    7.828772] mv_xor f1060900.xor: Marvell shared XOR driver
[    7.891163] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    7.898995] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    7.906880] console [ttyS0] disabled
[    7.910618] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    7.919666] console [ttyS0] enabled
[    7.919666] console [ttyS0] enabled
[    7.926728] bootconsole [earlycon0] disabled
[    7.926728] bootconsole [earlycon0] disabled
[    7.942960] loop: module loaded
[    7.946760] sata_mv f1080000.sata: slots 32 ports 2
[    7.954816] scsi host0: sata_mv
[    7.958445] scsi host1: sata_mv
[    7.961888] ata1: SATA max UDMA/133 irq 33
[    7.966005] ata2: SATA max UDMA/133 irq 33
[    7.971051] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xda
[    7.977541] nand: Samsung NAND 256MiB 3,3V 8-bit
[    7.982217] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    7.989836] Scanning device for bad blocks
[    8.042557] Bad eraseblock 448 at 0x000003800000
[    8.053966] Bad eraseblock 511 at 0x000003fe0000
[    8.108247] Bad eraseblock 969 at 0x000007920000
[    8.121747] Bad eraseblock 1051 at 0x000008360000
[    8.133586] Bad eraseblock 1117 at 0x000008ba0000
[    8.180814] Bad eraseblock 1510 at 0x00000bcc0000
[    8.236449] Bad eraseblock 1979 at 0x00000f760000
[    8.248616] 3 ofpart partitions found on MTD device orion_nand
[    8.254531] Creating 3 MTD partitions on "orion_nand":
[    8.259726] 0x000000000000-0x000000100000 : "u-boot"
[    8.265869] 0x000000100000-0x000000700000 : "uImage"
[    8.272044] 0x000000700000-0x000010000000 : "root"
[    8.281285] libphy: Fixed MDIO Bus: probed
[    8.286326] libphy: orion_mdio_bus: probed
[    8.290542] [Firmware Warn]: /ocp@f1000000/mdio-bus@72004/ethernet-phy@8: Whitelisted compatible string. Please remove
[    8.302465] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    8.470263] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    8.481146] ata1.00: ATA-9: ST2000DM001-1ER164, CC26, max UDMA/133
[    8.487368] ata1.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    8.527039] ata1.00: configured for UDMA/133
[    8.550806] scsi 0:0:0:0: Direct-Access     ATA      ST2000DM001-1ER1 CC26 PQ: 0 ANSI: 5
[    8.571286] sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[    8.579076] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    8.600345] sd 0:0:0:0: [sda] Write Protect is off
[    8.605315] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    8.647115]  sda: sda1
[    8.661068] sd 0:0:0:0: [sda] Attached SCSI disk
[    9.080254] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    9.091124] ata2.00: ATA-8: ST2000DM001-9YN164, CC4H, max UDMA/133
[    9.097340] ata2.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    9.134794] ata2.00: configured for UDMA/133
[    9.140932] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 52:3b:20:9c:11:51
[    9.150152] scsi 1:0:0:0: Direct-Access     ATA      ST2000DM001-9YN1 CC4H PQ: 0 ANSI: 5
[    9.151346] sd 1:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[    9.151357] sd 1:0:0:0: [sdb] 4096-byte physical blocks
[    9.151446] sd 1:0:0:0: [sdb] Write Protect is off
[    9.151613] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    9.179768]  sdb: sdb1
[    9.181397] sd 1:0:0:0: [sdb] Attached SCSI disk
[    9.197747] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    9.204383] ehci-pci: EHCI PCI platform driver
[    9.208907] ehci-orion: EHCI orion driver
[    9.213222] orion-ehci f1050000.ehci: EHCI Host Controller
[    9.218763] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    9.226703] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    9.260249] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    9.266593] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    9.273455] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    9.280734] usb usb1: Product: EHCI Host Controller
[    9.285638] usb usb1: Manufacturer: Linux 4.15.2-kirkwood-tld-1 ehci_hcd
[    9.292392] usb usb1: SerialNumber: f1050000.ehci
[    9.297799] hub 1-0:1.0: USB hub found
[    9.301684] hub 1-0:1.0: 1 port detected
[    9.306396] usbcore: registered new interface driver usb-storage
[    9.312867] mousedev: PS/2 mouse device common for all mice
[    9.670248] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    9.871459] usb 1-1: New USB device found, idVendor=0781, idProduct=5583
[    9.878214] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    9.885413] usb 1-1: Product: Ultra Fit
[    9.889289] usb 1-1: Manufacturer: SanDisk
[    9.893428] usb 1-1: SerialNumber: 4C530001310407119045
[    9.899544] usb-storage 1-1:1.0: USB Mass Storage device detected
[    9.906141] scsi host2: usb-storage 1-1:1.0
[   10.330251] rtc-mv f1010300.rtc: internal RTC not ticking
[   10.335870] i2c /dev entries driver
[   10.346360] rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc0
[   10.356342] hidraw: raw HID events driver (C) Jiri Kosina
[   10.362218] drop_monitor: Initializing network drop monitor service
[   10.368848] NET: Registered protocol family 17
[   10.373456] Key type dns_resolver registered
[   10.378538] registered taskstats version 1
[   10.382693] Loading compiled-in X.509 certificates
[   10.387581] zswap: loaded using pool lzo/zbud
[   10.399486] Key type big_key registered
[   10.405714] Key type encrypted registered
[   10.412791] rtc-pcf8563 0-0051: setting system clock to 2018-04-16 08:27:56 UTC (1523867276)
[   10.422583] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[   10.430108] Please append a correct "root=" boot option; here are the available partitions:
[   10.438626] 1f00            1024 mtdblock0 
[   10.438632]  (driver?)
[   10.445272] 1f01            6144 mtdblock1 
[   10.445277]  (driver?)
[   10.451892] 1f02          254976 mtdblock2 
[   10.451897]  (driver?)
[   10.458471] 0800      1953514584 sda 
[   10.458476]  driver: sd
[   10.464637]   0801      1953125000 sda1 00091b90-01
[   10.464641] 
[   10.471060] 0810      1953514584 sdb 
[   10.471065]  driver: sd
[   10.477200]   0811      1953125000 sdb1 00075d10-01
[   10.477204] 
[   10.483628] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[   10.491938] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.2-kirkwood-tld-1 #1
[   10.499014] Hardware name: Marvell Kirkwood (Flattened Device Tree)
[   10.505349] [<c010ee44>] (unwind_backtrace) from [<c010af14>] (show_stack+0x10/0x14)
[   10.513143] [<c010af14>] (show_stack) from [<c0118744>] (panic+0xb0/0x244)
[   10.520068] [<c0118744>] (panic) from [<c0c011ec>] (mount_block_root+0x1a4/0x278)
[   10.527594] [<c0c011ec>] (mount_block_root) from [<c0c01388>] (m
Re: Issue booting after uboot update
April 16, 2018 03:55AM
bennytheben,

You've chosen a wrong step 4 during the upgrade to kernel 4.15.2

Since you are booting with the new u-boot, step 4a is the correct one to take.

Quote

4. Create uImage and uInitrd and setup for booting.

I'm using the GoFlex Net booting with USB drive as an example here. Please replace its name (kirkwood-goflexnet.dtb) with the box you are installing on (for example, kirkwood-pogo_e02.dtb). Please look inside /boot/dts/ for the correct DTB file name for your box.

Below are the 2 different alternatives in booting (method 4b is required for booting with older U-Boot that does not support FDT).

- Choose option 4a if you are going to use the current rootfs for many different Kirkwood boxes, as is. It should boot most of the Kirkwood boxes. And with the latest U-Boot for Kirkwood that suports FDT. This is the preferred method.

- Choose option 4b if you only use the current rootfs for the box you're installing on, and don't want to modify u-boot envs. This method is required for booting with older U-Boot that does not support FDT. Note that if you are installing from stock OS, u-boot envs must be modified to boot with USB or HDD (please post questions, since each box has a different flavor in setting up the envs).

4a. Boot with DTB file (standard way to boot FDT kernel). Recommended.
......
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)
.....

This has caused the misleading diagnosis in that when you hardcode the root=/dev/sda1 and it boots OK for the USB (you've basically partially correct the problem with that).

So to reverse that 4b step, boot the USB rootfs into Debian with your work around "root=/dev/sda1" and then fix it:

cd /boot
cp -a uImage uImage.stora_dtb_embedded
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.15.2-kirkwood-tld-1 -d vmlinuz-4.15.2-kirkwood-tld-1 uImage 
sync

Now the uImage is correct one to boot with the new u-boot 2017.07.

Plug in the HDD and reboot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Issue booting after uboot update
April 16, 2018 01:54PM
I wondered if it would cause problems having the dtb embedded in the kernel the "old fashioned" way. It's running happily now; thank you for your help! this kind of thing takes days of trial and error without the help of knowledgeable people like you (I would know... I was trying to get this working for days already until I found this forum). Have you had any contact with the people who run the wiki at openstora.com? I've been trying to follow a few guides including ones on that site and they're all a bit out of date and incomplete compared to yours. I think people would benefit from having more links to this forum.

I checked out the link in your signature and I made a donation to MSF as a token of thanks.

One more question:
I notice that the Debian repositories contain pages for image-linux-kirkwood/image-linux-marvell and debian.org says the architecture is supported - would it be possible or sensible to use these to keep up to date with security updates more easily instead of checking back on this forum and relying on you for updates? What's the difference between these kernels and the ones you compile?

Thanks
Re: Issue booting after uboot update
April 16, 2018 05:31PM
bennytheben,

> Have you had any contact with the
> people who run
> the
> wiki at openstora.com
? I've been trying to
> follow a few guides including ones on that site
> and they're all a bit out of date and incomplete
> compared to yours. I think people would benefit
> from having more links to this forum.

Please feel free to post links to Debian and u-boot threads there, in case people looking for helps. I did do this at NAS central for the Zyxel NAS325, since there was already a topic that point to this forum.

> I checked out the link in your signature and I
> made a donation to MSF as a token of thanks.

Awesome!

> One more question:
> I notice that the Debian repositories contain
> pages for image-linux-kirkwood/image-linux-marvell
> and debian.org says the architecture is supported
> - would it be possible or sensible to use these to
> keep up to date with security updates more easily
> instead of checking back on this forum and relying
> on you for updates? What's the difference between
> these kernels and the ones you compile?

The only difference between the kernel I compiled are the kernel config and the patches on top of the latest Linux source tree (image-linux-kirkwood usually based on a slightly older version). The other packages in the release tarball are to be used installing the kernel.

For example, linux-4.16.1-kirkwood-tld-1-bodhi.tar.bz2. This tarball contains 6 files:

linux-image-4.16.1-kirkwood-tld-1_1.0_armel.deb 
linux-headers-4.16.1-kirkwood-tld-1_1.0_armel.deb 
config-4.16.1-kirkwood-tld-1 
zImage-4.16.1-kirkwood-tld-1 
linux-dtb-4.16.1-kirkwood-tld-1.tar 
linux-4.16.1-kirkwood-tld-1.patch

For Marvell boxes that have been fully supported in mainline such as the Dockstar, you could use image-linux-kirkwood. The difference is not that much, other than some minor things such LED control. For boxes that are not supported in mainline Kirkwood, you need to either try to use the DTB or use kernel from the tarball that I released.

I alway keep track of any important kernel security updates, so that I can build a new kernel to pick that up sooner. But as always, when a major release such 4.16 is out, I will build that kernel, and that will take care of the security updates.

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