Welcome! Log In Create A New Profile

Advanced

Goflex Home bricked after installing Uboot

Posted by ouchyoung 
Goflex Home bricked after installing Uboot
November 09, 2016 09:42PM
Thank you for your attention and please forgive my poor English.

I installed ArchLinux ARM on my goflex home, well, it ran well but it's slower and slower recently, so I wanted to go back to the stock firmware. I followed the instructions from doozan.com as the following wishing I could boot the stock firmware with this operation (maybe it worked previously? I don't remember that well):

cd /tmp
wget http://projects.doozan.com/uboot/install_uboot_mtd0.sh
chmod +x install_uboot_mtd0.sh
./install_uboot_mtd0.sh

However, on the last step, it stopped and warned me that the code of the Uboot doesn't meet with that of Goflex Home, so I used another way as this:

wget http://goflex.scottn.us/uboot-mtd0-orig-goflexhome.kwb
flash_erase /dev/mtd0 0 4
nandwrite /dev/mtd0 uboot-mtd0-orig-goflexhome.kwb

After that, it reported the nand was successfully flashed. Then I re-ran the ./install_uboot_mtd0.sh from doozan.com and it went through without any problem and reported information of success. So I typed reboot to reboot my Goflex Home, but it never booted again, nor registered any IP on my router. I tried to listen on 10.10.10.5 6666, as well as 10.10.10.2 and 10.10.10.4 with a Macbook, but got nothing at all.

I also created a USB disk with the latest rootfs (Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2), after plugged in the USB disk, the front light went off, but there was still no registration of the device on my router. I also put the uboot.2016.05-tld-1.environment as uEnv.txt into the boot folder, but got no luck either. After powered on, the front green light blinked quickly, followed by the amber light, and the USB disk is blinking, too, indicating some access is happening. After a while (one minute or so), all front light went off, the USB access stopped.

So, is there any chance for restoring my device back? It the JTAG or a serial cable the only way to save it? Thank you very much!

BTW, I have a LAN (RJ45) to COM cable, will that work as a serial cable?



