Re: [yocto-patches] [meta-rockchip] Backport patches to Whinlatter
Quentin Schulz <[email protected]>
| Newsgroups | org.yoctoproject.lists.yocto-patches |
|---|---|
| Message-ID | <[email protected]> |
Hi Martin,
On 4/20/26 7:27 PM, Martin Herren via lists.yoctoproject.org wrote:
> Hej,
>
>> Hi Martin, Trevor,
>>
>
>> On 4/20/26 12:14 PM, Martin Herren wrote:
>>> Dear maintainers,
>>>
>>> May I suggest the following 2 patches from meta-rockchip master to be back ported to the Whinlatter branch ?
>>>
>>> fitimage rework: fe7cfa748bb132cfbe322c1c6d586f09557dbeb2
>>>
>>
>
>> This one is tricky. We shouldn't break existing users but this is a
>> patch that isn't backward compatible as we would require users to set
>> the RK_KERNEL_FITIMAGE variable to match the modifications they made to
>> KERNEL_IMAGETYPE/KERNEL_CLASSES in their own machine configuration file
>> based on the SoC machine include file. Can you tell us more about what
>> is broken before this is backported? Maybe there's another way to
>> implement a fix without breaking backward compatibility.
>
> Doing a `bitbake core-image-base` for `MACHINE = "rock-5b"` on current whinlatter (including all other layers also on whinlatter) without this patch leads to:
>
> ```
> ❯ bitbake core-image-base
> Loading cache: 100% |#######################################################################################################################################################| Time: 0:00:00
> Loaded 0 entries from dependency cache.
> ERROR: ParseError at /home/martin/dev/yocto/rockchip/layers/openembedded-core/meta/classes-recipe/kernel.bbclass:188: Could not inherit file classes/kernel-fitimage.bbclass| ETA: 0:00:17
> ERROR: Parsing halted due to errors, see error messages above
>
> Summary: There were 2 ERROR messages, returning a non-zero exit code.
> ```
>
OK. So... The issue is that we don't know what third-party layers do.
They may very well include rk3588s.inc or extend rock-5b.conf and modify
KERNEL_CLASSES and KERNEL_IMAGETYPE to not use fitImage. I couldn't
think of a way to not break them. The issue being that KERNEL_CLASSES
cannot contain kernel-fitimage so we cannot check for its presence, and
KERNEL_IMAGETYPE cannot contain fitImage anymore as well, so we also
cannot check for its presence. Do you have an idea maybe?
I'm tempted to say "wait for wrynose" which now should be 2-3 weeks
away. The fact that nobody complained about this issue before is either
because nobody uses the whinlatter branch (I don't for example) or
because they already adapted their third-party layer to accommodate. The
former isn't an issue, the latter is (well, wrt backporting this commit).
I haven't tested but I'm suspecting you could use the content of
conf/machine/include/rockchip-fitimage.inc and add it to your layer in
your machine conf file after the other includes. Replace ?= with =,
replace the += with an =. Adapt in that same file the UBOOT_EXTLINUX_*
variables to use the value as if KERNEL_IMAGETYPE was set to fitImage
(and use = instead of ?=). From a cursory look, that may be enough.
> Applying this patch goes further:
>
> ```
> ERROR: rockchip-rkbin-tf-a-git-r0 do_unpack: Recipes that set S = "${WORKDIR}/git" or S = "${UNPACKDIR}/git" should remove that assignment, as S set by bitbake.conf in oe-core now works.
> ERROR: Logfile of failure stored in: /home/martin/dev/yocto/rockchip/layers/build/tmp/work/rock_5b-oe-linux/rockchip-rkbin-tf-a/git/temp/log.do_unpack.34439
> ERROR: Task (/home/martin/dev/yocto/rockchip/layers/meta-rockchip/recipes-bsp/rkbin/rockchip-rkbin-tf-a_git.bb:do_unpack) failed with exit code '1'
> ERROR: rockchip-rkbin-ddr-git-r0 do_unpack: Recipes that set S = "${WORKDIR}/git" or S = "${UNPACKDIR}/git" should remove that assignment, as S set by bitbake.conf in oe-core now works.
> ERROR: Logfile of failure stored in: /home/martin/dev/yocto/rockchip/layers/build/tmp/work/rock_5b-oe-linux/rockchip-rkbin-ddr/git/temp/log.do_unpack.34438
> ERROR: Task (/home/martin/dev/yocto/rockchip/layers/meta-rockchip/recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb:do_unpack) failed with exit code '1'
> ```
>
> Thus the 2nd suggested backport.
>
We would also need 61505560d494 ("bsp: rkbin-native: fix build since
${WORKDIR} isn't allowed in S anymore") for completeness.
Cheers,
Quentin