Table of Contents

Booting From Usb In Fel Mode

About this Article

Abstract

Here we provide a simple way to boot linux from USB OTG port. It's very useful when our system get damaged somehow. We may be able to fix it by accessing to the storeage, e.g. nand, sata, or SD Card, and making some repair to the config or filesystem.

Host Enviroment

Ubuntu 12.04 x86_64

Step-by-step

Download all we need

$ wget http://dl.cubieboard.org/software/a20-cubieboard/cb2-fel-usb-boot.tar.gz
$ tar -zxvf cb2-fel-usb-boot.tar.gz

to check the md5sum(optional)

$ wget http://dl.cubieboard.org/software/a20-cubieboard/cb2-fel-usb-boot.tar.gz.md5
$ md5sum cb2-fel-usb-boot.tar.gz
 32a1192659a8ba9a914c3bb7139412ad  cb2-fel-usb-boot.tar.gz
$ cb2-fel-usb-boot.tar.gz.md5
 32a1192659a8ba9a914c3bb7139412ad  cb2-fel-usb-boot.tar.gz

Enter FEL Mode

FEL is a low-level subroutine containing in the BootROM on allwinner devices. It is used for provisioning and recovery of devices using USB. When the chip goes to FEL mode, the chip will be waiting for communication from PC though USB. The primary purpose for FEL is for flashing the NAND with the PC tool LiveSuit. For more detailed please refer to FEL MODE

To enter FEL mode here:

  1. Power off the device
  2. Press and hold FEL key
  3. Press and hold power key for about 2s (power on the device, when powering on, if a key is pressed, the devices will not boot until key released)

After entering FEL mode, we suggest you to plug in AC adapter if you have SATA drive on board, avoiding low current from USB.

Upload Images

$ cd usbboot-fel
$ ./usb-boot ./u-boot-spl.bin ./u-boot.bin ./uImage ./script.bin ./initramfs.img
fel write 0x2000 ./u-boot-spl.bin
fel exe 0x2000
fel write 0x4a000000 ./u-boot.bin
fel write 0x41000000 ./bin/ramboot.scr
fel write 0x43000000 ./script.bin
fel write 0x44000000 ./uImage
fel write 0x4c000000 ./initramfs.img
fel exe 0x4a000000

Tips

 udhcpc
 root/root

Customizing

Replace fel/usb-boot

The fel/usb-boot in this manual is X86_64bit version. If you want to use it under I386 or even arm platform, you need to compile the tools by yourself. fel/usb-boot are part of sunxi-tools, and the latest source code can be found at http://github.com/linux-sunxi/sunxi-tools.git.

and then replace the tools with the one you built

initramfs.img

See Also