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>
This commit is contained in:
parent
fa0d072b59
commit
225fa189fa
|
|
@ -45,3 +45,27 @@ CONFIG_SPL_LOAD_FIT=y
|
||||||
CONFIG_USB=y
|
CONFIG_USB=y
|
||||||
CONFIG_DM_USB=y
|
CONFIG_DM_USB=y
|
||||||
CONFIG_FSL_QSPI=y
|
CONFIG_FSL_QSPI=y
|
||||||
|
|
||||||
|
CONFIG_USB_GADGET=y
|
||||||
|
CONFIG_FASTBOOT=y
|
||||||
|
CONFIG_USB_FUNCTION_FASTBOOT=y
|
||||||
|
CONFIG_CMD_FASTBOOT=y
|
||||||
|
CONFIG_ANDROID_BOOT_IMAGE=y
|
||||||
|
CONFIG_FSL_FASTBOOT=y
|
||||||
|
CONFIG_FASTBOOT_BUF_ADDR=0x42800000
|
||||||
|
CONFIG_FASTBOOT_BUF_SIZE=0x40000000
|
||||||
|
CONFIG_FASTBOOT_FLASH=y
|
||||||
|
CONFIG_FASTBOOT_FLASH_MMC_DEV=0
|
||||||
|
CONFIG_EFI_PARTITION=y
|
||||||
|
CONFIG_SDP_LOADADDR=0x40400000
|
||||||
|
CONFIG_USB_GADGET_VENDOR_NUM=0x0525
|
||||||
|
CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
|
||||||
|
CONFIG_USB_GADGET_MANUFACTURER="FSL"
|
||||||
|
CONFIG_USB_GADGET_DOWNLOAD=y
|
||||||
|
CONFIG_SPL_USB_GADGET_SUPPORT=y
|
||||||
|
CONFIG_SPL_USB_SDP_SUPPORT=y
|
||||||
|
CONFIG_USB_XHCI_HCD=y
|
||||||
|
CONFIG_USB_XHCI_IMX8M=y
|
||||||
|
CONFIG_USB_XHCI_DWC3=y
|
||||||
|
CONFIG_USB_DWC3=y
|
||||||
|
CONFIG_USB_DWC3_GADGET=y
|
||||||
|
|
|
||||||
|
|
@ -46,3 +46,27 @@ CONFIG_USB=y
|
||||||
CONFIG_DM_USB=y
|
CONFIG_DM_USB=y
|
||||||
CONFIG_CMD_NAND=y
|
CONFIG_CMD_NAND=y
|
||||||
CONFIG_CMD_UBI=y
|
CONFIG_CMD_UBI=y
|
||||||
|
|
||||||
|
CONFIG_USB_GADGET=y
|
||||||
|
CONFIG_FASTBOOT=y
|
||||||
|
CONFIG_USB_FUNCTION_FASTBOOT=y
|
||||||
|
CONFIG_CMD_FASTBOOT=y
|
||||||
|
CONFIG_ANDROID_BOOT_IMAGE=y
|
||||||
|
CONFIG_FSL_FASTBOOT=y
|
||||||
|
CONFIG_FASTBOOT_BUF_ADDR=0x42800000
|
||||||
|
CONFIG_FASTBOOT_BUF_SIZE=0x40000000
|
||||||
|
CONFIG_FASTBOOT_FLASH=y
|
||||||
|
CONFIG_FASTBOOT_FLASH_MMC_DEV=0
|
||||||
|
CONFIG_EFI_PARTITION=y
|
||||||
|
CONFIG_SDP_LOADADDR=0x40400000
|
||||||
|
CONFIG_USB_GADGET_VENDOR_NUM=0x0525
|
||||||
|
CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
|
||||||
|
CONFIG_USB_GADGET_MANUFACTURER="FSL"
|
||||||
|
CONFIG_USB_GADGET_DOWNLOAD=y
|
||||||
|
CONFIG_SPL_USB_GADGET_SUPPORT=y
|
||||||
|
CONFIG_SPL_USB_SDP_SUPPORT=y
|
||||||
|
CONFIG_USB_XHCI_HCD=y
|
||||||
|
CONFIG_USB_XHCI_IMX8M=y
|
||||||
|
CONFIG_USB_XHCI_DWC3=y
|
||||||
|
CONFIG_USB_DWC3=y
|
||||||
|
CONFIG_USB_DWC3_GADGET=y
|
||||||
|
|
|
||||||
|
|
@ -47,3 +47,27 @@ CONFIG_CMD_NAND=y
|
||||||
CONFIG_NAND_BOOT=y
|
CONFIG_NAND_BOOT=y
|
||||||
CONFIG_ENV_IS_IN_NAND=y
|
CONFIG_ENV_IS_IN_NAND=y
|
||||||
CONFIG_CMD_UBI=y
|
CONFIG_CMD_UBI=y
|
||||||
|
|
||||||
|
CONFIG_USB_GADGET=y
|
||||||
|
CONFIG_FASTBOOT=y
|
||||||
|
CONFIG_USB_FUNCTION_FASTBOOT=y
|
||||||
|
CONFIG_CMD_FASTBOOT=y
|
||||||
|
CONFIG_ANDROID_BOOT_IMAGE=y
|
||||||
|
CONFIG_FSL_FASTBOOT=y
|
||||||
|
CONFIG_FASTBOOT_BUF_ADDR=0x42800000
|
||||||
|
CONFIG_FASTBOOT_BUF_SIZE=0x40000000
|
||||||
|
CONFIG_FASTBOOT_FLASH=y
|
||||||
|
CONFIG_FASTBOOT_FLASH_MMC_DEV=0
|
||||||
|
CONFIG_EFI_PARTITION=y
|
||||||
|
CONFIG_SDP_LOADADDR=0x40400000
|
||||||
|
CONFIG_USB_GADGET_VENDOR_NUM=0x0525
|
||||||
|
CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
|
||||||
|
CONFIG_USB_GADGET_MANUFACTURER="FSL"
|
||||||
|
CONFIG_USB_GADGET_DOWNLOAD=y
|
||||||
|
CONFIG_SPL_USB_GADGET_SUPPORT=y
|
||||||
|
CONFIG_SPL_USB_SDP_SUPPORT=y
|
||||||
|
CONFIG_USB_XHCI_HCD=y
|
||||||
|
CONFIG_USB_XHCI_IMX8M=y
|
||||||
|
CONFIG_USB_XHCI_DWC3=y
|
||||||
|
CONFIG_USB_DWC3=y
|
||||||
|
CONFIG_USB_DWC3_GADGET=y
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
CONFIG_ARM=y
|
CONFIG_ARM=y
|
||||||
CONFIG_ARCH_IMX8=y
|
CONFIG_ARCH_IMX8=y
|
||||||
CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qxp-lpddr4-arm2"
|
CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qxp-lpddr4-arm2"
|
||||||
|
|
@ -81,3 +82,15 @@ CONFIG_DM_DEVICE_REMOVE=n
|
||||||
|
|
||||||
CONFIG_SMC_FUSE=y
|
CONFIG_SMC_FUSE=y
|
||||||
CONFIG_CMD_MEMTEST=y
|
CONFIG_CMD_MEMTEST=y
|
||||||
|
|
||||||
|
CONFIG_FASTBOOT=y
|
||||||
|
CONFIG_USB_FUNCTION_FASTBOOT=y
|
||||||
|
CONFIG_CMD_FASTBOOT=y
|
||||||
|
CONFIG_ANDROID_BOOT_IMAGE=y
|
||||||
|
CONFIG_FSL_FASTBOOT=y
|
||||||
|
CONFIG_FASTBOOT_BUF_ADDR=0x82800000
|
||||||
|
CONFIG_FASTBOOT_BUF_SIZE=0x40000000
|
||||||
|
CONFIG_FASTBOOT_FLASH=y
|
||||||
|
CONFIG_FASTBOOT_FLASH_MMC_DEV=0
|
||||||
|
CONFIG_FASTBOOT_USB_DEV=1
|
||||||
|
CONFIG_EFI_PARTITION=y
|
||||||
|
|
|
||||||
|
|
@ -79,3 +79,12 @@ CONFIG_USB_ETHER_ASIX=y
|
||||||
CONFIG_VIDEO=y
|
CONFIG_VIDEO=y
|
||||||
CONFIG_ERRNO_STR=y
|
CONFIG_ERRNO_STR=y
|
||||||
CONFIG_DM_ETH=y
|
CONFIG_DM_ETH=y
|
||||||
|
CONFIG_CMD_FASTBOOT=y
|
||||||
|
CONFIG_USB_FUNCTION_FASTBOOT=y
|
||||||
|
CONFIG_FSL_FASTBOOT=y
|
||||||
|
CONFIG_FASTBOOT=y
|
||||||
|
CONFIG_FASTBOOT_BUF_ADDR=0x83800000
|
||||||
|
CONFIG_FASTBOOT_BUF_SIZE=0x40000000
|
||||||
|
CONFIG_FASTBOOT_FLASH=y
|
||||||
|
CONFIG_FASTBOOT_FLASH_MMC_DEV=1
|
||||||
|
CONFIG_EFI_PARTITION=y
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CONFIG_SPL_TEXT_BASE 0x7E1000
|
#define CONFIG_SPL_TEXT_BASE 0x7E1000
|
||||||
#define CONFIG_SPL_MAX_SIZE (124 * 1024)
|
#define CONFIG_SPL_MAX_SIZE (148 * 1024)
|
||||||
#define CONFIG_SYS_MONITOR_LEN (512 * 1024)
|
#define CONFIG_SYS_MONITOR_LEN (512 * 1024)
|
||||||
#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
|
#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
|
||||||
#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300
|
#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300
|
||||||
|
|
@ -328,32 +328,23 @@
|
||||||
|
|
||||||
/* USB configs */
|
/* USB configs */
|
||||||
#ifndef CONFIG_SPL_BUILD
|
#ifndef CONFIG_SPL_BUILD
|
||||||
#define CONFIG_USB_XHCI_IMX8M
|
|
||||||
#define CONFIG_USB_XHCI_DWC3
|
|
||||||
#define CONFIG_USB_XHCI_HCD
|
|
||||||
#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
|
#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
|
||||||
|
|
||||||
#define CONFIG_CMD_USB
|
#define CONFIG_CMD_USB
|
||||||
#define CONFIG_USB_STORAGE
|
#define CONFIG_USB_STORAGE
|
||||||
|
|
||||||
#define CONFIG_USB_DWC3
|
|
||||||
#define CONFIG_USB_DWC3_GADGET
|
|
||||||
#define CONFIG_USBD_HS
|
#define CONFIG_USBD_HS
|
||||||
|
|
||||||
#define CONFIG_USB_GADGET
|
|
||||||
#define CONFIG_CMD_USB_MASS_STORAGE
|
#define CONFIG_CMD_USB_MASS_STORAGE
|
||||||
#define CONFIG_USB_GADGET_MASS_STORAGE
|
#define CONFIG_USB_GADGET_MASS_STORAGE
|
||||||
#define CONFIG_USB_GADGET_DOWNLOAD
|
|
||||||
#define CONFIG_USB_GADGET_VBUS_DRAW 2
|
#define CONFIG_USB_GADGET_VBUS_DRAW 2
|
||||||
#define CONFIG_USB_GADGET_DUALSPEED
|
|
||||||
#define CONFIG_USB_FUNCTION_MASS_STORAGE
|
#define CONFIG_USB_FUNCTION_MASS_STORAGE
|
||||||
|
|
||||||
#define CONFIG_USB_GADGET_VENDOR_NUM 0x0525
|
|
||||||
#define CONFIG_USB_GADGET_PRODUCT_NUM 0xa4a5
|
|
||||||
#define CONFIG_USB_GADGET_MANUFACTURER "FSL"
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define CONFIG_SERIAL_TAG
|
||||||
|
#define CONFIG_FASTBOOT_USB_DEV 0
|
||||||
|
|
||||||
#define CONFIG_OF_SYSTEM_SETUP
|
#define CONFIG_OF_SYSTEM_SETUP
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
#include <linux/sizes.h>
|
#include <linux/sizes.h>
|
||||||
#include <asm/arch/imx-regs.h>
|
#include <asm/arch/imx-regs.h>
|
||||||
|
|
||||||
|
#include "imx_env.h"
|
||||||
|
|
||||||
#define CONFIG_REMAKE_ELF
|
#define CONFIG_REMAKE_ELF
|
||||||
|
|
||||||
#define CONFIG_BOARD_EARLY_INIT_F
|
#define CONFIG_BOARD_EARLY_INIT_F
|
||||||
|
|
@ -102,33 +104,28 @@
|
||||||
"m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \
|
"m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \
|
||||||
|
|
||||||
#ifdef CONFIG_NAND_BOOT
|
#ifdef CONFIG_NAND_BOOT
|
||||||
#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:128m(boot),32m(kernel),16m(dtb),8m(misc),-(rootfs) "
|
#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:128m(nandboot),32m(nandkernel),16m(nanddtb),8m(nandtee),-(nandrootfs) "
|
||||||
#else
|
#else
|
||||||
#define MFG_NAND_PARTITION ""
|
#define MFG_NAND_PARTITION ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CONFIG_MFG_ENV_SETTINGS \
|
#define CONFIG_MFG_ENV_SETTINGS \
|
||||||
"mfgtool_args=setenv bootargs console=${console},${baudrate} " \
|
CONFIG_MFG_ENV_SETTINGS_DEFAULT \
|
||||||
"rdinit=/linuxrc " \
|
"clk_ignore_unused "\
|
||||||
"g_mass_storage.stall=0 g_mass_storage.removable=1 " \
|
"\0" \
|
||||||
"g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF "\
|
|
||||||
"g_mass_storage.iSerialNumber=\"\" "\
|
|
||||||
MFG_NAND_PARTITION \
|
|
||||||
"clk_ignore_unused "\
|
|
||||||
"\0" \
|
|
||||||
"initrd_addr=0x83100000\0" \
|
"initrd_addr=0x83100000\0" \
|
||||||
"initrd_high=0xffffffffffffffff\0" \
|
"initrd_high=0xffffffffffffffff\0" \
|
||||||
"bootcmd_mfg=run mfgtool_args; if iminfo ${initrd_addr}; then "\
|
"mtdparts=" MFG_NAND_PARTITION \
|
||||||
"booti ${loadaddr} ${initrd_addr} ${fdt_addr};"\
|
"\0"\
|
||||||
"else fastboot 1; fi\0" \
|
|
||||||
|
|
||||||
/* Initial environment variables */
|
/* Initial environment variables */
|
||||||
#ifdef CONFIG_NAND_BOOT
|
#ifdef CONFIG_NAND_BOOT
|
||||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||||
CONFIG_MFG_ENV_SETTINGS \
|
CONFIG_MFG_ENV_SETTINGS \
|
||||||
"bootargs=console=ttyLP0,115200 ubi.mtd=5 " \
|
"bootargs=console=ttyLP0,115200 ubi.mtd=5 " \
|
||||||
"root=ubi0:rootfs rootfstype=ubifs " \
|
"root=ubi0:nandrootfs rootfstype=ubifs " \
|
||||||
"mtdparts=gpmi-nand:128m(boot),32m(kernel),16m(dtb),8m(misc),-(rootfs)\0"\
|
MFG_NAND_PARTITION \
|
||||||
|
"\0"\
|
||||||
"console=ttyLP0,115200 earlycon=lpuart32,0x5a060000,115200\0" \
|
"console=ttyLP0,115200 earlycon=lpuart32,0x5a060000,115200\0" \
|
||||||
"fdt_addr=0x83000000\0"
|
"fdt_addr=0x83000000\0"
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NAND_BOOT
|
#ifdef CONFIG_NAND_BOOT
|
||||||
#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(boot),16m(kernel),16m(dtb),16m(tee),-(rootfs) "
|
#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(nandboot),16m(nandkernel),16m(nanddtb),16m(nandtee),-(nandrootfs) "
|
||||||
#else
|
#else
|
||||||
#define MFG_NAND_PARTITION ""
|
#define MFG_NAND_PARTITION ""
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -100,6 +100,8 @@
|
||||||
"initrd_high=0xffffffff\0" \
|
"initrd_high=0xffffffff\0" \
|
||||||
"emmc_dev=1\0"\
|
"emmc_dev=1\0"\
|
||||||
"sd_dev=0\0" \
|
"sd_dev=0\0" \
|
||||||
|
"mtdparts=" MFG_NAND_PARTITION \
|
||||||
|
"\0"\
|
||||||
|
|
||||||
#define CONFIG_DFU_ENV_SETTINGS \
|
#define CONFIG_DFU_ENV_SETTINGS \
|
||||||
"dfu_alt_info=image raw 0 0x800000;"\
|
"dfu_alt_info=image raw 0 0x800000;"\
|
||||||
|
|
@ -116,7 +118,7 @@
|
||||||
"fdt_high=0xffffffff\0" \
|
"fdt_high=0xffffffff\0" \
|
||||||
"console=ttymxc0\0" \
|
"console=ttymxc0\0" \
|
||||||
"bootargs=console=ttymxc0,115200 ubi.mtd=4 " \
|
"bootargs=console=ttymxc0,115200 ubi.mtd=4 " \
|
||||||
"root=ubi0:rootfs rootfstype=ubifs " \
|
"root=ubi0:nandrootfs rootfstype=ubifs " \
|
||||||
MFG_NAND_PARTITION \
|
MFG_NAND_PARTITION \
|
||||||
"\0" \
|
"\0" \
|
||||||
"bootcmd=nand read ${loadaddr} 0x4000000 0x800000;"\
|
"bootcmd=nand read ${loadaddr} 0x4000000 0x800000;"\
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue