Welcome! Log In Create A New Profile

Advanced

Totaly f***ed up my Goflex Home uBoot

Posted by egon0 
Totaly f***ed up my Goflex Home uBoot
October 03, 2014 05:02PM
Hello,

i have semi-bricked my Goflex Home. Updated uBoot and set up some wrong stuff in uBoot-Config. I have working UART, but all i see is:

U-Boot 2014.07-tld-1 (Jul 18 2014 - 00:41:47)
Seagate GoFlex Home

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    nc
Out:   nc
Err:   nc

looks like serial console is completely disabled... after this. i could uart-sideload some old uboot.uart, but dont know what is the next step. any attempts to rewrite the uboot-config from the old sideloaded uboot seem to be ignored by the new uboot.

has anybody some ideas?

greetings,

egon



Edited 1 time(s). Last edit at 10/04/2014 05:49PM by egon0.
Re: Totaly f***ed up my Goflex Home uBoot
October 04, 2014 12:10AM
egon0,

Quote

> I have working UART, but all i see is:
>
>
> U-Boot 2014.07-tld-1 (Jul 18 2014 - 00:41:47)
> Seagate GoFlex Home
> 
> SoC:   Kirkwood 88F6281_A1
> DRAM:  128 MiB
> WARNING: Caches not enabled
> NAND:  256 MiB
> In:    nc
> Out:   nc
> Err:   nc
>
>
> looks like serial console is completely
> disabled…

Interesting problem! it seems you have written to the envs area before with these by booting netconsole.
Quote

> In: nc
> Out: nc
> Err: nc

UART recovery is working half-way, but it has read the envs in successfully so it did not use default values. Do you remember or have saved the envs setting for netconsole? If you do, open another terminal and run netconsole on that one. It will output the netconsole output to that, and you will have a chance to interrupt it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Totaly f***ed up my Goflex Home uBoot
October 04, 2014 03:25AM
Problem is, the Netconsole config is f**ked up too. There is no netconsole at all. have lissened via tcpdump and wireshark directly connected to my gfh, no initial ping from the box (iirc it pings the nc-target-host and then starts the nc).
Re: Totaly f***ed up my Goflex Home uBoot
October 04, 2014 04:00AM
egon0,

> Problem is, the Netconsole config is f**ked up
> too. There is no netconsole at all. have lissened
> via tcpdump and wireshark directly connected to my
> gfh, no initial ping from the box (iirc it pings
> the nc-target-host and then starts the nc).

Yes, it should do the initial ping. Then my guess is your u-boot envs must have these settings (in error) somehow:
stderr=nc
stdin=nc
stdout=nc
preboot=
So netconsole did not start (preboot could have been set to something wrong or empty, likewise with ipaddr and serverip), but input/output are set to netconsole.

But this only prevented you to see the output. U-boot should default to serial when it starts (before preboot). Did you try to repeatedly hit any key right at the moment u-boot banner appeared? Even with bootdelay=0, serial console should stop if you hit a key soon enough. Try this and let me know if it works. There is a small chance that it would.

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



Edited 1 time(s). Last edit at 10/04/2014 04:06AM by bodhi.
Re: Totaly f***ed up my Goflex Home uBoot
October 04, 2014 04:12AM
ok, i will try to hit "any" key :D constantly later this night. i will report what happens. another idea is to rewrite the preboot var from the old uboot new, maybe it will help.

is there any chance to reset the new uboot config to the defaults from within a uart-sideloaded old uboot?
Re: Totaly f***ed up my Goflex Home uBoot
October 04, 2014 04:29AM
egon0,

No, it won't set to default envs, because a "good" envs area at 0xC0000 was found (checksum had passed the test, even though the values were wrong). Of course, it is possible with code change, but it would break from u-boot design.

BTW, your semi-bricked GFH problem has caused me to rethink the default setup for u-boot :) On top of my head, I think/hope I know what to change to enable recovery even when envs are all messed up.

I'm close to release new u-boot version for Kirkwood boxes. So let me take a look if I could add a feature that has a capability for rewiting envs before releasing.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Totaly f***ed up my Goflex Home uBoot
October 04, 2014 04:47AM
I think my fault was missing one step, there is in your other thread somerhing like uboot default environment. its an img file. i should have flashed this. i think there are some old and now wrong envs... as said, will have a look at this later and will notify you if something interesting happended.
Re: Totaly f***ed up my Goflex Home uBoot
October 04, 2014 03:54PM
ok, no way to stop boot process by hitting any key...
Re: Totaly f***ed up my Goflex Home uBoot
October 04, 2014 05:07PM
egon0,

Try kwboot with this attached GFH uart image (use without -p option).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - uboot.2014.07-tld-2.goflexhome.rescue.uart.kwb (435.1 KB)
Re: Totaly f***ed up my Goflex Home uBoot
October 04, 2014 05:20PM
U-Boot 2014.07-tld-2 (Oct 04 2014 - 13:48:16)
Seagate GoFlex Home

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    nc
Out:   nc
Err:   nc

:'-(
Re: Totaly f***ed up my Goflex Home uBoot
October 04, 2014 06:10PM
:) your u-boot envs were messed up so much more than I've expected. I guess the rescue u-boot must ignore all of them (not just preboot) to get it to the prompt. I'll be back later today.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Totaly f***ed up my Goflex Home uBoot
October 04, 2014 08:18PM
Here is the updated image. Try kwboot with this attached GFH uart image (use without -p option).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - uboot.2014.07-tld-2-uart-rescue.goflexhome.kwb (435.4 KB)
Re: Totaly f***ed up my Goflex Home uBoot
October 05, 2014 03:39AM
U-Boot 2014.07-tld-2-uart-rescue (Oct 04 2014 - 17:28:55)
Seagate GoFlex Home

SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    nc
Out:   nc
Err:   nc
Hit any key to stop autoboot:  0 
GoFlexHome>
:) nice work.

arcNumber=3338
baudrate=115200
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run sata_bootcmd; run rescue_bootcmd; run pogo_bootcmd; reset
bootdelay=10
console=ttyS0,115200
ethact=egiga0
ethaddr=00:10:75:2f:3e:99
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
ipaddr=10.10.10.6
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)
nc_start=setenv stdin nc; setenv stdout nc; setenv stderr nc; version
nc_test=ping $ncip
ncip=10.10.10.5
ncipk=10.10.10.4
partition=nand0,2
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
preboot=setenv stderr serial; setenv stdin serial; setenv stdout serial; setenv baudrate 115200; setenv console ttyS0,115200; setenv bootdelay 10
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=0
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
sata_boot=ide reset; mw 0x800000 0 1; ext2load ide $sata_device 0x800000 /boot/uImage; if ext2load ide $sata_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_bootcmd=run sata_set_bootargs; run sata_boot
sata_device=0:1
sata_root=/dev/sda1
sata_rootdelay=10
sata_rootfstype=ext3
sata_set_bootargs=setenv bootargs console=$console root=$sata_root rootdelay=$sata_rootdelay rootfstype=$sata_rootfstype $mtdparts $sata_custom_params
serverip=10.10.10.3
stderr=serial
stdin=serial
stdout=serial
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_custom_params=ignore_loglevel netconsole=6665@10.10.10.3/eth0,6666@10.10.10.4/
usb_device=0:1
usb_init=run usb_scan
usb_root=/dev/sda1
usb_rootdelay=10
usb_rootfstype=ext4
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=/dev/disk/by-label/urootfs rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params

Environment size: 3269/131068 bytes

where is the error? tried to boot from my formerly working arch usb-stick and from a new debian usb stick, both stuck after booting the kernel


GoFlexHome>usb start
GoFlexHome>mw 0x800000 0 1; ext2load usb 0:1 0x800000 /boot/uImage; if ext2load usb 0:1 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
2756040 bytes read in 382 ms (6.9 MiB/s)
6032465 bytes read in 477 ms (12.1 MiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.16.0-kirkwood-tld-2
   Created:      2014-09-01  23:18:31 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2755976 Bytes = 2.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-3.16.0-kirkwood-tld-2
   Created:      2014-09-01  23:18:48 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6032401 Bytes = 5.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

but no dhcp-request from the gfh, maybe i try to create a completely new debian stick
Re: Totaly f***ed up my Goflex Home uBoot
October 05, 2014 01:19PM
It stuck there because of the bootargs when you run the command like above. Go ahead and boot to see where it was stuck at booting the kernel:
> boot

Once you've booted into Linux, remember to set stdin, stdout, stderr back to serial. And remove the preboot env.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Totaly f***ed up my Goflex Home uBoot
October 12, 2014 04:23AM
Ok, great news, my GFH is alive! But one problem is left - it won't boot with attached hdd. If i put the hdd after boot to the GFH everything looks good, but would be cool if it would boot with attached hdd.

many thanks for yout great help so far!
Re: Totaly f***ed up my Goflex Home uBoot
October 12, 2014 05:02AM
Use the label for rootfs:

1. Set the label of the USB drive to "rootfs" (adjust the name to your liking). Assuming the USB drive is assigned sda1:
# tune2fs -L rootfs /dev/sda1

2. Set the booting environment variable usb_init:
# fw_setenv usb_init "run usb_scan; setenv usb_root LABEL=rootfs"

And you root is
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params

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



Edited 1 time(s). Last edit at 10/12/2014 05:06AM by bodhi.
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: