This shows you the differences between two versions of the page.
tutorials:ct1:development:booting_from_usb_otg_port [2013/10/24 17:28] benn [Enter FEL Mode] |
tutorials:ct1:development:booting_from_usb_otg_port [2014/11/19 11:53] (current) admin old revision restored (2013/10/26 00:46) |
||
---|---|---|---|
Line 11: | Line 11: | ||
Here we provide a simple way to boot linux from USB OTG port. It's very useful when our system damaged somehow, and we can fix it if we could access to the storeage, e.g. nand, sata, or SD Card. | Here we provide a simple way to boot linux from USB OTG port. It's very useful when our system damaged somehow, and we can fix it if we could access to the storeage, e.g. nand, sata, or SD Card. | ||
+ | ===== Host Enviroment ===== | ||
+ | |||
+ | Ubuntu 12.04 x86_64 | ||
===== Step-by-step ===== | ===== Step-by-step ===== | ||
- | ==== Download Files ==== | + | |
+ | ==== Download all we need ==== | ||
+ | $wget http://dl.cubieboard.org/software/a20-cubietruck/common/usbboot-fel.tar.gz | ||
+ | $tar -zxvf usbboot-fel.tar.gz | ||
+ | |||
+ | |||
+ | to check the md5sum(optional) | ||
+ | $wget http://dl.cubieboard.org/software/a20-cubietruck/common/usbboot-fel.tar.gz.md5 | ||
+ | $ md5sum usbboot-fel.tar.gz | ||
+ | f09f92833dc419207c7c9cd71ad65cc4 usbboot-fel.tar.gz | ||
+ | $ cat usbboot-fel.tar.gz.md5 | ||
+ | f09f92833dc419207c7c9cd71ad65cc4 usbboot-fel.tar.gz | ||
+ | |||
+ | |||
==== Enter FEL Mode ==== | ==== Enter FEL Mode ==== | ||
Line 26: | Line 43: | ||
After entering FEL mode, we suggest you to plug in AC adapter if you have SATA drive on board, avoiding low current from USB. | 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 ==== | ==== Upload Images ==== | ||
+ | $cd usbboot-fel | ||
$ ./usb-boot ./u-boot-spl.bin ./u-boot.bin ./uImage ./script.bin ./initramfs.img | $ ./usb-boot ./u-boot-spl.bin ./u-boot.bin ./uImage ./script.bin ./initramfs.img | ||
fel write 0x2000 ./u-boot-spl.bin | fel write 0x2000 ./u-boot-spl.bin | ||
Line 35: | Line 53: | ||
fel write 0x4c000000 ./initramfs.img | fel write 0x4c000000 ./initramfs.img | ||
fel exe 0x4a000000 | fel exe 0x4a000000 | ||
+ | |||
+ | ==== Tips ==== | ||
+ | *Setting GMAC | ||
+ | |||
+ | udhcpc | ||
+ | |||
+ | *default user and password | ||
+ | |||
+ | root/root | ||
+ | |||
+ | *Change to VGA output | ||
+ | |||
+ | $cd usbboot-fel/ | ||
+ | $ ls | ||
+ | adb-devprobe.sh bin2fex fel fex2bin initramfs.img pio u-boot.bin uImage | ||
+ | bin bootinfo fel-gpio fexc nand-part script.bin u-boot-spl.bin usb-boot | ||
+ | ./bin2fex script.bin 1.fex | ||
+ | fexc-bin: script.bin: version: 0.1.2 | ||
+ | fexc-bin: script.bin: size: 46472 (85 sections) | ||
+ | vim 1.fex (here change the output type | ||
+ | ./fex2bin 1.fex script.bin | ||
+ | |||
+ | =====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. | ||
+ | |||
+ | * Getting Source Code | ||
+ | |||
+ | $git clone git://github.com/linux-sunxi/sunxi-tools.git | ||
+ | |||
+ | * Compiling | ||
+ | |||
+ | $cd sunxi-tools | ||
+ | $make | ||
+ | |||
+ | and then replace the tools with the one you built | ||
+ | |||
+ | ====initramfs.img==== | ||
+ | *Refer to http://github.com/hno/miniroot | ||
=== See Also === | === See Also === | ||
+ | *http://linux-sunxi.org/FEL | ||
+ | *http://linux-sunxi.org/FEL/USBBoot | ||
+ | |||
+ | |||
<WRAP noprint> | <WRAP noprint> | ||
{{tag>Cubieboard Cubietruck}} | {{tag>Cubieboard Cubietruck}} | ||
</WRAP> | </WRAP> |