Mike,
> But - why are my environment variables so
> apparently wrong?
Because you've missed step 8 during installation (or missed parts of step 8).
The red lines were the one you did not do.
> But - why are my environment variables so
> apparently wrong?
Because you've missed step 8 during installation (or missed parts of step 8).
Quote
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.
The red lines were the one you did not do.