Search This Blog

Jun 29, 2011

Android r10.2 support SATA boot up on i.MX53 SMD rev B board

1. u-boot

In include/configs/mx53_smd_android.h
-#define CONFIG_FSL_ENV_IN_MMC
+#define CONFIG_FSL_ENV_IN_SATA 

+#elif defined(CONFIG_FSL_ENV_IN_SATA)
+ #define CONFIG_ENV_IS_IN_SATA   1
+ #define CONFIG_SATA_ENV_DEV     0
+ #define CONFIG_ENV_OFFSET       (768 * 1024)

2. Kernel

In kernel-imx/arch/arm/configs/imx5_android_defconfig
CONFIG_ATA=y
CONFIG_ATA_VERBOSE_ERROR=y
CONFIG_SATA_AHCI_PLATFORM=y
CONFIG_ATA_SFF=y

Make sure # CONFIG_SATA_PMP is not set in .config (It’s important.)

3. Android

In device/fsl/imx53_smd/init.rc
-    mount ext4 /dev/block/mmcblk0p2 /system
-    mount ext4 /dev/block/mmcblk0p2 /system ro remount
-    mount ext4 /dev/block/mmcblk0p5 /data nosuid nodev
-    mount ext4 /dev/block/mmcblk0p6 /cache nosuid nodev
+    mount ext4 /dev/block/sda2 /system
+    mount ext4 /dev/block/sda2 /system ro remount
+    mount ext4 /dev/block/sda5 /data nosuid nodev
+    mount ext4 /dev/block/sda6 /cache nosuid nodev

4. MFG tool

Copy all android relate image files to "files/android"
Modify ucl.xml
change mmcblk to sda in "MX53SMD-Android-SATA"
-"push" body="$ sh mksdcard-android.sh /dev/mmcblk0"> Partitioning...
+"push" body="$ sh mksdcard-android.sh /dev/sda"> Partitioning...

5. Blown SATA internal boot fuse

To boot from SATA with internal clock, ensure the fuse “SATA_ALT_CLK_REF” is blown.
The following U-Boot command can blown SATA internal boot fuse:
$ iim blow 4 3 4

6. u-boot parameter

$ setenv ethaddr 00:04:9f:00:ea:d3
$ setenv fec_addr 00:04:9f:00:ea:d3
$ setenv loadaddr 0x70800000
$ setenv rd_loadaddr 0x70D00000
$ setenv bootcmd 'run bootcmd_sata; bootm ${loadaddr} ${rd_loadaddr}'
$ setenv bootcmd_sata 'sata read ${loadaddr} 0x800 0x2000; sata read ${rd_loadaddr} 0x3000 0x300;'
$ setenv bootargs console=ttymxc0 init=/init androidboot.console=ttymxc0 video=mxcdi1fb:RGB666,XGA ldb=di1 di1_primary ip=dhcp gpu_nommu, gpu_memory=64M
$ saveenv

7. Bootup Android

We can see Android bootup and done.

No comments: