mini6410 - android build steps
DESCRIPTION
Mini6410 - Android Build StepsTRANSCRIPT
Android 2.1 (Froyo) Build for Mini6410
Host System Information:
Intel PC with Ubuntu 11.10 (32‐bit)
Target System Information:
Mini6410 ARM11 with 128MB RAM
Cross‐compile tools and build environment
In CDB, we have build tools placed in folder CDB/linux/. Copy arm‐linux‐gcc, mktools and logomaker
tarzips
# mkdir ~/mini6410
# cd ~/mini6410
# cp /media/cdrom/linux/arm-linux-gcc-4.x.x.tgz ~/mini6410
# cp /media/cdrom/linux/mktools.tar.tgz ~/mini6410
# cp /media/cdrom/linux/logomaker.tgz ~/mini6410
Uncompress these with the following command:
# cd ~/mini6410
# sudo tar xvzf arm-linux-gcc-4.x.x-xx-xxx-20xxxxxx.tgz
# sudo tar xvzf mktools.tar.gz
# sudo tar xvzf logomaker.tgz
Add Path in your environment file. Open ~/.bashrc file to add a new path with editor (gedit)
PATH=$PATH:/mini6410/opt/FriendlyARM/toolschain/4.x.x/bin
To apply this change, login again or restart the .bashrc
# source .bashrc
Check the tool‐chain path to see if it is set up correctly or not, whether it show gcc version 4.5.1
# arm-linux-gcc –v
Create a working folder
Copy the android folder from CDA to PC mini6410 folder
# cp -fr /media/cdrom/android/
# cd android
linux‐2.x.xx.x‐android, uncompress the linux kernel for android file,
#tar xvzf android-kernel-2.x.xx-20xxxxxx.tar.gz
Android‐2.1, Android system source code
# tar xvzf android-2.1-fs-20xxxxxx.tar.gz
rootfs_android, Root file system folder
# tar xvzf rootfs_android-20xxxxxx.tar.gz
Configure and compile linux kernel
Now the configuration and compile can start. Go to
# cd linux-2.x.xx.x-android
Next step is to create .config file using next command (specific to attached display – in this case
config_android_a70)
# cp config_android_xxx .config
Create kernel
# make zImage
if the kernel build is successful, there must be in “arch/arm/boot/ file »zImage
Configure and compile Android system
Before we do the build, we need to have following libraries installed. Run the following command
sudo apt-get install libc6-dev-i386, g++-multilib, zlib1g-dev, lib32z1-dev, bison, flex, lib32ncurses5-dev, libncurses5-dev, libx11-dev, gperf
In any library is missing, you can look for alternative debian libraries online. For instance lib32ncurses5‐
dev can be replaced by libncurses5‐dev
# cd android-2.1
# ./build-android
There were three major issues during build. You can take following actions depending on the type of
issue faced during build.
Error 1:
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/RefBase.o] Error 1 make: *** Waiting for unfinished jobs....
Make following changes
diff frameworks/base/libs/utils/Android.mk - LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) + LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
Error 2:
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] error 1 Make following changes
diff frameworks/base/tools/appt/Android.mk ifeq ($(HOST_OS),linux) -LOCAL_LDLIBS += -lrt +LOCAL_LDLIBS += -lrt -lpthread endif
Error 3:
make: *** [out/host/linux-x86/obj/EXECUTABLES/localize_intermediates/localize] error 1
Make following changes
diff frameworks/base/tools/localize/Android.mk ifeq ($(HOST_OS),linux) -LOCAL_LDLIBS += -lrt +LOCAL_LDLIBS += -lrt -lpthread endif
At the end create a root file system.
# ./genrootfs.sh
If you can build Android system successfully, you will have »rootfs_dir« folder.
Make Filesystem
Make yaffs filesystem
# cd ~/mini6410/android/Android-2.1
# mkyaffs2image-128M rootfs_dir rootfs_android.img
If you can do it successfully, you will have “rootfs_android.img” in the same folder.
Make UBIFS filesystem
# cd ~/mini6410/android/Android-2.1
# mkubimage rootfs_dir rootfs_android.ubi
If you can do it successfully, you will have “rootfs_android.ubi” in the same folder.
Make Ext3 filesystem
# cd ~/mini6410/android/Android-2.1
# mkext3image rootfs_dir rootfs_android.ext3
If you can do it successfully, you will have “rootfs_android.ext3″ in the same folder.