diff mbox series

[meta-rockchip,v2] rk3288: use u-boot.img as bootloader image

Message ID 20251104141935.2011578-1-mustela@erminea.space
State New
Headers show
Series [meta-rockchip,v2] rk3288: use u-boot.img as bootloader image | expand

Commit Message

Peter Shkenev Nov. 4, 2025, 2:19 p.m. UTC
Currently, u-boot.bin is used for supported rk3288-based boards. But, as
U-Boot for those boards gets built without OP-TEE, u-boot.bin is a raw
image, and, since raw images support for those boards is disabled as
well, u-boot will fail to boot.

Fix this by using u-boot.img for supported rk3288 boards, which is a FIT
image.

Suggested-by: Quentin Schulz <quentin.schulz@cherry.de>

Signed-off-by: Peter Shkenev <mustela@erminea.space>
---
 conf/machine/include/rk3288.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Quentin Schulz Nov. 5, 2025, 10:27 a.m. UTC | #1
Hi Peter,

On 11/4/25 3:19 PM, Peter Shkenev via lists.yoctoproject.org wrote:
> [You don't often get email from mustela=erminea.space@lists.yoctoproject.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> Currently, u-boot.bin is used for supported rk3288-based boards. But, as
> U-Boot for those boards gets built without OP-TEE, u-boot.bin is a raw
> image, and, since raw images support for those boards is disabled as
> well, u-boot will fail to boot.
> 

I assume you meant CONFIG_SPL_RAW_IMAGE_SUPPORT may not be enabled in 
which case u-boot.bin cannot be loaded?

The mention of OP-TEE here is quite confusing as it's not the direct 
reason why u-boot.bin is a raw image. It always is a raw image for 
Rockchip as far as I could tell. You may not be able to boot it if 
SPL_RAW_IMAGE_SUPPORT=n.

u-boot.img can be either a FIT image (if CONFIG_SPL_LOAD_FIT is 
enabled), or a raw image if it isn't (c.f. Makefile 
MKIMAGEFLAGS_u-boot.img being different when that symbol is enabled).

> Fix this by using u-boot.img for supported rk3288 boards, which is a FIT
> image.
> 

It is a FIT image only if CONFIG_SPL_LOAD_FIT is enabled, otherwise it's 
a raw image. Which means it's an ideal value regardless of the state of 
the SPL_LOAD_FIT symbol.

We should also add a comment in the rk3288.inc file stating that if one 
wants to use OP-TEE, one needs to set UBOOT_SUFFIX to itb instead, and 
have SPL_OPTEE_IMAGE and SPL_FIT selected in the defconfig in order for 
this to work.

The change itself is fine, I would just like the commit log to be 
reworded to be less confusing (and ideally a comment added in rk3288 
hinting that it may need to be changed to itb if one wants to use OP-TEE).

Cheers,
Quentin
Peter Shkenev Nov. 8, 2025, 9:51 p.m. UTC | #2
Hello,

On 11/5/25 13:27, Quentin Schulz wrote:
> Hi Peter,
>
> On 11/4/25 3:19 PM, Peter Shkenev via lists.yoctoproject.org wrote:
>> [You don't often get email from 
>> mustela=erminea.space@lists.yoctoproject.org. Learn why this is 
>> important at https://aka.ms/LearnAboutSenderIdentification ]
>>
>> Currently, u-boot.bin is used for supported rk3288-based boards. But, as
>> U-Boot for those boards gets built without OP-TEE, u-boot.bin is a raw
>> image, and, since raw images support for those boards is disabled as
>> well, u-boot will fail to boot.
>>
>
> I assume you meant CONFIG_SPL_RAW_IMAGE_SUPPORT may not be enabled in 
> which case u-boot.bin cannot be loaded?
>
> The mention of OP-TEE here is quite confusing as it's not the direct 
> reason why u-boot.bin is a raw image. It always is a raw image for 
> Rockchip as far as I could tell. You may not be able to boot it if 
> SPL_RAW_IMAGE_SUPPORT=n.
>
> u-boot.img can be either a FIT image (if CONFIG_SPL_LOAD_FIT is 
> enabled), or a raw image if it isn't (c.f. Makefile 
> MKIMAGEFLAGS_u-boot.img being different when that symbol is enabled).
>
Somewhy I was under expression that with OP-TEE u-boot.bin would be a 
raw image. Sorry!

(Side note, upstream OP-TEE does not seem to support RK3288).

>> Fix this by using u-boot.img for supported rk3288 boards, which is a FIT
>> image.
>>
>
> It is a FIT image only if CONFIG_SPL_LOAD_FIT is enabled, otherwise 
> it's a raw image. Which means it's an ideal value regardless of the 
> state of the SPL_LOAD_FIT symbol.
>
> We should also add a comment in the rk3288.inc file stating that if 
> one wants to use OP-TEE, one needs to set UBOOT_SUFFIX to itb instead, 
> and have SPL_OPTEE_IMAGE and SPL_FIT selected in the defconfig in 
> order for this to work.

You have mentioned it in v1 patch discussion, and I have forgot to add 
it. Sorry again!

>
> The change itself is fine, I would just like the commit log to be 
> reworded to be less confusing (and ideally a comment added in rk3288 
> hinting that it may need to be changed to itb if one wants to use 
> OP-TEE).

Will send v3 patch with fixes soon.

>
> Cheers,
> Quentin

---

Best regards,

Peter
diff mbox series

Patch

diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc
index a648b44..70d554f 100644
--- a/conf/machine/include/rk3288.inc
+++ b/conf/machine/include/rk3288.inc
@@ -13,6 +13,6 @@  SERIAL_CONSOLES = "115200;ttyS2"
 KBUILD_DEFCONFIG ?= "multi_v7_defconfig"
 KERNEL_FEATURES:append:rk3288 = " bsp/rockchip/remove-non-rockchip-arch-arm.scc"
 
-UBOOT_SUFFIX ?= "bin"
+UBOOT_SUFFIX ?= "img"
 
 ENABLE_STATELESS_VPU_GST ?= "1"