Welcome! Log In Create A New Profile

Advanced

Dockstar kernel booting problem

Posted by ptosch 
Dockstar kernel booting problem
June 16, 2016 09:13AM
Hi Bodhi,

after updating to new Uboot 2015.10 (which worked very well btw.), I updated my USB-Stick to Devuan Jessie with Kernel 4.6, which seems to run pretty smooth.

The only problem is: the rescue system doesn't boot through, so I could not login to it.
In netconsole I can see the kernel beeing loaded:

NAND read: device 0 offset 0x100000, size 0x400000
 4194304 bytes read: OK
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-2.6.32.18-dockstar
   Created:      2010-09-16  20:04:19 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3175992 Bytes = 3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK


Starting kernel ...

But after that the LED stays yellow, and no network connect is possible, no DHCP requests are beeing sent.

I think, it must have something to do with non FDT Kernel beeing installed, but I don't have a clue, how to include kirkwood-dockstar.dtb .

Do You have an idea, what should be done? Unfortunately the serial console seems to be grilled, almost only garbage is printed.

TIA,
Peter



Edited 1 time(s). Last edit at 06/16/2016 03:07PM by bodhi.
Attachments:
open | download - fw_printenv.txt (2.7 KB)
Re: Dockstar kernel booting problem
June 16, 2016 03:16PM
Peter,

1. Your envs is old. It means you did not flash the new default envs?
2. When rescue system is booting like that, your USB rootfs is having problem. This is not even to the point where FDT is coming to play.
3. The amber LED indicate that the rescuse system is stuck.

Try

a. Mount your USB rootfs on another Linux box and fsck it for error.
b. List some info and kernel files (assume it is mounted at /media/sdb1)
mount
e2label /dev/sdb1
ls -lart /media/sdb1/boot
ls -lart /media/sdb1/boot/dts/*dockstar*

If your serial console does not work, try booting again, interrupt netconsole and then
printenv

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dockstar kernel booting problem
June 16, 2016 08:05PM
Looks like I misunderstood what you said. Is the Debian rootfs booting OK?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dockstar kernel booting problem
June 17, 2016 12:58AM
Well, booting from my USBstick is working. So at least I can boot from USB.

But when the stick is not used (just using plain dockstar), I expect the dockstar to boot into the rescue system.

The rescue system even starts loading image "Linux-2.6.32.18-dockstar" (like mentioned before), but it does not boot to the end, so I could log in.

Before updating the Uboot, booting from rescue was working.

First I am going to flash the new ENVs.

Maybe I should also update the rescue system? It seems to be from year 2010, would Rescue V2.8.2 work?
Re: Dockstar kernel booting problem
June 17, 2016 01:27AM
Ah, I see.

Did you flash the new default uboot envs image? And if you did, did you restore your box-specific envs as instructed?

If you like, interrupt serial console, list the envs with printenv and post here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dockstar kernel booting problem
June 17, 2016 02:46AM
Panic!
I flashed the ENVs with uboot.2014.07-tld-3.environment.img, and now I have no netconsole output. Server, where nc is started: 192.168.10.254, dockstars IP: 192.168.10.100

After resetting the dockstar I can seen no ping returning, when the dockstar is in Uboot. After a while it boots into the attached USBStick, and is pingable. Before the ENV flash, I could start the dockstar, it pinged back, then no ping, booted into the USBstick and pinged back again.

Seems like no network connect is etsablished while in Uboot.

I attached the current env output.
Attachments:
open | download - fw_printenv.txt (2.7 KB)
Re: Dockstar kernel booting problem
June 17, 2016 03:46AM
Peter,

The default envs does not activate netconsole by default (this is your box-specific). You have to do it explicitly. This is to avoid confusion for people who has serial console and loose it temporarily if netconsole is activated by default.

To activate netconsole, copy and paste this command in Debian, don't type it (because a typo here will be really bad, could lock you out).
fw_setenv preboot 'run preboot_nc'


But note that you will see output stops on serial console if you activate netconsole on the serverIP of the same box that has serial module converter. So to see both outputs you need 2 terminal sessions (one for serial and one for net console).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dockstar kernel booting problem
June 17, 2016 04:07AM
Oh dear, how could I be so blind, I forgot to set the last variable "preboot".
Thanks for the hint, netconsole is working again.


So after the ENV flash (and after setting variable preboot) now I tried first time to boot from rescue (means pure dockstar without any USB devices connected).
Unfortunately now it doesn't even load a kernel. Here is the output:

U-Boot 2015.10-tld-1 (Nov 06 2015 - 15:56:21 -0800)
Seagate FreeAgent DockStar
gcc (Debian 4.9.2-10) 4.9.2
GNU ld (GNU Binutils for Debian) 2.25
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... usb_get_configuration_no: failed to get descriptor - too long: 1191
usb_new_device: Cannot read configuration, skipping device 08bb:2902
2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'

no USB devices available
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide
Unknown command 'ide' - try 'help'
device ide 0:1
** Bad device ide 0 **
device ide 1:1
** Bad device ide 1 **
device ide 2:1
** Bad device ide 2 **
device ide 3:1
** Bad device ide 3 **
Scan device mmc
Unknown command 'mmc' - try 'help'
device mmc 0:1
** Bad device mmc 0 **
device mmc 1:1
** Bad device mmc 1 **
device mmc 2:1
** Bad device mmc 2 **
device mmc 3:1
** Bad device mmc 3 **
loading uImage ...
** Bad device usb 0 **
loading uInitrd ...
** Bad device usb 0 **
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
DockStar>

Looks, like no boot entry for nand boot is defined or something? I attached printenv made in uboot.
Attachments:
open | download - printenv.txt (3.1 KB)
Re: Dockstar kernel booting problem
June 17, 2016 04:13AM
Just tried:

DockStar> nand read.e 0x800000 0x100000 0x400000
nand read.e 0x800000 0x100000 0x400000

NAND read: device 0 offset 0x100000, size 0x400000
 4194304 bytes read: OK
DockStar> bootm 0x800000
bootm 0x800000
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-2.6.32.18-dockstar
   Created:      2010-09-16  20:04:19 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3175992 Bytes = 3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK


Starting kernel ...

And indeed i cannot find any "nand read.e" entry in environment.
Re: Dockstar kernel booting problem
June 17, 2016 04:35AM
You don't have any rescue set up in your envs. They are your box-specific. Look back to where you save your current envs before flashing u-boot and u-boot envs. They look like this.

NOTE: the envs below are not to be used in your box. They are for example only.

rescue_installed=1
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
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

And bootcmd should have
bootcmd=xxxxxxxxxxxxxxxxxx;  run rescue_bootcmd; reset

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dockstar kernel booting problem
June 17, 2016 05:16AM
This seems to be quite konfusing.

Now I set the following:

fw_setenv rescue_installed 1
fw_setenv rescue_set_bootargs 'setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params'
fw_setenv 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'
fw_setenv force_rescue 0
fw_setenv 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'
fw_setenv bootcmd 'run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run rescue_bootcmd; reset'

After setting this, at least rescue boots:

U-Boot 2015.10-tld-1 (Nov 06 2015 - 15:56:21 -0800)
Seagate FreeAgent DockStar
gcc (Debian 4.9.2-10) 4.9.2
GNU ld (GNU Binutils for Debian) 2.25
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... usb_get_configuration_no: failed to get descriptor - too long: 1191
usb_new_device: Cannot read configuration, skipping device 08bb:2902
2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'

no USB devices available
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide
Unknown command 'ide' - try 'help'
device ide 0:1
** Bad device ide 0 **
device ide 1:1
** Bad device ide 1 **
device ide 2:1
** Bad device ide 2 **
device ide 3:1
** Bad device ide 3 **
Scan device mmc
Unknown command 'mmc' - try 'help'
device mmc 0:1
** Bad device mmc 0 **
device mmc 1:1
** Bad device mmc 1 **
device mmc 2:1
** Bad device mmc 2 **
device mmc 3:1
** Bad device mmc 3 **
loading uImage ...
** Bad device usb 0 **
loading uInitrd ...
** Bad device usb 0 **
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!

NAND read: device 0 offset 0x100000, size 0x400000
 4194304 bytes read: OK
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-2.6.32.18-dockstar
   Created:      2010-09-16  20:04:19 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3175992 Bytes = 3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK


Starting kernel ...

It boots from rescue, even though You wrote "NOTE: the envs below are not to be used in your box. They are for example only.". These were the same settings before flashing the ENVs (except bootcmd value).

Anyway, there is still the problem, like before flashing the ENVs: kernel is loaded, but login is not possible, no ping, no ssh, just amber LED.
Re: Dockstar kernel booting problem
June 17, 2016 03:53PM
Peter,


> It boots from rescue, even though You wrote "NOTE:
> the envs below are not to be used in your box.
> They are for example only.". These were the same
> settings before flashing the ENVs (except bootcmd
> value).

I should have worded it a little bit more clear (late night and all that :). These were from my log long ago. So I can't be sure if I have changed any thing. And I don't know if you have changed anything related to rescue setup in your box. So you should restore the settings from your box. That's what I meant by example only.

>
> Anyway, there is still the problem, like before
> flashing the ENVs: kernel is loaded, but login is
> not possible, no ping, no ssh, just amber LED.

Did you rescue system boot before installing the new u-boot?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dockstar kernel booting problem
June 20, 2016 08:09AM
Hi Bodhi,

ah, this is how it was meant; at least it was pretty exciting setting the env: does it boot after this? ;)

Back to topic: yes, my rescue was fully working before the new Uboot .

I attached the dockstar to serial console (although it is broken, only garbage is displayed, but some times You can see some words), and after the 34th reset I got an unscrambled output!:

host 192.168.10.254 is alive
Using egiga0 device
host 192.168.10.254 is alive
Using egiga0 device
host 192.168.10.254 is alive
Using egiga0 device
host 192.168.10.254 is alive
Uncompressing Linux......................................................................................................................................................................................................... done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x00000bb6).

Available machine support:

ID (hex)        NAME
00000690        Marvell DB-88F6281-BP Development Board
00000691        Marvell RD-88F6192-NAS Development Board
00000692        Marvell RD-88F6281 Reference Board
0000078c        Marvell 88F6281 GTW GE Board
00000831        Marvell SheevaPlug Reference Board
0000085b        QNAP TS-119/TS-219
00000915        Marvell OpenRD Base Board


Please check your kernel config and/or bootloader.

Hmm. It may have something to do with arcNumber variable? Before the ENV Update it was 2097 (how could that work?), now it is 2998 ...
Re: Dockstar kernel booting problem
June 20, 2016 08:26AM
OK, its not arcNumber, just tested with the old value.

Anyway, how should it, before ENV flash old value was 2097 too, and it didn't boot.
Re: Dockstar kernel booting problem
June 20, 2016 02:38PM
arcNumber should be 2097 for the rescue system.

Do you keep a log of you old envs? something else might be missing.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dockstar kernel booting problem
June 21, 2016 03:17AM
Hi Bodhi,

I solved this by setting machid=831. Seems like this kernel ignores arcnumber and uses machid.

This is how it looks now:

host 192.168.10.254 is alive
Using egiga0 device
host 192.168.10.254 is alive
Using egiga0 device
host 192.168.10.254 is alive
Using egiga0 device
host 192.168.10.254 is alive
Uncompressing Linux......................................................................................................................................................................................................... done, booting the kernel.


          Jeff Doozan's
Dockstar/Pogoplug Recovery System

rescue login:

I have checked, if the 4.6 Debian system boots from usb with this settings, and yes indeed it does.
Re: Dockstar kernel booting problem
June 21, 2016 04:07AM
ptosch Wrote:
-------------------------------------------------------
> Hi Bodhi,
>
> I solved this by setting machid=831. Seems like
> this kernel ignores arcnumber and uses machid.
>

Cool!

> This is how it looks now:
>
>
> host 192.168.10.254 is alive
> Using egiga0 device
> host 192.168.10.254 is alive
> Using egiga0 device
> host 192.168.10.254 is alive
> Using egiga0 device
> host 192.168.10.254 is alive
> Uncompressing
> Linux.............................................
> ..................................................
> ..................................................
> ..................................................
> ...... done, booting the kernel.
> 
> 
>           Jeff Doozan's
> Dockstar/Pogoplug Recovery System
> 
> rescue login: 
>
>
> I have checked, if the 4.6 Debian system boots
> from usb with this settings, and yes indeed it
> does.

Debian kernel 4.6 does not care about machid or arcNumber (it's FDT).

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

Your Email:


Subject:


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