diff mbox series

[1/2] cmd: thordown: Add proper dependency for CMD_THOR_DOWNLOAD

Message ID 20230709130958.7666-2-ashok.reddy.soma@amd.com
State Changes Requested
Delegated to: Tom Rini
Headers show
Series Fix dependencies of USB Kconfig options | expand

Commit Message

Ashok Reddy Soma July 9, 2023, 1:09 p.m. UTC
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.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
---

 cmd/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Heinrich Schuchardt July 9, 2023, 1:39 p.m. UTC | #1
Am 9. Juli 2023 15:09:57 MESZ schrieb Ashok Reddy Soma <ashok.reddy.soma@amd.com>:
>When CONFIG_CMD_USB and CONFIG_USB are 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



>
>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.
>
>Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
>---
>
> cmd/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/cmd/Kconfig b/cmd/Kconfig
>index 02e54f1e50..b44df9d67a 100644
>--- a/cmd/Kconfig
>+++ b/cmd/Kconfig
>@@ -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
Ashok Reddy Soma July 9, 2023, 2 p.m. UTC | #2
Hi Heinrich,

> -----Original Message-----
> From: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Sent: Sunday, July 9, 2023 7:09 PM
> To: Soma, Ashok Reddy <ashok.reddy.soma@amd.com>; u-
> boot@lists.denx.de
> Cc: sjg@chromium.org; ilias.apalodimas@linaro.org; rfried.dev@gmail.com;
> seanedmond@microsoft.com; tobias@waldekranz.com; sr@denx.de;
> john@metanate.com; Simek, Michal <michal.simek@amd.com>; git (AMD-
> Xilinx) <git@amd.com>
> Subject: 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
> <ashok.reddy.soma@amd.com>:
> >When CONFIG_CMD_USB and CONFIG_USB are 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?

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

> 
> Best regards
> 
> Heinrich
> 
> 
> 
> >
> >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.
> >
> >Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
> >---
> >
> > cmd/Kconfig | 1 +
> > 1 file changed, 1 insertion(+)
> >
> >diff --git a/cmd/Kconfig b/cmd/Kconfig
> >index 02e54f1e50..b44df9d67a 100644
> >--- a/cmd/Kconfig
> >+++ b/cmd/Kconfig
> >@@ -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
Tom Rini July 14, 2023, 7:24 p.m. UTC | #3
On Sun, Jul 09, 2023 at 07:09:57AM -0600, Ashok Reddy Soma wrote:
> 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.
> 
> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
> ---
> 
>  cmd/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/cmd/Kconfig b/cmd/Kconfig
> index 02e54f1e50..b44df9d67a 100644
> --- a/cmd/Kconfig
> +++ b/cmd/Kconfig
> @@ -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.
Tom Rini July 15, 2023, 3:03 p.m. UTC | #4
On Sun, Jul 09, 2023 at 07:09:57AM -0600, Ashok Reddy Soma wrote:

> 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.
> 
> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>

Applied to u-boot/master, thanks!
Tom Rini July 15, 2023, 3:04 p.m. UTC | #5
On Sat, Jul 15, 2023 at 11:03:53AM -0400, Tom Rini wrote:
> On Sun, Jul 09, 2023 at 07:09:57AM -0600, Ashok Reddy Soma wrote:
> 
> > 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.
> > 
> > Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
> 
> 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.
diff mbox series

Patch

diff --git a/cmd/Kconfig b/cmd/Kconfig
index 02e54f1e50..b44df9d67a 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -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