PeterChan

Enable fastboot for MX50 RD3 board -blog archive

Discussion created by PeterChan Employee on Apr 5, 2012
Latest reply on Apr 20, 2012 by PeterChan

The fastboot is an utility for download images from Windows/Linux PC host to the target device by USB via Android ADB interface. This utility is released by Google in the Android SDK packages, which can be downloaded from Android's official site.

 

To enable fastboot for MX50 RD3 board, simply copy those fastboot configure options from mx50_rdp_android.h to mx50_rd3.h as below and then rebuild the u-boot.

 

diff --git a/include/configs/mx50_rd3.h b/include/configs/mx50_rd3.h
index 58229a1..c07a56b 100644
--- a/include/configs/mx50_rd3.h
+++ b/include/configs/mx50_rd3.h
@@ -299,4 +299,42 @@
 #else
  #define CONFIG_ENV_IS_NOWHERE 1
 #endif
+
+/*
+ * Android support Configs
+ */
+
+/* Android fastboot configs */
+#define CONFIG_USB_DEVICE
+#define CONFIG_IMX_UDC                 1
+#define CONFIG_FASTBOOT                1
+#define CONFIG_FASTBOOT_STORAGE_EMMC_SATA
+#define CONFIG_FASTBOOT_VENDOR_ID      0xbb4
+#define CONFIG_FASTBOOT_PRODUCT_ID     0xc01
+#define CONFIG_FASTBOOT_BCD_DEVICE     0x311
+#define CONFIG_FASTBOOT_MANUFACTURER_STR  "Freescale"
+#define CONFIG_FASTBOOT_PRODUCT_NAME_STR "i.mx50 rdp"
+#define CONFIG_FASTBOOT_CONFIGURATION_STR  "Android fastboot"
+#define CONFIG_FASTBOOT_INTERFACE_STR    "Android fastboot"
+#define CONFIG_FASTBOOT_SERIAL_NUM      "12345"
+#define CONFIG_FASTBOOT_SATA_NO          0
+#define CONFIG_FASTBOOT_TRANSFER_BUF    0x80000000
+#define CONFIG_FASTBOOT_TRANSFER_BUF_SIZE 0x8000000 /* 128M byte */
+
+#define CONFIG_ANDROID_RECOVERY
+#define CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC \
+       "setenv bootargs ${bootargs} init=/init root=/dev/mmcblk0p4"    \
+       " rootfs=ext4 keypad"
+#define CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC  \
+       "run bootargs_base bootargs_android_recovery;"  \
+       "mmc read 0 ${loadaddr} 0x800 0x2000;bootm"
+#define CONFIG_ANDROID_RECOVERY_CMD_FILE "/recovery/command"
+
+#define CONFIG_MTD_DEVICE
+#define CONFIG_MTD_PARTITIONS
+
+#define CONFIG_ANDROID_SYSTEM_PARTITION_MMC 2
+#define CONFIG_ANDROID_RECOVERY_PARTITION_MMC 4
+#define CONFIG_ANDROID_CACHE_PARTITION_MMC 6
+
 #endif    /* __CONFIG_H */

 

Before starting the fastboot, Android SDK must be installed on a PC HOST, the u-boot.bin is downloaded to target device and all the Android system partitions are created and formatted on a MMC/SD card. For detail, please refer to i.MX Android R10.3 User Guide.

 

When the board is powered, press any key to enter uboot shell. Since my MX50_RD3 board is boot from a SD card on the SD1 port, I use this command to choose SD/MMC card to download the fastboot images.

 

MX50_RD3 U-Boot > setenv fastboot_dev mmc0

 

Then I run the fastboot command in u-boot shell and connect USB cable to my board.

 

MX50_RD3 U-Boot > fasboot

fastboot is in init......flash target is MMC:0
USB Mini b cable Connected!
fastboot initialized
USB_SUSPEND
USB_RESET
USB_RESET

 

 

On host side, the fastboot utility is located under "platform-tools" where the Android-SDK installed. Supposing all your images are under an "images" folder, use these fastboot commands to download these images to your target devices. 

 

C:\Android\android-sdk\platform-tools>fastboot flash bootloader images\u-boot-no-padding.bin

C:\Android\android-sdk\platform-tools>fastboot flash kernel images\uImage

C:\Android\android-sdk\platform-tools>fastboot flash uramdisk images\uramdisk.img

C:\Android\android-sdk\platform-tools>fastboot flash system images\system.img

C:\Android\android-sdk\platform-tools>fastboot flash recovery images\recovery.img

 

 

Finally reboot the device after downloading all the images.

 

C:\Android\android-sdk\platform-tools>fastboot reboot

Outcomes