Welcome! Log In Create A New Profile

Advanced

Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar

Posted by Tom74 
Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 03, 2018 07:05AM
Hello,

I am trying to boot Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on my Dockstar without success.
I did extract Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 to a blank usb drive formatted as ext3 with 1 partition.
I have generated the uImage with DTB for the Dockstar embedded inside. The kernel starts booting and then the dockstar stucks. The LED lights solid amber.

Environment vars:

u-boot>> printenv
printenv
arcNumber=2097
baudrate=115200
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
bootcmd_pogo=run bootcmd_rescue
bootcmd_rescue=run set_bootargs_rescue; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
bootdelay=10
console=ttyS0,115200
ethact=egiga0
ethaddr=00:10:75:1A:B8:8D
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
if_netconsole=ping $serverip
ipaddr=192.168.0.16
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
ncip=192.168.0.1
partition=nand0,2
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
preboot=run if_netconsole start_netconsole
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
rescue_installed=1
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
serverip=192.168.0.1
set_bootargs_rescue=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=nc
stdin=nc
stdout=nc
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_device=0:1
usb_init=run usb_scan
usb_root=/dev/sda1
usb_rootdelay=10
usb_rootfstype=ext2
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_scan_list=1 2 3 4
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params

Environment size: 2839/131068 bytes
u-boot>>



U-Boot 2011.12 (Feb 12 2012 - 21:33:07)
Seagate FreeAgent DockStar
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1
GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709
Hit any key to stop autoboot:  0
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 4 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Loading file "/rescueme" from usb device 0:1 (usbda1)
** File not found /rescueme
reading /rescueme.txt

** Unable to read "/rescueme.txt" from usb 0:1 **
Creating 1 MTD partitions on "nand0":
0x000002500000-0x000010000000 : "mtd=3"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=3"
UBI: MTD device size:            219 MiB
UBI: number of good PEBs:        1750
UBI: number of bad PEBs:         2
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     0
UBI: available PEBs:             1729
UBI: total number of reserved PEBs: 21
UBI: number of PEBs reserved for bad PEB handling: 17
UBI: max/mean erase counter: 1/1
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:rootfs", error -19
Error reading superblock on volume 'ubi:rootfs'!
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
1 bytes read
Found bootable drive on usb 0:1
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
3831988 bytes read
Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)
7245696 bytes read
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3831924 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
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7245632 Bytes = 6.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...



Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi is working fine. I have generated the uImage with DTB for the Dockstar embedded inside. Kernel gets loaded and the LED lights green.
I also can ssh to the dockstar.

U-Boot 2011.12 (Feb 12 2012 - 21:33:07)
Seagate FreeAgent DockStar
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1
GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709
Hit any key to stop autoboot:  0
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 4 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Loading file "/rescueme" from usb device 0:1 (usbda1)
** File not found /rescueme
reading /rescueme.txt

** Unable to read "/rescueme.txt" from usb 0:1 **
Creating 1 MTD partitions on "nand0":
0x000002500000-0x000010000000 : "mtd=3"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=3"
UBI: MTD device size:            219 MiB
UBI: number of good PEBs:        1750
UBI: number of bad PEBs:         2
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     0
UBI: available PEBs:             1729
UBI: total number of reserved PEBs: 21
UBI: number of PEBs reserved for bad PEB handling: 17
UBI: max/mean erase counter: 1/1
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:rootfs", error -19
Error reading superblock on volume 'ubi:rootfs'!
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
1 bytes read
Found bootable drive on usb 0:1
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
3165294 bytes read
Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)
7179935 bytes read
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.4.0-kirkwood-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3165230 Bytes = 3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.4.0-kirkwood-tld-1
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7179871 Bytes = 6.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

login as: root
root@192.168.0.16's password:
Linux debian 4.4.0-kirkwood-tld-1 #1 PREEMPT Mon Jan 25 20:35:24 PST 2016 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Feb 19 20:08:26 2016 from 192.168.0.100
root@debian:~#
root@debian:~#
root@debian:~# uname -r
4.4.0-kirkwood-tld-1
root@debian:~#

Strange, why does Debian-4.4.0-kirkwood-tld-1 work and Debian-4.12.1-kirkwood-tld-1 not?

-Tom
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 03, 2018 02:53PM
Tom,

Your current u-boot is quite old and the envs are different from the new u-boot.

Try this with both rootfs:

1. Make sure that the /etc/fstab has this line for rootfs:

LABEL=rootfs    /               ext3    noatime,errors=remount-ro 0 1


2. Power up, interrupt netconsole and,

setenv usb_set_bootargs 'setenv bootargs console=$console root=LABEL=rootfs rootdelay=$usb_rootdelay $mtdparts $usb_custom_params'
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 04, 2018 07:15AM
1. fstab is correct

2. bootargs are set but still kernel will not boot.

Additional question: I am trying to setup netconsole to troubleshoot Debian kernel booting like mentioned in this thread[How To] Use netconsole to troubleshoot Debian kernel booting

My problem now is I can't generate new initramfs image for the dockstar written to the usb stick. The command wants to update the initramfs of the actual running kernel of my VM.

I can't do it on the dockstar because it did not boot properly as you know.
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 04, 2018 08:21AM
I have modified my working Debian-4.4.0-kirkwood-tld-1 installation with the netconsole options to see the kernel messages.

U-Boot 2011.12 (Feb 12 2012 - 21:33:07)
Seagate FreeAgent DockStar

arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1

GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709

Hit any key to stop autoboot: 10

u-boot>> setenv usb_set_bootargs 'setenv bootargs console=$console root=LABEL=rootfs rootdelay=$usb_rootdelay $mtdparts $usb_custom_params'
setenv usb_set_bootargs 'setenv bootargs console=$console root=LABEL=rootfs rootdelay=$usb_rootdelay $mtdparts $usb_custom_params'
u-boot>> boot
boot
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 4 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Loading file "/rescueme" from usb device 0:1 (usbda1)
** File not found /rescueme
reading /rescueme.txt

