From ae7ffee7fe9f9b2e217d051971a98e1f28290cb1 Mon Sep 17 00:00:00 2001 From: "Ye.Li" Date: Thu, 9 Jul 2015 11:19:13 +0800 Subject: MLK-11228-1 android: Integrate community fastboot with FSL i.MX fastboot 1. Replace the UDC driver with community's USB gadget d_dnl driver. 2. Integrate the FSL SD/SATA/NAND flash operations, since the GPT and EFI partitions are not support by i.MX. 3. Add FDT support to community's android image. 4. Change the booti command to boota, due to the booti has been used for ARM64 image boot. 5. Modify boota implementation to load ramdisk and fdt to their loading addresses specified in boot.img header, while bootm won't do it for android image. 6. Modify the android image HAB implementation. Authenticate the boot.img on the "load_addr" for both SD and NAND. 7. Enable new configuration CONFIG_FSL_FASTBOOT for Freescale's fastboot with relevant header file "fsl_fastboot.h". While disabling the configuration, the community fastboot is used. 8. Use community's way to combine cmdline in boot.img and u-boot environment, not overwrite the cmdline in boot.img Signed-off-by: Ye.Li --- board/freescale/mx6qsabreauto/mx6qsabreauto.c | 41 +++++++++------------------ 1 file changed, 13 insertions(+), 28 deletions(-) (limited to 'board/freescale/mx6qsabreauto/mx6qsabreauto.c') diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c b/board/freescale/mx6qsabreauto/mx6qsabreauto.c index cedc090..e701828 100644 --- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c +++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c @@ -34,12 +34,12 @@ #ifdef CONFIG_CMD_SATA #include #endif -#ifdef CONFIG_FASTBOOT -#include +#ifdef CONFIG_FSL_FASTBOOT +#include #ifdef CONFIG_ANDROID_RECOVERY #include #endif -#endif /*CONFIG_FASTBOOT*/ +#endif /*CONFIG_FSL_FASTBOOT*/ #ifdef CONFIG_MAX7310_IOEXP #include @@ -942,7 +942,7 @@ int board_ehci_power(int port, int on) } #endif -#ifdef CONFIG_FASTBOOT +#ifdef CONFIG_FSL_FASTBOOT void board_fastboot_setup(void) { @@ -952,7 +952,7 @@ void board_fastboot_setup(void) if (!getenv("fastboot_dev")) setenv("fastboot_dev", "sata"); if (!getenv("bootcmd")) - setenv("bootcmd", "booti sata"); + setenv("bootcmd", "boota sata"); break; #endif /*CONFIG_FASTBOOT_STORAGE_SATA*/ #if defined(CONFIG_FASTBOOT_STORAGE_MMC) @@ -961,14 +961,14 @@ void board_fastboot_setup(void) if (!getenv("fastboot_dev")) setenv("fastboot_dev", "mmc0"); if (!getenv("bootcmd")) - setenv("bootcmd", "booti mmc0"); + setenv("bootcmd", "boota mmc0"); break; case SD3_BOOT: case MMC3_BOOT: if (!getenv("fastboot_dev")) setenv("fastboot_dev", "mmc1"); if (!getenv("bootcmd")) - setenv("bootcmd", "booti mmc1"); + setenv("bootcmd", "boota mmc1"); break; #endif /*CONFIG_FASTBOOT_STORAGE_MMC*/ #if defined(CONFIG_FASTBOOT_STORAGE_NAND) @@ -980,7 +980,7 @@ void board_fastboot_setup(void) if (!getenv("bootcmd")) setenv("bootcmd", "nand read ${loadaddr} ${boot_nand_offset} " - "${boot_nand_size};booti ${loadaddr}"); + "${boot_nand_size};boota ${loadaddr}"); break; #endif /*CONFIG_FASTBOOT_STORAGE_NAND*/ default: @@ -1025,19 +1025,19 @@ void board_recovery_setup(void) #if defined(CONFIG_FASTBOOT_STORAGE_SATA) case SATA_BOOT: if (!getenv("bootcmd_android_recovery")) - setenv("bootcmd_android_recovery", "booti sata recovery"); + setenv("bootcmd_android_recovery", "boota sata recovery"); break; #endif /*CONFIG_FASTBOOT_STORAGE_SATA*/ #if defined(CONFIG_FASTBOOT_STORAGE_MMC) case SD1_BOOT: case MMC1_BOOT: if (!getenv("bootcmd_android_recovery")) - setenv("bootcmd_android_recovery", "booti mmc0 recovery"); + setenv("bootcmd_android_recovery", "boota mmc0 recovery"); break; case SD3_BOOT: case MMC3_BOOT: if (!getenv("bootcmd_android_recovery")) - setenv("bootcmd_android_recovery", "booti mmc1 recovery"); + setenv("bootcmd_android_recovery", "boota mmc1 recovery"); break; #endif /*CONFIG_FASTBOOT_STORAGE_MMC*/ #if defined(CONFIG_FASTBOOT_STORAGE_NAND) @@ -1045,7 +1045,7 @@ void board_recovery_setup(void) if (!getenv("bootcmd_android_recovery")) setenv("bootcmd_android_recovery", "nand read ${loadaddr} ${recovery_nand_offset} " - "${recovery_nand_size};booti ${loadaddr}"); + "${recovery_nand_size};boota ${loadaddr}"); break; #endif /*CONFIG_FASTBOOT_STORAGE_NAND*/ default: @@ -1059,19 +1059,4 @@ void board_recovery_setup(void) } #endif /*CONFIG_ANDROID_RECOVERY*/ -#endif /*CONFIG_FASTBOOT*/ - -#ifdef CONFIG_IMX_UDC -iomux_v3_cfg_t const otg_udc_pads[] = { - (MX6_PAD_ENET_RX_ER__USB_OTG_ID | MUX_PAD_CTRL(NO_PAD_CTRL)), -}; -void udc_pins_setting(void) -{ - imx_iomux_v3_setup_multiple_pads(otg_udc_pads, - ARRAY_SIZE(otg_udc_pads)); - - /*set daisy chain for otg_pin_id on 6q. for 6dl, this bit is reserved*/ - imx_iomux_set_gpr_register(1, 13, 1, 0); -} - -#endif /*CONFIG_IMX_UDC*/ +#endif /*CONFIG_FSL_FASTBOOT*/ -- cgit v1.1