_______________________________________________________________________________
THIS GUIDE (AND UBOOT ITSELF) IS DEPRECATED. READ HERE TO UPDATE U-BOOT.
_______________________________________________________________________________
I am basically copying this from doozan's forum and collecting things from a multiple page thread into one post here. (I've changed/added many things since) Doing what is described here may (soft) brick your device (still recoverable with a serial). So stop and think twice. Read the whole guide first before attempting to upgrade and make sure you understand everything and won't miss a step. ACTIVATE NETCONSOLE before rebooting or be stuck waiting for a USB->TTL adapter if something goes wrong. On the bright side you will be able to run kernels past version 3.2 and currently archlinuxarm has kernel version 3.10.10 in the repos (as of this writing).
Dockstar/Pogoplug V1/V2:
Keep in mind that if you just installed alarm then you already have the new U-Boot, so there's no need to do this, except to use a workaround for the arcNumber bug if you have a Pogoplug V2.
Upgrade is very simple:
$this->bbcode_second_pass_code('', 'cd /tmp
wget http://projects.doozan.com/uboot/install_uboot_mtd0.sh
chmod +x install_uboot_mtd0.sh
./install_uboot_mtd0.sh')
There seems to be a bug in this version of the uBoot for Pogoplug V2 (don't know if other devices exhibit the same behavior - reports are welcome) as arcNumber doesn't get passed to the kernel and kernel seems to think it is a sheeva plug. Thanks to bodhi, the workaround is to set machid in hex. (3542 = hex(dd6))
$this->bbcode_second_pass_code('', '/usr/sbin/fw_setenv machid dd6')
This is it. It is highly recommended to enable netconsole for troubleshooting, especially if you don't have a serial - jump to the Enabling netconsole section.
------------------------------------------------------------------------
GoFlex Home/Net:
I do not own GoFlex Net myself so I do not know how well this will work with booting off of the sata drive. Probably only one sata port will work for booting:
$this->bbcode_second_pass_code('', 'cd /tmp
wget http://projects.doozan.com/uboot/install_uboot_mtd0.sh
chmod +x install_uboot_mtd0.sh
./install_uboot_mtd0.sh --no-uboot-check')
It will say that it can't recognize your device. Choose the one that you have from the list. If you choose wrong model you will probably brick your device.
After it is done DO NOT REBOOT!!!
Make sure you have the correct arcNumber set for your device, or you won't be able to boot from sata!
Home: "/usr/sbin/fw_setenv arcNumber 3338"
Net: "/usr/sbin/fw_setenv arcNumber 3089"
Now, depending if you have rootfs on USB or SATA you need to set up U-Boot environemnt differently.
SATA then USB:
The following will allow USB boot, but SATA will be tried first
$this->bbcode_second_pass_code('', '/usr/sbin/fw_setenv sata_device '0:1'
/usr/sbin/fw_setenv sata_root '/dev/sda1'
/usr/sbin/fw_setenv sata_rootfstype 'ext3'
/usr/sbin/fw_setenv sata_rootdelay '10'
/usr/sbin/fw_setenv sata_set_bootargs 'setenv bootargs console=$console root=$sata_root rootdelay=$sata_rootdelay rootfstype=$sata_rootfstype $mtdparts $sata_custom_params'
/usr/sbin/fw_setenv sata_boot 'ide reset; mw 0x800000 0 1; ext2load ide $sata_device 0x800000 /boot/uImage; if ext2load ide $sata_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi'
/usr/sbin/fw_setenv sata_bootcmd 'run sata_set_bootargs; run sata_boot'
/usr/sbin/fw_setenv bootcmd 'run sata_bootcmd; usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset'')
OR
USB then SATA:
The following will allow SATA boot, but USB will be tried first
$this->bbcode_second_pass_code('', '/usr/sbin/fw_setenv sata_device '0:1'
/usr/sbin/fw_setenv sata_root '/dev/sda1'
/usr/sbin/fw_setenv sata_rootfstype 'ext3'
/usr/sbin/fw_setenv sata_rootdelay '10'
/usr/sbin/fw_setenv sata_set_bootargs 'setenv bootargs console=$console root=$sata_root rootdelay=$sata_rootdelay rootfstype=$sata_rootfstype $mtdparts $sata_custom_params'
/usr/sbin/fw_setenv sata_boot 'ide reset; mw 0x800000 0 1; ext2load ide $sata_device 0x800000 /boot/uImage; if ext2load ide $sata_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi'
/usr/sbin/fw_setenv sata_bootcmd 'run sata_set_bootargs; run sata_boot'
/usr/sbin/fw_setenv bootcmd 'usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run sata_bootcmd; run rescue_bootcmd; run pogo_bootcmd; reset'')
----------------------------------------------------------------------------------------------
Note: There are some reports that USB booting does not work while sata drive is in. So there are 2 ways to resolve this:
(Edit: try this first: the solution by mlitke)
1. Remove sata drive before (re)booting and insert it when system has booted up.
2. Create an initial ramdisk which will let you choose the root drive by label instead of /dev/sd[a,b,c,d]1 (the instructions below assume that you've removed the SATA drive and booted off of the flash drive that you will always boot from later)
(a) Download (or create your own) this uInitrd I created (it should survive kernel upgrades as I didn't include any kernel-specific modules in it):
$this->bbcode_second_pass_code('', 'cd /boot
wget http://goo.gl/GFbtn -O uInitrd')
It is also available here: http://www.mediafire.com/file/e6mwdz6bw3nxmjj/uInitrd in case my pogo is down.
(b) $this->bbcode_second_pass_code('', 'chmod 644 /boot/uInitrd')
(c) change the default usb_set_bootargs to this:
$this->bbcode_second_pass_code('', '/usr/sbin/fw_setenv usb_set_bootargs 'setenv bootargs console=$console root=/dev/disk/by-label/urootfs rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params'')
Another Note: Your usb drive needs to have a label "urootfs" whcih can be done with "tune2fs -L urootfs /dev/sda1" while booted into archlinux without the sata drive. You may change it to whatever you want, but then be sure to change root=/dev/disk/by-label/urootfs to the name you want.
Another Note 2: If you are using the new systemd rootfs tarball then rootfs will be mounted read only unless you add an entry into fstab:
$this->bbcode_second_pass_code('', 'LABEL=urootfs / ext3 rw,noatime 0 1')
Activating netconsole (works for all devices)(optional, but recommended to troubleshoot - just do it!):
For all devices: Please refer to this gude on how to use netconsole (not just GoFlex Home users)
$this->bbcode_second_pass_code('', '#U-BOOT Netconsole
/usr/sbin/fw_setenv ipaddr '10.10.10.6'
/usr/sbin/fw_setenv ncip '10.10.10.5'
/usr/sbin/fw_setenv ncipk '10.10.10.4'
/usr/sbin/fw_setenv serverip '10.10.10.3'
/usr/sbin/fw_setenv preboot 'run nc_test nc_start'
/usr/sbin/fw_setenv nc_test 'ping $ncip'
/usr/sbin/fw_setenv nc_start 'setenv stdin nc; setenv stdout nc; setenv stderr nc; version'
#Kernel Netconsole:
#When booting from USB
/usr/sbin/fw_setenv usb_custom_params 'ignore_loglevel netconsole=6665@10.10.10.3/eth0,6666@10.10.10.4/'
#When booting from SATA
/usr/sbin/fw_setenv sata_custom_params 'ignore_loglevel netconsole=6665@10.10.10.3/eth0,6666@10.10.10.4/'')
Setting BFQ as the default I/O scheduler
Since kernel version 3.1.10-15 and 3.6.10-1 this is the default I/O scheduler. No need to do this anymore!
Since kernel version 3.5.4-0 there is a BFQ I/O scheduler compiled in. It is not activated by default. You can either activate it selectively for different drives or activate it globally and make it the default I/O scheduler.
Please note even though that you may see some benefit of using BFQ with a flash drive, the results will be better with a spinning hard drive. SSD/Flash Drives should benefit more from using 'noop' scheduler. This is all theory so do some tests and see what works the best for the workload that you have. Allso note that hdd speed tests will show the same result. The difference is noticeable under some sort of load and multiple applications accessing the same hard drive.
To activate it selectively, read here.
To activate it globally, modification to bootargs u-boot variable is required.
If you had activated netconsole in the previous step:
$this->bbcode_second_pass_code('', '/usr/sbin/fw_setenv usb_custom_params 'ignore_loglevel netconsole=6665@10.10.10.3/eth0,6666@10.10.10.4/ elevator=bfq'
/usr/sbin/fw_setenv sata_custom_params 'ignore_loglevel netconsole=6665@10.10.10.3/eth0,6666@10.10.10.4/ elevator=bfq'')
OR
If you did not activate netconsole:
$this->bbcode_second_pass_code('', '/usr/sbin/fw_setenv usb_custom_params 'elevator=bfq'
/usr/sbin/fw_setenv sata_custom_params 'elevator=bfq'')
----------------------------------------------------------------------------------------------
Reboot now
Now you can install the new kernel, which is at version 3.6.4 as of this wring.
$this->bbcode_second_pass_code('', 'pacman -Sy linux-kirkwood linux-headers-kirkwood')
Thanks to Mr. Doozan and Davygravy for this new UBoot, Vlad for netconsole, Sagittarius for SATA Boot and Kurlon for the kernel.