** Unable to read "/rescueme.txt" from usb 0:1 **
Creating 1 MTD partitions on "nand0":
0x000002500000-0x000010000000 : "mtd=3"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=3"
UBI: MTD device size:            219 MiB
UBI: number of good PEBs:        1750
UBI: number of bad PEBs:         2
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     0
UBI: available PEBs:             1729
UBI: total number of reserved PEBs: 21
UBI: number of PEBs reserved for bad PEB handling: 17
UBI: max/mean erase counter: 1/1
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:rootfs", error -19
Error reading superblock on volume 'ubi:rootfs'!
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
1 bytes read
Found bootable drive on usb 0:1
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
3165294 bytes read
Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)
7178889 bytes read
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.4.0-kirkwood-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3165230 Bytes = 3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.4.0-kirkwood-tld-1
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7178825 Bytes = 6.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...
.
[   19.869766] systemd-udevd[302]: starting version 215
[   20.385211] marvell-cesa: probe of f1030000.crypto failed with error -524
[   20.406713] orion_wdt: Initial timeout 21 sec
[   20.523197] usbcore: registered new interface driver usbserial
[   20.575093] usbcore: registered new interface driver usbserial_generic
[   20.581801] usbserial: USB Serial support registered for generic
[   20.649520] random: nonblocking pool is initialized
[   20.688416] usbcore: registered new interface driver ftdi_sio
[   20.724619] usbserial: USB Serial support registered for FTDI USB Serial Device
[   20.772118] ftdi_sio 1-1.1:1.0: FTDI USB Serial Device converter detected
[   20.804339] usb 1-1.1: Detected FT232RL
[   20.811733] usb 1-1.1: FTDI USB Serial Device converter now attached to ttyUSB0
[   21.449427] EXT4-fs (sda1): re-mounted. Opts: (null)
[   21.642369] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[   24.270146] NET: Registered protocol family 10
.
login as: root
root@192.168.0.16's password:
Linux debian 4.4.0-kirkwood-tld-1 #1 PREEMPT Mon Jan 25 20:35:24 PST 2016 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Feb  4 05:51:11 2018 from einstein.fritz.box
root@debian:~#

Note: I have an usb smartcardreader attached to the dockstar.

I thought maybe the reader has a problem with the Debian-4.12.1 rootfs/kernel.
So I unplugged the reader from the dockstar.

But also without the reader the kernel did not boot!

-Tom
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 04, 2018 02:23PM
Tom,

Try using a different USB thumb drive for Debian-4.12.1 rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 06, 2018 04:02PM
That's weird...

Now I used another USB thumb drive.

usb_set_bootargs=setenv bootargs console=$console root=LABEL=rootfs rootdelay=$usb_rootdelay $mtdparts $usb_custom_params

Environment size: 2815/131068 bytes
u-boot>> boot
boot
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 4 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Loading file "/rescueme" from usb device 0:1 (usbda1)
Failed to mount ext2 filesystem...
** Bad ext2 partition or disk - usb 0:1 **
reading /rescueme.txt

** Unable to read "/rescueme.txt" from usb 0:1 **
Creating 1 MTD partitions on "nand0":
0x000002500000-0x000010000000 : "mtd=3"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=3"
UBI: MTD device size:            219 MiB
UBI: number of good PEBs:        1750
UBI: number of bad PEBs:         2
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     0
UBI: available PEBs:             1729
UBI: total number of reserved PEBs: 21
UBI: number of PEBs reserved for bad PEB handling: 17
UBI: max/mean erase counter: 1/1
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:rootfs", error -19
Error reading superblock on volume 'ubi:rootfs'!
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
Failed to mount ext2 filesystem...
** Bad ext2 partition or disk - usb 0:1 **
** Block device usb 1 not supported
** Block device usb 2 not supported
** Block device usb 3 not supported
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
Failed to mount ext2 filesystem...
** Bad ext2 partition or disk - usb 0:1 **
Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)
Failed to mount ext2 filesystem...
** Bad ext2 partition or disk - usb 0:1 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
stopping USB..

I have checked the file system and it is clean.

What's going on here? I don't get it. Even with ext2 or ext3 formatted fs. I also have modified fstab to ext2or3 properly.

I don't think I have a bad USB thumb drive because I used different ones. They can't be all broken...

Partitioning, formatting and copying the data did not show any error or data corruption.

Still very strange issues after all...
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 06, 2018 04:38PM
Tom,


> I have checked the file system and it is clean.
>
> What's going on here? I don't get it. Even with
> ext2 or ext3 formatted fs. I also have modified
> fstab to ext2or3 properly.
>
> I don't think I have a bad USB thumb drive because
> I used different ones. They can't be all
> broken...
>
> Partitioning, formatting and copying the data did
> not show any error or data corruption.
>
> Still very strange issues after all...

It's not that strange. Your installed Marvell u-boot is very old, and the usb driver had problems. Perhaps it is the drive.

In the old days (5,6 years ago), we just tried different USB thumb drive until we found one that worked. Sandisk is my favorite brand, it is quite resilient and never fail to boot. If you have Sandisk brand, try that.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 06, 2018 05:35PM
Ok. The usb thumb drive I used for the testing above is an older Corsair Voyager GT 16GB in exchange of the sandisk cruzer fit below.

My old Debian Squeeze on DockStar is installed on an 4GB Philips thumb drive and it worked well all the years without any major issues.

For the main test/upgrade attempt of my old system I am using 2 new sandisk cruzer fit thumb drives with 16GB of RAM.
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 08, 2018 01:13PM
Bodhi,

is it possible that you built me a new rootfs (4.12.1 or maybe later) with the DTB embedded for my dockstar and netconsole enabled (for debugging)?

/etc/initramfs-tools/modules setup to:

netconsole netconsole=6666@192.168.0.016/eth0,6666@192.168.0.1/

This would help me a lot to do further investigations.

