#! /Bin/sh
Android_path =/opt/imx515/source/myandroid
# Build uboot Images
CD $/opt/imx515/source/myandroid/bootable/bootloader/uboot-IMX
Export arch = arm
Export cross_compile = $/opt/imx515/source/myandroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin
# Command to build for I. MX51 BBG board is:
Make distclean
Make mx51_bbg_android_config
Make
# "U-boot.bin" is generated if you have a successful build
# Build kernel Image
Export Path = $/opt/imx515/source/myandroid/bootable/bootloader/uboot-IMX/tools: $ path
CD $/opt/imx515/source/myandroid/kernel_imx
Echo $ arch & Echo $ cross_compile
Export cross_compile = $/opt/imx515/source/myandroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/ARM-Eabi-
Make imx5_android_defconfig
Make uimage
# Generate uimage to be loaded by U-boot
CD $/opt/imx515/source/myandroid/kernel_imx/ARCH/ARM/boot
$/Opt/imx515/source/myandroid/bootable/bootloader/uboot-IMX/tools/mkimage-A arm-O Linux-T kernel-C none-A 0x90008000-e 0x90008000-n "android Linux kernel"-D. /zimage. /uimage
# During boot, when uboot try to load abve "uimage", it will know to load it (without image head added by mkimage tool) into 0x90008000 or 0x70008000 (specified by "-a"), and then jump to 0x90008000 or 0x70008000 (specified by "-e") to execute it. "-C none"
Means no compression when generating "uimage". This is because the original zimage is already a compressed one.
# Build Android Image
CD $/opt/imx515/source/myandroid
Export cross_compile = $/opt/imx515/source/myandroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/ARM-Eabi-
Make PRODUCT-imx51_bbg-eng 2> & 1 | tee build_imx51_bbg_android.log
# For I. MX51 BBG build, the following outputs are generated as default under myandroid/out/target/product/imx51_bbg
# Above three folders can be used to create your android File System for NFS mounting, I. e. Root/>/, system/>/system, data/>/Data
# Recovery/: root file system when booting in "recovery" mode. Not directly used.
# Ramdisk. IMG: ramdisk image generated from "root/". Not directly used.
# System. IMG: ext4 image generated from "system/". can be programmed to "system" partition on SD card with "DD"
# Userdata. IMG: ext4 image generated from "Data /".
# Recovery. IMG: ext4 image generated from "recovery/". can be programmed to "recovery" partition on SD card with "DD"
CD $/opt/imx515/source/myandroid/out/target/product/imx51_bbg
$/Opt/imx515/source/myandroid/bootable/bootloader/uboot-IMX/tools/mkimage-A arm-O Linux-T ramdisk-C none-A 0x90308000-n "android root filesystem"-D. /ramdisk. IMG. /uramdisk. IMG