Fix dependencies of USB Kconfig options
Subsystems (3)
cover Fix dependencies of USB Kconfig options
When USB device driver CONFIG_USB and CONFIG_CMD_USB are disabled, some compilation issues are seen. Also CMD_THOR_DOWNLOAD should depend on CONFIG_CMD_USB. Add dependencies to resolve those issues and compile properly. Also remove unused config CONFIG_ZYNQMP_USB.
Ashok Reddy Soma (2):
cmd: thordown: Add proper dependency for CMD_THOR_DOWNLOAD
zynqmp: config: Add proper dependencies for USB
arch/arm/mach-zynqmp/Kconfig | 3 --- cmd/Kconfig | 1 + configs/xilinx_zynqmp_virt_defconfig | 1 - include/configs/xilinx_zynqmp.h | 4 ++-- 4 files changed, 3 insertions(+), 6 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/2 cmd: thordown: Add proper dependency for CMD_THOR_DOWNLOAD
When CONFIG_CMD_USB and CONFIG_USB are disabled some compilation errors are seen as below.
cmd/thordown.o: in function `usb_gadget_initialize':include/linux/usb/gadget.h:981: undefined reference to board_usb_init' cmd/thordown.o: in function do_thor_down':cmd/thordown.c:68: undefined reference to g_dnl_unregister' cmd/thordown.o: in function usb_gadget_release':include/linux/usb/gadget.h:986: undefined reference to board_usb_cleanup' cmd/thordown.o: in function do_thor_down':cmd/thordown.c:41: undefined reference to g_dnl_register' cmd/thordown.c:48: undefined reference to thor_init' cmd/thordown.c:56: undefined reference to `thor_handle' gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-ld.bfd: line 4: 8485
Segmentation fault (core dumped) $CC --sysroot=$LIBC
--no-warn-rwx-segment "$@"
Makefile:1779: recipe for target 'u-boot' failed
make: *** [u-boot] Error 139
make: *** Deleting file 'u-boot'
Add dependency of CMD_USB for CONFIG_CMD_THOR_DOWNLOAD to fix the errors.
---
cmd/Kconfig | 1 + 1 file changed, 1 insertion(+)
cmd/Kconfig +1 -0
@@ -526,6 +526,7 @@ config CMD_SPL_WRITE_SIZE config CMD_THOR_DOWNLOAD bool "thor - TIZEN 'thor' download" + depends on CMD_USB select DFU help Implements the 'thor' download protocol. This is a way of
Signature · 1 line
2.17.1
Re: [PATCH 1/2] cmd: thordown: Add proper dependency for CMD_THOR_DOWNLOAD
Am 9. Juli 2023 15:09:57 MESZ schrieb Ashok Reddy Soma <[email protected]>:
Quoted 2 lines
When
CONFIG_CMD_USBandCONFIG_USBare disabled some compilation errors are seen as below.
Thanks for your patch.
Currently we have no documentation for the thordown command. We should create a man page in /docs/usage/cmd/.
Do you have any description of the usage of the command?
Best regards
Heinrich
Quoted 38 lines
cmd/thordown.o: in function `usb_gadget_initialize':include/linux/usb/gadget.h:981: undefined reference toboard_usb_init' cmd/thordown.o: in functiondo_thor_down':cmd/thordown.c:68: undefined reference tog_dnl_unregister' cmd/thordown.o: in functionusb_gadget_release':include/linux/usb/gadget.h:986: undefined reference toboard_usb_cleanup' cmd/thordown.o: in functiondo_thor_down':cmd/thordown.c:41: undefined reference tog_dnl_register' cmd/thordown.c:48: undefined reference tothor_init'cmd/thordown.c:56: undefined reference to `thor_handle' gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-ld.bfd: line 4: 8485
Segmentation fault (core dumped) $CC --sysroot=$LIBC
--no-warn-rwx-segment "$@"
Makefile:1779: recipe for target 'u-boot' failed
make: *** [u-boot] Error 139
make: *** Deleting file 'u-boot'Add dependency of
CMD_USBforCONFIG_CMD_THOR_DOWNLOADto fix the errors.Signed-off-by Ashok Reddy Soma <[email protected]>---
cmd/Kconfig | 1 +
1 file changed, 1 insertion(+)cmd/Kconfig +0
-0@@ -526,6 +526,7 @@ config CMD_SPL_WRITE_SIZEconfig
CMD_THOR_DOWNLOAD
bool "thor - TIZEN 'thor' download"cmd/Kconfig +1
-0+ depends on CMD_USBselect DFU
help
Implements the 'thor' download protocol. This is a way of
RE: [PATCH 1/2] cmd: thordown: Add proper dependency for CMD_THOR_DOWNLOAD
Hi Heinrich,
Quoted 18 lines
-----Original Message-----
From: Heinrich Schuchardt <[email protected]>
Sent: Sunday, July 9, 2023 7:09 PM
To: Soma, Ashok Reddy <[email protected]>; u- [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Simek, Michal <[email protected]>; git (AMD- Xilinx) <[email protected]>
Subject: Re: [PATCH 1/2] cmd: thordown: Add proper dependency forCMD_THOR_DOWNLOADAm 9. Juli 2023 15:09:57 MESZ schrieb Ashok Reddy Soma <[email protected]>:
Quoted 1 line
When
CONFIG_CMD_USBandCONFIG_USBare disabled some compilationerrors
Quoted 8 lines
Quoted 1 line
are seen as below.
Thanks for your patch.
Currently we have no documentation for the thordown command. We should create a man page in /docs/usage/cmd/.
Do you have any description of the usage of the command?
No, I was not working with thor download command
I was disabling CONFIG_CMD_USB and CONFIG_USB and saw some compilation errors from cmd/thordown.c. So, added dependency and sent patch.
Thanks,
Ashok
Quoted 47 lines
Best regards
Heinrich
Quoted 7 lines
cmd/thordown.o: in function `usb_gadget_initialize':include/linux/usb/gadget.h:981: undefined reference toboard_usb_init' cmd/thordown.o: in functiondo_thor_down':cmd/thordown.c:68: undefined reference tog_dnl_unregister' cmd/thordown.o: in functionusb_gadget_release':include/linux/usb/gadget.h:986: undefined reference to`board_usb_cleanup'
Quoted 11 lines
cmd/thordown.o: in function `do_thor_down':cmd/thordown.c:41: undefined reference tog_dnl_register' cmd/thordown.c:48: undefined reference tothor_init'cmd/thordown.c:56: undefined reference to `thor_handle' gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-ld.bfd: line 4: 8485
Segmentation fault (core dumped) $CC --sysroot=$LIBC
--no-warn-rwx-segment "$@"
Makefile:1779: recipe for target 'u-boot' failed
make: *** [u-boot] Error 139
make: *** Deleting file 'u-boot'Quoted 1 line
Add dependency of
CMD_USBforCONFIG_CMD_THOR_DOWNLOADto fixthe errors.
Quoted 19 lines
Signed-off-by Ashok Reddy Soma <[email protected]>---
cmd/Kconfig | 1 +
1 file changed, 1 insertion(+)cmd/Kconfig +0
-0@@ -526,6 +526,7 @@ config CMD_SPL_WRITE_SIZEconfig
CMD_THOR_DOWNLOAD
bool "thor - TIZEN 'thor' download"cmd/Kconfig +1
-0+ depends on CMD_USBselect DFU
help
Implements the 'thor' download protocol. This is a way of
Re: [PATCH 1/2] cmd: thordown: Add proper dependency for CMD_THOR_DOWNLOAD
In reply to Ashok Reddy SomaQuoted 33 lines · Ashok Reddy Soma
When
CONFIG_CMD_USBandCONFIG_USBare disabled some compilation errors are seen as below.
cmd/thordown.o: in function `usb_gadget_initialize':include/linux/usb/gadget.h:981: undefined reference toboard_usb_init' cmd/thordown.o: in functiondo_thor_down':cmd/thordown.c:68: undefined reference tog_dnl_unregister' cmd/thordown.o: in functionusb_gadget_release':include/linux/usb/gadget.h:986: undefined reference toboard_usb_cleanup' cmd/thordown.o: in functiondo_thor_down':cmd/thordown.c:41: undefined reference tog_dnl_register' cmd/thordown.c:48: undefined reference tothor_init'cmd/thordown.c:56: undefined reference to `thor_handle' gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-ld.bfd: line 4: 8485
Segmentation fault (core dumped) $CC --sysroot=$LIBC
--no-warn-rwx-segment "$@"
Makefile:1779: recipe for target 'u-boot' failed
make: *** [u-boot] Error 139
make: *** Deleting file 'u-boot'Add dependency of
CMD_USBforCONFIG_CMD_THOR_DOWNLOADto fix the errors.Signed-off-by Ashok Reddy Soma <[email protected]>---
cmd/Kconfig | 1 + 1 file changed, 1 insertion(+)cmd/Kconfig +0
-0
cmd/Kconfig config CMD_SPL_WRITE_SIZE · line 532
Quoted 7 lines
cmd/Kconfig +1
-0@@ -526,6 +526,7 @@ config CMD_SPL_WRITE_SIZE config CMD_THOR_DOWNLOAD bool "thor - TIZEN 'thor' download" + depends on CMD_USB select DFU help Implements the 'thor' download protocol. This is a way of
This isn't right, and removes the command from s5p_goni. The issue is that CMD_USB is for host support, and this is a gadget command. Likely the best answer is to make this depend on USB_FUNCTION_THOR, or select USB_FUNCTION_THOR but depend on USB_GADGET_DOWNLOAD.
Signature · 1 line
Tom
Re: [PATCH 1/2] cmd: thordown: Add proper dependency for CMD_THOR_DOWNLOAD
In reply to Ashok Reddy SomaQuoted 20 lines · Ashok Reddy Soma
When
CONFIG_CMD_USBandCONFIG_USBare disabled some compilation errors are seen as below.
cmd/thordown.o: in function `usb_gadget_initialize':include/linux/usb/gadget.h:981: undefined reference toboard_usb_init' cmd/thordown.o: in functiondo_thor_down':cmd/thordown.c:68: undefined reference tog_dnl_unregister' cmd/thordown.o: in functionusb_gadget_release':include/linux/usb/gadget.h:986: undefined reference toboard_usb_cleanup' cmd/thordown.o: in functiondo_thor_down':cmd/thordown.c:41: undefined reference tog_dnl_register' cmd/thordown.c:48: undefined reference tothor_init'cmd/thordown.c:56: undefined reference to `thor_handle' gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-ld.bfd: line 4: 8485
Segmentation fault (core dumped) $CC --sysroot=$LIBC
--no-warn-rwx-segment "$@"
Makefile:1779: recipe for target 'u-boot' failed
make: *** [u-boot] Error 139
make: *** Deleting file 'u-boot'
Quoted 3 lines
Add dependency of
CMD_USBforCONFIG_CMD_THOR_DOWNLOADto fix the errors.Signed-off-by Ashok Reddy Soma <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom
Re: [PATCH 1/2] cmd: thordown: Add proper dependency for CMD_THOR_DOWNLOAD
Quoted 22 lines · Tom Rini
Quoted 20 lines · Ashok Reddy Soma
When
CONFIG_CMD_USBandCONFIG_USBare disabled some compilation errors are seen as below.
cmd/thordown.o: in function `usb_gadget_initialize':include/linux/usb/gadget.h:981: undefined reference toboard_usb_init' cmd/thordown.o: in functiondo_thor_down':cmd/thordown.c:68: undefined reference tog_dnl_unregister' cmd/thordown.o: in functionusb_gadget_release':include/linux/usb/gadget.h:986: undefined reference toboard_usb_cleanup' cmd/thordown.o: in functiondo_thor_down':cmd/thordown.c:41: undefined reference tog_dnl_register' cmd/thordown.c:48: undefined reference tothor_init'cmd/thordown.c:56: undefined reference to `thor_handle' gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-ld.bfd: line 4: 8485
Segmentation fault (core dumped) $CC --sysroot=$LIBC
--no-warn-rwx-segment "$@"
Makefile:1779: recipe for target 'u-boot' failed
make: *** [u-boot] Error 139
make: *** Deleting file 'u-boot'
Quoted 5 lines
Quoted 3 lines
Add dependency of
CMD_USBforCONFIG_CMD_THOR_DOWNLOADto fix the errors.Signed-off-by Ashok Reddy Soma <[email protected]>Applied to u-boot/master, thanks!
No, no I didn't apply this still, I just forgot to remove it from the bundle before making all the applied messages.
At least I'm not also tagging a release today, sigh.
Signature · 1 line
Tom
PATCH 2/2 zynqmp: config: Add proper dependencies for USB
In reply to Ashok Reddy SomaWhen CONFIG_CMD_USB and CONFIG_USB are disabled, still some compilation errors are seen as below.
In file included from include/configs/xilinx_zynqmp.h:173,
from include/config.h:3,
from include/common.h:16,
from env/common.c:10:
include/config_distro_bootcmd.h:302:9: error: expected '}' before 'BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB'
302 | BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/config_distro_bootcmd.h:302:9: note: in definition of macro
'BOOTENV_DEV_NAME_USB'
302 | BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~include/configs/xilinx_zynqmp.h:77:41: note: in expansion of macro 'BOOTENV_DEV_NAME'
77 | # define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0) func(USB, usb, 1)
| ^~~~include/configs/xilinx_zynqmp.h:168:9: note: in expansion of macro 'BOOT_TARGET_DEVICES_USB'
168 | BOOT_TARGET_DEVICES_USB(func) \
| ^~~~~~~~~~~~~~~~~~~~~~~
include/config_distro_bootcmd.h:454:25: note: in expansion of macro
'BOOT_TARGET_DEVICES'
454 | "boot_targets=" BOOT_TARGET_DEVICES(BOOTENV_DEV_NAME) "\0"
| ^~~~~~~~~~~~~~~~~~~
include/config_distro_bootcmd.h:474:9: note: in expansion of macro
'BOOTENV_BOOT_TARGETS'
474 | BOOTENV_BOOT_TARGETS \
| ^~~~~~~~~~~~~~~~~~~~
include/configs/xilinx_zynqmp.h:179:9: note: in expansion of macro
'BOOTENV'
179 | BOOTENV
| ^~~~~~~
include/env_default.h:120:9: note: in expansion of macro
'CFG_EXTRA_ENV_SETTINGS'
120 | CFG_EXTRA_ENV_SETTINGS
| ^~~~~~~~~~~~~~~~~~~~~~In file included from env/common.c:32:include/env_default.h:27:36: note: to match this '{'
27 | const char default_environment[] = {
| ^scripts/Makefile.build:256: recipe for target 'env/common.o' failed make[1]: *** [env/common.o] Error 1
Makefile:1853: recipe for target 'env' failed
make: *** [env] Error 2
make: *** Waiting for unfinished jobs....
Add CONFIG_USB_STORAGE as dependency for USB related macro's such as BOOT_TARGET_DEVICES_USB() and DFU_DEFAULT_POLL_TIMEOUT and CONFIG_THOR_RESET_OFF.
Remove CONFIG_ZYNQMP_USB from Kconfig and also from defconfig since it is not used anywhere else.
---
arch/arm/mach-zynqmp/Kconfig | 3 --- configs/xilinx_zynqmp_virt_defconfig | 1 - include/configs/xilinx_zynqmp.h | 4 ++-- 3 files changed, 2 insertions(+), 6 deletions(-)
arch/arm/mach-zynqmp/Kconfig +0 -3
@@ -84,9 +84,6 @@ config ZYNQMP_SPL_PM_CFG_OBJ_FILE Leave this option empty if your PMU firmware has a hard-coded configuration object or you are loading it by any other means. -config ZYNQMP_USB - bool "Configure ZynqMP USB" - config ZYNQMP_NO_DDR bool "Disable DDR MMU mapping" help
configs/xilinx_zynqmp_virt_defconfig +0 -1
@@ -17,7 +17,6 @@ CONFIG_ENV_OFFSET_REDUND=0x1E80000 CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y CONFIG_CMD_FRU=y -CONFIG_ZYNQMP_USB=y CONFIG_SYS_LOAD_ADDR=0x8000000 CONFIG_AHCI=y CONFIG_SYS_MEMTEST_START=0x00000000
include/configs/xilinx_zynqmp.h +2 -2
@@ -29,7 +29,7 @@/* Miscellaneous configurable options */ -#if defined(CONFIG_ZYNQMP_USB ) +#if defined(CONFIG_USB_STORAGE )#define DFU_DEFAULT_POLL_TIMEOUT 300# define PARTS_DEFAULT \
@@ -73,7 +73,7 @@# define BOOT_TARGET_DEVICES_SCSI (func)#endif -#if defined(CONFIG_ZYNQMP_USB ) +#if defined(CONFIG_USB_STORAGE )# define BOOT_TARGET_DEVICES_USB (func) func(USB, usb, 0) func(USB, usb, 1)#else # define BOOT_TARGET_DEVICES_USB (func)
Signature · 1 line
2.17.1