Too bad that I can't built it on my own because my system is not working... :(

Thank you in advance.

regards
-Tom
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 08, 2018 02:42PM
Tom,

> is it possible that you built me a new rootfs
> (4.12.1 or maybe later) with the DTB embedded for
> my dockstar and netconsole enabled (for
> debugging)?
>

No need to, because:

1. You can boot with Debian-4.4.0-kirkwood-tld-1 rootfs, so you can run that, chroot into the 4.12.1 and create the new initramfs (search for chroot instruction, quite easy to do).
2. Netconsole setup in Debian will not help in trouble shooting this problem. You need serial console.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 11, 2018 03:58PM
Could this be an issue?

With start of using kernel Linux-4.11.3-kirkwood-tld-1

u-boot>> boot
boot
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 4 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Loading file "/rescueme" from usb device 0:1 (usbda1)
** File not found /rescueme
reading /rescueme.txt

** Unable to read "/rescueme.txt" from usb 0:1 **
Creating 1 MTD partitions on "nand0":
0x000002500000-0x000010000000 : "mtd=3"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=3"
UBI: MTD device size:            219 MiB
UBI: number of good PEBs:        1750
UBI: number of bad PEBs:         2
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     0
UBI: available PEBs:             1729
UBI: total number of reserved PEBs: 21
UBI: number of PEBs reserved for bad PEB handling: 17
UBI: max/mean erase counter: 1/1
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:rootfs", error -19
Error reading superblock on volume 'ubi:rootfs'!
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
1 bytes read
Found bootable drive on usb 0:1
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
3504548 bytes read
Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)
7935209 bytes read
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.11.3-kirkwood-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3504484 Bytes = 3.3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.11.3-kirkwood-tld-1
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7935145 Bytes = 7.6 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

[   15.462047] orion_wdt: Initial timeout 21 sec
[   15.558181] marvell-cesa f1030000.crypto: CESA device successfully registered
[   15.681903] usbcore: registered new interface driver usbserial
[   15.729654] usbcore: registered new interface driver usbserial_generic
[   15.743690] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   15.807623] usbserial: USB Serial support registered for generic
[   15.905496] usbcore: registered new interface driver ftdi_sio
[   15.911456] usbserial: USB Serial support registered for FTDI USB Serial Device
[   15.987313] ftdi_sio 1-1.1:1.0: FTDI USB Serial Device converter detected
[   16.035655] usb 1-1.1: Detected FT232RL
[   16.060057] usb 1-1.1: FTDI USB Serial Device converter now attached to ttyUSB0
[   16.774736] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[   17.732478] __nand_correct_data: uncorrectable ECC error
[   17.737966] blk_update_request: I/O error, dev mtdblock0, sector 2040
[   17.744733] __nand_correct_data: uncorrectable ECC error
[   17.750114] blk_update_request: I/O error, dev mtdblock0, sector 2040
[   17.756597] Buffer I/O error on dev mtdblock0, logical block 255, async page read
[   18.169467] __nand_correct_data: uncorrectable ECC error
[   18.174958] blk_update_request: I/O error, dev mtdblock0, sector 2040
[   18.181694] __nand_correct_data: uncorrectable ECC error
[   18.187130] blk_update_request: I/O error, dev mtdblock0, sector 2040
[   18.193610] Buffer I/O error on dev mtdblock0, logical block 255, async page read
[   21.943821] random: crng init done

the dockstar gets stuck and the kernel is not working.

Kernel Linux-4.10.9-kirkwood-tld-1 is the last one which works without problems.

Starting kernel ...

[   15.327128] orion_wdt: Initial timeout 21 sec
[   15.433240] marvell-cesa f1030000.crypto: CESA device successfully registered
[   15.613143] usbcore: registered new interface driver usbserial
[   15.663803] usbcore: registered new interface driver usbserial_generic
[   15.670533] usbserial: USB Serial support registered for generic
[   15.681806] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   15.804828] usbcore: registered new interface driver ftdi_sio
[   15.844826] usbserial: USB Serial support registered for FTDI USB Serial Device
[   15.888233] ftdi_sio 1-1.1:1.0: FTDI USB Serial Device converter detected
[   15.936983] usb 1-1.1: Detected FT232RL
[   15.966172] usb 1-1.1: FTDI USB Serial Device converter now attached to ttyUSB0
[   16.700920] EXT4-fs (sda1): re-mounted. Opts: (null)
[   16.903801] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[   17.946098] random: crng init done
[   19.467386] NET: Registered protocol family 10
[   19.475094] Segment Routing with IPv6

-Tom
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 11, 2018 06:09PM
Tom,

There were no change regarding MTD from kernel Linux-4.10.9-kirkwood-tld-1 to kernel Linux-4.11.3-kirkwood-tld-1. So that error does not ring any bell for me.

I would suggest that:

- Use the rootfs that you can boot (e.g. 4.4. or whatever).
- Clone it to another USB drive.
- And upgrade the kernel on the clone USB drive to the latest kernel (linux-4.14.1-kirkwood-tld-1).
- If this cloned drive works, then start using it as your rootfs.

This way you won't chase a seemingly mysterious problem. Again, if you install serial console, whatever the issue is, it can be solved in a few minutes.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 16, 2018 01:50PM
[    0.160945] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set

Is this info critical?
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 16, 2018 03:20PM
Tom74 Wrote:
-------------------------------------------------------
>
> [    0.160945] [Firmware Info]:
> /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0:
> local-mac-address is not set
>
>
> Is this info critical?

This is OK. It's information only.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 20, 2018 03:19PM
Hello bodhi,

I have now a working system with Debian 9 and the 4.10.9-kirkwood-tld-1 kernel.
What about flashing the new u-boot?

Do I have to look for something special?

These are my bad blocks in mtd0:

root@debian9:~# dmesg | grep -i 'bad'
[    5.831470] Scanning device for bad blocks
[    5.845415] Bad eraseblock 127 at 0x000000fe0000
[    5.887606] Bad eraseblock 616 at 0x000004d00000
[    5.915511] Bad eraseblock 919 at 0x0000072e0000

Is this ok? Can I safely flash the new u-boot?

1. My uBoot envs config is defined as

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

2. My partitions look like

dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 02000000 00020000 "rootfs"
mtd3: 0db00000 00020000 "data"

4. save my current envs, save ethaddr, and save NAND mtd0: with nanddump

5. Erase mtd0

flash_erase /dev/mtd0 0 4

6.Write image to NAND

nandwrite /dev/mtd0 uboot.2017.07-tld-1.dockstar.mtd0.kwb

Should I flash the default u-boot envs image ?

1. flash erease

/usr/sbin/flash_erase /dev/mtd0 0xc0000 1

2. flash u-boot envs image

/usr/sbin/nandwrite -s 786432 /dev/mtd0 uboot.2016.05-tld-1.environment.img

fw_setenv:

for Dockstar:

fw_setenv arcNumber 2998
fw_setenv machid

set mtdparts and ethaddr

fw_setenv mtdparts 'mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)'
fw_setenv ethaddr '00:10:75:xx:xx:xx'


(I need to enter the backticks? I mean the ' -> is this correct?)


->xx my real ethaddr here

What about the DTB file?

Right now it is embedded in my 4.10.9-kirkwood-tld-1 kernel because of the old u-boot.

So I leave the fw_setenv dtb_file empty right?

Does it make sense to put this in /boot/uEnv.txt :

dtb_file=/boot/dts/kirkwood-dockstar.dtb     *
devices=usb 
disks=0 1 2 3 4 5 6 7


*with my old embedded kernel I leave the line like dtb_file =
otherwise with a new kernel with the path and filename

Have I missed something important or do I need some other additional env-vars?

It would be nice if you could have a look over my entry and give me a feedback.

Thank you in advance.

-Tom



Edited 1 time(s). Last edit at 02/20/2018 03:20PM by Tom74.
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 20, 2018 04:05PM
Tom,

> I have now a working system with Debian 9 and the
> 4.10.9-kirkwood-tld-1 kernel.
> What about flashing the new u-boot?
>
> Do I have to look for something special?
>
> These are my bad blocks in mtd0:
>
>
> root@debian9:~# dmesg | grep -i 'bad'
> [    5.831470] Scanning device for bad blocks
> [    5.845415] Bad eraseblock 127 at
> 0x000000fe0000
> [    5.887606] Bad eraseblock 616 at
> 0x000004d00000
> [    5.915511] Bad eraseblock 919 at
> 0x0000072e0000
>
>
> Is this ok? Can I safely flash the new u-boot?

This is OK. Yes it is safe to flash.

>
> 1. My uBoot envs config is defined as
>
>
> # MTD device name       Device offset   Env. size 
>      Flash sector size      Number of sectors
> /dev/mtd0 0xc0000 0x20000 0x20000
>
>
> 2. My partitions look like
>
>
> dev:    size   erasesize  name
> mtd0: 00100000 00020000 "u-boot"
> mtd1: 00400000 00020000 "uImage"
> mtd2: 02000000 00020000 "rootfs"
> mtd3: 0db00000 00020000 "data"
>
>

Everything looks good.


> 4. save my current envs, save ethaddr, and save
> NAND mtd0: with nanddump
>
> 5. Erase mtd0
>
>
> flash_erase /dev/mtd0 0 4
>
>
> 6.Write image to NAND
>
>
> nandwrite /dev/mtd0
> uboot.2017.07-tld-1.dockstar.mtd0.kwb
>
>
> Should I flash the default u-boot envs image ?

Yes.


>
> 1. flash erease
>
>
> /usr/sbin/flash_erase /dev/mtd0 0xc0000 1
>
>
> 2. flash u-boot envs image
>
>
> /usr/sbin/nandwrite -s 786432 /dev/mtd0
> uboot.2016.05-tld-1.environment.img
>
>
> fw_setenv:
>
> for Dockstar:
>
>
> fw_setenv arcNumber 2998
> fw_setenv machid
>
>
> set mtdparts and ethaddr
>
>
> fw_setenv mtdparts
> 'mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)'
> fw_setenv ethaddr '00:10:75:xx:xx:xx'
>
>
>
> (I need to enter the backticks? I mean the ' -> is
> this correct?)
>

It is not a back tick. It is a single quote.

>
> ->xx my real ethaddr here
>
> What about the DTB file?
>
> Right now it is embedded in my
> 4.10.9-kirkwood-tld-1 kernel because of the old
> u-boot.
>
> So I leave the fw_setenv dtb_file empty right?

No. You should restore the original uImage. Rembember when you create the rootfs, you have saved the original uImage:

Quote

4b. Boot with DTB file embedded in the kernel image (no U-Boot envs changes are needed if your system already booting on USB or HDD)

Again, please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box.

Generate the uImage and uInitrd:
cd /boot
mv uImage uImage.orig
cp -a zImage-4.15.2-kirkwood-tld-1 zImage.fdt
cat dts/kirkwood-goflexnet.dtb >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.15.2-kirkwood-tld-1 -d zImage.fdt uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.15.2-kirkwood-tld-1 -d initrd.img-4.15.2-kirkwood-tld-1 uInitrd



>
> Does it make sense to put this in /boot/uEnv.txt
> :
>
>
> dtb_file=/boot/dts/kirkwood-dockstar.dtb     *
> devices=usb 
> disks=0 1 2 3 4 5 6 7
>
>
>
> *with my old embedded kernel I leave the line like
> dtb_file =
> otherwise with a new kernel with the path and
> filename

No need to use uEnv.txt. Just set the env to boot with separate DTB

fw_setenv dtb_file '/boot/dts/kirkwood-dockstar.dtb'


Ok. Be very careful, because the Dockstar does not have UART booting capability. And you don't have serial console either. A tiny mistate could make the box semi-bricked and you will need to connect serial console to recover.

If the u-boot image flashing failed, you will need to stop and post the log here.

Quote

> flash_erase /dev/mtd0 0 4
> nandwrite /dev/mtd0
> uboot.2017.07-tld-1.dockstar.mtd0.kwb

If you'd like, do you procedure as you laid out above, but don't reboot. Post the entire log of the terminal session here and I will double check for you before you reboot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 22, 2018 04:40PM
Ok. I will try it during the weekend.

And thanks that you will have a look at the procedure and will double check it for me.

But I think I will use the 4.10.9-kirkwood-tld-1 kernel because I know it is working with my dockstar at the moment.

Right now I don't have a serial console for further debugging. I will install it later when I have more free time.

Quote

No. You should restore the original uImage. Rembember when you create the rootfs, you have saved the original uImage:

I don't get it right now maybe it's too late here :)

