Welcome! Log In Create A New Profile

Advanced

[How To] Set U-Boot envs for USB booting with Kirkwood plugs

Posted by bodhi 
[How To] Set U-Boot envs for USB booting with Kirkwood plugs
May 20, 2014 09:57PM
This is a basic but completed set of U-Boot environment variables that is good for booting Debian/Arch using USB. Please be aware that mistakes in changing U-Boot envs could block you out the box, so please use this as a guide only if you have serial console or netconsole.

1. U-Boot version must be one that was installed by Jeff's script, or newer U-Boot that was manually installed (stock U-Boot won't work).

2. And the kernel on the USB rootfs must support your plug. You can find it here: Linux Kernel 3.14.0 Kirkwood package and rootfs (Non Flattened Device Tree).

3. This particular example is for the Pogo V4/Mobile. But it can be adjusted for any Kirkwood plugs. Note these 2variables must match your Kirkwood plug (3960 and f78 are for Pogo V4/Mobile)
arcNumber=3960
machid=f78

4. The ethaddr needs to be the MAC addr that on the sticker for this specific plug:
ethaddr=00:xx:x:xx:xx:xx

5. mtdparts must match what is for your Kirkwood plug, this is the Pogo V4/Mobile:
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)


6. The partition that contains the rootfs on USB must be labeled as rootfs (use tune2fs -L rootfs /dev/sda1, for example). This partition also must be formatted as Ext3.

The completed set of U-Boot envs:
baudrate=115200
bootcmd=run bootcmd_usb; usb stop; reset
bootcmd_usb=run usb_init; run usb_load_uimage; run set_bootargs_usb; run usb_boot;
bootdelay=3
console=ttyS0,115200
ethact=egiga0
ethaddr=00:xx:x:xx:xx:xx
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
partition=nand0,2
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts
stderr=serial
stdin=serial
stdout=serial
usb_boot=if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000;else bootm 0x800000;fi;
usb_device=0:1
usb_init=usb start
usb_load_uimage=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage
usb_rootdelay=10
arcNumber=3960
machid=f78
usb_root=LABEL=rootfs
usb_rootfstype=ext3

Note that it is just a basic set of envs that works for a single USB drive attached. Jeff's script installs a much more robust set of envs that takes into account different types of environment.

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



Edited 2 time(s). Last edit at 05/20/2014 10:09PM by bodhi.
Re: [How To] Set U-Boot envs for USB booting with Kirkwood plugs
May 22, 2014 07:27PM
Thanks for posting this bodhi!
The pogo is back up and working. Now i need to decide what to do with it.

:-)
thanks - helped me get up and running
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: