U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jonas Karlman <jonas@kwiboo.se>
To: Quentin Schulz <quentin.schulz@cherry.de>,
	FUKAUMI Naoki <naoki@radxa.com>
Cc: u-boot@lists.denx.de, sjg@chromium.org, philipp.tomsich@vrull.eu,
	kever.yang@rock-chips.com, trini@konsulko.com,
	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 2/3] rockchip: Fix SPL link error for Radxa ROCK Pi 4
Date: Wed, 5 Feb 2025 17:20:21 +0100	[thread overview]
Message-ID: <f119f652-647b-4f62-bcf6-e3672a6ce2b2@kwiboo.se> (raw)
In-Reply-To: <4e7d8797-8fc7-43cf-ba8c-085476ba9fcf@cherry.de>

Hi Quentin and Naoki,

On 2025-02-05 12:37, Quentin Schulz wrote:
> Hi Naoki,
> 
> On 1/29/25 2:25 PM, FUKAUMI Naoki wrote:
>> If CONFIG_EFI_CAPSULE_FIRMWARE_RAW, CONFIG_SPL_ENV_SUPPORT, and
>> CONFIG_SPL_DFU are enabled, linking u-boot-spl will fail.
>>
>>    LD      spl/u-boot-spl
>> ld.bfd: drivers/dfu/dfu.o: in function `dfu_init_env_entities':
>> /home/radxa/u-boot/drivers/dfu/dfu.c:173:(.text.dfu_init_env_entities+0x24): undefined reference to `set_dfu_alt_info'
>>
>> Compile mach-rockchip/board.c for SPL.
>>
>> Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
>> ---
>>   arch/arm/mach-rockchip/Makefile | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile
>> index 5e7edc99cdc..e697df7ebcb 100644
>> --- a/arch/arm/mach-rockchip/Makefile
>> +++ b/arch/arm/mach-rockchip/Makefile
>> @@ -22,10 +22,10 @@ ifeq ($(CONFIG_XPL_BUILD)$(CONFIG_TPL_BUILD),)
>>   # we can have the preprocessor correctly recognise both 0x0 and 0
>>   # meaning "turn it off".
>>   obj-y += boot_mode.o
>> -obj-$(CONFIG_ROCKCHIP_COMMON_BOARD) += board.o
>>   endif
>>   
>>   ifeq ($(CONFIG_TPL_BUILD),)
>> +obj-$(CONFIG_ROCKCHIP_COMMON_BOARD) += board.o
> 
> This is probably a tiny bit too enthusiastic.
> 
> This means the whole content of board.c will be compiled for SPL whereas 
> it currently is compiled only for proper.
> 
> This means we need to be careful about what's in board.c.
> 
> Most IS_ENABLED(CONFIG_<config>) should probably be changed to 
> CONFIG_IS_ENABLED(<config>) so that it handles SPL symbols too and 
> doesn't attempt to build stuff for SPL when only proper symbols are 
> selected (and not their SPL counterpart).
> 
> E.g.
> 
> - EFI_PARTITION
> - SYS_DCACHE_OFF
> - USB_GADGET
> - DM_USB_GADGET
> 
> seems to have SPL symbols too, but
> 
> - EFI_HAVE_CAPSULE_SUPPORT
> - ROCKCHIP_USB2_PHY
> - FASTBOOT
> - MISC_INIT_R
> - ROCKCHIP_EFUSE (though does only build for proper (see the use of 
> $(XPL_) in Makefile))
> - ROCKCHIP_OTP (though does only build for proper (see the use of 
> $(XPL_) in Makefile))
> - BOARD_RNG_SEED
> - RNG_ROCKCHIP
> 
> only have proper symbols.
> 
> Maybe it makes more sense to move the efi-specific part of board.c into 
> efi.c and build that one whenever we actually need it?
> 
> What do you think?

I fully agree, please move the efi-specific parts away from board.c.

In current state it is only the rock-pi-4c-rk3399 target that have use
of set_dfu_alt_info(), rockchip_capsule_update_board_setup() is broken
for rock-pi-4-rk3399, the code check for radxa,rockpi4b, and board
target use radxa,rockpi4a :-)

Regards,
Jonas

> 
> Cheers,
> Quentin


  reply	other threads:[~2025-02-05 16:20 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 [this message]
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

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=f119f652-647b-4f62-bcf6-e3672a6ce2b2@kwiboo.se \
    --to=jonas@kwiboo.se \
    --cc=bb@ti.com \
    --cc=dsimic@manjaro.org \
    --cc=greg.malysa@timesys.com \
    --cc=ian.roberts@timesys.com \
    --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=trini@konsulko.com \
    --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