imx515編譯指令碼

來源:互聯網
上載者:User

#!/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/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 above "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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.