SDK build howto

Allwinner usually provides device manufacturers with a complete SDK that includes the matching u-boot and kernel sources (with some odd binaries), Android packages, buildroot, build scripts and a matching Linaro toolchain.

Development board vendors share the SDK with hardware owners to customize. This howto assumes you have such an SDK. This document is based on the A23 and A80 SDKs. If you have one for an earlier SoC, some names may vary.

= Contents of the SDK = The SDK is split into several parts, but the build scripts requires them to be complete.


 * android-4.4
 * lichee
 * build.sh -- main build script
 * buildroot -- rootfs, toolchain, and build scripts
 * linux-3.4 -- linux kernel
 * brandy -- boot related stuff
 * build.sh -- simple build script for u-boot
 * u-boot-2011.09 -- Allwinner's port of u-Boot
 * out</tt> -- build intermediaries and results. toolchain is also in here

= Basic Full Build =

Once you have unpacked the SDK (the lichee directory in particular), you can go in a do a straight full build, which results in a LiveSuite image.

Configuring the Build
The SDK can build android or linux flavor images, and may target different boards.

lichee$ ./build.sh config

Welcome to mkscript setup progress All available chips: 0. sun9iw1p1 Choice: 0 All available platforms: 0. android 1. dragonboard 2. linux Choice: 0 All available kernel: 0. linux-3.4 Choice: 0 All available boards: 0. optimus 1. p1  2. perf 3. perf5 4. perf-lpddr3 Choice: 0

Running the Build
Running build.sh will produce binaries and images under out/ /{linux,android}. These will be used to generate the firmware image in the next step.

lichee$ ./build.sh

This will prepare the toolchain (or build buildroot if you're building for Linux), the kernel, and the rootfs (if not Android).

Linux Build Specifics
Building the Linux platform will build the whole buildroot tree. As the buildroot version bundled in the SDK is rather old, errors are bound to happen. Please use an older host toolchain.

Android Build Specifics
(This section requires additional work.) The Android image is built from the android directory in the SDK.

Packing the Image
Run the following command to pack the final LiveSuit image.

lichee$ ./build.sh pack