From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Date: Mon, 6 Feb 2017 10:32:41 -0800 Subject: [U-Boot] [PATCH 1/5] configs: am335x_evm: Enable FASTBOOT based on kconfig In-Reply-To: <154c374b-7a8e-a637-412c-602b8bf127c2@ti.com> References: <20170203234220.28589-1-alex.g@adaptrum.com> <20170203234220.28589-2-alex.g@adaptrum.com> <154c374b-7a8e-a637-412c-602b8bf127c2@ti.com> Message-ID: <01790789-e1d8-2413-8406-c9fa066c4df5@adaptrum.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 02/06/2017 07:15 AM, Andrew F. Davis wrote: > On 02/03/2017 05:42 PM, Alexandru Gagniuc wrote: >> When CONFIG_CMD_FASTBOOT or CONFIG_USB_FUNCTION_FASTBOOT are defined >> in am335x_evm.h, a dependency on g_dnl.c is created. This in turn >> creates a dependency on having USB gadget enabled. >> As a result we can't create configs with USB gadget disabled. >> >> Since these CONFIG_ variables are now part of kconfig, move them to >> the board defconfigs, and out of am335x_evm.h. This both preserves >> current defaults, and allows creating configs with USB gadget off. >> >> Signed-off-by: Alexandru Gagniuc > > Should CONFIG_SYS_LOAD_ADDR be move also? It should, yes, but it is beyond the scope of this patch, I think the CONFIG_SYS_LOAD_ADDR is better handled separately so that we don't end up with an inconsistent tree where some platforms do it in code, and others in Kconfig. Alex > Otherwise, nothing too complex here, looks good, > > Reviewed-by: Andrew F. Davis > >> --- >> configs/am335x_boneblack_defconfig | 5 +++++ >> configs/am335x_boneblack_vboot_defconfig | 3 +++ >> configs/am335x_evm_defconfig | 3 +++ >> configs/am335x_evm_nor_defconfig | 5 +++++ >> configs/am335x_evm_norboot_defconfig | 5 +++++ >> configs/am335x_evm_spiboot_defconfig | 5 +++++ >> configs/am335x_evm_usbspl_defconfig | 5 +++++ >> configs/am335x_hs_evm_defconfig | 5 +++++ >> include/configs/am335x_evm.h | 4 ---- >> 9 files changed, 36 insertions(+), 4 deletions(-) >> >> diff --git a/configs/am335x_boneblack_defconfig b/configs/am335x_boneblack_defconfig >> index 2df4976..325242b 100644 >> --- a/configs/am335x_boneblack_defconfig >> +++ b/configs/am335x_boneblack_defconfig >> @@ -5,6 +5,9 @@ CONFIG_TARGET_AM335X_EVM=y >> CONFIG_SPL_STACK_R_ADDR=0x82000000 >> CONFIG_DISTRO_DEFAULTS=y >> CONFIG_FIT=y >> +CONFIG_FASTBOOT=y >> +CONFIG_FASTBOOT_BUF_ADDR=0x81000000 >> +CONFIG_FASTBOOT_BUF_SIZE=0x07000000 >> CONFIG_SYS_EXTRA_OPTIONS="EMMC_BOOT" >> CONFIG_SYS_CONSOLE_INFO_QUIET=y >> CONFIG_VERSION_VARIABLE=y >> @@ -28,6 +31,7 @@ CONFIG_CMD_I2C=y >> CONFIG_CMD_USB=y >> CONFIG_CMD_DFU=y >> CONFIG_CMD_GPIO=y >> +CONFIG_CMD_FASTBOOT=y >> # CONFIG_CMD_SETEXPR is not set >> CONFIG_CMD_EXT4_WRITE=y >> CONFIG_DFU_TFTP=y >> @@ -41,6 +45,7 @@ CONFIG_USB=y >> CONFIG_USB_MUSB_HOST=y >> CONFIG_USB_MUSB_GADGET=y >> CONFIG_USB_STORAGE=y >> +CONFIG_USB_FUNCTION_FASTBOOT=y >> CONFIG_USB_GADGET=y >> CONFIG_USB_GADGET_DOWNLOAD=y >> CONFIG_G_DNL_MANUFACTURER="Texas Instruments" >> diff --git a/configs/am335x_boneblack_vboot_defconfig b/configs/am335x_boneblack_vboot_defconfig >> index e425260..cfad7e9 100644 >> --- a/configs/am335x_boneblack_vboot_defconfig >> +++ b/configs/am335x_boneblack_vboot_defconfig >> @@ -6,6 +6,9 @@ CONFIG_SPL_STACK_R_ADDR=0x82000000 >> CONFIG_DEFAULT_DEVICE_TREE="am335x-boneblack" >> CONFIG_DISTRO_DEFAULTS=y >> CONFIG_FIT=y >> +CONFIG_FASTBOOT=y >> +CONFIG_FASTBOOT_BUF_ADDR=0x81000000 >> +CONFIG_FASTBOOT_BUF_SIZE=0x07000000 >> CONFIG_FIT_SIGNATURE=y >> CONFIG_FIT_VERBOSE=y >> CONFIG_SYS_EXTRA_OPTIONS="EMMC_BOOT,ENABLE_VBOOT" >> diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig >> index ab7b9aa..6477a00 100644 >> --- a/configs/am335x_evm_defconfig >> +++ b/configs/am335x_evm_defconfig >> @@ -5,6 +5,9 @@ CONFIG_SPL_STACK_R_ADDR=0x82000000 >> CONFIG_DEFAULT_DEVICE_TREE="am335x-evm" >> CONFIG_DISTRO_DEFAULTS=y >> CONFIG_FIT=y >> +CONFIG_FASTBOOT=y >> +CONFIG_FASTBOOT_BUF_ADDR=0x81000000 >> +CONFIG_FASTBOOT_BUF_SIZE=0x07000000 >> CONFIG_SPL_LOAD_FIT=y >> CONFIG_SYS_EXTRA_OPTIONS="NAND" >> CONFIG_SYS_CONSOLE_INFO_QUIET=y >> diff --git a/configs/am335x_evm_nor_defconfig b/configs/am335x_evm_nor_defconfig >> index 8a63ad2..d9aa3a2 100644 >> --- a/configs/am335x_evm_nor_defconfig >> +++ b/configs/am335x_evm_nor_defconfig >> @@ -5,6 +5,9 @@ CONFIG_SPL_STACK_R_ADDR=0x82000000 >> CONFIG_NOR=y >> CONFIG_DISTRO_DEFAULTS=y >> CONFIG_FIT=y >> +CONFIG_FASTBOOT=y >> +CONFIG_FASTBOOT_BUF_ADDR=0x81000000 >> +CONFIG_FASTBOOT_BUF_SIZE=0x07000000 >> CONFIG_SYS_EXTRA_OPTIONS="NAND" >> CONFIG_SYS_CONSOLE_INFO_QUIET=y >> CONFIG_VERSION_VARIABLE=y >> @@ -24,6 +27,7 @@ CONFIG_CMD_I2C=y >> CONFIG_CMD_USB=y >> CONFIG_CMD_DFU=y >> CONFIG_CMD_GPIO=y >> +CONFIG_CMD_FASTBOOT=y >> # CONFIG_CMD_SETEXPR is not set >> CONFIG_CMD_EXT4_WRITE=y >> CONFIG_DFU_MMC=y >> @@ -37,6 +41,7 @@ CONFIG_USB=y >> CONFIG_USB_MUSB_HOST=y >> CONFIG_USB_MUSB_GADGET=y >> CONFIG_USB_STORAGE=y >> +CONFIG_USB_FUNCTION_FASTBOOT=y >> CONFIG_USB_GADGET=y >> CONFIG_USB_GADGET_DOWNLOAD=y >> CONFIG_G_DNL_MANUFACTURER="Texas Instruments" >> diff --git a/configs/am335x_evm_norboot_defconfig b/configs/am335x_evm_norboot_defconfig >> index f77b50c..56e119e 100644 >> --- a/configs/am335x_evm_norboot_defconfig >> +++ b/configs/am335x_evm_norboot_defconfig >> @@ -4,6 +4,9 @@ CONFIG_TARGET_AM335X_EVM=y >> CONFIG_NOR=y >> CONFIG_DISTRO_DEFAULTS=y >> CONFIG_FIT=y >> +CONFIG_FASTBOOT=y >> +CONFIG_FASTBOOT_BUF_ADDR=0x81000000 >> +CONFIG_FASTBOOT_BUF_SIZE=0x07000000 >> CONFIG_NOR_BOOT=y >> CONFIG_SYS_CONSOLE_INFO_QUIET=y >> CONFIG_VERSION_VARIABLE=y >> @@ -19,6 +22,7 @@ CONFIG_CMD_I2C=y >> CONFIG_CMD_USB=y >> CONFIG_CMD_DFU=y >> CONFIG_CMD_GPIO=y >> +CONFIG_CMD_FASTBOOT=y >> # CONFIG_CMD_SETEXPR is not set >> CONFIG_CMD_EXT4_WRITE=y >> CONFIG_DFU_MMC=y >> @@ -31,6 +35,7 @@ CONFIG_USB=y >> CONFIG_USB_MUSB_HOST=y >> CONFIG_USB_MUSB_GADGET=y >> CONFIG_USB_STORAGE=y >> +CONFIG_USB_FUNCTION_FASTBOOT=y >> CONFIG_USB_GADGET=y >> CONFIG_USB_GADGET_DOWNLOAD=y >> CONFIG_G_DNL_MANUFACTURER="Texas Instruments" >> diff --git a/configs/am335x_evm_spiboot_defconfig b/configs/am335x_evm_spiboot_defconfig >> index 26f1f37..99fcdd3 100644 >> --- a/configs/am335x_evm_spiboot_defconfig >> +++ b/configs/am335x_evm_spiboot_defconfig >> @@ -7,6 +7,9 @@ CONFIG_SPL_SPI_SUPPORT=y >> CONFIG_SPL_STACK_R_ADDR=0x82000000 >> CONFIG_DISTRO_DEFAULTS=y >> CONFIG_FIT=y >> +CONFIG_FASTBOOT=y >> +CONFIG_FASTBOOT_BUF_ADDR=0x81000000 >> +CONFIG_FASTBOOT_BUF_SIZE=0x07000000 >> CONFIG_SYS_EXTRA_OPTIONS="SPI_BOOT" >> CONFIG_SPI_BOOT=y >> CONFIG_SYS_CONSOLE_INFO_QUIET=y >> @@ -19,6 +22,7 @@ CONFIG_SPL_MUSB_NEW_SUPPORT=y >> CONFIG_CMD_ASKENV=y >> # CONFIG_CMD_FLASH is not set >> CONFIG_CMD_GPT=y >> +CONFIG_CMD_FASTBOOT=y >> CONFIG_CMD_MMC=y >> CONFIG_CMD_SF=y >> CONFIG_CMD_SPI=y >> @@ -38,6 +42,7 @@ CONFIG_USB=y >> CONFIG_USB_MUSB_HOST=y >> CONFIG_USB_MUSB_GADGET=y >> CONFIG_USB_STORAGE=y >> +CONFIG_USB_FUNCTION_FASTBOOT=y >> CONFIG_USB_GADGET=y >> CONFIG_USB_GADGET_DOWNLOAD=y >> CONFIG_G_DNL_MANUFACTURER="Texas Instruments" >> diff --git a/configs/am335x_evm_usbspl_defconfig b/configs/am335x_evm_usbspl_defconfig >> index a79470e..6ed9b9a 100644 >> --- a/configs/am335x_evm_usbspl_defconfig >> +++ b/configs/am335x_evm_usbspl_defconfig >> @@ -3,6 +3,9 @@ CONFIG_AM33XX=y >> CONFIG_TARGET_AM335X_EVM=y >> CONFIG_SPL_STACK_R_ADDR=0x82000000 >> CONFIG_DISTRO_DEFAULTS=y >> +CONFIG_FASTBOOT=y >> +CONFIG_FASTBOOT_BUF_ADDR=0x81000000 >> +CONFIG_FASTBOOT_BUF_SIZE=0x07000000 >> CONFIG_FIT=y >> CONFIG_SYS_EXTRA_OPTIONS="NAND" >> CONFIG_SYS_CONSOLE_INFO_QUIET=y >> @@ -16,6 +19,7 @@ CONFIG_SPL_NET_SUPPORT=y >> CONFIG_SPL_OS_BOOT=y >> # CONFIG_CMD_IMLS is not set >> CONFIG_CMD_ASKENV=y >> +CONFIG_CMD_FASTBOOT=y >> # CONFIG_CMD_FLASH is not set >> CONFIG_CMD_GPT=y >> CONFIG_CMD_MMC=y >> @@ -38,6 +42,7 @@ CONFIG_USB=y >> CONFIG_USB_MUSB_HOST=y >> CONFIG_USB_MUSB_GADGET=y >> CONFIG_USB_STORAGE=y >> +CONFIG_USB_FUNCTION_FASTBOOT=y >> CONFIG_USB_GADGET=y >> CONFIG_USB_GADGET_DOWNLOAD=y >> CONFIG_G_DNL_MANUFACTURER="Texas Instruments" >> diff --git a/configs/am335x_hs_evm_defconfig b/configs/am335x_hs_evm_defconfig >> index d6224bc..8f16b1b 100644 >> --- a/configs/am335x_hs_evm_defconfig >> +++ b/configs/am335x_hs_evm_defconfig >> @@ -9,6 +9,9 @@ CONFIG_SPL_STACK_R_ADDR=0x82000000 >> # CONFIG_SPL_YMODEM_SUPPORT is not set >> CONFIG_DEFAULT_DEVICE_TREE="am335x-evm" >> CONFIG_DISTRO_DEFAULTS=y >> +CONFIG_FASTBOOT=y >> +CONFIG_FASTBOOT_BUF_ADDR=0x81000000 >> +CONFIG_FASTBOOT_BUF_SIZE=0x07000000 >> CONFIG_FIT=y >> CONFIG_SYS_EXTRA_OPTIONS="NAND" >> CONFIG_SPL_LOAD_FIT=y >> @@ -22,6 +25,7 @@ CONFIG_SPL_STACK_R=y >> CONFIG_SPL_MTD_SUPPORT=y >> # CONFIG_CMD_IMLS is not set >> CONFIG_CMD_ASKENV=y >> +CONFIG_CMD_FASTBOOT=y >> # CONFIG_CMD_FLASH is not set >> CONFIG_CMD_MMC=y >> CONFIG_CMD_SF=y >> @@ -52,6 +56,7 @@ CONFIG_USB=y >> CONFIG_USB_MUSB_HOST=y >> CONFIG_USB_MUSB_GADGET=y >> CONFIG_USB_STORAGE=y >> +CONFIG_USB_FUNCTION_FASTBOOT=y >> CONFIG_USB_GADGET=y >> CONFIG_USB_GADGET_DOWNLOAD=y >> CONFIG_G_DNL_MANUFACTURER="Texas Instruments" >> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h >> index d8e6ba3..85c0728 100644 >> --- a/include/configs/am335x_evm.h >> +++ b/include/configs/am335x_evm.h >> @@ -264,11 +264,7 @@ >> >> #ifndef CONFIG_SPL_USBETH_SUPPORT >> /* Fastboot */ >> -#define CONFIG_USB_FUNCTION_FASTBOOT >> -#define CONFIG_CMD_FASTBOOT >> #define CONFIG_ANDROID_BOOT_IMAGE >> -#define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR >> -#define CONFIG_FASTBOOT_BUF_SIZE 0x07000000 >> >> #define CONFIG_FASTBOOT_FLASH_MMC_DEV 1 >> #endif >>