Android r10.3.1 support SATA boot up on i.MX53 Tablet board -blog archive

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

Android r10.3.1 support SATA boot up on i.MX53 Tablet board -blog archive

785 Views
xiaodong_zhang
NXP Employee
NXP Employee

At first, please read i.MX_Android_R10.3_User_Guide.html and i.MX_Android_R10.3.1_User_Guide.html for environment setting.

1. Modify the following file in 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.Modify the following file 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 very important). If you use make menuconfig, CONFIG_SATA_PMP is set to y defaultly.

3. Modiy Android code

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 relative image files to "files/android"
select right configuration.104-untitled.JPG

5. Blown FUSE before burning new image to SATA device

To boot from SATA with internal clock(using 120Mhz USB_PHY_CLK), ensure “SATA_ALT_CLK_REF”(The bit 1 and bit 2 of Bank 4,row 3 in FUSE map) is blown.SATA_ALT_CLK_REF is used to decide SATA PHY source clock and frequency select. SATA_ALT_CLK_REF define as

'00' - 100MHz (External)
'01'  - 50MHz (External)
'10' - 120MHz, internal (USB PHY)
'11' - Reserved.

The following U-Boot command can blown fuse for internal clock:

$ iim blow 4 3 4

Usage of command "iim blow" is "iim blow Bank-number Row-number Blown-value "

6. Boot dip settings for SATA boot

SW26: dip 4, 6 are on. Others are off. Please refer to \Profiles\MX53 Linux Update\OS Firmware\ucl.xml of MFG tool for detailed information.

7. Set u-boot parameter before boot kernel

$ 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

8. Bootup Android

We can see Android bootup and done.

Tags (1)
0 Kudos
0 Replies