Edited 1 time(s). Last edit at 11/09/2016 09:46PM by ouchyoung.
Re: Goflex Home bricked after installing Uboot
November 10, 2016 01:29AM
ouchyoung Wrote:
-------------------------------------------------------
> Thank you for your attention and please forgive my
> poor English.
>
> I installed ArchLinux ARM on my goflex home, well,
> it ran well but it's slower and slower recently,
> so I wanted to go back to the stock firmware. I
> followed the instructions from doozan.com as the
> following wishing I could boot the stock firmware
> with this operation (maybe it worked previously? I
> don't remember that well):
>
> cd /tmp
> wget
> http://projects.doozan.com/uboot/install_uboot_mtd
> 0.sh
> chmod +x install_uboot_mtd0.sh
> ./install_uboot_mtd0.sh
>
> However, on the last step, it stopped and warned
> me that the code of the Uboot doesn't meet with
> that of Goflex Home, so I used another way as
> this:
>
> wget
> http://goflex.scottn.us/uboot-mtd0-orig-goflexhome
> .kwb
> flash_erase /dev/mtd0 0 4
> nandwrite /dev/mtd0
> uboot-mtd0-orig-goflexhome.kwb
>
> After that, it reported the nand was successfully
> flashed. Then I re-ran the ./install_uboot_mtd0.sh
> from doozan.com and it went through without any
> problem and reported information of success. So I
> typed reboot to reboot my Goflex Home, but it
> never booted again, nor registered any IP on my
> router. I tried to listen on 10.10.10.5 6666, as
> well as 10.10.10.2 and 10.10.10.4 with a Macbook,
> but got nothing at all.
>

At this point you are running Jeff/davygravy u-boot circa 2012.

> I also created a USB disk with the latest rootfs
> (Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2)
> , after plugged in the USB disk, the front light
> went off, but there was still no registration of
> the device on my router.

This has good chance to work. The latest rootfs should boot with the 2012 u-boot.


> also put the
> uboot.2016.05-tld-1.environment as uEnv.txt into
> the boot folder, but got no luck either.

This can only be used with my new u-boot releases since 2013.

> After
> powered on, the front green light blinked quickly,
> followed by the amber light, and the USB disk is
> blinking, too, indicating some access is
> happening. After a while (one minute or so), all
> front light went off, the USB access stopped.
>
> So, is there any chance for restoring my device
> back?

There is a good chance it will boot with the Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 at this point. This might be only the rootfs mounting problem. Your device was not bricked.

> It the JTAG or a serial cable the only way
> to save it? Thank you very much!
>

The best chance to get it working is to connect serial console. No need for JTAG. But it sounds like you will be able to boot the new rootfs. So hold on, and see below what I think.

> BTW, I have a LAN (RJ45) to COM cable, will that
> work as a serial cable?

No, it won't work.

-----

Here is what I think.

At this point you have the 2012 u-boot in NAND. And you have not even changed any u-boot envs after installing this u-boot. So the rootfs Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 should boot.

Going back to this rootfs creation, try to start again from scratch and create this rootfs on USB. Follow the instruction very closely (being root, single Ext3 partition,...). And since you are booting with the old 2012 u-boot, you must do step 4. And the DTB file must be kirkwood-goflexhome.dtb

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

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

Generate the uImage with DTB embedded inside:
cd /media/sdb1/boot
cp -a zImage-4.4.0-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.4.0-kirkwood-tld-1 -d zImage.fdt uImage
sync

Note that everything must be done exactly the way the instruction written. Don't try to substitute any command that you think is equivalence. Keep the log of how you create the rootfs and post here, I will look at that over and make sure you did not miss anything.

Plug in this rootfs when you're done and power up. Look for the new IP address in your router or try pinging it:
ping debian.local

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



Edited 1 time(s). Last edit at 11/10/2016 01:45AM by bodhi.
Re: Goflex Home bricked after installing Uboot
November 10, 2016 02:08AM
Thank you so much Bodhi, I will try this later when I get back home.
Re: Goflex Home bricked after installing Uboot
November 10, 2016 07:30AM
Yes, it's working now, thank you so much!!

BTW, here is the log:

root@ouch-VirtualBox:/# umount /media/root/rootfs

root@ouch-VirtualBox:/# mkfs.ext3 /dev/sdb1

mke2fs 1.42.13 (17-May-2015)

/dev/sdb1 contains a ext3 file system labelled 'rootfs'

	last mounted on /media/root/rootfs on Thu Nov 10 20:43:01 2016

无论如何也要继续? (y,n) y

Creating filesystem with 1966080 4k blocks and 492480 inodes

Filesystem UUID: 367ce25f-21ac-48de-9c45-c46777b1dd62

Superblock backups stored on blocks: 

	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632



Allocating group tables: 完成                            

正在写入inode表: 完成                            

Creating journal (32768 blocks): 完成

Writing superblocks and filesystem accounting information: 完成 



root@ouch-VirtualBox:/# e2label /dev/sdb1 rootfs

root@ouch-VirtualBox:/# cd /media/root/rootfs

root@ouch-VirtualBox:/media/root/rootfs# tar -xjf Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2

root@ouch-VirtualBox:/media/root/rootfs# cd boot

root@ouch-VirtualBox:/media/root/rootfs/boot# cp -a zImage-4.4.0-kirkwood-tld-1 zImage.fdt

root@ouch-VirtualBox:/media/root/rootfs/boot# cat dts/kirkwood-goflexhome.dtb >> zImage.fdt

root@ouch-VirtualBox:/media/root/rootfs/boot# mv uImage uImage.orig

root@ouch-VirtualBox:/media/root/rootfs/boot# mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.4.0-kirkwood-tld-1 -d zImage.fdt uImage

Image Name:   Linux-4.4.0-kirkwood-tld-1

Created:      Thu Nov 10 21:19:08 2016

Image Type:   ARM Linux Kernel Image (uncompressed)

Data Size:    3165437 Bytes = 3091.25 kB = 3.02 MB

Load Address: 00008000

Entry Point:  00008000

root@ouch-VirtualBox:/media/root/rootfs/boot# sync

----------
mod edit: add code tags



Edited 1 time(s). Last edit at 11/10/2016 01:18PM by bodhi.
Re: Goflex Home bricked after installing Uboot
November 10, 2016 01:19PM
Cool! glad it's unbrick. Now you should install the new u-boot and set up netconsole.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Goflex Home bricked after installing Uboot
November 13, 2016 08:15PM
Yep! I'm learning to Debian... Newbie here, came from Archlinux ARM, there's a little bit different between the two OSes, need some time to look into it. BTW, is there a systematic wiki like ArchLinux has here? Thanks!
Re: Goflex Home bricked after installing Uboot
November 13, 2016 09:07PM
ouchyoung Wrote:
-------------------------------------------------------
> Yep! I'm learning to Debian... Newbie here, came
> from Archlinux ARM, there's a little bit different
> between the two OSes, need some time to look into
> it. BTW, is there a systematic wiki like ArchLinux
> has here? Thanks!

We are not an organization like ALARM. But we have a Wiki thread:
http://forum.doozan.com/read.php?2,23630

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Goflex Home bricked after installing Uboot
November 13, 2016 09:41PM
Thanks for your quick reply!

I read that thread, but for a newbie, it's too simple to ultilize those tricks. For example, I want to setup an owncloud server on my goflex home, I read the thread "optimization for owncloud", it do mentioned the skill for optimizing the performance, but I don't know how to setup an owncloud... Sigh
Re: Goflex Home bricked after installing Uboot
November 14, 2016 12:07AM
Next cloud has a self contained package that fairly easy to follow as I was able to do it. It was abit slow for me on an E02 but it isnt a quad core either.
Re: Goflex Home bricked after installing Uboot
November 14, 2016 01:08AM
Is there some tutorials for Next cloud setting up? Thanks!
Re: Goflex Home bricked after installing Uboot
November 14, 2016 07:07AM
We have hijacked this enough I will post a link in off topic
Re: Goflex Home bricked after installing Uboot
November 14, 2016 07:32PM
Great! Can't wait to read it~
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: