Welcome! Log In Create A New Profile

Advanced

2017.07 U-Boot Kirkwood - GoFlexNet, GoFlexHome, PogoE02, Dockstar, iConnect, NetgearStora, PogoV4/Mobile, Sheevaplug, NSA325, NSA320, NSA310S, NSA320S, NSA310, HP T5325, Dreamplug

Posted by bodhi 
2017.07 U-Boot for FDT and Non-FDT Kirkwood Kernel - GoFlexNet, GoFlexHome, PogoE02, Dockstar, iConnect, NetgearStora, PogoV4/Mobile, Sheevaplug, NSA325, NSA320, NSA310S/320S, NSA310, HP-T5325, Dreamplug.

These images support the following latest U-Boot features (among others):

- both FDT and non-FDT kernel booting
- supports EFI/GPT partition > 2TB (SATA and USB) either for booting or just attached.
- boot Ext4 rootfs
- SNTP (Simple NTP to set date time during U-Boot booting)
- bootz (boot with zImage).
- Ability to customize u-boot envs in a script (uEnv.txt) during boot, without committing changes to NAND (see section C for instruction). This feature also can be used for rescue purpose where the u-boot envs were messed up, or when the NAND envs block is bad.

References:

1. U-Boot source code at GitHub (latest branch 2017.07-kirkwood-tld-1 and tag v2017.07-kirkwood-tld-1)
2. Latest Linux Kernel Kirkwood package and rootfs

Disclaimer

Flashing uBoot to mtd0 could potentially brick your box! please have serial console, or JTAG set up before hand to recover from any mistake or bad flash. The instruction to flash uBoot image to mtd0 is included here. But please proceed only at your own risk. And most important of all, please read the entire post and make sure you understand the procedure before starting. The flashing instruction assumes that you have a beginner's knowledge of how U-Boot works, and how to set U-Boot environment variables to facilitate booting Linux kernel. If this is the first time you are installing U-Boot and dealing with NAND, and/or using U-Boot environment tools, please ask questions before starting.

=======================================================
Last Updated 28 Oct 2017

I've uploaded 2017.07-tld-1 U-Boot images for Pogo E02, GoFlexNet, GoFlex Home, Dockstar, Pogo V4/Mobile, iConnect, Netgear Stora, Sheevaplug, NSA320, NSA325, NSA310S/320S, NSA310, HP-T5325, and Dreamplug.

The HP Thin Client T5325 installation procedure is different from other Kirkwood u-boots, see this thread for installation instruction and download link..

The Marvell Dreamplug box installation procedure is different from other Kirkwood u-boots, see this thread for installation instruction and download link.


New/updated in 2017.07-tld-1 version:

- Rebase u-boot code to track mainline 2017.07.
- Incorporated patch to fix "EHCI timed out on TD" error with USB drives.
- SD cards: Use the mainline version of MMC driver for Pogo V4/Mobile and Sheevaplug
- Improve internal defautl envs.

Credits: Thanks rayvt for the EHCI timed out on TD patch ! good works.

UART Booting: If possible, try to test this boot image with UART booting before flashing to NAND. See davygravy's UART booting using kwboot instruction here in this thread. The latest u-boot image released here should be used for UART booting, if your box is the type that supports it (these do not: Dockstar, Pogo E02, iConnect).

Quote

Warning: Regarding the Pogo V4 or Netgear Stora boxes only. If you are installing my released u-boot for the first time, and try UART booting using kwboot before actual flashing the image to NAND. See here for a correction needed.

Quote
To download ARM kwboot binary for UART booting at Dropbox

kwboot-2016.05.tar
md5:
76977c5a61544a5707dfa17ae832a3ad
sha256:
25ee4fa8a94372d2d398cac4704e9ee3ca87585c29e72e18323209b7f163209d

kwboot (this is an older version)
md5:
0efd011bdb244436e432a8de33e639a1



Download U-Boot images at Dropbox:

uboot.2017.07-tld-1.iconnect.bodhi.tar
md5
e7ce4376d2fc6d0489634556f1cc79b0
sha256
51564c3321ccc42ceedcbf8ca66ec6e6a66285408eb4e0d4d782275b675491d2

uboot.2017.07-tld-1.netgear_ms2110.bodhi.tar
md5
1b09317e896ad928104a1edce459a9f5
sha256
8f5e8b5b33e3979b05698a09a92f99cd41ed04121993058f9b2469122fd280a7

uboot.2017.07-tld-1.nsa310.bodhi.tar
md5
b2d04eafe402bb356c8dc8e42dc21f8f
sha256
4a5e1e730607b8d8f42544de0bd6c476e0af0e70cc1d201405ae6d4843047d21

uboot.2017.07-tld-1.nsa310s.bodhi.tar
md5
4af9c6f16e1705e7a4345e6f7cc01fa7
sha256
724cb6ac5baf2053e63dc44489693c6772264ca326f4bdb2506c81f654ea84dc

uboot.2017.07-tld-1.nsa320.bodhi.tar
md5
ed39fa5a2f79809f32a78b661faa7a2c
sha256
67eba01db75a020cdb71e20b636d5863042f51a996f9c80d342e7ccca64a31e2

uboot.2017.07-tld-1.nsa325.bodhi.tar
md5
102be464341ec77de08725998dfca00b
sha256
93968d24efbe9fa1641f93340a4d3c476475c9d63f61573b365976d0770937ad

uboot.2017.07-tld-1.pogo_e02.bodhi.tar
md5
c32e0e23c57e77938a567f94c18a4084
sha256
36369a6df4953430e3df6993a08ac4e8608ea993f2715d64315c3ceec5659672

uboot.2017.07-tld-1.dockstar.bodhi.tar
md5
6a375a0bb5e8941d2fa416edc687f493
sha256
3b926930d0dc9d5c8b0405f1210d72b780170f1f88da29105b7c9d6a13a1cded

uboot.2017.07-tld-1.goflexhome.bodhi.tar
md5
b014dcf14697d573ca9626fbc6a6c489
sha256
964b659492d50e464d7117116a273768d27731cf6640eecc1a43cbedbffc14c1

uboot.2017.07-tld-1.goflexnet.bodhi.tar
md5
0d4c9afeb85d1ca0fd17bd4bbd21d782
sha256
a8acf14169b13543dd42c30d2ea100789426a2abc4fd3352dc9016ae314e7384

uboot.2017.07-tld-1.pogo_v4.bodhi.tar
md5
e2c2b4927dcd8189f0c97dd81b72ad7e
sha256
18f856d2106aabe6029331358fb06f053ea9257ad896e2d382f4f096f93c46e9

uboot.2017.07-tld-1.sheevaplug.bodhi.tar
md5
6e827a2dbfb520ac3d62ed8264db055d
sha256
9b6290acc456e33f594737a3810d896a0ef0022626e31b74f5a6210cccbdafe8

Each archive contains the uBoot image only.


A. Flashing Instruction:


Installation is the same for each u-Boot image, the instruction below is written to include all boxes. So choose the platform name that you are installing for, and copy/paste the appropriate commands.

If you are running kernel that do not provide mtd-utils and uboot-tools (fw_setenv, fw_printenv, flash_erase, nandwrite), you can download the NAND and U-Boot tools binaries here in this thread.

1. uBoot envs config should be defined as followed in your /etc/fw_env.config

cat /etc/fw_env.config
 # MTD device name	Device offset	Env. size	Flash sector size	Number of sectors 
/dev/mtd0 0xc0000 0x20000 0x20000

- And your mtd partitions should be:

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

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"

2. Make sure ethaddr is set in uBoot env. It must be set before rebooting the system. However, if you plan to flash the default envs image in step 8 (Flashing default u-boot envs image), then no need to worry about it now. It can be set after you've booted in to Linux. The MAC address will be set to a valid randomly generated local address.
fw_printenv ethaddr

3. Be sure to save your current uBoot image in mtd0, or have a backup image saved somewhere as precaution. And save your current u-boot envs with fw_printenv, or just copy/paste the listing into a text file. Note the nanddump command below allows future restoration to the same box you're backing up, and also can be used to restore a differrent box's mtd0 if needed.

Dumping NAND mtd0:
nanddump --noecc --omitoob -l 0x80000 -f mtd0 /dev/mtd0
Save envs:
fw_printenv > current_envs.txt
or
blparam >  current_envs.txt

4. Be sure there is no bad block in the first 1M of your NAND (check dmesg). This is very important, if there is bad block in the first 1M (8 blocks), don't flash u-boot, because you will almost certainly brick your box. Please post your question here (there is a work around for it).

Example of bad block in mtd0:
dmesg | grep -i 'bad'

[    2.413231] Scanning device for bad blocks
[    2.417731] Bad eraseblock 3 at 0x000000060000

This bad block is the 4th block which resides within mtd0 (block 0 to block 7). So u-boot should not be flashed.

5. Extract the archive to /tmp

Among the tar commands below, be careful and execute only one tar command corresponding to your platform that you are installing to, using the tar file that you have downloaded before starting the flashing instruction. Beware of the similar sounding name of different u-boots (nsa310s and nsa310 are two different u-boots).
cd /tmp
tar -xf uboot.2017.07-tld-1.dockstar.bodhi.tar
tar -xf uboot.2017.07-tld-1.goflexhome.bodhi.tar
tar -xf uboot.2017.07-tld-1.goflexnet.bodhi.tar
tar -xf uboot.2017.07-tld-1.iconnect.bodhi.tar
tar -xf uboot.2017.07-tld-1.netgear_ms2110.bodhi.tar
tar -xf uboot.2017.07-tld-1.pogo_e02.bodhi.tar
tar -xf uboot.2017.07-tld-1.pogo_v4.bodhi.tar
tar -xf uboot.2017.07-tld-1.sheevaplug.bodhi.tar
tar -xf uboot.2017.07-tld-1.nsa320.bodhi.tar
tar -xf uboot.2017.07-tld-1.nsa325.bodhi.tar
tar -xf uboot.2017.07-tld-1.nsa310s.bodhi.tar
tar -xf uboot.2017.07-tld-1.nsa310.bodhi.tar

Be extra careful with the next 2 commands in step 6 and 7, you should see output that look like below in those steps. If there is error, then do not reboot, post your problem here so we can help.

6. Erase mtd0
flash_erase /dev/mtd0 0 4
Expected output:
Erase Total 4 Units 
Performing Flash Erase of length 131072 at offset 0x60000 done

7. Write image to NAND

Among the nandwrite commands below, be extra careful and execute only one nandwrite command corresponding to your platform that you are installing to, using the kwb file that you have extracted in step 5. Please double check to make sure the file is for the correct platform. Especially the similar sounding names (e.g. nsa310s and nsa310 are different u-boots).

nandwrite /dev/mtd0 uboot.2017.07-tld-1.dockstar.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.goflexhome.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.goflexnet.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.iconnect.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.netgear_ms2110.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.pogo_e02.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.pogo_v4.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.sheevaplug.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.nsa320.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.nsa325.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.nsa310s.mtd0.kwb
nandwrite /dev/mtd0 uboot.2017.07-tld-1.nsa310.mtd0.kwb

Expected output:
Writing data to block 0 at offset 0x0 
Writing data to block 1 at offset 0x20000 
Writing data to block 2 at offset 0x40000 
Writing data to block 3 at offset 0x60000

8. Flashing default u-boot envs image (if you are upgrading from 2016.05-tld-1 u-boot, you can skip this step 8).

As described in step 1, u-boot envs must be defined in /etc/fw_env.config as

# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors 
/dev/mtd0 0xc0000 0x20000 0x20000

This default envs image supports booting with multiple disk drives (and hubs) attached. The disk drives could be any type (usb, sata, sd card). The scanning logic and default envs were set to automatically boot the box with the following required configuration:

For whatever reason, if you can't set up your configuration to satisfy the following 4 requirements, then don't flash this defaut envs image. It might not boot properly. In this case, section C below can be used to tailor the envs to your specific configuration.

r1. There must be only one partition among all partitions from all drives that contains the kernel files. The 2 kernel files are /boot/uImage and /boot/uInitrd.
r2. The partition that contains the 2 kernel files must be partition 1 in a disk drive
r3. The partition that contains the rootfs must be labeled rootfs
r4. The rootfs partition is recommended to be type Ext3 (this is not a hard requirement, ext4 should boot OK, but Ext3 will ensure no problem).

So the bottom line is if you have only one rootfs in a single Ext3 partition, which is labeled as rootfs, then you're all set.

a. Download the default u-boot envs at Dropbox:

uboot.2016.05-tld-1.environment.bodhi.tar
md5:
3823eef10011b864859d31a76470e0e3
sha256:
c8db95a4225e8d78bdaaaa372bd5a87e4b98f3448dd9c62fc96c72b2df1a997c

This tarball includes 3 files:

uboot.2016.05-tld-1.environment.img (the default envs image to be flashed)
uboot.2016.05-tld-1.environment (the content of the default envs in text format)
uboot.2016.05-tld-1.environment.64K.img (small envs image to be flashed on HP T5325 only).

b. Extract the archive to /tmp
cd /tmp
tar -xf uboot.2016.05-tld-1.environment.bodhi.tar

c. Save current envs with fw_printenv, or just copy/paste the listing into a text file.
fw_printenv > current_envs.txt

d. Flash u-boot envs to NAND location 0xC0000.

Be extra careful with the next 2 commands, you should see output that look like below. If there is error, then do not reboot, post your problem here so we can help.

/usr/sbin/flash_erase /dev/mtd0 0xc0000 1
Expected output:
Erase Total 1 Units
Performing Flash Erase of length 131072 at offset 0xc0000 done

/usr/sbin/nandwrite -s 786432 /dev/mtd0 uboot.2016.05-tld-1.environment.img
Expected output:
Writing data to block 6 at offset 0xc0000

e. Modify the following u-boot variables using fw_setenv:

Note that arcNumber and machid are not necessary if you are booting with FDT kernel 3.17+ in the latest kernel and rootfs thread. But it does not hurt to set them anyway.

archNumber and machid are required for non-FDT kernel (3.16.x or earlier)

Also note that only some boxes need machid, some don't (so the command fw_setenv machid below clears them).

for Pogo V4/Mobile:
fw_setenv arcNumber 3960
fw_setenv machid f78

for iConnect:
fw_setenv arcNumber 2870
fw_setenv machid

for Stora:
fw_setenv arcNumber 2743
fw_setenv machid

for Dockstar:
fw_setenv arcNumber 2998
fw_setenv machid

for Pogo E02:
fw_setenv arcNumber 3542
fw_setenv machid dd6

for GoFlex Home:
fw_setenv arcNumber 3338
fw_setenv machid


for GoFlex Net:
fw_setenv arcNumber 3089
fw_setenv machid

for Sheevaplug:
fw_setenv arcNumber 2097
fw_setenv machid

for NSA325:
fw_setenv arcNumber 4495
fw_setenv machid

for NSA320:
fw_setenv arcNumber 3956
fw_setenv machid

for NSA310S/320S:
fw_setenv arcNumber 4931
fw_setenv machid

for NSA310:
fw_setenv arcNumber 4022
fw_setenv machid


Then for all boxes, restore these 2 envs using the saved envs text in step c (replace xxx with the real saved values)
fw_setenv mtdparts 'xxxxxxxxx'
fw_setenv ethaddr 'xx:xx:xx:xx:xx:xx'

Note: for boxes that boot with SATA as rootfs. Please make this adjustment if your boot drive is SATA:
fw_setenv bootcmd_uenv 'run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3'
(This will help the "ide reset" to work properly. There seems to be a bug in u-boot that if you do "ide reset" too quickly in succession, the SATA drive might have problem spinning up).

f. Adjust the DTB name to boot with a rootfs that has FDT kernel 3.17+ (this is the normal case):

Find your box DTB file in the rootfs /boot/dts directory and adjust the env to it. For example, if the box is the Dockstar
fw_setenv dtb_file '/boot/dts/kirkwood-dockstar.dtb'

In the special case when you are booting with a non-FDT kernel 3.16 or earlier, or if you have appended the DTB to uImage. Remove the DTB file env. If not sure please post question before continuing.
fw_setenv dtb_file

h. For sanity check, list you envs again
fw_printenv

If there is error in listing u-boot envs, stop here and post your problem so we can help.

Remember to save away your old envs text file created in step c for future reference in case more need to be restored.

i. Done step 8.


9. For sanity check, print out uBoot envs to see if they look OK.
fw_printenv
and then double check the ethaddr env again to be sure. Don't reboot if there is error while listing U-Boot envs.

10. Set up netconsole. It's important to set up neconsole if you don't already have serial console connected. If you have serial console, don't set up netconsole at this moment, because it will interfere with serial console.

If you've flashed the default environments in step 8 then activate netconsole with the following envs:

Adjust 192.168.0.xxx and 192.168.0.yyy below to the real numbers in your network configuration. 192.168.0.xxx is this plug IP address, and 192.168.0.yyy is the IP address of the netconsole server where it will monitor the output from the this plug (adjust them to the real values in your own local network settings).

fw_setenv preboot_nc 'setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi'
fw_setenv preboot 'run preboot_nc'
fw_setenv ipaddr    '192.168.0.xxx'
fw_setenv serverip '192.168.0.yyy'


11. Reboot. Upon reboot, in either serial console or netconsole, uBoot banner should show:

U-Boot 2017.07-tld-1 (….)
<your box name>

DONE installation.


B. Deprecated


C. Add uEnv.txt to /boot directory (Optional)

To adjust the default envs to your specific configuration, and not having to permanently alter u-boot envs NAND. Create a text file in /boot directory with the content in the format that u-boot envs are listed.

Examples:

The example below only to demonstrate the syntax in uEnv.txt (they might or might not apply to your current settings):

- Load appropriate DTB file for the kernel to run GoFlex Net box.
- Use SD card, USB and SATA for booting. The kernel and rootfs search order is as they are appeared on the list: mmc, usb, ide.
- Define that there are 8 storage devices (i.e. disk partitions).

cat /boot/uEnv.txt
dtb_file=/boot/dts/kirkwood-goflexnet.dtb
devices=mmc usb ide
disks=0 1 2 3 4 5 6 7


=======================================================
Last Updated 19 June 2016

I've uploaded 2016.05-tld-1 U-Boot images for Pogo E02, GoFlexNet, GoFlex Home, Dockstar, Pogo V4/Mobile, iConnect, Netgear Stora, Sheevaplug, NSA320, NSA325, NSA310S/320S, NSA310, and HP-T5325.

The HP Thin Client T5325 installation procedure is different from other Kirkwood u-boots, see this thread for installation instruction.

Credits: Thanks davidedg for the inspiration to add button command to these boxes!

Important Note: If possible, try to test this boot image with UART booting before flashing to NAND. See davygravy's UART booting using kwboot instruction here in this thread. The latest u-boot image released here should be used for UART booting, if your box is the type that supports it (these do not: Dockstar, Pogo E02, iConnect).


Quote
To download ARM kwboot binary for UART booting at Dropbox

kwboot-2016.05.tar
md5:
76977c5a61544a5707dfa17ae832a3ad
sha256:
25ee4fa8a94372d2d398cac4704e9ee3ca87585c29e72e18323209b7f163209d

kwboot (this is an older version)
md5:
0efd011bdb244436e432a8de33e639a1




Download U-Boot images at Dropbox:

uboot.2016.05-tld-1.pogo_e02.bodhi.tar
md5:
99a0246b75413004307b6f203750b0ef
sha256:
c764233dc06ad87ec8951db7a1228de821a30bbebcc4f70ca4d551863becec3b

uboot.2016.05-tld-1.goflexnet.bodhi.tar
md5:
6fdc775d64035b7b5998813eea2fe4bd
sha256:
d311204247c403f321f4aad82258a7d67eea53222b5ec5de763a6e08e75a59a3

uboot.2016.05-tld-1.goflexhome.bodhi.tar
md5:
73aa0654c565614146015d7314ece2ca
sha256:
65958f995ff7b88ce624549d8927a693ff32d92d64353d533db1aa40e78a9387

uboot.2016.05-tld-1.dockstar.bodhi.tar
md5:
cf26342644249fb768493ee6a276be83
sha256:
685776ccc4b97b435e0e8e7b6a0bdc4737ddda5ee05770316f6a271bf01d7945

uboot.2016.05-tld-1.iconnect.bodhi.tar
md5:
db6d97b7da3d7b59412514b3cdd74207
sha256:
2166f70142712e3dbd0cf7b66d10c1bacdcf93c437b86cef5a17ace58fd0d4f5

uboot.2016.05-tld-1.pogo_v4.bodhi.tar
md5:
0a16cbc707312d03b07094e4884be48b
sha256:
bb3b36527fdd76f3ddc130954d5aa47f53dc2f1b387ed623ddd15e33b0ef4c25

uboot.2016.05-tld-1.netgear_ms2110.bodhi.tar
md5:
a5676c3fba5df312b43b42bc3cb1a771
sha256:
27554f4fa87c85812475a19be4e72cc303d6e31c0266cefe6bb06cb7722e63d5

uboot.2016.05-tld-1.nsa325.bodhi.tar
md5:
a1a72c8750a0e5c3993c4f1ef1e71d0e
sha256:
33259fd66a9ebfad9b13359002753844cebe9e976ecd5f719faf71a75fd82cdd

uboot.2016.05-tld-1.nsa320.bodhi.tar
md5:
a7834cba839c31538172f49252ba5213
sha256:
c980e02162a1dd7690eabb193c0326ccac92feb9c0911aba9907fd54ad9ec41c

uboot.2016.05-tld-1.nsa310s.bodhi.tar
md5:
5abca0109cda5e5c4314590b54e4c0e4
sha256:
b8c14be691ce57b38ad953232face3ae923967fe81567497372aa3c17cf9cf7d

uboot.2016.05-tld-1.nsa310.bodhi.tar
md5:
38a02d1c99c70933ff40b74cf4409ff4
sha256:
8cdaa1d5f1c423fbcc4561e34911a84c3403a8c7abb0f122c598821dbe7a302a

uboot.2016.05-tld-1.sheevaplug.bodhi.tar
md5:
18618f756427ebcb21ce2643252755c7
sha256:
0942e58fc0aecea7a853cab3057f2418533defdd243cf412d0e39e66e5d9a1c0

Each archive contains the uBoot image only.


A. Flashing Instruction:


Installation is the same for each u-Boot image, the instruction below is written to include all boxes. So choose the platform name that you are installing for, and copy/paste the appropriate commands.

If you are running kernel that do not provide mtd-utils and uboot-tools (fw_setenv, fw_printenv, flash_erase, nandwrite), you can download the NAND and U-Boot tools binaries here in this thread.

1. uBoot envs config must be defined as followed in your /etc/fw_env.config

cat /etc/fw_env.config
 # MTD device name	Device offset	Env. size	Flash sector size	Number of sectors 
/dev/mtd0 0xc0000 0x20000 0x20000

- And your mtd partitions should be:

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

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 importan 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 (0x 00100000) or greater then it will be OK:
mtd0: 00100000 00020000 "u-boot"

2. Make sure ethaddr is set in uBoot env. It must be set before rebooting the system. However, if you plan to flash the default envs image in step 8 (Flashing default u-boot envs image), then no need to worry about it now. It can be set after you've booted in to Linux. The MAC address will be set to a valid randomly generated local address.
fw_printenv ethaddr

3. Be sure to save your current uBoot image in mtd0, or have a backup image saved somewhere as precaution. And save your current u-boot envs with fw_printenv, or just copy/paste the listing into a text file. Note the nanddump command below allows future restoration to the same box you're backing up, and also can be used to restore a differrent box's mtd0 if needed.

Dumping NAND mtd0:
nanddump --noecc --omitoob -l 0x80000 -f mtd0 /dev/mtd0
Save envs (stock OS might not have fw_printenv, so try blparam):
fw_printenv > current_envs.txt
or
/usr/local/cloudengines/bin/blparam >  current_envs.txt

4. Be sure there is no bad block in the first 1M of your NAND (check dmesg). This is very important, if there is bad block in the first 1M (8 blocks), don't flash u-boot, because you will almost certainly brick your box. Please post your question here (there is a work around for it).

Example of bad block in mtd0:
dmesg | grep -i 'bad'

[    2.413231] Scanning device for bad blocks
[    2.417731] Bad eraseblock 3 at 0x000000060000

This bad block is the 4th block which resides within mtd0 (block 0 to block 7). So u-boot should not be flashed.

5. Extract the archive to /tmp

Among the tar commands below, be careful and execute only one tar command corresponding to your platform that you are installing to, using the tar file that you have downloaded before starting the flashing instruction. Beware of the similar sounding name of different u-boots (nsa310s and nsa310 are two different u-boots).
cd /tmp
tar -xf uboot.2016.05-tld-1.dockstar.bodhi.tar
tar -xf uboot.2016.05-tld-1.goflexhome.bodhi.tar
tar -xf uboot.2016.05-tld-1.goflexnet.bodhi.tar
tar -xf uboot.2016.05-tld-1.iconnect.bodhi.tar
tar -xf uboot.2016.05-tld-1.netgear_ms2110.bodhi.tar
tar -xf uboot.2016.05-tld-1.pogo_e02.bodhi.tar
tar -xf uboot.2016.05-tld-1.pogo_v4.bodhi.tar
tar -xf uboot.2016.05-tld-1.sheevaplug.bodhi.tar
tar -xf uboot.2016.05-tld-1.nsa320.bodhi.tar
tar -xf uboot.2016.05-tld-1.nsa325.bodhi.tar
tar -xf uboot.2016.05-tld-1.nsa310s.bodhi.tar
tar -xf uboot.2016.05-tld-1.nsa310.bodhi.tar

Be extra careful with the next 2 commands in step 6 and 7, you should see output that look like below in those steps. If there is error, then do not reboot, post your problem here so we can help.

6. Erase mtd0
flash_erase /dev/mtd0 0 4
Expected output:
Erase Total 4 Units 
Performing Flash Erase of length 131072 at offset 0x60000 done

7. Write image to NAND

Among the nandwrite commands below, be extra careful and execute only one nandwrite command corresponding to your platform that you are installing to, using the kwb file that you have extracted in step 5. Please double check to make sure the file is for the correct platform. Especially the similar sounding names (e.g. nsa310s and nsa310 are different u-boots).

nandwrite /dev/mtd0 uboot.2016.05-tld-1.dockstar.mtd0.kwb
nandwrite /dev/mtd0 uboot.2016.05-tld-1.goflexhome.mtd0.kwb
nandwrite /dev/mtd0 uboot.2016.05-tld-1.goflexnet.mtd0.kwb
nandwrite /dev/mtd0 uboot.2016.05-tld-1.iconnect.mtd0.kwb
nandwrite /dev/mtd0 uboot.2016.05-tld-1.netgear_ms2110.mtd0.kwb
nandwrite /dev/mtd0 uboot.2016.05-tld-1.pogo_e02.mtd0.kwb
nandwrite /dev/mtd0 uboot.2016.05-tld-1.pogo_v4.mtd0.kwb
nandwrite /dev/mtd0 uboot.2016.05-tld-1.sheevaplug.mtd0.kwb
nandwrite /dev/mtd0 uboot.2016.05-tld-1.nsa320.mtd0.kwb
nandwrite /dev/mtd0 uboot.2016.05-tld-1.nsa325.mtd0.kwb
nandwrite /dev/mtd0 uboot.2016.05-tld-1.nsa310s.mtd0.kwb
nandwrite /dev/mtd0 uboot.2016.05-tld-1.nsa310.mtd0.kwb

Expected output:
Writing data to block 0 at offset 0x0 
Writing data to block 1 at offset 0x20000 
Writing data to block 2 at offset 0x40000 
Writing data to block 3 at offset 0x60000

8. Flashing default u-boot envs image:

As described in step 1, u-boot envs must be defined in etc/fw_env.config as

# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors 
/dev/mtd0 0xc0000 0x20000 0x20000

A special section (B. Flashing default u-boot envs image) about flashing default u-boot envs is included at the end of this installation procedure. Please follow the instruction in this section B to perform this step before continuing with step 9.

9. For sanity check, print out uBoot envs to see if they look OK.
fw_printenv
and then double check the ethaddr env again to be sure. Don't reboot if there is error while listing U-Boot envs.

10. Set up netconsole. It's important to set up neconsole if you don't already have serial console connected. If you've flashed the default environments in step 8 then activate netconsole with the following envs:

fw_setenv preboot_nc 'setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi'
fw_setenv preboot 'run preboot_nc'
fw_setenv ipaddr    '192.168.0.xxx'
fw_setenv serverip '192.168.0.yyy'

where the 192.168.0.xxx is this plug IP address, and 192.168.0.yyy is the IP address of the netconsole server where it will monitor the output from the this plug (adjust them to the real values in your own local network settings).

11. Reboot. Upon reboot, in either serial console or netconsole, uBoot banner should show:

U-Boot 2016.05-tld-1 (Jun 12 2016 ….)
<your box name>


B. Flashing default u-boot envs image

This default envs image supports booting with multiple disk drives (and hubs) attached. The disk drives could be any type (usb, sata, sd card). The scanning logic and default envs were set to automatically boot the box with the following required configuration:

For whatever reason, if you can't set up your configuration to satisfy the following 4 requirements, then don't flash this defaut envs image. It might not boot properly. In this case, section C below can be used to tailor the envs to your specific configuration.

r1. There must be only one partition among all partitions from all drives that contains the kernel files. The 2 kernel files are /boot/uImage and /boot/uInitrd.
r2. The partition that contains the 2 kernel files must be partition 1 in a disk drive
r3. The partition that contains the rootfs must be labeled rootfs
r4. The rootfs partition is recommended to be type Ext3 (this is not a hard requirement, ext4 should boot OK, but Ext3 will ensure no problem).

So the bottom line is if you have only one rootfs in a single Ext3 partition, which is labeled as rootfs, then you're all set.

a. Download the default u-boot envs at Dropbox:

uboot.2016.05-tld-1.environment.bodhi.tar
md5:
3823eef10011b864859d31a76470e0e3
sha256:
c8db95a4225e8d78bdaaaa372bd5a87e4b98f3448dd9c62fc96c72b2df1a997c

This tarball includes 3 files:

uboot.2016.05-tld-1.environment.img (the default envs image to be flashed)
uboot.2016.05-tld-1.environment (the content of the default envs in text format)
uboot.2016.05-tld-1.environment.64K.img (small envs image to be flashed on HP T5325 only).

b. Extract the archive to /tmp
cd /tmp
tar -xf uboot.2016.05-tld-1.environment.bodhi.tar

c. Save current envs with fw_printenv, or just copy/paste the listing into a text file.
fw_printenv > current_envs.txt

d. Flash u-boot envs to NAND location 0xC0000.

Be extra careful with the next 2 commands, you should see output that look like below. If there is error, then do not reboot, post your problem here so we can help.

/usr/sbin/flash_erase /dev/mtd0 0xc0000 1
Expected output:
Erase Total 1 Units
Performing Flash Erase of length 131072 at offset 0xc0000 done

/usr/sbin/nandwrite -s 786432 /dev/mtd0 uboot.2016.05-tld-1.environment.img
Expected output:
Writing data to block 6 at offset 0xc0000

e. Modify the following u-boot variables using fw_setenv:

Note that setting arcNumber and machid are not necessary if you are booting with FDT kernel 3.17+ in the latest kernel and rootfs thread. But it's required for non-FDT kernel.

Also note that only some boxes need machid, some don't (so the command fw_setenv machid below clears them).

for Pogo V4/Mobile:
fw_setenv arcNumber 3960
fw_setenv machid f78

for iConnect:
fw_setenv arcNumber 2870
fw_setenv machid

for Stora:
fw_setenv arcNumber 2743
fw_setenv machid

for Dockstar:
fw_setenv arcNumber 2998
fw_setenv machid

for Pogo E02:
fw_setenv arcNumber 3542
fw_setenv machid dd6

for GoFlex Home:
fw_setenv arcNumber 3338
fw_setenv machid


for GoFlex Net:
fw_setenv arcNumber 3089
fw_setenv machid

for Sheevaplug:
fw_setenv arcNumber 2097
fw_setenv machid

for NSA325:
fw_setenv arcNumber 4495
fw_setenv machid

for NSA320:
fw_setenv arcNumber 3956
fw_setenv machid

for NSA310S/320S:
fw_setenv arcNumber 4931
fw_setenv machid

for NSA310:
fw_setenv arcNumber 4022
fw_setenv machid


Then for all boxes, restore these 2 envs using the saved envs text in step c (replace xxx with the real saved values)
fw_setenv mtdparts 'xxxxxxxxx'
fw_setenv ethaddr 'xx:xx:xx:xx:xx:xx'

Note: for boxes that boot with SATA as rootfs. Please make this adjustment if your boot drive is SATA:
fw_setenv bootcmd_uenv 'run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3'
(This will help the "ide reset" to work properly. There seems to be a bug in u-boot that if you do "ide reset" too quickly in succession, the SATA drive might have problem spinning up).

f. Adjust the DTB name to boot with a rootfs that has FDT kernel (this is the normal case):

Find your box DTB file in the rootfs /boot/dts directory and adjust the env to it. For example, if the box is the Dockstar
fw_setenv dtb_file '/boot/dts/kirkwood-dockstar.dtb'

In the special case when you are booting with a non-FDT kernel, or if you have appended the DTB to uImage. Remove the DTB file env. If not sure please post question before continuing.
fw_setenv dtb_file

h. List you envs again to make sure you've not missed any of the old envs that you might have adjusted to your box. Now is the time to restore those box- specific u-boot envs. Hint: if you changed u-boot envs while in Debian with fw_setenv, fw_printenv will list the modified envs at the end of the output.
fw_printenv

If there is error in listing u-boot envs, stop here and post your problem so we can help.

Remember to save away your old envs text file created in step c for future reference in case more need to be restored.

i. Done.

C. Add uEnv.txt to /boot directory

Create a text file in /boot directory with the content in the format that u-boot envs are listed.

Examples:

These 4 examples are only to demonstrate the syntax in uEnv.txt (they might or might not apply to your current settings):

- Load appropriate DTB file for the kernel to run GoFlex Net box.
- Use only USB drives for kernel and rootfs during booting
- Use SD card, USB and SATA for booting. The kernel and rootfs search order is as they are appeared on the list: mmc, usb, ide.
- Define that there are 8 storage devices (i.e. disk partitions).

cat /boot/uEnv.txt
dtb_file=/boot/dts/kirkwood-goflexnet.dtb
devices=usb
devices=mmc usb ide
disks=0 1 2 3 4 5 6 7


DONE.


========= Below are old posts, kept for posterity =============


2015.10 U-Boot for FDT and Non-FDT Kirkwood Kernel - GoFlexNet, GoFlexHome, PogoE02, Dockstar, iConnect, NetgearStora, PogoV4/Mobile, Sheevaplug, NSA325, NSA320, NSA310S/320S, NSA310, HP-T5325.

Note 1: The NetgearStora u-boot have not been tested in actual hardware. Please report your finding if you install (please try UART booting first) this image in your box.

Note 2: The NSA310 ethernet does not work during u-boot booting.

Note 3: The Sheevaplug u-boot is missing some minor functions (which does not effect booting). But I will upload a new version to incorporate some features such as enabling SATA (for sheevaplugs with eSATA port).

There are only minor changes in functionality from previous version. The major change in this version is to upgrading and tracking the mainline branch.

These images support the following latest U-Boot features (among others):

- both FDT and non-FDT kernel booting
- supports EFI/GPT partition > 2TB (SATA and USB) either for booting or just attached.
- boot Ext4 rootfs
- SNTP (Simple NTP to set date time during U-Boot booting)
- bootz (boot with zImage).
- Ability to customize u-boot envs in a script (uEnv.txt) during boot, without committing changes to NAND (see section D for instruction). This feature also can be used for rescue purpose where the u-boot envs were messed up, or when the NAND envs block is bad.
- The NSA325 u-boot: Power and Copy buttons states are query-able during boot (thanks to davidedg's contribution).

References:

1. U-Boot source code at GitHub (branch 2015.10-kirkwood, sync to released 2015.10 u-boots in this thread)
2. Latest Linux Kernel Kirkwood package and rootfs

Disclaimer

Flashing uBoot to mtd0 could potentially brick your box! please have serial console, or JTAG set up before hand to recover from any mistake or bad flash. The instruction to flash uBoot image to mtd0 is included here. But please proceed only at your own risk. And most important of all, please read the entire post and make sure you understand the procedure before starting. The flashing instruction assumes that you have a beginner's knowledge of how U-Boot works, and how to set U-Boot environment variables to facilitate booting Linux kernel. If this is the first time you are installing U-Boot and dealing with NAND, and/or using U-Boot environment tools, please ask questions before starting.

=======================================================
Last Updated 29 May 2016

I've uploaded 2015.10-tld-2 U-Boot images for the HP Thin Client T5325. Because this box installation is different from other Kirkwood boxes here, please see this thread for download link and installation instruction:
http://forum.doozan.com/read.php?3,26562


=======================================================
Last Updated 13 Nov 2015

I've uploaded 2015.10-tld-1 U-Boot images for Pogo E02, GoFlexNet, GoFlex Home, Dockstar, Pogo V4/Mobile, iConnect, Netgear Stora, Sheevaplug, NSA320, NSA325, NSA310S/320S (same image), and NSA310.

Important Note: If possible, try to test this boot image with UART booting before flashing to NAND. See davygravy's UART booting using kwboot instruction here in this thread. The latest u-boot image released here should be used for UART booting, if your box is the type that supports it (these do not: Dockstar, Pogo E02, iConnect).

To download ARM kwboot binary for UART booting at Dropbox:
kwboot
md5:
0efd011bdb244436e432a8de33e639a1

Download U-Boot images at Dropbox:

uboot.2015.10-tld-1.pogo_e02.bodhi.tar
md5
8ed904b92c745e8edf1795808a4f0f7a

uboot.2015.10-tld-1.goflexnet.bodhi.tar
md5
0db2fe50256f6c9253cf20dfb0652c47

uboot.2015.10-tld-1.goflexhome.bodhi.tar
md5
96f1aa7ed958c4e684fa54035d0ba4d5

uboot.2015.10-tld-1.dockstar.bodhi.tar
md5
296b7bb1ee2da2335510496136bb98a4

uboot.2015.10-tld-1.iconnect.bodhi.tar
md5
08aaf34b7c681b7e08196ecf8ad454f5

uboot.2015.10-tld-1.pogo_v4.bodhi.tar
md5
28c0603a64dc975b420bf7facb4df47d

uboot.2015.10-tld-1.netgear_ms2110.bodhi.tar
md5
24d779e481aaafe5067f71a625fdd506

uboot.2015.10-tld-1.nsa325.bodhi.tar
md5
3a7cf2b0052adc38db744f0f5d7a957d

uboot.2015.10-tld-1.nsa320.bodhi.tar
md5
4b18fa5380b6c654493bfba4aa23acbc

uboot.2015.10-tld-1.nsa310s.bodhi.tar
md5
e1a06853426a2ec33d59ad678d430331

uboot.2015.10-tld-1.nsa310.bodhi.tar
md5
3d755b78d77527563a91cced66ba7b50

uboot.2015.10-tld-1.sheevaplug.bodhi.tar
md5
0e3ac5428ee25dd812a77cc9cb541758


Each archive contains the uBoot image only.


A. Flashing Instruction:

Installation is the same for each u-Boot image, the instruction below is written to include all boxes. So choose the platform name that you are installing for, and copy/paste the appropriate commands.

If you are running kernel that do not provide mtd-utils and uboot-tools tools (fw_setenv, fw_printenv, flash_erase, nandwrite), you can download the NAND and U-Boot tools binaries here in this thread.

1. uBoot envs config must be defined as followed in your /etc/fw_env.config

cat /etc/fw_env.config
 # MTD device name	Device offset	Env. size	Flash sector size	Number of sectors 
/dev/mtd0 0xc0000 0x20000 0x20000

- And your mtd partitions should be:

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

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 importan for booting and it can be adjusted later. For users who like to keep the stock mtds definition, there is no need to adjust it to the above definition. As long as mtd0 is defined as 1MB (0x 00100000) or greater then it will be OK:
mtd0: 00100000 00020000 "u-boot"

2. Make sure ethaddr is set in uBoot env. It must be set before rebooting the system. However, if you plan to flash the default envs image in step 8 (Flashing default u-boot envs image), then no need to worry about it now. It can be set after you've booted in to Linux. The MAC address will be set to a valid randomly generated local address.
fw_printenv ethaddr

If you don't have fw_printenv/fw_setenv, then you are running either stock Pogo OS, or earlier version of Arch Linux ARM. The correct tool to use in this case is blparam in your system.

3. Be sure to save your current uBoot image in mtd0, or have a backup image saved somewhere as precaution. And save your current u-boot envs with fw_printenv, or just copy/paste the listing into a text file. Note the nanddump command below allows future restoration to the same box you're backing up, and also can be used to restore a differrent box's mtd0 if needed.

Dumping NAND mtd0:
nanddump --noecc --omitoob -l 0x80000 -f mtd0 /dev/mtd0
Save envs:
fw_printenv > current_envs.txt
or
blparam >  current_envs.txt

4. Be sure there is no bad block in the first 1M of your NAND (check dmesg). This is very important, if there is bad block in the first 1M (8 blocks), don't flash u-boot, because you will almost certainly brick your box. Please post your question here (there is a work around for it).

Example of bad block in mtd0:
dmesg | grep -i 'bad'

[    2.413231] Scanning device for bad blocks
[    2.417731] Bad eraseblock 3 at 0x000000060000

This bad block is the 4th block which resides within mtd0 (block 0 to block 7). So u-boot should not be flashed.

5. Extract the archive to /tmp

Among the tar commands below, be careful and execute only one tar command corresponding to your platform that you are installing to, using the tar file that you have downloaded before starting the flashing instruction. Beware of the similar sounding name of different u-boots (nsa310s and nsa310 are two different u-boots).
cd /tmp
tar -xf uboot.2015-tld-1.dockstar.bodhi.tar
tar -xf uboot.2015-tld-1.goflexhome.bodhi.tar
tar -xf uboot.2015-tld-1.goflexnet.bodhi.tar
tar -xf uboot.2015-tld-1.iconnect.bodhi.tar
tar -xf uboot.2015-tld-1.netgear_ms2110.bodhi.tar
tar -xf uboot.2015-tld-1.pogo_e02.bodhi.tar
tar -xf uboot.2015-tld-1.pogo_v4.bodhi.tar
tar -xf uboot.2015-tld-1.sheevaplug.bodhi.tar
tar -xf uboot.2015-tld-1.nsa320.bodhi.tar
tar -xf uboot.2015-tld-1.nsa325.bodhi.tar
tar -xf uboot.2015-tld-1.nsa310s.bodhi.tar
tar -xf uboot.2015-tld-1.nsa310.bodhi.tar

Be extra careful with the next 2 commands in step 6 and 7, you should see output that look like below in those steps. If there is error, then do not reboot, post your problem here so we can help.

6. Erase mtd0
flash_erase /dev/mtd0 0 4
Expected output:
Erase Total 4 Units 
Performing Flash Erase of length 131072 at offset 0x60000 done

7. Write image to NAND

Among the nandwrite commands below, be extra careful and execute only one nandwrite command corresponding to your platform that you are installing to, using the kwb file that you have extracted in step 5. Please double check to make sure the file is for the correct platform. Especially the similar sounding names (e.g. nsa310s and nsa310 are different u-boots).

nandwrite /dev/mtd0 uboot.2015-tld-1.dockstar.mtd0.kwb
nandwrite /dev/mtd0 uboot.2015-tld-1.goflexhome.mtd0.kwb
nandwrite /dev/mtd0 uboot.2015-tld-1.goflexnet.mtd0.kwb
nandwrite /dev/mtd0 uboot.2015-tld-1.iconnect.mtd0.kwb
nandwrite /dev/mtd0 uboot.2015-tld-1.netgear_ms2110.mtd0.kwb
nandwrite /dev/mtd0 uboot.2015-tld-1.pogo_e02.mtd0.kwb
nandwrite /dev/mtd0 uboot.2015-tld-1.pogo_v4.mtd0.kwb
nandwrite /dev/mtd0 uboot.2015-tld-1.sheevaplug.mtd0.kwb
nandwrite /dev/mtd0 uboot.2015-tld-1.nsa320.mtd0.kwb
nandwrite /dev/mtd0 uboot.2015-tld-1.nsa325.mtd0.kwb
nandwrite /dev/mtd0 uboot.2015-tld-1.nsa310s.mtd0.kwb
nandwrite /dev/mtd0 uboot.2015-tld-1.nsa310.mtd0.kwb

Expected output:
Writing data to block 0 at offset 0x0 
Writing data to block 1 at offset 0x20000 
Writing data to block 2 at offset 0x40000 
Writing data to block 3 at offset 0x60000

8. Flashing default u-boot envs image:

As described in step 1, u-boot envs must be defined in etc/fw_env.config as

# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors 
/dev/mtd0 0xc0000 0x20000 0x20000

a. If you've previously installed an older release of this u-boot (uboot.201x.xx-tld-x.), or if your u-boot envs is already defined at 0xc0000, then there is no need to flash a new default envs, you can skip this step 8. Optionally, you can go ahead and reflash this default envs and then readjust to your own envs setings. The default envs have been improved in this release.

b. However, if you are installing from a recent release of Arch u-boot (2014.04 or after), you do need to do this step (in effect it is a totally different u-boot like the ones below in paragraph c, even though the envs location looks the same, i.e 0xc0000).

c. A special section (B. Flashing default u-boot envs image) about flashing default u-boot envs is included at the end of this installation procedure. Please follow the instruction in this section B to perform this step before continuing with step 9.

9. For sanity check, print out uBoot envs to see if they look OK.
fw_printenv
and then double check the ethaddr env again to be sure. Don't reboot if there is error while listing U-Boot envs.

10. Set up netconsole. It's important to set up neconsole if you don't already have serial console connected. If you've flashed the default environments in step 8 then activate netconsole with the following envs:

fw_setenv preboot_nc 'setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi'
fw_setenv preboot 'run preboot_nc'
fw_setenv ipaddr    '192.168.0.xxx'
fw_setenv serverip '192.168.0.yyy'

where the 192.168.0.xxx is this plug IP address, and 192.168.0.yyy is the IP address of the netconsole server where it will monitor the output from the this plug (adjust them to the real values in your own local network settings).


11. Reboot. Upon reboot, in either serial console or netconsole, uBoot banner should show:

for GoFlex Net:
U-Boot 2015.10-tld-1 (Nov 06 2015 - 15:49:48 -0800)
Seagate GoFlex Net

for GoFlex Home:
U-Boot 2015.10-tld-1 (Nov 06 2015 - 15:53:00 -0800)
Seagate GoFlex Home

for Pogo E02:
U-Boot 2015.10-tld-1 (Nov 06 2015 - 15:46:25 -0800)
Pogo E02

for Dockstar:
U-Boot 2015.10-tld-1 (Nov 06 2015 - 15:56:21 -0800)
Seagate FreeAgent DockStar

for iConnect:
U-Boot 2015.10-tld-1 (Nov 06 2015 - 15:59:30 -0800)
Iomega iConnect

for Netgear Stora:
U-Boot 2015.10-tld-1 (Nov 06 2015 - 16:06:22 -0800)
Netgear-MS2110

for Pogo V4/Mobile:
U-Boot 2015.10-tld-1 (Nov 06 2015 - 16:02:55 -0800)
Pogoplug V4

for Sheevaplug:
U-Boot 2015.10-tld-1 (Nov 08 2015 - 21:01:07 -0800)
Marvell-Sheevaplug

for NSA325:
U-Boot 2015.10-tld-1 (Nov 06 2015 - 16:09:38 -0800)
ZyXEL NSA325 2-Bay Power Media Server

for NSA320:
U-Boot 2015.10-tld-1 (Nov 06 2015 - 16:12:51 -0800)
ZyXEL NSA320 2-Bay Power Media Server

for NSA310S/320S:
U-Boot 2015.10-tld-1 (Nov 06 2015 - 16:16:11 -0800)
ZyXEL NSA310S/320S 1/2-Bay Power Media Server

for NSA310:
U-Boot 2015.10-tld-1 (Nov 06 2015 - 16:19:43 -0800)
ZyXEL NSA310 1-Bay Power Media Server


B. Flashing default u-boot envs image

This default envs image supports booting with multiple disk drives (and hubs) attached. The disk drives could be any type (usb, sata, sd card). The scanning logic and default envs were set to automatically boot the box with the following required configuration:

For whatever reason, if you can't set up your configuration to satisfy the following 4 requirements, then don't flash this defaut envs image. It might not boot properly. In this case, section D below can be used to tailor the envs to your specific configuration.

r1. There must be only one partition among all partitions from all drives that contains the kernel files. The 2 kernel files are /boot/uImage and /boot/uInitrd.
r2. The partition that contains the 2 kernel files must be partition 1 in a disk drive
r3. The partition that contains the rootfs must be labeled rootfs
r4. The rootfs partition is recommended to be type Ext3 (this is not a hard requirement, ext4 should boot OK, but Ext3 will ensure no problem).

So the bottom line is if you have only one rootfs in a single Ext3 partition, which is labeled as rootfs, then you're all set.

a. Download the default u-boot envs at Dropbox:

uboot.2014.07-tld-3.environment.bodhi.tar
md5
8d53c30918510e0f1ea89d889a3f6f8e

This tarball includes 2 files:

uboot.2014.07-tld-3.environment.img (the default envs image to be flashed)
uboot.2014.07-tld-3.environment (the content of the default envs in text format)

b. Extract the archive to /tmp
cd /tmp
tar -xf uboot.2014.07-tld-3.environment.bodhi.tar

c. Save current envs with fw_printenv, or just copy/paste the listing into a text file.
fw_printenv > current_envs.txt

d. Flash u-boot envs to NAND location 0xC0000.

Be extra careful with the next 2 commands, you should see output that look like below. If there is error, then do not reboot, post your problem here so we can help.

/usr/sbin/flash_erase /dev/mtd0 0xc0000 1
Expected output:
Erase Total 1 Units
Performing Flash Erase of length 131072 at offset 0xc0000 done

/usr/sbin/nandwrite -s 786432 /dev/mtd0 uboot.2014.07-tld-3.environment.img
Expected output:
Writing data to block 6 at offset 0xc0000

e. Modify the following u-boot variables using fw_setenv:

Note that setting arcNumber is optional if you are booting with kernel 3.17+ in the latest kernel and rootfs thread. But it's required for non-FDT kernel.

Also note that only some boxes need machid, some don't (so the command fw_setenv machid below clears them).

for Pogo V4/Mobile:
fw_setenv arcNumber 3960
fw_setenv machid f78

for iConnect:
fw_setenv arcNumber 2870
fw_setenv machid

for Stora:
fw_setenv arcNumber 2743
fw_setenv machid

for Dockstar:
fw_setenv arcNumber 2998
fw_setenv machid

for Pogo E02:
fw_setenv arcNumber 3542
fw_setenv machid dd6

for GoFlex Home:
fw_setenv arcNumber 3338
fw_setenv machid


for GoFlex Net:
fw_setenv arcNumber 3089
fw_setenv machid

for Sheevaplug:
fw_setenv arcNumber 2097
fw_setenv machid

for NSA325:
fw_setenv arcNumber 4495
fw_setenv machid

for NSA320:
fw_setenv arcNumber 3956
fw_setenv machid

for NSA310S/320S:
fw_setenv arcNumber 4931
fw_setenv machid

for NSA310:
fw_setenv arcNumber 4022
fw_setenv machid


Then for all boxes, restore these 2 envs using the saved envs text in step c (replace xxx with the real saved values)
fw_setenv mtdparts 'xxxxxxxxx'
fw_setenv ethaddr 'xx:xx:xx:xx:xx:xx'

NOTE: I forgot one little detail for boxes that boot with SATA as rootfs. Please make this adjustment if your boot drive is SATA:
fw_setenv bootcmd_uenv 'run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3'
(This will help the "ide reset" to work properly. There seems to be a bug in u-boot that if you do "ide reset" too quickly in succession, the SATA drive might have problem spinning up).

f. Adjust the DTB name to boot with a rootfs that has FDT kernel (this is the normal case):

Find your box DTB file in the rootfs /boot/dts directory and adjust the env to it. For example, if the box is the Dockstar
fw_setenv dtb_file '/boot/dts/kirkwood-dockstar.dtb'

In the special case when you are booting with a non-FDT kernel, or if you have appended the DTB to uImage. Remove the DTB file env. If not sure please post question before continuing.
fw_setenv dtb_file

h. For sanity check, list you envs again
fw_printenv

If there is error in listing u-boot envs, stop here and post your problem so we can help.

Remember to save away your old envs text file created in step c for future reference in case more need to be restored.

i. Done.

C. this section was deprecated

D. Add uEnv.txt to /boot directory

Create a text file in /boot directory with the content in the format that u-boot envs are listed.

Examples:

These 4 examples are only to demonstrate the syntax in uEnv.txt (they might or might not apply to your current settings):

- Load appropriate DTB file for the kernel to run GoFlex Net box.
- Use only USB drives for kernel and rootfs during booting
- Use SD card, USB and SATA for booting. The kernel and rootfs search order is as they are appeared on the list: mmc, usb, ide.
- Define that there are 8 storage devices (i.e. disk partitions).

cat /boot/uEnv.txt
dtb_file=/boot/dts/kirkwood-goflexnet.dtb
devices=usb
devices=mmc usb ide
disks=0 1 2 3 4 5 6 7


DONE.


========= Below are old posts, kept for posterity =============


-----------------------------------
Updated 30 Aug 2015

I've uploaded the Zyxel NSA310S/320S u-boot-2014.07-tld-4 image.

The installation instruction is the same for the NSA310S/320S as for other boxes that have a different stock env location: iConnect, Pogo V4/Mobile, and Netgear Stora. In the instruction below (First Updated 21 Dec 2014), I’ve modified it to include this new release.

Caveat: the NSA320S currently has a problem with using 3.5" HDD in the 2nd HDD slot. This seems to be a power-related problem, since using a 2.5" HDD in the 2nd slot is working fine.


-----------------------------------
Updated 23 Aug 2015

I've uploaded the Pogopug E02 u-boot-2014.07-tld-3 image.

This version added the enhancement that allows booting stock Pogo OS. If you don't intend to boot stock Pogo OS, there is no need to upgrade to this version.

The installation instruction is the same for the Pogoplug E02 as for other boxes. In the instruction below (First Updated 21 Dec 2014), I’ve modified it to include this new release.

-----------------------------------
Updated 04 Aug 2015

I've uploaded the Zyxel NSA320 u-boot-2014.07-tld-4 image.

This version solves the PHY problem after the NSA320 was shutdown and no Ethernet link upon power up (also seen in other Zyxel NSA3xx boxes that use the same Marvell MV88E1318 or MV88E1318S Ethernet chip). This was the real root cause for netconsole problem previously reported.

The installation instruction is the same for the NSA320 as for other boxes that have a different stock env location: iConnect, Pogo V4/Mobile, and Netgear Stora. In the instruction below (First Updated 21 Dec 2014), I’ve modified it to include this new release.

-----------------------------------
Updated 02 Aug 2015

I’ve uploaded the NSA325 u-boot 2014.07-tld-4 image.

This version solves the PHY problem after the NSA325 was shutdown and no Ethernet link upon power up (also seen in other Zyxel NSA3xx boxes that use the same Marvell MV88E1318 or MV88E1318S Ethernet chip). This was the real root cause for netconsole problem previously reported.

The installation instruction is the same for the NSA325 as for other boxes that have a different stock env location: iConnect, Pogo V4/Mobile, and Netgear Stora. In the instruction below (First Updated 21 Dec 2014), I’ve modified it to include this new release.

-----------------------------------
Updated 24 Mar 2015

I’ve uploaded the NSA325 and NSA320 u-boot 2014.07-tld-3 images. These 2 images were built using patch extracted from WarheadsSE u-boot-kirkwood GitHub for 2013.10 version, modified, and rebased to 2014.07 in my u-boot-kirkwood GitHub.

The installation instruction is the same for the NSA325/320 as for other boxes that have a different stock env location: iConnect, Pogo V4/Mobile, and Netgear Stora. In the instruction below (First Updated 21 Dec 2014), I’ve modified it to include the new 2 images.

Warning: netconsole seems to be broken in these 2 images. Stay tune, I am troubleshooting this problem!


-----------------------------------------------------------------------------------------------------------------
This post was getting too large, so I had to remove old info.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 133 time(s). Last edit at 11/17/2017 03:42PM by bodhi.
Re: U-Boot for Device-Tree Kernel
May 11, 2013 07:18PM
@syong,

Re http://forum.doozan.com/read.php?3,12218,12378#msg-12378
Reset_phys does not seems to be the problem. I think it might be a bug in hush parser.
Re: U-Boot for Device-Tree Kernel
May 12, 2013 08:51AM
If it is hush parser, you should see the problem on the serial console too.

-syong
Re: U-Boot for Device-Tree Kernel
May 12, 2013 01:13PM
Of course you're right! I turned on debug for both netconsole and hush parser. Hush parser works with no problem. Netconsole was the problem since it echos back the incompeted command string before hush takes it.

The strange thing is if I turned on netconsole debug option, then the command was echo back OK (no dropped 2nd char). But still it won't boot with netconsole.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: U-Boot for Device-Tree Kernel
July 05, 2013 12:40AM
I've finally figured out these netconsle problems in the later uBoot versions and how work around them.

Testing with u-boot.2013.07-rc1

1. netconsole input driver seems to regress. Second character in command got lost consistenly. This is due to a recursion logic in drivers/net/netconsole.c that processes characters from a buffer. I modified the recursion logic slightly and it seems to work consistenly, no character dropping. But I also had to leave printf debug code in to slow it down a bit.

2. bootm command is now halting the ethernet NIC before loading kernel if netconsole is running :) a significant change from the version that Davygravy worked on and we are using when installing using Jeffs's script. This causes netconsole driver to choke on trying output to the console, and bootm never got executed. This bootm problem has been reported in uBoot news group a few months ago. I did not understand the problem enough when reading the posts, so I assumed that the droping of character somehow caused booting problem, but they are actually 2 different issues.

The work around for this 2nd problem is not robust, but it would get netconsole working well enough: turn off netconsole in uBoot env script right before bootm is executed.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: U-Boot for Device-Tree Kernel
July 05, 2013 05:45PM
Please see 1st post for an uploaded uBoot image for GoFlex Net.
Re: U-Boot for Device-Tree Kernel
July 17, 2013 02:24PM
can it be used on NSA320?
Re: U-Boot for Device-Tree Kernel
July 17, 2013 11:23PM
gaogao Wrote:
-------------------------------------------------------
> can it be used on NSA320?

No, this version is for GoFlex Net only. It could be used for GoFlex Home, though.
The reason: each uBoot image is built using the board file for that hardware. So when you run Jeff's install script, it actually selects the right version for you.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Newer U-Boot for FDT and Non-FDT Kernel
July 18, 2013 05:48AM
tks, hopefully these changes will soon be incorporated in Jeff's packages.
josef
Re: Newer U-Boot for FDT and Non-FDT Kernel
July 19, 2013 03:22PM
Hello there, first of all: Thanks for your work.
Second: I got a problem. I wanted to upgrade to bootloader in order to be able to boot newer stock kernels. My old system was running a 2.6.39 kernel flawlessly; I had the bootloader configured to boot from the second partition. also the rescue system v2 is installed if I recall correctly.
Then, in order to upgrade, I followed all of your steps; no errors so far.
But now, after the first reboot and, since then, several retries, it wont boot anymore :(
First, the green led blinks, and it reads something from the hdd, then it goes instantly to constant orange and stays there.
If I rename uImage to a invalid filename, it still reads something from the disk; but after the green blinking follows orange blinking and then constant orange. -> So it seems like it still reads the kernel from the correct partition, but wont move on.
Without a HDD, the sequence is green blinking->orange blinking->constant orange. Normally in his case it should boot the rescue system; but the dockstar isnt reachable over network.
Unfortunately, I dont have a serial console :( Maybe someone of you knows what's going wrong?

Here is the output of fw_printenv before the bootloader-upgrade:

ethact=egiga0
bootdelay=3
baudrate=115200
mainlineLinux=yes
console=ttyS0,115200
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
mtdids=nand0=orion_nand
partition=nand0,2
stdin=serial
stdout=serial
stderr=serial
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
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
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
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
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
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
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_list=1 2 3 4
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_init=run usb_scan
usb_device=0:1
usb_rootfstype=ext2
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
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
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
ethaddr=00:10:75:1A:CD:52
rescue_installed=1
arcNumber=2998
usb_root=/dev/sda2
usb_scan_1=usb=0:2 dev=sda2

After the upgrade I only checked the last line of the output; and since it was the same as before I figured that everything in the environment was ... but maybe I was too light-headed there? :(
I hope that someone can help me, as I really like this little thingy

Thank you in advance
Josef
Re: Newer U-Boot for FDT and Non-FDT Kernel
July 19, 2013 04:19PM
Josef,

Since you don't have serial console, netconsole is a must before attempting to change any thing in uBoot. Even that, serial console is strongly recommended :)
Do you keep a log of what's going on during the installation?

To get it boot back to Debian to troubleshoot, use this 3.8.11 rootfs in this thread:
http://forum.doozan.com/read.php?2,12096
See this section:
Updated 19 June 2013: 
Basic minimal Debian Kirkwood rootfs with kernel 3.8.11 for 
Dockstar, Pogoplug E02/Mobile/V4, GoFlex Home/Net, iConnect, NSA320.

Prepare this rootfs on an empty USB stick, using another Linux box or Live CD.
Since your uBoot env for rootfs type is Ext2, if it does not boot you might want to convert this 3.8.11 rootfs to Ext2 and try again.

-bodhi
===========================
Forum Wiki
bodhi's corner
Josef
Re: Newer U-Boot for FDT and Non-FDT Kernel
July 19, 2013 04:57PM
Dear bodhi,

oh my god I am happy now!
Extracted it to second partition (ext2) and - badang! - constant green led and a few typical hard drive reads - looks like its booting up again! :) thank you for your quick help! I wont try connect right now though since I am very tired, but tomorrow.
I am also aware that I was acting very careless ;)

But I do not understand why it didn't work with the old debian. Since it was a 2.6.39 kernel, I figure it was a NFDT kernel, like your kernel also is. Plus, before the bootloader upgrade it worked. So why does your rootfs work and my debian not? As I want to install debian again, it is important to know where I must be careful.
Thank you!

- Josef
Josef
Re: Newer U-Boot for FDT and Non-FDT Kernel
July 19, 2013 05:09PM
Also, which recovery system could i flash into NAND? Since the old one isn't working anymore
Re: Newer U-Boot for FDT and Non-FDT Kernel
July 19, 2013 05:48PM
Josef,

Your arcNumber is 2998, meaning it is for the Dockstar, not GoFlexNet. When you boot your old 2.6.39, it set your box as a Dockstar, which is OK. The new uBoot is GoFlex Net version, so your arcNumber needs to be set to 3089 to be correct. But don't change arcNumber yet because you have to boot with a kernel that supports it after you've done that. Using my rootfs, it will work with 3089. Stock kernel does not have GoFlex Net support for non-FDT, looks like it has FDT (but I'm not sure if it is completed). So you will need to decide what you want to do.

So get your netconsole working first and you will not be locked out with uBoot that has this enable. Once you have netconsole, rescue system is nice to have, but not as important as before.

-bodhi
===========================
Forum Wiki
bodhi's corner
Josef
Re: Newer U-Boot for FDT and Non-FDT Kernel
July 21, 2013 12:13PM
Ugh I completely overread that this was for GoFlexNet only. Went now back to a Dockstar Bootloader (however, this time with the L2-Cache Bug resolved so I can atleast boot 3.2 kernels) since this seems cleaner to me than pretending it to be a GoFlexNet and installed Debian wheezy.
In another thread I read that you have the same (FDT-able) bootloader for dockstar, but not released, since you couldn't test it yet. Would you mind releasing it somewhere here, (WITH A BIG WARNING SIGN THAT ITS UNTESTED)? When I have more time on my hands I may attach a serial console and see where this leads. Also, I presume that your bootloader also has the L2-Bug resolved (like the one Jeff's script is using)?

Thank you for your help!

Josef
Re: Newer U-Boot for FDT and Non-FDT Kernel
July 21, 2013 02:41PM
Josef,

So you do have Dockstar, I thought you have a GoFlex Net? :)

About the Dockstar uBoot image, it was a little old and with the netconsole input problem. I could build a new version, and try a sanity check on a GoFlex Net with UART booting (I don't have JTAG connection for my Dockstar). Yes, I will post it here as an untested image.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: U-Boot for Device-Tree Kernel
July 26, 2013 02:24AM
bodhi Wrote:
-------------------------------------------------------
> gaogao Wrote:
> --------------------------------------------------
> -----
> > can it be used on NSA320?
>
> No, this version is for GoFlex Net only. It could
> be used for GoFlex Home, though.
> The reason: each uBoot image is built using the
> board file for that hardware. So when you run
> Jeff's install script, it actually selects the
> right version for you.

Thanks for all of your Work!

will you release an uboot which is compatible with the nsa 320?

- syro
Re: U-Boot for Device-Tree Kernel
July 26, 2013 11:56PM
syro Wrote:
-------------------------------------------------------
> bodhi Wrote:
> --------------------------------------------------
> -----
> > gaogao Wrote:
> >
> --------------------------------------------------
>
> > -----
> > > can it be used on NSA320?
> >
> > No, this version is for GoFlex Net only. It
> could
> > be used for GoFlex Home, though.
> > The reason: each uBoot image is built using the
> > board file for that hardware. So when you run
> > Jeff's install script, it actually selects the
> > right version for you.
>
> Thanks for all of your Work!
>
> will you release an uboot which is compatible with
> the nsa 320?
>
> - syro

No, not likely. I have not looked to see whether board file is available.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: U-Boot for Device-Tree Kernel
July 27, 2013 04:05AM
bodhi Wrote:
-------------------------------------------------------
> syro Wrote:
> --------------------------------------------------
> -----
> > bodhi Wrote:
> >
> --------------------------------------------------
>
> > -----
> > > gaogao Wrote:
> > >
> >
> --------------------------------------------------
>
> >
> > > -----
> > > > can it be used on NSA320?
> > >
> > > No, this version is for GoFlex Net only. It
> > could
> > > be used for GoFlex Home, though.
> > > The reason: each uBoot image is built using
> the
> > > board file for that hardware. So when you run
> > > Jeff's install script, it actually selects
> the
> > > right version for you.
> >
> > Thanks for all of your Work!
> >
> > will you release an uboot which is compatible
> with
> > the nsa 320?
> >
> > - syro
>
> No, not likely. I have not looked to see whether
> board file is available.

hm ok :-( well thanks for all of your work! do you think that there will be an uboot rls which supports gpt?
Re: U-Boot for Device-Tree Kernel
July 27, 2013 04:27PM
@syro,

If you're looking for non-FDT kernel booting, then davygravy already has it. But if you're looking for GPT and FDT-kernel booting, I could not find the board file in uBoot source code, so that has to come from either Zyxel, or Davy.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Newer U-Boot for FDT and Non-FDT Kernel
September 10, 2013 11:51PM
How to boot Debian FDT kernel using the new uBoot

In this example, the rootfs is on a USB drive (The old uBoot was installed using Jeff's script) The new uBoot is in the first post of this thread.

- Copy the board file kirkwood-goflexnet.dtb to /boot

- Change uBoot envs to load dtb file along with the uImage and uInitrd:

dt_load_dtb=ext2load usb 0:1 0x1c00000 /boot/kirkwood-goflexnet.dtb
dt_load_initrd=ext2load usb 0:1 0x1100000 /boot/uInitrd
dt_load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
dt_usb_boot=run dt_load_dtb; run dt_load_uimage; run dt_load_initrd; bootm 0x800000 0x1100000 0x1c00000
dt_usb_bootcmd=usb start; run usb_init; run usb_set_bootargs; run dt_usb_boot
usb_bootcmd=run dt_usb_bootcmd

Note the change in usb_bootcmd. It was originally:
usb_bootcmd=usb start; run usb_init; run usb_set_bootargs; run usb_boot

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 11/16/2013 03:25PM by bodhi.
Re: Newer U-Boot for FDT and Non-FDT Kernel
September 11, 2013 12:13PM
Hi bodhi,

What would be the procedure for Seagate Dockstar? Or more specifically migrating from non-FDT uBoot 2011 to a newer uBoot that does support FDT.

Thanks.
Re: Newer U-Boot for FDT and Non-FDT Kernel
September 11, 2013 10:33PM
duduke Wrote:
-------------------------------------------------------
> Hi bodhi,
>
> What would be the procedure for Seagate Dockstar?
> Or more specifically migrating from non-FDT uBoot
> 2011 to a newer uBoot that does support FDT.
>
> Thanks.

duduke,

There are 2 options:

1. New uBoot with FDT config option
2. Linux kernel compiled with FDT otion.
3. Make the board file.
4. Update the kernel, and copy the board file from kernel compilation (similar to GoFlex Net dtb file above) to rootfs.
5. uBoot envs changes (similar to GoFlex Net above).

or

1. Same uBoot as now.
2. Linux kernel compiled with FDT otion and CONFIG_ARM_APPENDED_DTB.
3. Update the kernel, make the board file, append the board file from kernel compilation (similar to GoFlex Net dtb file above) to zImage.
4. Make uImage

So the bottom line is if you have a newer uBoot then it's much simpler to deal with it. I could compile the Dockstar uBoot with FDT option and upload it. But I don't have JTAG connected to the Dockstar so I can't test it. I don't want people to risk bricking their box so I did not upload something that I'm not sure will work :)

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Newer U-Boot for FDT and Non-FDT Kernel
November 16, 2013 01:53AM
I've uploaded a new uBoot 2013.10 image for GoFlex Net. Please see 1st post for download link, description, and installation instruction.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: 2013.10 U-Boot for FDT and Non-FDT Kernel - GoFlex Net
November 16, 2013 12:27PM
Hi bodhi

I have tried to download the files couple time.
When I try to open it shows error

tar -xjf uboot.2013.10.goflexnet.bodhi.tar.bz2
bzip2: (stdin) is not a bzip2 file.
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Re: 2013.10 U-Boot for FDT and Non-FDT Kernel - GoFlex Net
November 16, 2013 01:38PM
Hi markweng,

I used the wrong extension :)! sorry about that. Just use command tar without the j option:
tar -xf uboot.2013.10.goflexnet.bodhi.tar.bz2

Update: Fixed the archive file name to uboot.2013.10.goflexnet.bodhi.tar

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 11/16/2013 02:37PM by bodhi.
Re: 2013.10 U-Boot for FDT and Non-FDT Kernel - GoFlex Net
November 17, 2013 11:50PM
We will drink no wine before its time :) So after testing on my GoFlex Home, I've uploaded the 2013.10 uBoot image for GoFlex Home. Please see 1st post for download link.
Re: 2013.10 U-Boot for FDT and Non-FDT Kernel - GoFlex Net
December 08, 2013 10:26PM
I've uploaded the 2013.10 uBoot image for Pogo E02. Please see 1st post for download link.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: 2013.10 U-Boot for FDT and Non-FDT Kernel - GoFlex Net
December 12, 2013 12:54AM
I'd like to hear any feedback on these uBoot images! did it work? … problem?

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: 2013.10 U-Boot for FDT and Non-FDT Kernel - GoFlex Net/GoFlex Home/Pogo E02
December 14, 2013 04:45PM
I can't find any ide commands in this uBoot. I'm trying to boot from an SSD on a sata interface. Can this uBoot do that?
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: