Android6.0 m6.0.1_2.0.0_ga_tool 烧写疑问

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Android6.0 m6.0.1_2.0.0_ga_tool 烧写疑问

1,353 Views
baozhuliu
Contributor III

Hi  all,

      我现在使用的是imx6qp  sabre-sd 改造过的板子,打算烧写Android6.0的系统,但是参考了Android_User's_Guide.pdf文档后还是有几点不明白的地方:

cfg.ini的配置如下:

[profiles]
chip = Linux

[platform]
board = SabreSD

[LIST]
name = eMMC-Android

[variable]
board = sabresd
mmc =0
sxuboot=sabresd
sxdtb=sdb
7duboot=sabresd
7ddtb=sdb
6uluboot=14x14ddr3arm2
6uldtb=14x14-ddr3-arm2
ldo=
soc=6q
plus=p
data_type=
folder=sabresd
initramfs=fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot
seek = 1
sxnor=qspi2
7dnor=qspi1
6ulnor=qspi1
nor_part=0

 ucl2.xml里面的

</LIST>
<LIST name="eMMC-Android" desc="Choose eMMC as media">
<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6q%plus%%board%_sd.imx" ifdev="MX6Q">Loading U-boot</CMD>
<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6dl%board%_sd.imx" ifdev="MX6D">Loading U-boot</CMD>
<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6sx%board%_emmc.imx" ifdev="MX6SX">Loading U-boot</CMD>
<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx7d%7duboot%_sd.imx" ifdev="MX7D">Loading U-boot</CMD>
<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6ul%6uluboot%_emmc.imx" ifdev="MX6UL">Loading U-boot</CMD>

<CMD state="BootStrap" type="load" file="firmware/zImage" address="0x12000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q MX6D">Loading Kernel.</CMD>
<CMD state="BootStrap" type="load" file="firmware/zImage" address="0x80800000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6SL MX6SX MX7D MX6UL">Loading Kernel.</CMD>

<CMD state="BootStrap" type="load" file="firmware/%initramfs%" address="0x12C00000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q MX6D">Loading Initramfs.</CMD>
<CMD state="BootStrap" type="load" file="firmware/%initramfs%" address="0x83800000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6SL MX6SX MX7D MX6UL">Loading Initramfs.</CMD>

<CMD state="BootStrap" type="load" file="firmware/zImage-imx6q%plus%-%board%%ldo%.dtb" address="0x18000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q">Loading device tree.</CMD>
<CMD state="BootStrap" type="load" file="firmware/zImage-imx6dl-%board%%ldo%.dtb" address="0x18000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6D">Loading device tree.</CMD>

<CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>

<!-- create partition -->
<CMD state="Updater" type="push" body="send" file="mksdcard-android%data_type%.sh.tar">Sending partition shell</CMD>
<CMD state="Updater" type="push" body="$ tar xf $FILE "> Partitioning...</CMD>
<CMD state="Updater" type="push" body="$ sh mksdcard-android%data_type%.sh /dev/mmcblk%mmc%"> Partitioning...</CMD>

<!-- burn uboot -->
<CMD state="Updater" type="push" body="$ dd if=/dev/zero of=/dev/mmcblk%mmc% bs=1k seek=384 conv=fsync count=129">clear u-boot arg</CMD>
<CMD state="Updater" type="push" body="$ echo 0 > /sys/block/mmcblk%mmc%boot0/force_ro">access boot partition 1</CMD>

<CMD state="Updater" type="push" body="send" file="files/android/%folder%/u-boot-imx%soc%%plus%%ldo%.imx" >Sending u-boot.bin</CMD>

<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk%mmc%boot0 bs=512 seek=2">write U-Boot to sd card</CMD>
<CMD state="Updater" type="push" body="$ echo 1 > /sys/block/mmcblk%mmc%boot0/force_ro"> re-enable read-only access </CMD>
<CMD state="Updater" type="push" body="$ mmc bootpart enable 1 1 /dev/mmcblk%mmc%">enable boot partion 1 to boot</CMD>

<CMD state="Updater" type="push" body="$ ls -l /dev/mmc* ">Formatting sd partition</CMD>

<CMD state="Updater" type="push" body="send" file="files/android/%folder%/boot-imx%soc%%plus%%ldo%.img" >Sending and writting boot.img</CMD>

<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk%mmc%p1">write boot.img</CMD>


<CMD state="Updater" type="push" body="$ mkfs.ext4 -E nodiscard /dev/mmcblk%mmc%p5">Formatting system partition</CMD>
<CMD state="Updater" type="push" body="$ mkfs.ext4 -E nodiscard /dev/mmcblk%mmc%p6">Formatting cache partition</CMD>

<CMD state="Updater" type="push" body="$ mkfs.ext4 -E nodiscard /dev/mmcblk%mmc%p7">Formatting device partition</CMD>
<CMD state="Updater" type="push" body="$ mount -o remount,size=600M rootfs /">change size of tmpfs</CMD>
<CMD state="Updater" type="push" body="send" file="files/android/%folder%/system.img" >Sending system.img</CMD>
<CMD state="Updater" type="push" body="$ simg2img $FILE /dev/mmcblk%mmc%p5">writting sparse system.img</CMD>

<!-- Write userdata.img is optional, for some customer this is needed, but it's optional. -->
<!-- Also, userdata.img will have android unit test, you can use this to do some auto test. -->
<!-- <CMD state="Updater" type="push" onError="ignore" body="pipe dd of=/dev/mmcblk0p7" file="file/android/userdate.img"> Sending userdata.img(optional) </CMD>
<CMD state="Updater" type="push" body="frf">flush the memory.</CMD> -->
<CMD state="Updater" type="push" body="pipe dd of=/dev/mmcblk%mmc%p2 bs=512" file="files/android/%folder%/recovery-imx%soc%%plus%%ldo%.img">Sending and writting recovery.img</CMD>

<CMD state="Updater" type="push" body="$ sync">Sync file system</CMD>
<CMD state="Updater" type="push" body="frf">Finishing rootfs write</CMD>

<CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>

1,其中<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6q%plus%%board%_sd.imx" ifdev="MX6Q">Loading U-boot</CMD>的u-boot-imx6q%plus%%board%_sd.imx我应该从哪编译得到?

2,<CMD state="BootStrap" type="load" file="firmware/zImage" address="0x12000000"里面的zImage我的编译方式如下:

$ export PATH=~/myandroid/bootable/bootloader/uboot-imx/tools:$PATH
$ cd ~/myandroid/kernel_imx
$ echo $ARCH && echo $CROSS_COMPILE
Make sure that you have those two environment variables set. If the two variables are not set, set them as follows:
$ export ARCH=arm
$ export CROSS_COMPILE=~/myandroid/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-
# Generate ".config" according to default config file under arch/arm/configs.
# To build the kernel image for i.MX 6Dual/Quad, 6QuadPlus, 6DualLite, 6Solo, 6SoloLite,6SoloX, and 7Dual
$ make imx_v7_android_defconfig
$ make KCFLAGS=-mno-android

# To build the kernel uImage for i.MX 6Dual/Quad, 6QuadPlus, 6DualLite, and 6Solo
$ make uImage LOADADDR=0x10008000 KCFLAGS=-mno-android

但是每次都烧写不成功,请问imx_v7_android_defconfig是不是我烧写时所需要的文件?

3,<CMD state="BootStrap" type="load" file="firmware/zImage-imx6q%plus%-%board%%ldo%.dtb" address="0x18000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q">Loading device tree.</CMD>里面的zImage-imx6q%plus%-%board%%ldo%.dtb使用的是什么方式编译出来的,我该如何替换?

Labels (3)
0 Kudos
1 Reply

754 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

Hi baozhu liu,

About how to build the images runing on your board you can refer to Android_User's_Guide.pdf in the section 3 Building the Android platform for i.MX, you can see details in this document. And the uboot for mfgtool can use the same uboot for target board. Here you do not need to rebuild the uboot for mfgtool.Hope this can help you.
Have a great day,
Rita

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos