imx53-saber-tablet开发记录

imx53-saber-tablet技术文档

0.freescal官网下载imx-android-r10.3.tar.gz

$ tar xzvf imx-android-r10.3.tar.gz

$ cd imx-android-r10.3/code

$ tar xzvf r10.3.tar.

r10.3里的doc里面有一个i.MX_Android_R10.3_User_Guide帮助文档,可以参照里面的帮助。

1.uboot编译:

cd /home/nation/android-imx/myandroid/bootable/bootloader/uboot-imx

export ARCH=arm

export CROSS_COMPILE=/home/nation/android-imx/myandroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-

make distclean

make mx53_smd_android_config

make

sudo dd if=./u-boot.bin of=./u-boot-no-padding.bin bs=1024 skip=1; sync

2.kernel  编译

cd /home/nation/android-imx/myandroid/kernel_imx

export PATH=/home/nation/android-imx/myandroid/bootable/bootloader/uboot-imx/tools:$PATH

export ARCH=arm

export CROSS_COMPILE=/home/nation/android-imx/myandroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-

make imx5_android_defconfig

make uImage

cd /home/nation/android-imx/myandroid/kernel_imx/arch/arm/boot

/home/nation/android-imx/myandroid/bootable/bootloader/uboot-imx/tools/mkimage -A arm -O linux -T kernel -C none -a 0x70008000 -e 0x70008000 -n "Android Linux Kernel" -d ./zImage ./uImage

3.android 编译

export CROSS_COMPILE=/home/nation/android-imx/myandroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-

source build/envsetup.sh

lunch imx53_smd-user

make

/home/nation/android-imx/myandroid/bootable/bootloader/uboot-imx/tools/mkimage -A arm -O linux -T ramdisk -C none -a 0x70308000 -n "Android Root Filesystem" -d ./ramdisk.img ./uramdisk.img

4.Download image#SD卡固件的烧写

    Download the uboot image:

    # sudo dd if=u-boot.bin of=/dev/sdb bs=1K skip=1 seek=1; sync

Or If you're using no padding uboot image:

    # sudo dd if=u-boot-no-padding.bin of=/dev/sdb bs=1K seek=1; sync

    Download the kernel image:

    # sudo dd if=uImage of=/dev/sdb bs=1M seek=1; sync   

    Download the initramfs image:

    # sudo dd if=uramdisk.img of=/dev/sdb bs=1M seek=6; sync

    Download the android system root image:

    # sudo dd if=system.img of=/dev/sdb2; sync

       Download the android recovery image:

    # sudo dd if=recovery.img of=/dev/sdb4; sync

imx53uboot启动参数在uboot源码中的

uboot-imx/include/configs/mx53_smd_android.h中用以下代码

以下是从imx53内部启动且lvds显示的是参数

#define CONFIG_EXTRA_ENV_SETTINGS \

"netdev=eth0\0" \

"ethprime=FEC0\0" \

"ethaddr=00:04:9f:00:ea:d3\0" \

"bootfile=uImage\0" \

"loadaddr=0x70800000\0" \

"rd_loadaddr=0x70D00000\0" \

"bootargs=console=ttymxc0 init=/init " \

"androidboot.console=ttymxc0 video=mxcdi1fb:RGB666,XGA " \

"ldb=di1 di1_primary gpu_nommu gpu_memory=64M\0" \

"bootcmd_SD=mmc read 1 ${loadaddr} 0x800 0x2000;" \

"mmc read 1 ${rd_loadaddr} 0x3000 0x300\0" \

"bootcmd=run bootcmd_SD; bootm ${loadaddr} ${rd_loadaddr}\0" \

以下为SD卡启动且是HDMI1080P高清显示

#define CONFIG_EXTRA_ENV_SETTINGS \

"netdev=eth0\0" \

"ethprime=FEC0\0" \

"ethaddr=00:04:9f:00:ea:d3\0" \

"bootfile=uImage\0" \

"loadaddr=0x70800000\0" \

"rd_loadaddr=0x70D00000\0" \

"bootargs=console=ttymxc0 init=/init " \

"androidboot.console=ttymxc0 video=mxcdi0fb:RGB24,1920x1080M@60" \

"hdmi di0_primary ip=dhcp gpu_nommu, gpu_memory=64M dmfc=3\0" \

"bootcmd_SD=mmc read 0 ${loadaddr} 0x800 0x2000;" \

"mmc read 0 ${rd_loadaddr} 0x3000 0x300\0" \

"bootcmd=run bootcmd_SD; bootm ${loadaddr} ${rd_loadaddr}\0" \

(注:詳細的设置请参考i.MX_Android_R10.3_User_Guide.html

其中SD卡启动时要硬件启动方式设置好,再做软件部分,硬件设置开关是sw26 sw28i.MX_Android_R10.3_User_Guide.html 中的3.1.2 Boot up settings中有詳細介绍

Sd卡启动还要对ramdisk进行修改,请按以下修改

.2 System on MMC/SD and eMMC

Android support running on the MMC/SD card, or on board eMMC device.

Currently, i.MX51 BBG only support MMC/SD system, but i.MX53 TABLET also support eMMC device, i.MX50 RD3 support NAND device.

We need images below to create an android system on MMC/SD or eMMC device:

    u-boot image: u-boot.bin or u-boot-no-padding.bin

    kernel image: uImage

    ramdisk image: uramdisk.img

    Android system root image: system.img

    Recovery root image: recovery.img

All the images you can get from the release package, or built out by yourself as 2.5 section described.

NOTE: i.MX53 TABLET take eMMC as the default storage for android system, so the default images in the release package only support android boot from on board eMMC device.

If you want to boot it from SD card, please change the init.rc in the uramdisk.img, and modify all the 'mmcblk0px' to 'mmcblk1px', as we take eMMC block device as mmcblk0, but external SD slot as mmcblk1:

   

    # dd if=uramdisk.img of=ramdisk.img.gz skip=64 bs=1

    # gunzip ramdisk.img.gz

    # mkdir ramdisk; cd ramdisk

    # cpio -i < ../ramdisk.img

    # vim init.rc   (modify the init.rc, change the mmcblk0 to mmcblk1)

    # find . | cpio --create --format='newc' | gzip > ../ramdisk.img

    # /home/nation/android-imx/myandroid/bootable/bootloader/uboot-imx/tools/mkimage -A arm -O linux -T ramdisk -C none -a 0x70308000 -n "Android Root Filesystem" -d ./ramdisk.img ./uramdisk.img

(本人试过这个init.rc里并没有找到mmcblk0,而在init.freescale.rc中即找到了所以把 vim init.rc这一步改成gedit init.freescale.rc 而把mmcblk0改为mmcblk1即可 )

你可能感兴趣的:(arm)