diff mbox series

u-boot: move DT validation yaml removal patch to common SRC_URI

Message ID 20260507204018.3254064-1-ricardo.salveti@oss.qualcomm.com
State Under Review
Headers show
Series u-boot: move DT validation yaml removal patch to common SRC_URI | expand

Commit Message

Ricardo de Araujo (Salveti) May 7, 2026, 8:40 p.m. UTC
Commit 5e97f3c1e2cf ("u-boot-tools: drop yaml in DT validation") added the
backport through SRC_URI_RISCV, so only RISC-V u-boot builds picked it up.

This issue is because the v1 of the patch was merged instead the v2 (which
is also not fully correct as it is not patching u-boot-tools). Drop the
patch from SRC_URI_RISCV and move it to u-boot-common.inc so it is applied
consistently to both u-boot and u-boot-tools.

Fixes: 5e97f3c1e2cf ("u-boot-tools: drop yaml in DT validation")
Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
---
 meta/recipes-bsp/u-boot/u-boot-common.inc | 5 ++++-
 meta/recipes-bsp/u-boot/u-boot_2026.04.bb | 1 -
 2 files changed, 4 insertions(+), 2 deletions(-)

Comments

Quentin Schulz May 8, 2026, 2:35 p.m. UTC | #1
Hi Ricardo,

On 5/7/26 10:40 PM, Ricardo Salveti via lists.openembedded.org wrote:
> Commit 5e97f3c1e2cf ("u-boot-tools: drop yaml in DT validation") added the
> backport through SRC_URI_RISCV, so only RISC-V u-boot builds picked it up.
> 
> This issue is because the v1 of the patch was merged instead the v2 (which
> is also not fully correct as it is not patching u-boot-tools). Drop the
> patch from SRC_URI_RISCV and move it to u-boot-common.inc so it is applied
> consistently to both u-boot and u-boot-tools.
> 
> Fixes: 5e97f3c1e2cf ("u-boot-tools: drop yaml in DT validation")
> Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
> ---
>   meta/recipes-bsp/u-boot/u-boot-common.inc | 5 ++++-
>   meta/recipes-bsp/u-boot/u-boot_2026.04.bb | 1 -
>   2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-bsp/u-boot/u-boot-common.inc b/meta/recipes-bsp/u-boot/u-boot-common.inc
> index 574768b9f8..15e94a4e37 100644
> --- a/meta/recipes-bsp/u-boot/u-boot-common.inc
> +++ b/meta/recipes-bsp/u-boot/u-boot-common.inc
> @@ -14,7 +14,10 @@ PE = "1"
>   # repo during parse
>   SRCREV = "88dc2788777babfd6322fa655df549a019aa1e69"
>   
> -SRC_URI = "git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master;tag=v${PV}"
> +SRC_URI = "\
> +    git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master;tag=v${PV} \
> +    file://0001-scripts-dtc-drop-yaml-in-DT-validation.patch \
> +"
>   

This means any recipe including recipes-bsp/u-boot/u-boot-common.inc 
will need to override SRC_URI in addition to SRCREV otherwise the patch 
may not apply.

Wondering if we should move SRCREV and that patch into a

u-boot-2026.04.inc

which we can then include from
meta/recipes-bsp/u-boot/u-boot-tools_2026.04.bb
meta/recipes-bsp/u-boot/u-boot_2026.04.bb

with
require u-boot-${PV}.inc

?

Cheers,
Quentin
Ricardo de Araujo (Salveti) May 8, 2026, 4:04 p.m. UTC | #2
On Fri, May 8, 2026 at 11:35 AM Quentin Schulz <quentin.schulz@cherry.de> wrote:
>
> Hi Ricardo,
>
> On 5/7/26 10:40 PM, Ricardo Salveti via lists.openembedded.org wrote:
> > Commit 5e97f3c1e2cf ("u-boot-tools: drop yaml in DT validation") added the
> > backport through SRC_URI_RISCV, so only RISC-V u-boot builds picked it up.
> >
> > This issue is because the v1 of the patch was merged instead the v2 (which
> > is also not fully correct as it is not patching u-boot-tools). Drop the
> > patch from SRC_URI_RISCV and move it to u-boot-common.inc so it is applied
> > consistently to both u-boot and u-boot-tools.
> >
> > Fixes: 5e97f3c1e2cf ("u-boot-tools: drop yaml in DT validation")
> > Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
> > ---
> >   meta/recipes-bsp/u-boot/u-boot-common.inc | 5 ++++-
> >   meta/recipes-bsp/u-boot/u-boot_2026.04.bb | 1 -
> >   2 files changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/meta/recipes-bsp/u-boot/u-boot-common.inc b/meta/recipes-bsp/u-boot/u-boot-common.inc
> > index 574768b9f8..15e94a4e37 100644
> > --- a/meta/recipes-bsp/u-boot/u-boot-common.inc
> > +++ b/meta/recipes-bsp/u-boot/u-boot-common.inc
> > @@ -14,7 +14,10 @@ PE = "1"
> >   # repo during parse
> >   SRCREV = "88dc2788777babfd6322fa655df549a019aa1e69"
> >
> > -SRC_URI = "git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master;tag=v${PV}"
> > +SRC_URI = "\
> > +    git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master;tag=v${PV} \
> > +    file://0001-scripts-dtc-drop-yaml-in-DT-validation.patch \
> > +"
> >
>
> This means any recipe including recipes-bsp/u-boot/u-boot-common.inc
> will need to override SRC_URI in addition to SRCREV otherwise the patch
> may not apply.
>
> Wondering if we should move SRCREV and that patch into a
>
> u-boot-2026.04.inc
>
> which we can then include from
> meta/recipes-bsp/u-boot/u-boot-tools_2026.04.bb
> meta/recipes-bsp/u-boot/u-boot_2026.04.bb
>
> with
> require u-boot-${PV}.inc

u-boot-common.inc is really minimal and mostly just to add the common
homepage, license, srcrev and src_uri, so not sure if other variants
should really be including it (e.g. LIC_FILES_CHKSUM could as well
change based on the base version used).

If we move SRCREV and SRC_URI to another common include file then
u-boot-common.inc will just be used to share non-critical variables,
which should probably also be customized by other alternatives (e.g.
HOMEPAGE could be different).

So not sure if this would help much.

Thanks,

Ricardo
Dmitry Baryshkov May 8, 2026, 7:09 p.m. UTC | #3
On Thu, May 07, 2026 at 05:40:18PM -0300, Ricardo Salveti wrote:
> Commit 5e97f3c1e2cf ("u-boot-tools: drop yaml in DT validation") added the
> backport through SRC_URI_RISCV, so only RISC-V u-boot builds picked it up.
> 
> This issue is because the v1 of the patch was merged instead the v2 (which
> is also not fully correct as it is not patching u-boot-tools). Drop the
> patch from SRC_URI_RISCV and move it to u-boot-common.inc so it is applied
> consistently to both u-boot and u-boot-tools.
> 
> Fixes: 5e97f3c1e2cf ("u-boot-tools: drop yaml in DT validation")
> Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
> ---
>  meta/recipes-bsp/u-boot/u-boot-common.inc | 5 ++++-
>  meta/recipes-bsp/u-boot/u-boot_2026.04.bb | 1 -
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-bsp/u-boot/u-boot-common.inc b/meta/recipes-bsp/u-boot/u-boot-common.inc
> index 574768b9f8..15e94a4e37 100644
> --- a/meta/recipes-bsp/u-boot/u-boot-common.inc
> +++ b/meta/recipes-bsp/u-boot/u-boot-common.inc
> @@ -14,7 +14,10 @@ PE = "1"
>  # repo during parse
>  SRCREV = "88dc2788777babfd6322fa655df549a019aa1e69"
>  
> -SRC_URI = "git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master;tag=v${PV}"
> +SRC_URI = "\
> +    git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master;tag=v${PV} \
> +    file://0001-scripts-dtc-drop-yaml-in-DT-validation.patch \

We are fetching the source basing on the PV. The patch might be
applicable or might not. I'd suggest listing the patch twice: in the
u-boot_2026.04.bb and u-boot-tools_2026.04.bb.

(in fact I did that in a local patch, it's good that I checked the ML
before sending it).

> +"
>  
>  B = "${WORKDIR}/build"
>
diff mbox series

Patch

diff --git a/meta/recipes-bsp/u-boot/u-boot-common.inc b/meta/recipes-bsp/u-boot/u-boot-common.inc
index 574768b9f8..15e94a4e37 100644
--- a/meta/recipes-bsp/u-boot/u-boot-common.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-common.inc
@@ -14,7 +14,10 @@  PE = "1"
 # repo during parse
 SRCREV = "88dc2788777babfd6322fa655df549a019aa1e69"
 
-SRC_URI = "git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master;tag=v${PV}"
+SRC_URI = "\
+    git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master;tag=v${PV} \
+    file://0001-scripts-dtc-drop-yaml-in-DT-validation.patch \
+"
 
 B = "${WORKDIR}/build"
 
diff --git a/meta/recipes-bsp/u-boot/u-boot_2026.04.bb b/meta/recipes-bsp/u-boot/u-boot_2026.04.bb
index 9f09d91daa..5259fd5832 100644
--- a/meta/recipes-bsp/u-boot/u-boot_2026.04.bb
+++ b/meta/recipes-bsp/u-boot/u-boot_2026.04.bb
@@ -14,7 +14,6 @@  SRC_URI_RISCV = "\
     ${@bb.utils.contains    ("TUNE_FEATURES", "d",      "file://u-boot-riscv-isa_d.cfg", "", d)} \
     ${@bb.utils.contains_any("TUNE_FEATURES", "b zbb",  "file://u-boot-riscv-isa_zbb.cfg", "", d)} \
     ${@bb.utils.contains    ("TUNE_FEATURES", "zicbom", "file://u-boot-riscv-isa_zicbom.cfg", "", d)} \
-    file://0001-scripts-dtc-drop-yaml-in-DT-validation.patch \
     "
 
 SRC_URI:append:riscv32 = "${SRC_URI_RISCV}"