U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Quentin Schulz <quentin.schulz@cherry.de>
Cc: FUKAUMI Naoki <naoki@radxa.com>,
	u-boot@lists.denx.de, sjg@chromium.org, philipp.tomsich@vrull.eu,
	kever.yang@rock-chips.com, jonas@kwiboo.se, dsimic@manjaro.org,
	pbrobinson@gmail.com, marek.vasut+renesas@mailbox.org,
	ian.roberts@timesys.com, nathan.morrison@timesys.com,
	greg.malysa@timesys.com, bb@ti.com
Subject: Re: [PATCH 1/3] rockchip: Fix TPL link error
Date: Wed, 29 Jan 2025 09:29:26 -0600	[thread overview]
Message-ID: <20250129152926.GU1233568@bill-the-cat> (raw)
In-Reply-To: <d7c14292-1d74-4692-b981-8b674c005069@cherry.de>

[-- Attachment #1: Type: text/plain, Size: 2738 bytes --]

On Wed, Jan 29, 2025 at 03:16:13PM +0100, Quentin Schulz wrote:
> Hi Naoki,
> 
> On 1/29/25 2:25 PM, FUKAUMI Naoki wrote:
> > Rockchip RK3399 targets build TPL. If CONFIG_SPL_USB_DWC3_GENERIC and
> > CONFIG_SPL_USB_GADGET are enabled, linking u-boot-tpl will fail.
> > 
> >    LD      tpl/u-boot-tpl
> > ld.bfd: drivers/usb/dwc3/dwc3-generic.o: in function `dwc3_glue_bind_common':
> > /home/radxa/u-boot/drivers/usb/dwc3/dwc3-generic.c:527:(.text.dwc3_glue_bind_common+0x20): undefined reference to `usb_get_dr_mode'
> > /home/radxa/u-boot/drivers/usb/dwc3/dwc3-generic.c:527:(.text.dwc3_glue_bind_common+0x20): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `usb_get_dr_mode'
> > ld.bfd: /home/radxa/u-boot/drivers/usb/dwc3/dwc3-generic.c:529:(.text.dwc3_glue_bind_common+0x2c): undefined reference to `usb_get_dr_mode'
> > /home/radxa/u-boot/drivers/usb/dwc3/dwc3-generic.c:529:(.text.dwc3_glue_bind_common+0x2c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `usb_get_dr_mode'
> > ld.bfd: drivers/usb/dwc3/dwc3-generic.o: in function `dwc3_glue_probe':
> > /home/radxa/u-boot/drivers/usb/dwc3/dwc3-generic.c:683:(.text.dwc3_glue_probe+0xb0): undefined reference to `usb_get_dr_mode'
> > /home/radxa/u-boot/drivers/usb/dwc3/dwc3-generic.c:683:(.text.dwc3_glue_probe+0xb0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `usb_get_dr_mode'
> > 
> > Do not compile drivers/usb/ for TPL.
> > 
> > Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
> > ---
> >   scripts/Makefile.xpl | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/scripts/Makefile.xpl b/scripts/Makefile.xpl
> > index abc49fbe6c9..e4ca4d395ac 100644
> > --- a/scripts/Makefile.xpl
> > +++ b/scripts/Makefile.xpl
> > @@ -125,8 +125,8 @@ endif
> >   libs-y += drivers/
> >   libs-$(CONFIG_SPL_MEMORY) += drivers/memory/
> > -libs-$(CONFIG_SPL_USB_GADGET) += drivers/usb/dwc3/
> > -libs-$(CONFIG_SPL_USB_GADGET) += drivers/usb/cdns3/
> > +libs-$(CONFIG_$(PHASE_)USB_GADGET) += drivers/usb/dwc3/
> > +libs-$(CONFIG_$(PHASE_)USB_GADGET) += drivers/usb/cdns3/
> 
> I don't know what this is actually used for? Like why is it different from
> the typical Makefile we have for other subsystems and drivers?
> 
> Can't we simply remove those and add them in drivers/Makefile, like:
> 
> obj-$(CONFIG_$(PHASE_)USB_GADGET) += usb/dwc3/
> obj-$(CONFIG_$(PHASE_)USB_GADGET) += usb/cdns3/
> 
> For example?

The likely answer is that we used to not have consistent CONFIG naming
here between SPL support and non-SPL support, and while that's since
been corrected, this part was never updated to take advantage of that.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

      reply	other threads:[~2025-01-29 15:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-29 13:25 [PATCH 1/3] rockchip: Fix TPL link error FUKAUMI Naoki
2025-01-29 13:25 ` [PATCH 2/3] rockchip: Fix SPL link error for Radxa ROCK Pi 4 FUKAUMI Naoki
2025-02-05 11:37   ` Quentin Schulz
2025-02-05 16:20     ` Jonas Karlman
2025-01-29 13:25 ` [PATCH 3/3] rockchip: Fix binman error FUKAUMI Naoki
2025-02-05 12:59   ` Quentin Schulz
2025-02-06 12:46     ` Simon Glass
2025-02-06 16:54       ` Quentin Schulz
2025-02-09 14:27         ` Simon Glass
2025-02-10  7:40           ` FUKAUMI Naoki
2025-02-11  5:41     ` FUKAUMI Naoki
2025-01-29 14:16 ` [PATCH 1/3] rockchip: Fix TPL link error Quentin Schulz
2025-01-29 15:29   ` Tom Rini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250129152926.GU1233568@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=bb@ti.com \
    --cc=dsimic@manjaro.org \
    --cc=greg.malysa@timesys.com \
    --cc=ian.roberts@timesys.com \
    --cc=jonas@kwiboo.se \
    --cc=kever.yang@rock-chips.com \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=naoki@radxa.com \
    --cc=nathan.morrison@timesys.com \
    --cc=pbrobinson@gmail.com \
    --cc=philipp.tomsich@vrull.eu \
    --cc=quentin.schulz@cherry.de \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox