Dear developers,
Welcome to the Mozilla Firefox OS Contribution Program for Flatfish. For those who wish to modify the uboot, you will learn in this concise guide how to:
The following steps will allow you to compile and update your Flatfish uboot image (Ubuntu 12.04 x64):
Export the WORKSPACE
export WORKSPACE=`pwd`
Acquire the Allwinner A31 uboot source
Download Flatfish uboot patch
cd $WORKSPACE
git clone https://github.com/flatfish-fox/flatfish-uboot.git
cd flatfish-uboot
git checkout Bug-1026963 -- 0001-Bug-1026963-Flatfish-Need-a-bare-boot-image-supporti.patch
git checkout Bug-1033619 -- 0001-Bug-1033619-Flatfish-Make-Vendor-ID-in-Fastboot-mode.patch
Download and set the cross compiler path for compiling the uboot
cd $WORKSPACE
wget https://launchpad.net/linaro-toolchain-binaries/trunk/2012.02/+download/gcc-linaro-arm-linux-gnueabi-2012.02-20120222_linux.tar.bz2
tar jxvf gcc-linaro-arm-linux-gnueabi-2012.02-20120222_linux.tar.bz2
export PATH=$WORKSPACE/gcc-linaro-arm-linux-gnueabi-2012.02-20120222_linux/bin:$PATH
Patch the uboot source
cd $WORKSPACE/uboot
patch -p1 < $WORKSPACE/flatfish-uboot/0001-Allwinner-A31-u-boot-patches-for-flatfish-tablet.patch
patch -p1 < $WORKSPACE/flatfish-uboot/0001-Bug-1026963-Flatfish-Need-a-bare-boot-image-supporti.patch
patch -p1 < $WORKSPACE/flatfish-uboot/0001-Bug-1033619-Flatfish-Make-Vendor-ID-in-Fastboot-mode.patch
Compile the uboot
./build.sh -p sun6i
Update the u-boot.bin
adb shell mkdir /mnt/bootloader
adb shell busybox mount -t vfat /dev/block/mmcblk0p2 /mnt/bootloader
adb shell rm /mnt/bootloader/linux/u-boot.bin
adb push u-boot.bin /mnt/bootloader/linux
adb reboot