Welcome! Log In Create A New Profile

Advanced

Pogo 02 not booting correctly

Posted by highend 
Pogo 02 not booting correctly
June 15, 2017 05:21AM
Hi,

I wanted to update to the latest u-boot via http://forum.doozan.com/read.php?3,12381
but it seems I messed up in the B. Flashing default u-boot envs image part...

The serial console states:
U-Boot 2016.05-tld-1 ...
...
Hit any key to stop autoboot: Timer from 10 to 0

When I don't abort it the last lines in the console are
loading uImage ...
** Bad device usb 0 **
loading uInitrd ...
** Bad device usb 0 **
loading DTB /boot/dts/kirkwood-pogo_e02.dtb ...
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
PogoE02>

With no stick attached.

When I abort the autoboot I get directly
to
PogoE02>

How do I get into recovery mode, fix what's wrong and install
debian from scratch now?

The rescue system should be this: http://forum.doozan.com/read.php?4,3896



Edited 1 time(s). Last edit at 06/15/2017 05:22AM by highend.
Re: Pogo 02 not booting correctly
June 15, 2017 05:40AM
highend Wrote:
-------------------------------------------------------

> With no stick attached.
>
> When I abort the autoboot I get directly
> to
> PogoE02>
>
> How do I get into recovery mode, fix what's wrong
> and install
> debian from scratch now?
>
> The rescue system should be this: http://forum.doo
> zan.com/read.php?4,3896

highend,

Bodhi is going to want to see your whole boot log with the usb stick attached and also your printenv from the "PogoE02>" prompt after you interrupt the boot to see what to do next.
Re: Pogo 02 not booting correctly
June 15, 2017 06:20AM
Hi feas,

the stick I used to boot from is dead. I wanted to setup everything from scratch
anyway because of this.

How can I capture the output of printenv from inside u-boot to e.g. a file to post it here?
Easy to do from the rescue system but I've never done this from u-boot.
Re: Pogo 02 not booting correctly
June 15, 2017 06:59AM
highend Wrote:
-------------------------------------------------------
> Hi feas,
>
> the stick I used to boot from is dead.
I wanted to
> setup everything from scratch
> anyway because of this.
>
it doesn't matter if it boots to linux he needs to see what it is trying to do to trouble shoot it first. might just be messed up envs.

> How can I capture the output of printenv from insi
> de u-boot to e.g. a file to post it here?

you are connected to serial right? highlight and copy/paste then.

> Easy to do from the rescue system but I've never d
> one this from u-boot.
Re: Pogo 02 not booting correctly
June 15, 2017 07:09AM
Here we go:

PogoE02> printenv
arcNumber=3542
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 $loadr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootootm $load_uimage_addr; fi; fi
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
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
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
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uIn
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uIma
load_uimage_addr=0x800000
machid=dd6
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 rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdpa
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv st
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 in; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do fordone;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $ueded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fienv_read; fi;  fi
usb_ready_retry=15

Environment size: 2858/131068 bytes

Boot log:
U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:23:43 -0700)
Pogo E02

SoC:   Kirkwood 88F6281_A0
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot:  0 
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 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            31291392        00fe96ed-01     0c Boot
loading envs from usb 0 ...
reading /boot/uEnv.txt
** Unable to read file /boot/uEnv.txt **
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'
running scan_disk ...
Scan device usb
device usb 0:1
reading /boot/uImage
** Unable to read file /boot/uImage **
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 ...
reading /boot/uImage
** Unable to read file /boot/uImage **
loading uInitrd ...
reading /boot/uInitrd
** Unable to read file /boot/uInitrd **
loading DTB /boot/dts/kirkwood-pogo_e02.dtb ...
reading /boot/dts/kirkwood-pogo_e02.dtb
** Unable to read file /boot/dts/kirkwood-pogo_e02.dtb **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
PogoE02> 
Re: Pogo 02 not booting correctly
June 15, 2017 02:34PM
@feas,

Thanks for helping out :) all good advice.

@highend,

Everything looks good with your u-boot installation. There is no need to do anything related.

The USB rootfs is, as you said, is not good. So to install from scratch, you can create a new rootfs on this USB stick, using Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 from the kernel/rootfs thread:

http://forum.doozan.com/read.php?2,12096

Section

Quote

Updated 20 Feb 2016:

This Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 is to keep in sync with kernel Linux-4.4.0-kirkwood-tld-1.

Basic minimal Debian Kirkwood rootfs for most Kirwood plugs:

Note: you must skip step 4

Quote

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

That's it. Boot wih the new rootfs.

Regarding rescue system v2. I'll find the post with the envs adjustments so that you can boot to it when the stick is not attached.

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



Edited 1 time(s). Last edit at 06/15/2017 03:13PM by bodhi.
Re: Pogo 02 not booting correctly
June 16, 2017 05:58AM
@bodhi

Thank you!

I've installed the new jessie root fs and upgraded the kernel to the newest version afterwards.
This works fine so far...

But sometimes, when the additional external usb3 harddisk is attached as well, it tries to boot from it instead of the usb stick.
Log:
U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:23:43 -0700)
Pogo E02

SoC:   Kirkwood 88F6281_A0
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
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)

Use USB retry period from the environment: 15 second(s)
2 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            1953523120      f38a4105-01     83


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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            4085760         58fbe382-01     83 Boot
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
** File not found /boot/uImage **
device usb 1:1
1 bytes read in 242 ms (0 Bytes/s)
Found bootable drive on usb 1
** File not found /boot/uImage **
** File not found /boot/uInitrd **
** File not found /boot/dts/kirkwood-pogo_e02.dtb **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
PogoE02>

The first partition of the usb stick has the label rootfs, so this shouldn't be the problem...


Quote
I'll find the post with the envs adjustments so that you can boot to it when the stick is not attached.

Yes, please!

Thanks again,
highend



Edited 1 time(s). Last edit at 06/16/2017 06:04AM by highend.
Re: Pogo 02 not booting correctly
June 16, 2017 02:55PM
highend,

If you have more than 1 USB drive attached, and they both contain rootfs, which has a kernel file in /boot/uImage, then booting will not be corrected. So to avoid booting the wrong drive, you should either rename the uImage on the non-booting drive, or only plug it in after the system has booted.


Here is the rescue envs.

Unplug the USB drive, power up, interrupt serial console and,
setenv rescue_installed 1
setenv rescue_set_bootargs 'setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params'
setenv rescue_bootcmd 'if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; fi'
setenv bootcmd 'run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run rescue_bootcmd; reset'
boot

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