Welcome! Log In Create A New Profile

Advanced

GoFlex Net uEnv error

Posted by W4G28U 
GoFlex Net uEnv error
February 05, 2022 07:59PM
I try to reactivate my old goflex net box but cannot get it to boot.

I used a USB drive formatted in ext3 with label 'rootfs'. Put the 5.13.6 kirkwood on it. With serial console, I got this:

U-Boot 2014.07-tld-1 (Jul 18 2014 - 00:35:50)
Seagate GoFlex Net

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
** Bad device usb 0x800000 **
** Bad device usb 0x1100000 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Unknown command 'mmc' - try 'help'
** Bad device mmc 0 **
** Bad device mmc 0 **
Wrong Image Format for bootm command

ERROR: can't get kernel image!

Reset IDE: ide_preinit failed
** Bad device size - ide 0 **
** Bad device size - ide 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
resetting ...


Here is the uboot environment on board:
arcNumber=3089
baudrate=115200
bootcmd=run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; reset
bootcmd_mmc=run mmc_init; run set_bootargs_mmc; run mmc_boot
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot;
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot;
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
ethaddr=00:00
if_netconsole=ping $serverip
ipaddr=192.168.1.30
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mmc_boot=mw 0x800000 0 1; run mmc_load_uimage; if run mmc_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
mmc_init=mmc rescan
mmc_load_uimage=ext2load mmc $device 0x800000 /boot/uImage
mmc_load_uinitrd=ext2load mmc $device 0x1100000 /boot/uInitrd
mmc_root=/dev/mmcblk0p1
mtddevname=rootfs
mtddevnum=2
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
rootdelay=10
rootfstype=ext4
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
serverip=192.168.1.15
set_bootargs_mmc=setenv bootargs console=$console root=$mmc_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
usb_boot=mw 0x800000 0 1; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_init=usb start
usb_load_uimage=ext4load usb 0x800000 /boot/uImage
usb_load_uinitrd=ext4load usb 0x1100000 /boot/uInitrd
usb_root=LABEL=rootfs

Please give me some suggestions how to change the uEnv to make it boot. My plan is to boot into 5.13.6, then update uboot to 2017 (latest).

I note the current uEnv has nothing about dtb. So I tried to add "dtb_file=/boot/dts/kirkwood-goflexnet.dtb" but still get the same error.

Meanwhile, I have a Pogo E02, which was updated to uboot 2017 last month. I compared the parameters and they look almost the same. Maybe there are some differences between them that I missed?
Re: GoFlex Net uEnv error
February 05, 2022 10:22PM
W4G28U,

> U-Boot 2014.07-tld-1 (Jul 18 2014 - 00:35:50)
> Seagate GoFlex Net

> bootcmd=run bootcmd_usb; run bootcmd_mmc; run
> bootcmd_sata; reset

> usb_boot=mw 0x800000 0 1; run usb_load_uimage; if
> run usb_load_uinitrd; then bootm 0x800000
> 0x1100000; else bootm 0x800000; fi

> usb_load_uimage=ext4load usb 0x800000
> /boot/uImage
> usb_load_uinitrd=ext4load usb 0x1100000
> /boot/uInitrd


> Please give me some suggestions how to change the
> uEnv to make it boot. My plan is to boot into
> 5.13.6, then update uboot to 2017 (latest).

Your installed u-boot is a bit old. And so the envs are not ready to be used for uEnv.txt.

But with serial console, you can fix the envs to boot the USB rootfs. Here is how:

Power up, interrupt serial console, and

setenv usb_load_uimage 'ext2load usb 0x800000 /boot/uImage'
setenv usb_load_uinitrd 'ext2load usb 0x1100000 /boot/uInitrd'

And then

boot

Note that your are booting without loading DTB, so the rootfs must have uImage with the DTB appended to it. As it were with stock u-boot, as mentioned in Step 4 for rootfs installation

Quote

4. (Stock u-boot only) 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, or running kwboot with latest u-boot image).

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-5.13.6-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-5.13.6-kirkwood-tld-1 -d zImage.fdt uImage
sync

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: GoFlex Net uEnv error
February 06, 2022 11:16AM
Hi bodhi

I modified the USB drive with integrated uImage [goflexnet]. Also changed the uboot command to ext2load. But I still got the exact same error message: bad device, wrong Image format. Any suggestions? Thank you very much.

Below is the console readout. I have tried multiple thumb drivers. all the same.

GoFlexNet> setenv usb_load_uimage 'ext2load usb 0x800000 /boot/uImage'
GoFlexNet> setenv usb_load_uinitrd 'ext2load usb 0x1100000 /boot/uInitrd'
GoFlexNet> saveenv
Saving Environment to NAND...
Erasing NAND...
Erasing at 0xc0000 -- 100% complete.
Writing to NAND... OK
GoFlexNet> printenv
arcNumber=3089
baudrate=115200
bootcmd=run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; reset
bootcmd_mmc=run mmc_init; run set_bootargs_mmc; run mmc_boot
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot;
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot;
bootdelay=10
bootdev=usb
console=ttyS0,115200
device=0:1
dtb_file=/boot/dts/kirkwood-goflexnet.dtb
ethact=egiga0
if_netconsole=ping $serverip
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mmc_boot=mw 0x800000 0 1; run mmc_load_uimage; if run mmc_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
mmc_init=mmc rescan
mmc_load_uimage=ext2load mmc $device 0x800000 /boot/uImage
mmc_load_uinitrd=ext2load mmc $device 0x1100000 /boot/uInitrd
mmc_root=/dev/mmcblk0p1
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
rootdelay=10
rootfstype=ext3
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
serverip=192.168.8.16
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data) $
set_bootargs_mmc=setenv bootargs console=$console root=$mmc_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
usb_boot=mw 0x800000 0 1; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_init=usb start
usb_load_uimage=ext2load usb 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb 0x1100000 /boot/uInitrd
usb_root=LABEL=rootfs

Environment size: 2396/131068 bytes
GoFlexNet> boot
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
** Bad device usb 0x800000 **
** Bad device usb 0x1100000 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Unknown command 'mmc' - try 'help'
** Bad device mmc 0 **
** Bad device mmc 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!

Reset IDE: ide_preinit failed
** Bad device size - ide 0 **
** Bad device size - ide 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
resetting ...

The kernel image was made as:
root@pogoE02:/mnt/temp/boot# ls -l
total 47008
drwxr-xr-x  3 root root    4096 Sep 23 22:25 .
drwxr-xr-x 22 root root    4096 Feb  6 11:36 ..
-rw-r--r--  1 root root 4403336 Aug  1  2021 System.map-5.13.6-kirkwood-tld-1
-rw-r--r--  1 root root  183927 Aug  1  2021 config-5.13.6-kirkwood-tld-1
drwxr-xr-x  2 root root    4096 Aug  1  2021 dts
-rw-r--r--  1 root root 9671027 Sep 23 21:04 initrd.img-5.13.6-kirkwood-tld-1
-rw-r--r--  1 root root 7762080 Aug  1  2021 linux-headers-5.13.6-kirkwood-tld-1_1.0_armel.deb
-rw-r--r--  1 root root 5435888 Sep 23 20:22 uImage
-rw-r--r--  1 root root 9671091 Sep 23 21:06 uInitrd
-rwxr-xr-x  1 root root 5435824 Aug  1  2021 vmlinuz-5.13.6-kirkwood-tld-1
-rwxr-xr-x  1 root root 5435824 Aug  1  2021 zImage-5.13.6-kirkwood-tld-1
root@pogoE02:/mnt/temp/boot# cp -a zImage-5.13.6-kirkwood-tld-1 zImage.fdt
root@pogoE02:/mnt/temp/boot# cat dts/kirkwood-goflexnet.dtb >> zImage.fdt
root@pogoE02:/mnt/temp/boot# mv uImage uImage.orig
root@pogoE02:/mnt/temp/boot# mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.13.6-kirkwood-tld-1 -d zImage.fdt uImage
Image Name:   Linux-5.13.6-kirkwood-tld-1
Created:      Sun Feb  6 11:38:29 2022
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    5447281 Bytes = 5319.61 KiB = 5.19 MiB
Load Address: 00008000
Entry Point:  00008000
root@pogoE02:/mnt/temp/boot# sync
Re: GoFlex Net uEnv error
February 06, 2022 12:09PM
Hi bodhi,

After some study, I changed env based on your previous post: https://forum.doozan.com/read.php?2,102054,105374#msg-105374

setenv usb_set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial'
setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv load_uinitrd 'ext2load usb 0:1 0x2100000 /boot/uInitrd'
setenv usb_boot 'mw 0x800000 0 1; run load_uimage; run load_uinitrd; bootm 0x800000 0x2100000'
setenv usb_bootcmd 'run usb_set_bootargs; run usb_boot'
setenv bootcmd 'usb start; run usb_bootcmd; usb stop; reset'

This is based on Netgear stora, but it worked! Thanks a lot.
Re: GoFlex Net uEnv error
February 06, 2022 04:11PM
W4G28U,

Cool! glad you've figure it out.

BTW, don't use saveenv until after you have tested the envs change and boot it a couple times.

GoFlexNet> saveenv

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