Welcome! Log In Create A New Profile

Advanced

Questions from newbie - 2017.07 U-Boot Kirkwood : GoFlex Home

Posted by cayoenrique 
Questions from newbie - 2017.07 U-Boot Kirkwood : GoFlex Home
February 05, 2022 09:46AM
Questions from newbie - 2017.07 U-Boot Kirkwood : GoFlex Home

1) My Experience:
1rst timer on Hacking GoFlex Home. But I been in Linux from some time. Experience in Openwrt with routers. So new to doozan tutorials but I hope to be able to manage the Debian to Goflex Home hack.

2) What I done so far:
I read & follow:
Install Latest Kirkwood Debian rootfs and U-boot from stock OS
https://forum.doozan.com/read.php?2,117079,117084#msg-117084

Linux Kernel 5.15.5 Kirkwood package and Debian rootfs
https://forum.doozan.com/read.php?2,12096

2017.07 U-Boot Kirkwood - GoFlexNet, GoFlexHome, PogoE02, Dockstar, iConnect, NetgearStora, PogoV4/Mobile, Sheevaplug, NSA325, NSA320, NSA310S, NSA320S, NSA310, HP T5325, Dreamplug
https://forum.doozan.com/read.php?3,12381,page=1

U-Boot flashing utilities
https://forum.doozan.com/read.php?3,27280

3) Where I am?
I want to be safe as I have not install the serial monitor. I could If needed.

I have my USB prepared with Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi.tar.bz2. And I did install Now following 2017.07 U-Boot Kirkwood - GoFlexNet, GoFlexHome
I did downloaded uboot.2017.07-tld-1.goflexhome.bodhi.tar And I am at A. Flashing Instruction:
I also installed linux-tools-installation-bodhi.tar.gz on device.

4) My results so far:
GoFlex Home version 10.0.x

-bash-3.2$ uname -a
Linux axentraserver.********.seagateshare.com 2.6.22.18 #14 Wed Oct 27 15:41:03 EDT 2010 armv5tejl armv5tejl armv5tejl GNU/Linux
-bash-3.2$ sudo -E -s

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

Password: 
audit_log_user_command(): Connection refused
-bash-3.2# cat /etc/fw_env.config
cat: /etc/fw_env.config: No such file or directory
-bash-3.2# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00600000 00020000 "uImage"
mtd2: 0f900000 00020000 "root"
bash-3.2# fw_printenv ethaddr
Warning: Bad CRC, using default environment
## Error: "ethaddr" not defined
bash-3.2# dmesg | grep -i 'bad'
Scanning device for bad blocks
UBI: number of bad PEBs:         0
UBI: number of PEBs reserved for bad PEB handling: 38
bash-3.2# dmesg | grep -i ethaddr
bash-3.2# fw_printenv        
Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
bash-3.2#

I had install /etc/fw_env.config from U-Boot flashing utilities

But as you see previouly in RED I have discrepancies. Tutorial say I should see
dev: size erasesize name 
mtd0: 00100000 00020000 "u-boot" 
mtd1: 00400000 00020000 "uImage" 
mtd2: 02000000 00020000 "rootfs" 
mtd3: 0db00000 00020000 "data"

And ethaddr is empty

What should I do next to correct discrepancies?

Thanks in advance.
enrique
Re: Questions from newbie - 2017.07 U-Boot Kirkwood : GoFlex Home
February 05, 2022 03:45PM
enrique,

Everything looks OK.

Quote

Warning: Bad CRC, using default environment

It is normal for the first time flashing u-boot from stock OS.

Stock:
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00600000 00020000 "uImage"
mtd2: 0f900000 00020000 "root"

Expected:

dev: size erasesize name 
mtd0: 00100000 00020000 "u-boot" 
mtd1: 00400000 00020000 "uImage" 
mtd2: 02000000 00020000 "rootfs" 
mtd3: 0db00000 00020000 "data"

So the mtd0 is OK as explained in the installation instruction:

Quote

Note: for boxes such as Pogo V4 and Zyxel NSA3xx, the mtd partition definition are kept the same as stock definition, therefore is different from the one above.

If you don't have /etc/fw_env.config file in your system then go ahead and create this file with the above content. MTD parts are not important for booting and it can be adjusted later. For users who like to keep the stock mtd definition, there is no need to adjust it to the above definition. As long as mtd0 is defined as 1MB (0x00100000) or greater then it will be OK:
mtd0: 00100000 00020000 "u-boot"

Quote

And ethaddr is empty

Run ifconfig, or look at dmesg output. Those are places where the MAC address is printed out. Or look at the bottom of the box.

========

Even if you had skipped this step of setting ethaddr it should boot OK. Because after you flashed u-boot image and u-boot envs image, the ethaddr will be set to a local MAC address. That will be enough for booting and getting a dynamic IP from the router. And then after you've booted into Debian, you can adjust ethaddr and also mtdparts envs to set these 2 envs to correct value.

However, the ethaddr is quite important when you don't have serial console. So it should always be set to a real MAC address during installation. Some routers don't like seeing the MAC address change, and you could see some problem getting dynamic IP.

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



Edited 1 time(s). Last edit at 02/05/2022 03:52PM by bodhi.
Re: Questions from newbie - 2017.07 U-Boot Kirkwood : GoFlex Home
February 05, 2022 05:05PM
I found my USB2serial device. So I do have now a serial console.

So as you found no mayor issues, I will continue with:

2017.07 U-Boot Kirkwood - GoFlexNet, GoFlexHome, PogoE02, Dockstar, iConnect, NetgearStora, PogoV4/Mobile, Sheevaplug, NSA325, NSA320, NSA310S, NSA320S, NSA310, HP T5325, Dreamplug
https://forum.doozan.com/read.php?3,12381,page=1

One last question.
Please do not feel in any obligation, but just as a reference of what to expect.

Do you show up in a daily basic? More like do you show on the weekend? Should I continue or wait until Monday. As I said do not feel you answer is an obligation. It is just as reference.

Thanks in advance. And keep the good work. I find this forum fascinated.
Re: Questions from newbie - 2017.07 U-Boot Kirkwood : GoFlex Home
February 05, 2022 05:44PM
I'm here daily. I might not be able to respond right away, but I usually check for posts that need help with unbricking box, or problem booting to answer first.

So if you see anything unexpected during installation, don't reboot, just post the question and the log here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Questions from newbie - 2017.07 U-Boot Kirkwood : GoFlex Home
February 06, 2022 12:44AM
Due to
*** Warning - bad CRC, using default environment
I wanted to verify that my corrupted environment will not conflict with new U-Boot.

So I did 1rst
UART Booting HowTo for Selected Kirkwood Devices
http://forum.doozan.com/read.php?3,7852,7852

Lucky enough my old U-Boot was BootROM version 1.2.1
ff00003c: 00000121

Once I proved new U-boot booted from UART and Debian booted from USB, I did commit U-Boot to NAND. I still got *** Warning - bad CRC, using default environment.

It was when I install uboot.2016.05-tld-1.environment.bodhi.tar that your good environment cleaned the error. Nice.

Yes I got a new difference MAC, but that is of little importance. I know I can edit the environment to correct. I will leave it as is,

I still need to make work:
1) netconsole
2) add /boot/uEnv.txt
3) and latter after I finish empty my old HDD, I want to boot from SATA HDD.

I can give testimony that your tutorials are enough to get the necessary steps. Yes it is not all in 1 single thread, but I understand. And difficulty is mid to high as it requires lots of reading. But can be done. I did it without any meaningful error. Well I started with a bad crc NAND. But it has nothing to do with your steps,

This forum provide solution not for my device but to many many others. So tutorials are kind of generic. One more time thank you for the forum and your support.
Author:

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: