* [scarthgap/master][PATCH] ti-sgx-ddk-km: work around incorrect target name selection
@ 2025-03-06 14:12 Matthias Schiffer
2025-03-14 21:41 ` [meta-ti] " Denys Dmytriyenko
0 siblings, 1 reply; 4+ messages in thread
From: Matthias Schiffer @ 2025-03-06 14:12 UTC (permalink / raw)
To: meta-ti; +Cc: oss, Matthias Schiffer
The omap5-sgx-ddk-linux Makefiles contain a list of target triple
patterns that are detected as "Yocto" to deal with arm vs. armhf target
selection. This breaks for Yocto distros that override TARGET_VENDOR,
requiring patches like [1]; similar patches can also be found in other
vendors' machine layers.
Work around the incorrect target selection by passing TARGET_PRIMARY_ARCH
via EXTRA_OEMAKE.
[1] https://github.com/tq-systems/meta-tq/blob/scarthgap.TQ.ARM.BSP.0003/meta-tq/dynamic-layers/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km/linux-5.10/0001-ti-sgx-ddk-km-properly-handle-more-OE-YP-compiler-pr.patch
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
---
Tested with meta-tq + meta-ti scarthgap for am335x.
.../powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
index 49376221..aaeee1d2 100644
--- a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
+++ b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
@@ -28,8 +28,11 @@ TARGET_PRODUCT:am65xx = "ti654x_linux"
PVR_BUILD = "release"
PVR_WS = "lws-generic"
+TARGET_PRIMARY_ARCH = "target_armhf"
+TARGET_PRIMARY_ARCH:aarch64 = "target_aarch64"
+
EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" BUILD=${PVR_BUILD} \
-WINDOW_SYSTEM=${PVR_WS} PVR_BUILD_DIR=${TARGET_PRODUCT}'
+WINDOW_SYSTEM=${PVR_WS} PVR_BUILD_DIR=${TARGET_PRODUCT} TARGET_PRIMARY_ARCH=${TARGET_PRIMARY_ARCH}'
# There are useful flags here that are interpreted by the final kbuild pass
# These variables are not necessary when compiling outside of Yocto
@@ -40,11 +43,7 @@ export KERNEL_OBJCOPY
export KERNEL_STRIP
do_install() {
- make -C ${STAGING_KERNEL_DIR} M=${B}/eurasiacon/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/target_armhf/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install
-}
-
-do_install:am65xx() {
- make -C ${STAGING_KERNEL_DIR} M=${B}/eurasiacon/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/target_aarch64/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install
+ make -C ${STAGING_KERNEL_DIR} M=${B}/eurasiacon/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/${TARGET_PRIMARY_ARCH}/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install
}
RRECOMMENDS:${PN} += "ti-sgx-ddk-um"
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
https://www.tq-group.com/
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [meta-ti] [scarthgap/master][PATCH] ti-sgx-ddk-km: work around incorrect target name selection
2025-03-06 14:12 [scarthgap/master][PATCH] ti-sgx-ddk-km: work around incorrect target name selection Matthias Schiffer
@ 2025-03-14 21:41 ` Denys Dmytriyenko
2025-03-18 19:49 ` Randolph Sapp
0 siblings, 1 reply; 4+ messages in thread
From: Denys Dmytriyenko @ 2025-03-14 21:41 UTC (permalink / raw)
To: matthias.schiffer, Randolph Sapp; +Cc: meta-ti, oss
+ Randolph Sapp as a domain expert here
On Thu, Mar 06, 2025 at 03:12:17PM +0100, Matthias Schiffer via lists.yoctoproject.org wrote:
> The omap5-sgx-ddk-linux Makefiles contain a list of target triple
> patterns that are detected as "Yocto" to deal with arm vs. armhf target
> selection. This breaks for Yocto distros that override TARGET_VENDOR,
> requiring patches like [1]; similar patches can also be found in other
> vendors' machine layers.
>
> Work around the incorrect target selection by passing TARGET_PRIMARY_ARCH
> via EXTRA_OEMAKE.
>
> [1] https://github.com/tq-systems/meta-tq/blob/scarthgap.TQ.ARM.BSP.0003/meta-tq/dynamic-layers/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km/linux-5.10/0001-ti-sgx-ddk-km-properly-handle-more-OE-YP-compiler-pr.patch
>
> Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
> ---
>
> Tested with meta-tq + meta-ti scarthgap for am335x.
>
> .../powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
> index 49376221..aaeee1d2 100644
> --- a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
> +++ b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
> @@ -28,8 +28,11 @@ TARGET_PRODUCT:am65xx = "ti654x_linux"
> PVR_BUILD = "release"
> PVR_WS = "lws-generic"
>
> +TARGET_PRIMARY_ARCH = "target_armhf"
> +TARGET_PRIMARY_ARCH:aarch64 = "target_aarch64"
> +
> EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" BUILD=${PVR_BUILD} \
> -WINDOW_SYSTEM=${PVR_WS} PVR_BUILD_DIR=${TARGET_PRODUCT}'
> +WINDOW_SYSTEM=${PVR_WS} PVR_BUILD_DIR=${TARGET_PRODUCT} TARGET_PRIMARY_ARCH=${TARGET_PRIMARY_ARCH}'
>
> # There are useful flags here that are interpreted by the final kbuild pass
> # These variables are not necessary when compiling outside of Yocto
> @@ -40,11 +43,7 @@ export KERNEL_OBJCOPY
> export KERNEL_STRIP
>
> do_install() {
> - make -C ${STAGING_KERNEL_DIR} M=${B}/eurasiacon/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/target_armhf/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install
> -}
> -
> -do_install:am65xx() {
> - make -C ${STAGING_KERNEL_DIR} M=${B}/eurasiacon/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/target_aarch64/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install
> + make -C ${STAGING_KERNEL_DIR} M=${B}/eurasiacon/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/${TARGET_PRIMARY_ARCH}/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install
> }
>
> RRECOMMENDS:${PN} += "ti-sgx-ddk-um"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [meta-ti] [scarthgap/master][PATCH] ti-sgx-ddk-km: work around incorrect target name selection
2025-03-14 21:41 ` [meta-ti] " Denys Dmytriyenko
@ 2025-03-18 19:49 ` Randolph Sapp
2025-03-19 8:15 ` Matthias Schiffer
0 siblings, 1 reply; 4+ messages in thread
From: Randolph Sapp @ 2025-03-18 19:49 UTC (permalink / raw)
To: Denys Dmytriyenko, matthias.schiffer; +Cc: meta-ti, oss
On Fri Mar 14, 2025 at 4:41 PM CDT, Denys Dmytriyenko wrote:
> + Randolph Sapp as a domain expert here
>
>
> On Thu, Mar 06, 2025 at 03:12:17PM +0100, Matthias Schiffer via lists.yoctoproject.org wrote:
>> The omap5-sgx-ddk-linux Makefiles contain a list of target triple
>> patterns that are detected as "Yocto" to deal with arm vs. armhf target
>> selection. This breaks for Yocto distros that override TARGET_VENDOR,
>> requiring patches like [1]; similar patches can also be found in other
>> vendors' machine layers.
>>
>> Work around the incorrect target selection by passing TARGET_PRIMARY_ARCH
>> via EXTRA_OEMAKE.
>>
>> [1] https://github.com/tq-systems/meta-tq/blob/scarthgap.TQ.ARM.BSP.0003/meta-tq/dynamic-layers/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km/linux-5.10/0001-ti-sgx-ddk-km-properly-handle-more-OE-YP-compiler-pr.patch
>>
>> Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
>> ---
>>
>> Tested with meta-tq + meta-ti scarthgap for am335x.
>>
>> .../powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb | 11 +++++------
>> 1 file changed, 5 insertions(+), 6 deletions(-)
>>
>> diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
>> index 49376221..aaeee1d2 100644
>> --- a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
>> +++ b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
>> @@ -28,8 +28,11 @@ TARGET_PRODUCT:am65xx = "ti654x_linux"
>> PVR_BUILD = "release"
>> PVR_WS = "lws-generic"
>>
>> +TARGET_PRIMARY_ARCH = "target_armhf"
>> +TARGET_PRIMARY_ARCH:aarch64 = "target_aarch64"
>> +
>> EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" BUILD=${PVR_BUILD} \
>> -WINDOW_SYSTEM=${PVR_WS} PVR_BUILD_DIR=${TARGET_PRODUCT}'
>> +WINDOW_SYSTEM=${PVR_WS} PVR_BUILD_DIR=${TARGET_PRODUCT} TARGET_PRIMARY_ARCH=${TARGET_PRIMARY_ARCH}'
>>
>> # There are useful flags here that are interpreted by the final kbuild pass
>> # These variables are not necessary when compiling outside of Yocto
>> @@ -40,11 +43,7 @@ export KERNEL_OBJCOPY
>> export KERNEL_STRIP
>>
>> do_install() {
>> - make -C ${STAGING_KERNEL_DIR} M=${B}/eurasiacon/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/target_armhf/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install
>> -}
>> -
>> -do_install:am65xx() {
>> - make -C ${STAGING_KERNEL_DIR} M=${B}/eurasiacon/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/target_aarch64/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install
>> + make -C ${STAGING_KERNEL_DIR} M=${B}/eurasiacon/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/${TARGET_PRIMARY_ARCH}/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install
>> }
>>
>> RRECOMMENDS:${PN} += "ti-sgx-ddk-um"
NAK, in my opinion this should not be handled by the Yocto recipe and instead
the compiler patterns need to be updated to properly match the given compiler.
I'll update the source repo and this recipe to resolve the issue outlined above.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [meta-ti] [scarthgap/master][PATCH] ti-sgx-ddk-km: work around incorrect target name selection
2025-03-18 19:49 ` Randolph Sapp
@ 2025-03-19 8:15 ` Matthias Schiffer
0 siblings, 0 replies; 4+ messages in thread
From: Matthias Schiffer @ 2025-03-19 8:15 UTC (permalink / raw)
To: Randolph Sapp, Denys Dmytriyenko; +Cc: meta-ti, oss
On Tue, 2025-03-18 at 14:49 -0500, Randolph Sapp wrote:
> ********************
> Achtung externe E-Mail: Öffnen Sie Anhänge und Links nur, wenn Sie wissen, dass diese aus einer sicheren Quelle stammen und sicher sind. Leiten Sie die E-Mail im Zweifelsfall zur Prüfung an den IT-Helpdesk weiter.
> Attention external email: Open attachments and links only if you know that they are from a secure source and are safe. In doubt forward the email to the IT-Helpdesk to check it.
> ********************
>
> On Fri Mar 14, 2025 at 4:41 PM CDT, Denys Dmytriyenko wrote:
> > + Randolph Sapp as a domain expert here
> >
> >
> > On Thu, Mar 06, 2025 at 03:12:17PM +0100, Matthias Schiffer via lists.yoctoproject.org wrote:
> > > The omap5-sgx-ddk-linux Makefiles contain a list of target triple
> > > patterns that are detected as "Yocto" to deal with arm vs. armhf target
> > > selection. This breaks for Yocto distros that override TARGET_VENDOR,
> > > requiring patches like [1]; similar patches can also be found in other
> > > vendors' machine layers.
> > >
> > > Work around the incorrect target selection by passing TARGET_PRIMARY_ARCH
> > > via EXTRA_OEMAKE.
> > >
> > > [1] https://github.com/tq-systems/meta-tq/blob/scarthgap.TQ.ARM.BSP.0003/meta-tq/dynamic-layers/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km/linux-5.10/0001-ti-sgx-ddk-km-properly-handle-more-OE-YP-compiler-pr.patch
> > >
> > > Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
> > > ---
> > >
> > > Tested with meta-tq + meta-ti scarthgap for am335x.
> > >
> > > .../powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb | 11 +++++------
> > > 1 file changed, 5 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
> > > index 49376221..aaeee1d2 100644
> > > --- a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
> > > +++ b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
> > > @@ -28,8 +28,11 @@ TARGET_PRODUCT:am65xx = "ti654x_linux"
> > > PVR_BUILD = "release"
> > > PVR_WS = "lws-generic"
> > >
> > > +TARGET_PRIMARY_ARCH = "target_armhf"
> > > +TARGET_PRIMARY_ARCH:aarch64 = "target_aarch64"
> > > +
> > > EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" BUILD=${PVR_BUILD} \
> > > -WINDOW_SYSTEM=${PVR_WS} PVR_BUILD_DIR=${TARGET_PRODUCT}'
> > > +WINDOW_SYSTEM=${PVR_WS} PVR_BUILD_DIR=${TARGET_PRODUCT} TARGET_PRIMARY_ARCH=${TARGET_PRIMARY_ARCH}'
> > >
> > > # There are useful flags here that are interpreted by the final kbuild pass
> > > # These variables are not necessary when compiling outside of Yocto
> > > @@ -40,11 +43,7 @@ export KERNEL_OBJCOPY
> > > export KERNEL_STRIP
> > >
> > > do_install() {
> > > - make -C ${STAGING_KERNEL_DIR} M=${B}/eurasiacon/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/target_armhf/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install
> > > -}
> > > -
> > > -do_install:am65xx() {
> > > - make -C ${STAGING_KERNEL_DIR} M=${B}/eurasiacon/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/target_aarch64/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install
> > > + make -C ${STAGING_KERNEL_DIR} M=${B}/eurasiacon/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/${TARGET_PRIMARY_ARCH}/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install
> > > }
> > >
> > > RRECOMMENDS:${PN} += "ti-sgx-ddk-um"
>
> NAK, in my opinion this should not be handled by the Yocto recipe and instead
> the compiler patterns need to be updated to properly match the given compiler.
> I'll update the source repo and this recipe to resolve the issue outlined above.
Thanks, that makes sense.
The whole point of matching these patterns appears to be to detect Yocto
compilers, which do not add the "hf" suffix in their target names. The problem
is that there is no single pattern that matches all (and only) Yocto compilers
because many BSP vendors include their own name in the toolchain tuple.
However, I'm not sure why that even matters - there don't seem to be any flags
set specifically for hard or soft float. Maybe the whole detection should just
be removed, using whatever CROSS_COMPILER is set and not caring about the target
name at all?
Best,
Matthias
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
https://www.tq-group.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-03-19 8:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-06 14:12 [scarthgap/master][PATCH] ti-sgx-ddk-km: work around incorrect target name selection Matthias Schiffer
2025-03-14 21:41 ` [meta-ti] " Denys Dmytriyenko
2025-03-18 19:49 ` Randolph Sapp
2025-03-19 8:15 ` Matthias Schiffer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.