Commit 225fa189faa518a334729d01176bc966e0259b8d
1 parent
fa0d072b59
Exists in
smarc_8mm-imx_v2018.03_4.14.98_2.0.0_ga
and in
5 other branches
MLK-19524: configs: add fastboot support for nand u-boot
add fastboot support for nand u-boot. 1. Add fastboot related configs 2. enlarge the SPL size for i.MX8MQ DDR4 NAND config 3. include the imx_env for boot command settings Signed-off-by: Han Xu <han.xu@nxp.com>
Showing 8 changed files with 113 additions and 29 deletions Side-by-side Diff
configs/imx8mq_ddr3l_arm2_defconfig
... | ... | @@ -45,4 +45,28 @@ |
45 | 45 | CONFIG_USB=y |
46 | 46 | CONFIG_DM_USB=y |
47 | 47 | CONFIG_FSL_QSPI=y |
48 | + | |
49 | +CONFIG_USB_GADGET=y | |
50 | +CONFIG_FASTBOOT=y | |
51 | +CONFIG_USB_FUNCTION_FASTBOOT=y | |
52 | +CONFIG_CMD_FASTBOOT=y | |
53 | +CONFIG_ANDROID_BOOT_IMAGE=y | |
54 | +CONFIG_FSL_FASTBOOT=y | |
55 | +CONFIG_FASTBOOT_BUF_ADDR=0x42800000 | |
56 | +CONFIG_FASTBOOT_BUF_SIZE=0x40000000 | |
57 | +CONFIG_FASTBOOT_FLASH=y | |
58 | +CONFIG_FASTBOOT_FLASH_MMC_DEV=0 | |
59 | +CONFIG_EFI_PARTITION=y | |
60 | +CONFIG_SDP_LOADADDR=0x40400000 | |
61 | +CONFIG_USB_GADGET_VENDOR_NUM=0x0525 | |
62 | +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 | |
63 | +CONFIG_USB_GADGET_MANUFACTURER="FSL" | |
64 | +CONFIG_USB_GADGET_DOWNLOAD=y | |
65 | +CONFIG_SPL_USB_GADGET_SUPPORT=y | |
66 | +CONFIG_SPL_USB_SDP_SUPPORT=y | |
67 | +CONFIG_USB_XHCI_HCD=y | |
68 | +CONFIG_USB_XHCI_IMX8M=y | |
69 | +CONFIG_USB_XHCI_DWC3=y | |
70 | +CONFIG_USB_DWC3=y | |
71 | +CONFIG_USB_DWC3_GADGET=y |
configs/imx8mq_ddr4_arm2_defconfig
... | ... | @@ -46,4 +46,28 @@ |
46 | 46 | CONFIG_DM_USB=y |
47 | 47 | CONFIG_CMD_NAND=y |
48 | 48 | CONFIG_CMD_UBI=y |
49 | + | |
50 | +CONFIG_USB_GADGET=y | |
51 | +CONFIG_FASTBOOT=y | |
52 | +CONFIG_USB_FUNCTION_FASTBOOT=y | |
53 | +CONFIG_CMD_FASTBOOT=y | |
54 | +CONFIG_ANDROID_BOOT_IMAGE=y | |
55 | +CONFIG_FSL_FASTBOOT=y | |
56 | +CONFIG_FASTBOOT_BUF_ADDR=0x42800000 | |
57 | +CONFIG_FASTBOOT_BUF_SIZE=0x40000000 | |
58 | +CONFIG_FASTBOOT_FLASH=y | |
59 | +CONFIG_FASTBOOT_FLASH_MMC_DEV=0 | |
60 | +CONFIG_EFI_PARTITION=y | |
61 | +CONFIG_SDP_LOADADDR=0x40400000 | |
62 | +CONFIG_USB_GADGET_VENDOR_NUM=0x0525 | |
63 | +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 | |
64 | +CONFIG_USB_GADGET_MANUFACTURER="FSL" | |
65 | +CONFIG_USB_GADGET_DOWNLOAD=y | |
66 | +CONFIG_SPL_USB_GADGET_SUPPORT=y | |
67 | +CONFIG_SPL_USB_SDP_SUPPORT=y | |
68 | +CONFIG_USB_XHCI_HCD=y | |
69 | +CONFIG_USB_XHCI_IMX8M=y | |
70 | +CONFIG_USB_XHCI_DWC3=y | |
71 | +CONFIG_USB_DWC3=y | |
72 | +CONFIG_USB_DWC3_GADGET=y |
configs/imx8mq_ddr4_arm2_nand_defconfig
... | ... | @@ -47,4 +47,28 @@ |
47 | 47 | CONFIG_NAND_BOOT=y |
48 | 48 | CONFIG_ENV_IS_IN_NAND=y |
49 | 49 | CONFIG_CMD_UBI=y |
50 | + | |
51 | +CONFIG_USB_GADGET=y | |
52 | +CONFIG_FASTBOOT=y | |
53 | +CONFIG_USB_FUNCTION_FASTBOOT=y | |
54 | +CONFIG_CMD_FASTBOOT=y | |
55 | +CONFIG_ANDROID_BOOT_IMAGE=y | |
56 | +CONFIG_FSL_FASTBOOT=y | |
57 | +CONFIG_FASTBOOT_BUF_ADDR=0x42800000 | |
58 | +CONFIG_FASTBOOT_BUF_SIZE=0x40000000 | |
59 | +CONFIG_FASTBOOT_FLASH=y | |
60 | +CONFIG_FASTBOOT_FLASH_MMC_DEV=0 | |
61 | +CONFIG_EFI_PARTITION=y | |
62 | +CONFIG_SDP_LOADADDR=0x40400000 | |
63 | +CONFIG_USB_GADGET_VENDOR_NUM=0x0525 | |
64 | +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 | |
65 | +CONFIG_USB_GADGET_MANUFACTURER="FSL" | |
66 | +CONFIG_USB_GADGET_DOWNLOAD=y | |
67 | +CONFIG_SPL_USB_GADGET_SUPPORT=y | |
68 | +CONFIG_SPL_USB_SDP_SUPPORT=y | |
69 | +CONFIG_USB_XHCI_HCD=y | |
70 | +CONFIG_USB_XHCI_IMX8M=y | |
71 | +CONFIG_USB_XHCI_DWC3=y | |
72 | +CONFIG_USB_DWC3=y | |
73 | +CONFIG_USB_DWC3_GADGET=y |
configs/imx8qxp_lpddr4_arm2_nand_defconfig
1 | + | |
1 | 2 | CONFIG_ARM=y |
2 | 3 | CONFIG_ARCH_IMX8=y |
3 | 4 | CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qxp-lpddr4-arm2" |
... | ... | @@ -81,4 +82,16 @@ |
81 | 82 | |
82 | 83 | CONFIG_SMC_FUSE=y |
83 | 84 | CONFIG_CMD_MEMTEST=y |
85 | + | |
86 | +CONFIG_FASTBOOT=y | |
87 | +CONFIG_USB_FUNCTION_FASTBOOT=y | |
88 | +CONFIG_CMD_FASTBOOT=y | |
89 | +CONFIG_ANDROID_BOOT_IMAGE=y | |
90 | +CONFIG_FSL_FASTBOOT=y | |
91 | +CONFIG_FASTBOOT_BUF_ADDR=0x82800000 | |
92 | +CONFIG_FASTBOOT_BUF_SIZE=0x40000000 | |
93 | +CONFIG_FASTBOOT_FLASH=y | |
94 | +CONFIG_FASTBOOT_FLASH_MMC_DEV=0 | |
95 | +CONFIG_FASTBOOT_USB_DEV=1 | |
96 | +CONFIG_EFI_PARTITION=y |
configs/mx7dsabresd_nand_defconfig
... | ... | @@ -79,4 +79,13 @@ |
79 | 79 | CONFIG_VIDEO=y |
80 | 80 | CONFIG_ERRNO_STR=y |
81 | 81 | CONFIG_DM_ETH=y |
82 | +CONFIG_CMD_FASTBOOT=y | |
83 | +CONFIG_USB_FUNCTION_FASTBOOT=y | |
84 | +CONFIG_FSL_FASTBOOT=y | |
85 | +CONFIG_FASTBOOT=y | |
86 | +CONFIG_FASTBOOT_BUF_ADDR=0x83800000 | |
87 | +CONFIG_FASTBOOT_BUF_SIZE=0x40000000 | |
88 | +CONFIG_FASTBOOT_FLASH=y | |
89 | +CONFIG_FASTBOOT_FLASH_MMC_DEV=1 | |
90 | +CONFIG_EFI_PARTITION=y |
include/configs/imx8mq_arm2.h
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | #endif |
16 | 16 | |
17 | 17 | #define CONFIG_SPL_TEXT_BASE 0x7E1000 |
18 | -#define CONFIG_SPL_MAX_SIZE (124 * 1024) | |
18 | +#define CONFIG_SPL_MAX_SIZE (148 * 1024) | |
19 | 19 | #define CONFIG_SYS_MONITOR_LEN (512 * 1024) |
20 | 20 | #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR |
21 | 21 | #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 |
22 | 22 | |
23 | 23 | |
24 | 24 | |
25 | 25 | |
26 | 26 | |
27 | 27 | |
... | ... | @@ -328,31 +328,22 @@ |
328 | 328 | |
329 | 329 | /* USB configs */ |
330 | 330 | #ifndef CONFIG_SPL_BUILD |
331 | -#define CONFIG_USB_XHCI_IMX8M | |
332 | -#define CONFIG_USB_XHCI_DWC3 | |
333 | -#define CONFIG_USB_XHCI_HCD | |
334 | 331 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 |
335 | 332 | |
336 | 333 | #define CONFIG_CMD_USB |
337 | 334 | #define CONFIG_USB_STORAGE |
338 | 335 | |
339 | -#define CONFIG_USB_DWC3 | |
340 | -#define CONFIG_USB_DWC3_GADGET | |
341 | 336 | #define CONFIG_USBD_HS |
342 | 337 | |
343 | -#define CONFIG_USB_GADGET | |
344 | 338 | #define CONFIG_CMD_USB_MASS_STORAGE |
345 | 339 | #define CONFIG_USB_GADGET_MASS_STORAGE |
346 | -#define CONFIG_USB_GADGET_DOWNLOAD | |
347 | 340 | #define CONFIG_USB_GADGET_VBUS_DRAW 2 |
348 | -#define CONFIG_USB_GADGET_DUALSPEED | |
349 | 341 | #define CONFIG_USB_FUNCTION_MASS_STORAGE |
350 | 342 | |
351 | -#define CONFIG_USB_GADGET_VENDOR_NUM 0x0525 | |
352 | -#define CONFIG_USB_GADGET_PRODUCT_NUM 0xa4a5 | |
353 | -#define CONFIG_USB_GADGET_MANUFACTURER "FSL" | |
354 | - | |
355 | 343 | #endif |
344 | + | |
345 | +#define CONFIG_SERIAL_TAG | |
346 | +#define CONFIG_FASTBOOT_USB_DEV 0 | |
356 | 347 | |
357 | 348 | #define CONFIG_OF_SYSTEM_SETUP |
358 | 349 |
include/configs/imx8qxp_arm2.h
... | ... | @@ -10,6 +10,8 @@ |
10 | 10 | #include <linux/sizes.h> |
11 | 11 | #include <asm/arch/imx-regs.h> |
12 | 12 | |
13 | +#include "imx_env.h" | |
14 | + | |
13 | 15 | #define CONFIG_REMAKE_ELF |
14 | 16 | |
15 | 17 | #define CONFIG_BOARD_EARLY_INIT_F |
16 | 18 | |
17 | 19 | |
18 | 20 | |
... | ... | @@ -102,33 +104,28 @@ |
102 | 104 | "m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \ |
103 | 105 | |
104 | 106 | #ifdef CONFIG_NAND_BOOT |
105 | -#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:128m(boot),32m(kernel),16m(dtb),8m(misc),-(rootfs) " | |
107 | +#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:128m(nandboot),32m(nandkernel),16m(nanddtb),8m(nandtee),-(nandrootfs) " | |
106 | 108 | #else |
107 | 109 | #define MFG_NAND_PARTITION "" |
108 | 110 | #endif |
109 | 111 | |
110 | 112 | #define CONFIG_MFG_ENV_SETTINGS \ |
111 | - "mfgtool_args=setenv bootargs console=${console},${baudrate} " \ | |
112 | - "rdinit=/linuxrc " \ | |
113 | - "g_mass_storage.stall=0 g_mass_storage.removable=1 " \ | |
114 | - "g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF "\ | |
115 | - "g_mass_storage.iSerialNumber=\"\" "\ | |
116 | - MFG_NAND_PARTITION \ | |
117 | - "clk_ignore_unused "\ | |
118 | - "\0" \ | |
113 | + CONFIG_MFG_ENV_SETTINGS_DEFAULT \ | |
114 | + "clk_ignore_unused "\ | |
115 | + "\0" \ | |
119 | 116 | "initrd_addr=0x83100000\0" \ |
120 | 117 | "initrd_high=0xffffffffffffffff\0" \ |
121 | - "bootcmd_mfg=run mfgtool_args; if iminfo ${initrd_addr}; then "\ | |
122 | - "booti ${loadaddr} ${initrd_addr} ${fdt_addr};"\ | |
123 | - "else fastboot 1; fi\0" \ | |
118 | + "mtdparts=" MFG_NAND_PARTITION \ | |
119 | + "\0"\ | |
124 | 120 | |
125 | 121 | /* Initial environment variables */ |
126 | 122 | #ifdef CONFIG_NAND_BOOT |
127 | 123 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
128 | 124 | CONFIG_MFG_ENV_SETTINGS \ |
129 | 125 | "bootargs=console=ttyLP0,115200 ubi.mtd=5 " \ |
130 | - "root=ubi0:rootfs rootfstype=ubifs " \ | |
131 | - "mtdparts=gpmi-nand:128m(boot),32m(kernel),16m(dtb),8m(misc),-(rootfs)\0"\ | |
126 | + "root=ubi0:nandrootfs rootfstype=ubifs " \ | |
127 | + MFG_NAND_PARTITION \ | |
128 | + "\0"\ | |
132 | 129 | "console=ttyLP0,115200 earlycon=lpuart32,0x5a060000,115200\0" \ |
133 | 130 | "fdt_addr=0x83000000\0" |
134 | 131 | #else |
include/configs/mx7dsabresd.h
... | ... | @@ -85,7 +85,7 @@ |
85 | 85 | #endif |
86 | 86 | |
87 | 87 | #ifdef CONFIG_NAND_BOOT |
88 | -#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(boot),16m(kernel),16m(dtb),16m(tee),-(rootfs) " | |
88 | +#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(nandboot),16m(nandkernel),16m(nanddtb),16m(nandtee),-(nandrootfs) " | |
89 | 89 | #else |
90 | 90 | #define MFG_NAND_PARTITION "" |
91 | 91 | #endif |
... | ... | @@ -100,6 +100,8 @@ |
100 | 100 | "initrd_high=0xffffffff\0" \ |
101 | 101 | "emmc_dev=1\0"\ |
102 | 102 | "sd_dev=0\0" \ |
103 | + "mtdparts=" MFG_NAND_PARTITION \ | |
104 | + "\0"\ | |
103 | 105 | |
104 | 106 | #define CONFIG_DFU_ENV_SETTINGS \ |
105 | 107 | "dfu_alt_info=image raw 0 0x800000;"\ |
... | ... | @@ -116,7 +118,7 @@ |
116 | 118 | "fdt_high=0xffffffff\0" \ |
117 | 119 | "console=ttymxc0\0" \ |
118 | 120 | "bootargs=console=ttymxc0,115200 ubi.mtd=4 " \ |
119 | - "root=ubi0:rootfs rootfstype=ubifs " \ | |
121 | + "root=ubi0:nandrootfs rootfstype=ubifs " \ | |
120 | 122 | MFG_NAND_PARTITION \ |
121 | 123 | "\0" \ |
122 | 124 | "bootcmd=nand read ${loadaddr} 0x4000000 0x800000;"\ |