imx515 开发板Android源代码编译过程(三)

2014-11-24 09:01:56 ? 作者: ? 浏览: 1
o load above "uImage ", it will know to load it (without image head added by mkimage tool) into 0x90008000 (specified by "-a"), and then jump to 0x90008000 (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


After applying all i.MX patches and kernel image built out, build the Android image using following steps:


$ cd


~/myandroid


Command to build for i.MX51 BBG3 board is:


$ make PRODUCT-imx51_BBG-eng | tee build_imx51_BBG_android.log


"imx51_BBG" is the product names (see ~/myandroid/vendor/fsl/product


)


After build, check build_*_android.log


to make sure no build error.


For i.MX51 BBG build, the following outputs are generated as default under myandroid/out/target/product/imx51_BBG:


root / : root file system (including init, init.rc , etc). Mounted at /


system / : Android system binary/libraries. Mounted at /system


data / : Android data area. Mounted at /data


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 : EXT3 image generated from "system/". Can be programmed to "SYSTEM" partition on SD card with "dd "


userdata.img : EXT3 image generated from "data/".


recovery.img : EXT3 image generated from "recovery/". Can be programmed to "RECOVERY" partition on SD card with "dd "


Generate uRamdisk to be loaded by uboot


The following steps generate a RAMDISK image recognized by uboot :


Assume you had already built uboot . mkimage was generated under myandroid//bootable/bootloader/uboot-imx/tools /


$ cd myandroid/out/target/product/imx51_BBG


$ ~/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


编译完成,我们可以逐步将img文件烧写到SD卡中.


上述过程简单,按步骤一步步进行即可,不抓图描述.


Program Bootloader into SD using dd


Insert the SD card/cardreader to the Linux PC (root privileges are needed for programming SD)


Note : if the SD card had been previously formatted with a valid file system, usually it is automatic mounted when you insert the SD card to Linux PC. Check is the SD card has been mounted using mount (usually /dev/sdb *). Umount the SD card using sudo umount /dev/sdb *


Program the bootloader into offset 1K (1024B) of the SD card


Make sure bootloader (uboot , for 3DS or BBG3) image is used. See "Prebuilt image for using uboot ".


# dd if=your_bootloader_binfile of=/dev/sdb bs =1K seek=1


In above example, you should use no-padding version bootloader since it will be programmed to 1KB offset ("bs =1K seek=1"). If you do want to use the normal version bootloader (with 1KB padding at the head of binfile ), you can do as below.


# dd if=/dev/sdb of=./mbrbackup bs =512 count=1 [To backup MBR]


# dd if=your_bootloader_binfile_withpadding of=/dev/sdb [To program bootloader into offset 0 on SD ]


# dd if=./mbrbackup of=/dev/sdb [To restore MBR]


-->

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: