1 Booting From Usb Otg Port 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-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 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
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1
Booting From Usb Otg Port
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-cubietruck/common/usbboot-fel.tar.gz $tar -zxvf usbboot-fel.tar.gz
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
2
$ ./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
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.
You will see the SATA block(maybe it's sdb, sdc or sdd,but it's no problem):
Now you know the block,use this command:
$dd if=/dev/block/system of=/dev/block/sda(Your SATA block)
Just wait for about 1 minutes,it will success:
5
Modify the SDK
After you copy the system file to SATA,you should modify SDK:
$cd /ct-droid1/android42/devices/softwinner/sugar-cubietruck/ && ls $vim init.sun7i.rc
And "mount ext4 /dev/block/system" changes to "mount ext4 /dev/block/sda",like that:
6
Save and quit,complie the android image.If you don't konw how to complie,refer to here
After compile success,do this:
Install the new image to Cubietruck.
Connect the SATA first( must first! If you don't do this it wouldn't boot)
Charge it with electricity,you will see it Boot from SATA.
Cb3 A20-install Nand Boot Android For Cubietruck
Install Livesuit or PhoenixSuit
All sunxi devices use LiveSuit as a default flasher and updater for retail customer and PhoenixCard or PhoenixUSB for flashing when devices are manufactured. LiveSuit/Phoenix protocol and data are closed-source standrad used by many companies and devices.
7
Please note that PhoenixSuit is actually LiveSuit2.0. There are different platform's PhoenixSuit
1. Windows 2. Linux i386 3. Linux x86_64 4. Mac
Please refer to the Livesuit/PhoenixSuit Installation Guide
Download Image
Assuming you are going to use ct-nand-v1.01-20140109.img
The final image is at /lichee/tools/pack/sun7i_android_sugar-cubietruck.img
You can use Livesuit to install it
Lubuntu Desktop/Server SD Card Installation for Cubietruck
Abstract
We may want to install lubuntu desktop/server to SD card, here is a guide for you. This guide is for Linux platform only. We take Desktop as a example in this guide. If you are interested in Server, just replace the images with server one.
Prerequisites
Any Linux environment, we want fdisk, dd, tar, wget commands An SD Card(at least 2GB)