My plan was to create a new image like in your "manual" 4a and use this as suggested.

Did you mean I should use the kernel the same way (embedded) as before like 4b and boot the kernel as I did it before?

-Tom
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 23, 2018 07:57PM
Tom,

>
Quote

No. You should restore the original uImage.
> Rembember when you create the rootfs, you have
> saved the original uImage:

This was needed if you use your current rootfs. Your current rootfs has the DTB embedded inside uImage.


> My plan was to create a new image like in your
> "manual" 4a and use this as suggested.

Yes. With the new u-boot installed, the new rootfs can be used without changing anything. So you would skip step 4 below.

Quote

Updated 24 Jul 2017:

Basic Debian stretch Kirkwood rootfs for most Kirwood plugs:

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

Download at Dropbox:

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

md5:
bf3d29569943875df348fb5ca03b348c
sha256:
4ed5714fdb123cdb40e973f3d0754e91cd199b75a9874018f2b5dc9cfa8ae8bb

And remember to check the hash of what you download, as always.

Installation:

Installation can be done on any Linux box, with a fresh USB drive (SD card or HDD would work fine too).

Note: all steps below must be done while logging in as root user (not sudo). If you are not the root user then don't continue, because the rootfs will not work.

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.

2. Mount the drive on a Linux box. cd to top level directory and extract it. It is assuming the USB drive is mounted at /media/sdb1
cd /media/sdb1
tar -xjf Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2

3. Adjust fstab (optional).

Edit /media/sdb1/etc/fstab entry for root device to match the rootfstype of your rootfstype if you use Ext4 or Ext2. However, you can keep it as is without problem in booting since the kernel will figure out which file system the rootfs was formatted.

LABEL=rootfs / ext3 noatime,errors=remount-ro 0 1

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).

Please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box (see the folder /media/sdb1/boot/dts for the exact spelling of your Kirkwood box name).

Generate the uImage with DTB embedded inside:
cd /media/sdb1/boot
cp -a zImage-4.12.1-kirkwood-tld-1 zImage.fdt
cat dts/kirkwood-goflexnet.dtb >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.12.1-kirkwood-tld-1 -d zImage.fdt uImage
sync

If your Linux box does not have mkimage, then install it

apt-get install u-boot-tools

5. Done. Take this USB rootfs to your plug and cold start. After booted into Debian, see Note1 and Note2 below. It is very important that you do Note1 steps to secure your box.

Note1:

After logging in this rootf the first time, remember to generate new SSH key to make it your own unique rootfs. And also update your rootfs to get the latest Debian package security updates:
rm /etc/ssh/ssh_host*
ssh-keygen -A

apt-get update
apt-get upgrade

Warning: Watch the apt-get upgrade progress. If the apt-get upgrade results in a new initramfs, the log would shows this message:

update-initramfs: Generating /boot/initrd.img-4.12.1-kirkwood-tld-1

Then you need to regenerate the uInitrd boot file:

cd /boot
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.12.1-kirkwood-tld-1 -d initrd.img-4.12.1-kirkwood-tld-1 uInitrd

Note2:

To boot with systemd, add parameter init=/bin/systemd to your u-boot env bootargs.

- For example,
fw_setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts init=/bin/systemd'

- Or, if you are booting with my latest u-boot images you can also use the uEnv.txt capability to do this. In the default envs, custom_params is a variable that allows you to add extra bootargs. So add the following line to uEnv.txt:
custom_params=init=/bin/systemd

If that's still not possible to run systemd, you might want to install it again:
apt-get install systemd

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 24, 2018 09:21AM
Hello bodhi,

Here is my session/log for flashing u-boot:

Can you please have a look if I can do a reboot or maybe I need to adjust something more?

root@debian9:~# cat /etc/fw_env.config
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000
root@debian9:~#



root@debian9:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 02000000 00020000 "rootfs"
mtd3: 0db00000 00020000 "data"
root@debian9:~#


root@debian9:~# fw_printenv ethaddr
ethaddr=00:10:75:1A:B8:8D
root@debian9:~#


root@debian9:~# nanddump --noecc --omitoob -l 0x80000 -f mtd0 /dev/mtd0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00080000...


root@debian9:~# fw_printenv > current_envs.txt

root@debian9:~# dmesg | grep -i 'bad'
 
[    5.830308] Scanning device for bad blocks
[    5.844254] Bad eraseblock 127 at 0x000000fe0000
[    5.886445] Bad eraseblock 616 at 0x000004d00000
[    5.914352] Bad eraseblock 919 at 0x0000072e0000



root@debian9:~# cd /tmp

root@debian9:/tmp# tar -xf uboot.2016.05-tld-1.dockstar.bodhi.tar

root@debian9:/tmp# flash_erase /dev/mtd0 0 4

Erasing 128 Kibyte @ 7f610f5c00000064 --  4 % complete
root@debian9:/tmp# nandwrite /dev/mtd0 uboot.2016.05-tld-1.dockstar.mtd0.kwb
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000




edit: I accidentally used the old uboot.2016.05 version.
And also i did forget to download uboot 2017.07...

root@debian9:/tmp# flash_erase /dev/mtd0 0 4

Erasing 128 Kibyte @ 7f5f2f5c00000064 --  4 % complete

root@debian9:/tmp# nandwrite /dev/mtd0 uboot.2017.07-tld-1.dockstar.mtd0.kwb

uboot.2017.07-tld-1.dockstar.mtd0.kwb: No such file or directory
nandwrite: error!: Data was only partially written due to error
           error 9 (Bad file descriptor)

damn but ok I need to download uboot.2017.07-tld-1.dockstar.bodhi.tar first.

wget https://www.dropbox.com/s/8n5c2fzgpoxgk39/uboot.2017.07-tld-1.dockstar.bodhi.tar --no-check-certificate

HTTP request sent, awaiting response... 200 OK
Length: 532480 (520K) [application/x-tar]
Saving to: 'uboot.2017.07-tld-1.dockstar.bodhi.tar'

uboot.2017.07-tld-1.dockstar.bodhi.tar                                          100%[====================================================================================================================================================================================================>] 520.00K  1.72MB/s    in 0.3s

2018-02-24 22:18:02 (1.72 MB/s) - 'uboot.2017.07-tld-1.dockstar.bodhi.tar' saved [532480/532480]


So I did erase mtd0 again and flashed uboot.2017.07 again.

root@debian9:/tmp# flash_erase /dev/mtd0 0 4

Erasing 128 Kibyte @ 7f5eef5c00000064 --  4 % complete
root@debian9:/tmp# nandwrite /dev/mtd0 uboot.2017.07-tld-1.dockstar.mtd0.kwb
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000



Is this ok?

Size seems to be ok but what about the address?

My flash_erase version:

root@debian9:/boot# flash_erase --version
flash_erase (mtd-utils) 2.0.0
Copyright (C) 2000 Arcom Control Systems Ltd
flash_erase [options] MTD_DEVICE <start offset> <block count>
Erase blocks of the specified MTD device.
Specify a count of 0 to erase to end of device.

your output:

Erase Total 4 Units 
Performing Flash Erase of length 131072 at offset 0x60000 done

Bodhi do you have an idea why I different address is shown during erasing mtd0?


root@debian9:/tmp# nandwrite /dev/mtd0 uboot.2016.05-tld-1.dockstar.mtd0.kwb
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000

Writing looks good.

I have created I new kernel image as descibed (4a method)



root@debian9:/boot# mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.10.9-kirkwood-tld-1 -d vmlinuz-4.10.9-kirkwood-tld-1 uImage

Image Name:   Linux-4.10.9-kirkwood-tld-1
Created:      Sat Feb 24 16:03:00 2018
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3414240 Bytes = 3334.22 kB = 3.26 MB
Load Address: 00008000
Entry Point:  00008000

root@debian9:/boot# mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.10.9-
kirkwood-tld-1 -d initrd.img-4.10.9-kirkwood-tld-1 uInitrd
Image Name:   initramfs-4.10.9-kirkwood-tld-1
Created:      Sat Feb 24 16:03:30 2018
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    8104305 Bytes = 7914.36 kB = 7.73 MB
Load Address: 00000000
Entry Point:  00000000
root@debian9:/boot#


Current env-vars

root@debian9:/boot#  fw_printenv
ethact=egiga0
bootdelay=3
baudrate=115200
mainlineLinux=yes
console=ttyS0,115200
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
mtdids=nand0=orion_nand
partition=nand0,2
stdin=serial
stdout=serial
stderr=serial
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_list=1 2 3 4
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_init=run usb_scan
usb_device=0:1
usb_root=/dev/sda1
usb_rootfstype=ext2
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
ethaddr=00:10:75:1A:B8:8D
set_bootargs_rescue=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts
bootcmd_rescue=run set_bootargs_rescue; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
bootcmd_pogo=run bootcmd_rescue
rescue_installed=1
serverip=192.168.0.1
ipaddr=192.168.0.16
if_netconsole=ping $serverip
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
preboot=run if_netconsole start_netconsole
arcNumber=2998
dtb_file=/boot/dts/kirkwood-dockstar.dtb
root@debian9:/boot#

Does it look good? What do you think can I safely reboot?

I also need to save the vars if they are ok, right?

fw_setenv only lasts till reboot?

saveenv is available in u-boot only I think.


Which vars are neccessary as default ?
uboot.2016.05-tld-1.environment

arcNumber=2098
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=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
load_dtb_addr=0x1c00000
load_initrd_addr=0x1100000
load_uimage_addr=0x800000
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
machid=0x831
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_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
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
usb_ready_retry=15


-Tom



Edited 13 time(s). Last edit at 02/24/2018 04:06PM by Tom74.
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 24, 2018 04:29PM
Tom,

Everything looks OK (no error).

However, you kept going back and forth with the u-boot version in your log above! So make sure the last flash is for uboot.2017.07-tld-1.dockstar.mtd0.kwb

root@debian9:/tmp# flash_erase /dev/mtd0 0 4 
Erasing 128 Kibyte @ 7f5eef5c00000064 --  4 % complete
root@debian9:/tmp# nandwrite /dev/mtd0 uboot.2017.07-tld-1.dockstar.mtd0.kwb
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000

The flash_erase address "Erasing 128 Kibyte @ 7f5eef5c00000064 -- 4 % complete" is a known bogus output. So it is OK.

You also need to set

fw_setenv arcNumber 2998
fw_setenv machid
fw_setenv ethaddr '00:10:75:1A:B8:8D'


For netconsole, replace the 2 numbers below with your real IP addresses in your network. ipaddr is one you want to assign to the Dockstar (client). serverip is one you will use to as netconsole server to monitor the Dockstar boot progress (it could be your laptop IP or which ever box that can run netconsole server).

fw_setenv ipaddr 192.168.0.231
fw_setenv serverip 192.168.0.220

After you've done the above, pls list the envs again and post here

fw_printenv

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



Edited 1 time(s). Last edit at 02/24/2018 04:30PM by bodhi.
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 24, 2018 04:44PM
I flashed uboot.2017.07 finally once again, so we are sure that this is the actual version.

root@debian9:/tmp# tar -xf uboot.2017.07-tld-1.dockstar.bodhi.tar

root@debian9:/tmp# flash_erase /dev/mtd0 0 4

Erasing 128 Kibyte @ 7f5eef5c00000064 --  4 % complete
root@debian9:/tmp# nandwrite /dev/mtd0 uboot.2017.07-tld-1.dockstar.mtd0.kwb
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000


Here are my envs:

root@debian9:~# fw_printenv
ethact=egiga0
bootdelay=3
baudrate=115200
mainlineLinux=yes
console=ttyS0,115200
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
mtdids=nand0=orion_nand
partition=nand0,2
stdin=serial
stdout=serial
stderr=serial
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_list=1 2 3 4
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_init=run usb_scan
usb_device=0:1
usb_root=/dev/sda1
usb_rootfstype=ext2
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
set_bootargs_rescue=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts
bootcmd_rescue=run set_bootargs_rescue; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
bootcmd_pogo=run bootcmd_rescue
rescue_installed=1
serverip=192.168.0.1
ipaddr=192.168.0.16
if_netconsole=ping $serverip
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
preboot=run if_netconsole start_netconsole
dtb_file=/boot/dts/kirkwood-dockstar.dtb
arcNumber=2998
ethaddr=00:10:75:1A:B8:8D


-Tom



Edited 2 time(s). Last edit at 02/24/2018 04:56PM by Tom74.
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 24, 2018 05:58PM
Tom,

You did not flash the default envs image. You need to do that before setting your specific envs.

Quote

Should I flash the default u-boot envs image ?

1. flash erease

/usr/sbin/flash_erase /dev/mtd0 0xc0000 1

2. flash u-boot envs image

/usr/sbin/nandwrite -s 786432 /dev/mtd0 uboot.2016.05-tld-1.environment.img


and then set these varriables
serverip=192.168.0.1
ipaddr=192.168.0.16
preboot=run preboot_nc
dtb_file=/boot/dts/kirkwood-dockstar.dtb
arcNumber=2998
ethaddr=00:10:75:1A:B8:8D

Please post the envs here afterward.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 24, 2018 06:16PM
root@debian9:/tmp# fw_printenv
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=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
ethact=egiga0
if_netconsole=ping $serverip
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb_addr=0x1c00000
load_initrd_addr=0x1100000
load_uimage_addr=0x800000
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
machid=0x831
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
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_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
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
usb_ready_retry=15
arcNumber=2998
ethaddr=00:10:75:1A:B8:8D
ipaddr=192.168.0.16
serverip=192.168.0.1
dtb_file=/boot/dts/kirkwood-dockstar.dtb
preboot=run preboot_nc

root@debian9:/tmp#

-Tom
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 24, 2018 06:25PM
Tom,

Cross your fingers and reboot :)

Do a sync first just in case
sync
shutdown -r now

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 24, 2018 07:26PM
Eureka! Success! :) :) :=)

Thank you for your help bodhi.

U-Boot 2017.07-tld-1 (Oct 24 2017 - 22:32:36 -0700)
Seagate FreeAgent DockStar
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices...
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            30593024        0003f790-01     83 Boot

## 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 **
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 569 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
3414304 bytes read in 774 ms (4.2 MiB/s)
loading uInitrd ...
8104369 bytes read in 1057 ms (7.3 MiB/s)
loading DTB /boot/dts/kirkwood-dockstar.dtb ...
10396 bytes read in 831 ms (11.7 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.10.9-kirkwood-tld-1
   Created:      2018-02-24  15:03:00 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3414240 Bytes = 3.3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.10.9-kirkwood-tld-1
   Created:      2018-02-24  15:03:30 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    8104305 Bytes = 7.7 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000


Starting kernel ...
[   23.193983] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   23.212342] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[   25.437919] orion_wdt: Initial timeout 21 sec
[   25.610760] marvell-cesa f1030000.crypto: CESA device successfully registered
[   25.692683] usbcore: registered new interface driver usbserial
[   25.734381] systemd-sysctl[376]: Couldn't write '1' to 'net/ipv6/conf/eth0/disable_ipv6', ignoring: No such file or directory
[   25.768050] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   25.852911] usbcore: registered new interface driver usbserial_generic
[   25.895100] usbserial: USB Serial support registered for generic
[   25.956188] usbcore: registered new interface driver ftdi_sio
[   25.962140] usbserial: USB Serial support registered for FTDI USB Serial Device
[   26.041675] ftdi_sio 1-1.1:1.0: FTDI USB Serial Device converter detected
[   26.087015] usb 1-1.1: Detected FT232RL
[   26.108604] usb 1-1.1: FTDI USB Serial Device converter now attached to ttyUSB0
[   26.808383] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[   27.743656] random: crng init done
[   30.248489] NET: Registered protocol family 10
[   30.256525] Segment Routing with IPv6

-Tom



Edited 1 time(s). Last edit at 02/24/2018 07:47PM by Tom74.
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
February 24, 2018 09:59PM
Cool! you did the right thing, Tom. Always take it slow, a bricked box would ruin your fun :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
March 13, 2018 03:51PM
bodhi,

just got some time to play with my dockstar again.

I have installed the Linux-4.15.2-kirkwood-tld-1 kernel image and what should I say it is working! :)


U-Boot 2017.07-tld-1 (Oct 24 2017 - 22:32:36 -0700)
Seagate FreeAgent DockStar
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices...
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            30593024        0003f790-01     83 Boot

## 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 **
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 569 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
3926040 bytes read in 787 ms (4.8 MiB/s)
loading uInitrd ...
7860942 bytes read in 1052 ms (7.1 MiB/s)
loading DTB /boot/dts/kirkwood-dockstar.dtb ...
10058 bytes read in 831 ms (11.7 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.15.2-kirkwood-tld-1
   Created:      2018-03-12  21:38:26 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3925976 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.15.2-kirkwood-tld-1
   Created:      2018-03-12  21:38:46 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7860878 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



Starting kernel ...
[   24.290672] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   24.308751] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[   26.680427] marvell-cesa f1030000.crypto: CESA device successfully registered
[   26.731060] orion_wdt: Initial timeout 21 sec
[   26.911613] systemd-sysctl[381]: Couldn't write '1' to 'net/ipv6/conf/eth0/disable_ipv6', ignoring: No such file or directory
[   26.958625] usbcore: registered new interface driver usbserial_generic
[   26.958687] usbserial: USB Serial support registered for generic
[   26.980238] usbcore: registered new interface driver ftdi_sio
[   26.980310] usbserial: USB Serial support registered for FTDI USB Serial Device
[   26.980531] ftdi_sio 1-1.1:1.0: FTDI USB Serial Device converter detected
[   26.980669] usb 1-1.1: Detected FT232RL
[   26.983342] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   27.021063] usb 1-1.1: FTDI USB Serial Device converter now attached to ttyUSB0
[   28.057961] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[   28.931930] random: crng init done
[   31.540146] NET: Registered protocol family 10
[   31.547756] Segment Routing with IPv6
[   48.437115] ftdi_sio ttyUSB0: use of SPD flags is deprecated

login as: root
root@192.168.0.16's password:

    _      _     _             ___
  __| | ___| |__ (_) __ _ _ __ / _ \
 / _` |/ _ \ '_ \| |/ _` | '_ \ (_) |
| (_| |  __/ |_) | | (_| | | | \__, |
 \__,_|\___|_.__/|_|\__,_|_| |_| /_/



Welcome to Debian GNU/Linux 9.4 (stretch) (4.15.2-kirkwood-tld-1).

System information as of: Tue Mar 13 21:54:02 CET 2018

System load:    0.08    IP Address:     192.168.0.16
System load:    2003:xx:xxxx:xxxxx:210:xxxx:xxxx:xxxx    IP Address:
Memory usage:   17.5%   System uptime:  23 min
Usage on /:     13%     Swap usage:
Local Users:    0       Processes:      72

Last login: Mon Mar 12 23:16:18 2018 from 192.168.0.1
root@debian9:~#



With the newest uboot the kernel gets booted without any problems.

It seems that the old uboot has issues to boot the newer kernels however.

Now I have only some cosmetic issues from above. How can I get rid of this warnings and errors?

Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            30593024        0003f790-01     83 Boot

## 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 **
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'

ftdi_sio ttyUSB0: use of SPD flags is deprecated

I have disabled ipv6 in /etc/sysctl.conf

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1

but...


systemd-sysctl[376]: Couldn't write '1' to 'net/ipv6/conf/eth0/disable_ipv6', ignoring: No such file or directory



-Tom

PS: Thank you bodhi for your patience with me and your help! :)



Edited 6 time(s). Last edit at 03/13/2018 04:05PM by Tom74.
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
March 13, 2018 04:51PM
Tom,

> I have installed the Linux-4.15.2-kirkwood-tld-1
> kernel image and what should I say it is working!
> :)

Excellent!

> Now I have only some cosmetic issues from above.
> How can I get rid of this warnings and errors?
> Unknown command 'ide' - try 'help'
> Unknown command 'mmc' - try 'help'


Set it to USB only, Dockstar does not have mmc or ide:

fw_setenv devices usb


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

These output are not supressable in new u-boot. It always blindly scans everything and gives us this, I have not got around to see how to make it so it is less noisy.

> systemd-sysctl[376]: Couldn't write '1' to
> 'net/ipv6/conf/eth0/disable_ipv6', ignoring: No
> such file or directory

For systemd, you will need to look for answer in general Debian forum. I'm avoiding all discussion about systemd :)

EDIT: command typo.

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



Edited 1 time(s). Last edit at 03/14/2018 01:26AM by bodhi.
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
March 14, 2018 01:28AM
I have edited the post above.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
lcg
Re: Boot problem with Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi on Dockstar
June 11, 2018 06:27AM
Dear bodhi,

I am in the same position (ie. Dockstar) and followed the steps in the uboot-tutorial and compared the output to this thread. Flashing etc. seemed to work fine (no reboot yet), my new uboot envs looks like:

# fw_printenv
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=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
ethact=egiga0
if_netconsole=ping $serverip
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb_addr=0x1c00000
load_initrd_addr=0x1100000
load_uimage_addr=0x800000
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
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
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_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
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
usb_ready_retry=15
arcNumber=2998
ethaddr=00:10:75:1A:DD:43
dtb_file=/boot/dts/kirkwood-dockstar.dtb
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
preboot=run preboot_nc
ipaddr=192.168.1.14
serverip=192.168.1.7

To be honest, I have no idea whether any error is embedded or not. In contrast to the old uboot envs, there are differences:

- the old one had a part about the rescue system in the NAND (which worked till now very well!) -> does this still works with the new environment or do I have to change/ add variables?
- stderr, stdin, stdout are now "serial", in the old one it was "nc" -> I have no serial console installed and always used 'nc' via a remote server (which worked very well, too) -> but I assume this is "normal" now and 'nc' works due to the 'preboot' command? And the older 'ncip' variable is not necessary anymore?
- with newer kernel I can skip completely the steps from the rootfs tutorial to generate the uImage with DTB embedded inside, because the uboot envs already points to that file? So I can just extract the tarball and use it (straightforward)?
- I had to use your external uboot flashing utilities, because although fw_printenv/ fw_setenv are there,the flashing utilities are missing. Is there a reason why Debian does not have them? I use the older 4.4.0 rootfs and was not able to find it with 'find'.

thanks and best.
lcg



Edited 1 time(s). Last edit at 06/11/2018 06:30AM by lcg.
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: