diff mbox series

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

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

Commit Message

Peter Shkenev Nov. 8, 2025, 10:56 p.m. UTC
Currently, u-boot.bin is used for supported rk3288-based boards. But on
some boards, such as tinker-board, it can not be loaded, since
u-boot.bin is raw and those boards have raw image support
(CONFIG_SPL_RAW_IMAGE_SUPPORT) disabled in favour of FIT images.

Use u-boot.img which is FIT when FIT support is enabled, and raw
otherwise.

Also add a note that u-boot.itb should be used if one wantes to utilize
OP-TEE.

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

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

Comments

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

On 11/8/25 11:56 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 on
> some boards, such as tinker-board, it can not be loaded, since
> u-boot.bin is raw and those boards have raw image support
> (CONFIG_SPL_RAW_IMAGE_SUPPORT) disabled in favour of FIT images.
> 
> Use u-boot.img which is FIT when FIT support is enabled, and raw
> otherwise.
> 
> Also add a note that u-boot.itb should be used if one wantes to utilize
> OP-TEE.
> 
> Suggested-by: Quentin Schulz <quentin.schulz@cherry.de>
> 

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

Thanks!
Quentin
Trevor Woerner Nov. 14, 2025, 2:53 p.m. UTC | #2
My build testing shows that this patch fails for the rock2-square
MACHINE. Are others seeing this as well? In the v1 patch Quentin noticed
this and mentioned building for all rk3288 devices, was this tested?

On Sun 2025-11-09 @ 01:56:41 AM, Peter Shkenev wrote:
> Currently, u-boot.bin is used for supported rk3288-based boards. But on
> some boards, such as tinker-board, it can not be loaded, since
> u-boot.bin is raw and those boards have raw image support
> (CONFIG_SPL_RAW_IMAGE_SUPPORT) disabled in favour of FIT images.
> 
> Use u-boot.img which is FIT when FIT support is enabled, and raw
> otherwise.
> 
> Also add a note that u-boot.itb should be used if one wantes to utilize
> OP-TEE.
> 
> Suggested-by: Quentin Schulz <quentin.schulz@cherry.de>
> 
> Signed-off-by: Peter Shkenev <mustela@erminea.space>
> ---
>  conf/machine/include/rk3288.inc | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc
> index a648b44..00cc04b 100644
> --- a/conf/machine/include/rk3288.inc
> +++ b/conf/machine/include/rk3288.inc
> @@ -13,6 +13,7 @@ SERIAL_CONSOLES = "115200;ttyS2"
>  KBUILD_DEFCONFIG ?= "multi_v7_defconfig"
>  KERNEL_FEATURES:append:rk3288 = " bsp/rockchip/remove-non-rockchip-arch-arm.scc"
>  
> -UBOOT_SUFFIX ?= "bin"
> +# Set UBOOT_SUFFIX to "itb" if you are going to use OP-TEE
> +UBOOT_SUFFIX ?= "img"
>  
>  ENABLE_STATELESS_VPU_GST ?= "1"
> -- 
> 2.51.1
>
Trevor Woerner Nov. 14, 2025, 3:01 p.m. UTC | #3
On Fri 2025-11-14 @ 09:53:08 AM, Trevor Woerner wrote:
> My build testing shows that this patch fails for the rock2-square
> MACHINE. Are others seeing this as well? In the v1 patch Quentin noticed
> this and mentioned building for all rk3288 devices, was this tested?

Actually, never mind, the fix is so small and obvious, I'll just roll it
into the patch and commit it.

> On Sun 2025-11-09 @ 01:56:41 AM, Peter Shkenev wrote:
> > Currently, u-boot.bin is used for supported rk3288-based boards. But on
> > some boards, such as tinker-board, it can not be loaded, since
> > u-boot.bin is raw and those boards have raw image support
> > (CONFIG_SPL_RAW_IMAGE_SUPPORT) disabled in favour of FIT images.
> > 
> > Use u-boot.img which is FIT when FIT support is enabled, and raw
> > otherwise.
> > 
> > Also add a note that u-boot.itb should be used if one wantes to utilize
> > OP-TEE.
> > 
> > Suggested-by: Quentin Schulz <quentin.schulz@cherry.de>
> > 
> > Signed-off-by: Peter Shkenev <mustela@erminea.space>
> > ---
> >  conf/machine/include/rk3288.inc | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc
> > index a648b44..00cc04b 100644
> > --- a/conf/machine/include/rk3288.inc
> > +++ b/conf/machine/include/rk3288.inc
> > @@ -13,6 +13,7 @@ SERIAL_CONSOLES = "115200;ttyS2"
> >  KBUILD_DEFCONFIG ?= "multi_v7_defconfig"
> >  KERNEL_FEATURES:append:rk3288 = " bsp/rockchip/remove-non-rockchip-arch-arm.scc"
> >  
> > -UBOOT_SUFFIX ?= "bin"
> > +# Set UBOOT_SUFFIX to "itb" if you are going to use OP-TEE
> > +UBOOT_SUFFIX ?= "img"
> >  
> >  ENABLE_STATELESS_VPU_GST ?= "1"
> > -- 
> > 2.51.1
> >
Trevor Woerner Nov. 14, 2025, 4 p.m. UTC | #4
On Sun 2025-11-09 @ 01:56:41 AM, Peter Shkenev wrote:
> Currently, u-boot.bin is used for supported rk3288-based boards. But on
> some boards, such as tinker-board, it can not be loaded, since
> u-boot.bin is raw and those boards have raw image support
> (CONFIG_SPL_RAW_IMAGE_SUPPORT) disabled in favour of FIT images.
> 
> Use u-boot.img which is FIT when FIT support is enabled, and raw
> otherwise.
> 
> Also add a note that u-boot.itb should be used if one wantes to utilize
> OP-TEE.
> 
> Suggested-by: Quentin Schulz <quentin.schulz@cherry.de>
> 
> Signed-off-by: Peter Shkenev <mustela@erminea.space>
> ---
>  conf/machine/include/rk3288.inc | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Applied to meta-rockchip, master branch.
Thanks!
Quentin Schulz Nov. 24, 2025, 1:19 p.m. UTC | #5
Hi Trevor,

On 11/14/25 4:01 PM, Trevor Woerner via lists.yoctoproject.org wrote:
> On Fri 2025-11-14 @ 09:53:08 AM, Trevor Woerner wrote:
>> My build testing shows that this patch fails for the rock2-square
>> MACHINE. Are others seeing this as well? In the v1 patch Quentin noticed
>> this and mentioned building for all rk3288 devices, was this tested?
> 
> Actually, never mind, the fix is so small and obvious, I'll just roll it
> into the patch and commit it.
> 

(Probably should have used ${UBOOT_SUFFIX} for the fixup :) )

Do you have a Rock2 Square by any chance? I'm wondering if we cannot 
migrate it to use wic instead of rockchip-gpt-img for generating the 
final flashable image? But I don't own the board so it makes it a bit 
hard to test patches.

Cheers,
Quentin
diff mbox series

Patch

diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc
index a648b44..00cc04b 100644
--- a/conf/machine/include/rk3288.inc
+++ b/conf/machine/include/rk3288.inc
@@ -13,6 +13,7 @@  SERIAL_CONSOLES = "115200;ttyS2"
 KBUILD_DEFCONFIG ?= "multi_v7_defconfig"
 KERNEL_FEATURES:append:rk3288 = " bsp/rockchip/remove-non-rockchip-arch-arm.scc"
 
-UBOOT_SUFFIX ?= "bin"
+# Set UBOOT_SUFFIX to "itb" if you are going to use OP-TEE
+UBOOT_SUFFIX ?= "img"
 
 ENABLE_STATELESS_VPU_GST ?= "1"