diff mbox series

[master,v2,3/3] ti-jailhouse: Fix buildpaths QA warning

Message ID 20260309170134.2779295-4-s-sadik@ti.com
State Superseded
Delegated to: Ryan Eatmon
Headers show
Series jailhouse: Fix build issues and QA warnings | expand

Commit Message

Mahammed Sadik Shaik March 9, 2026, 5:01 p.m. UTC
Add -ffile-prefix-map flags to KCFLAGS to remove build path
references from kernel module compilation, ensuring reproducible
builds and preventing absolute path leakage in binaries.

This resolves buildpaths QA warnings during packaging.

Signed-off-by: Mahammed Sadik Shaik <s-sadik@ti.com>
---
 meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ryan Eatmon March 9, 2026, 5:08 p.m. UTC | #1
On 3/9/2026 12:01 PM, Mahammed Sadik Shaik wrote:
> Add -ffile-prefix-map flags to KCFLAGS to remove build path
> references from kernel module compilation, ensuring reproducible
> builds and preventing absolute path leakage in binaries.
> 
> This resolves buildpaths QA warnings during packaging.
> 
> Signed-off-by: Mahammed Sadik Shaik <s-sadik@ti.com>
> ---
>   meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> index 91076c9e..8308f0e5 100644
> --- a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> +++ b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> @@ -80,8 +80,8 @@ USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \
>   
>   TOOLS_SRC_DIR = "${S}/tools"
>   
> -EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}" KDIR=${STAGING_KERNEL_BUILDDIR}"
> -
> +EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}" KDIR=${STAGING_KERNEL_BUILDDIR} \
> +    KCFLAGS='-ffile-prefix-map=${STAGING_KERNEL_BUILDDIR}/= -ffile-prefix-map=${STAGING_KERNEL_DIR}/='"
>   do_compile() {
>           oe_runmake V=1
>   }

Thank you.  I was going to comment on the v1 to not disable buildpaths.
Denys Dmytriyenko March 9, 2026, 6:58 p.m. UTC | #2
On Mon, Mar 09, 2026 at 12:08:36PM -0500, Ryan Eatmon via lists.yoctoproject.org wrote:
> 
> 
> On 3/9/2026 12:01 PM, Mahammed Sadik Shaik wrote:
> >Add -ffile-prefix-map flags to KCFLAGS to remove build path
> >references from kernel module compilation, ensuring reproducible
> >builds and preventing absolute path leakage in binaries.
> >
> >This resolves buildpaths QA warnings during packaging.
> >
> >Signed-off-by: Mahammed Sadik Shaik <s-sadik@ti.com>
> >---
> >  meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> >diff --git a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> >index 91076c9e..8308f0e5 100644
> >--- a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> >+++ b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> >@@ -80,8 +80,8 @@ USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \
> >  TOOLS_SRC_DIR = "${S}/tools"
> >-EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}" KDIR=${STAGING_KERNEL_BUILDDIR}"
> >-
> >+EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}" KDIR=${STAGING_KERNEL_BUILDDIR} \
> >+    KCFLAGS='-ffile-prefix-map=${STAGING_KERNEL_BUILDDIR}/= -ffile-prefix-map=${STAGING_KERNEL_DIR}/='"
> >  do_compile() {
> >          oe_runmake V=1
> >  }

Can you move V=1 into EXTRA_OEMAKE and remove overriding do_compile()


> Thank you.  I was going to comment on the v1 to not disable buildpaths.

+1
Mahammed Sadik Shaik March 10, 2026, 8:58 a.m. UTC | #3
On Tue, Mar 10, 2026 at 12:28 AM, Denys Dmytriyenko wrote:

>
> On Mon, Mar 09, 2026 at 12:08:36PM -0500, Ryan Eatmon via
> lists.yoctoproject.org wrote:
> > 
> > 
> > On 3/9/2026 12:01 PM, Mahammed Sadik Shaik wrote:
> > >Add -ffile-prefix-map flags to KCFLAGS to remove build path
> > >references from kernel module compilation, ensuring reproducible
> > >builds and preventing absolute path leakage in binaries.
> > >
> > >This resolves buildpaths QA warnings during packaging.
> > >
> > >Signed-off-by: Mahammed Sadik Shaik <s-sadik@ti.com>
> > >---
> > >  meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > >diff --git a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> > >index 91076c9e..8308f0e5 100644
> > >--- a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> > >+++ b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> > >@@ -80,8 +80,8 @@ USER_SPACE_CFLAGS = '${CFLAGS}
> -DLIBEXECDIR=\\\"${libexecdir}\\\" \
> > >  TOOLS_SRC_DIR = "${S}/tools"
> > >-EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}"
> KDIR=${STAGING_KERNEL_BUILDDIR}"
> > >-
> > >+EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}"
> KDIR=${STAGING_KERNEL_BUILDDIR} \
> > >+    KCFLAGS='-ffile-prefix-map=${STAGING_KERNEL_BUILDDIR}/=
> -ffile-prefix-map=${STAGING_KERNEL_DIR}/='"
> > >  do_compile() {
> > >          oe_runmake V=1
> > >  }
> 
> Can you move V=1 into EXTRA_OEMAKE and remove overriding do_compile()

Thanks for the review Denys, Apologies for multiple replies was facing some issues with relply all in mail.

Moving V=1 into EXTRA_OEMAKE is fine, but we can't remove the do_compile() override. . This is insufficient for jailhouse, which requires building:
1. Kernel modules (driver/jailhouse.ko)
2. Hypervisor binary (hypervisor/jailhouse.bin)
3. Userspace tools (tools/jailhouse, jailhouse-*)
4. Inmate demos (inmates/demos/*) — causing the install failure for all the demos during the build.

The do_compile() override is needed to run a plain oe_runmake which hits jailhouse's top-level Makefile and builds the full project.

If necessary I can send an V3 by moving V=1 into EXTRA_OEMAKE, but that doesn't serve our purpose of completely overriding the do_compile
And also I couldn't find an existing bbclass that does "run the top-level Makefile and build everything."

> 
> 
> > Thank you.  I was going to comment on the v1 to not disable buildpaths.
> 
> +1
>
Andrew Davis March 10, 2026, 1:46 p.m. UTC | #4
On 3/10/26 3:58 AM, Sadik via lists.yoctoproject.org wrote:
> On Tue, Mar 10, 2026 at 12:28 AM, Denys Dmytriyenko wrote:
> 
>>
>> On Mon, Mar 09, 2026 at 12:08:36PM -0500, Ryan Eatmon via
>> lists.yoctoproject.org wrote:
>>>
>>>
>>> On 3/9/2026 12:01 PM, Mahammed Sadik Shaik wrote:
>>>> Add -ffile-prefix-map flags to KCFLAGS to remove build path
>>>> references from kernel module compilation, ensuring reproducible
>>>> builds and preventing absolute path leakage in binaries.
>>>>
>>>> This resolves buildpaths QA warnings during packaging.
>>>>
>>>> Signed-off-by: Mahammed Sadik Shaik <s-sadik@ti.com>
>>>> ---
>>>>   meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc | 4 ++--
>>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>> b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>>>> index 91076c9e..8308f0e5 100644
>>>> --- a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>>>> +++ b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>>>> @@ -80,8 +80,8 @@ USER_SPACE_CFLAGS = '${CFLAGS}
>> -DLIBEXECDIR=\\\"${libexecdir}\\\" \
>>>>   TOOLS_SRC_DIR = "${S}/tools"
>>>> -EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}"
>> KDIR=${STAGING_KERNEL_BUILDDIR}"
>>>> -
>>>> +EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}"
>> KDIR=${STAGING_KERNEL_BUILDDIR} \
>>>> +    KCFLAGS='-ffile-prefix-map=${STAGING_KERNEL_BUILDDIR}/=
>> -ffile-prefix-map=${STAGING_KERNEL_DIR}/='"
>>>>   do_compile() {
>>>>           oe_runmake V=1
>>>>   }
>>
>> Can you move V=1 into EXTRA_OEMAKE and remove overriding do_compile()
> 
> Thanks for the review Denys, Apologies for multiple replies was facing some issues with relply all in mail.
> 
> Moving V=1 into EXTRA_OEMAKE is fine, but we can't remove the do_compile() override. . This is insufficient for jailhouse, which requires building:
> 1. Kernel modules (driver/jailhouse.ko)
> 2. Hypervisor binary (hypervisor/jailhouse.bin)
> 3. Userspace tools (tools/jailhouse, jailhouse-*)
> 4. Inmate demos (inmates/demos/*) — causing the install failure for all the demos during the build.
> 
> The do_compile() override is needed to run a plain oe_runmake which hits jailhouse's top-level Makefile and builds the full project.
> 

Does the default do_compile() not hit the top level Makefile?

Andrew

> If necessary I can send an V3 by moving V=1 into EXTRA_OEMAKE, but that doesn't serve our purpose of completely overriding the do_compile
> And also I couldn't find an existing bbclass that does "run the top-level Makefile and build everything."
> 
>>
>>
>>> Thank you.  I was going to comment on the v1 to not disable buildpaths.
>>
>> +1
>>
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#19687): https://lists.yoctoproject.org/g/meta-ti/message/19687
>> Mute This Topic: https://lists.yoctoproject.org/mt/118225330/3619733
>> Group Owner: meta-ti+owner@lists.yoctoproject.org
>> Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [afd@ti.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
Denys Dmytriyenko March 10, 2026, 1:52 p.m. UTC | #5
On Tue, Mar 10, 2026 at 01:58:45AM -0700, Sadik via lists.yoctoproject.org wrote:
> On Tue, Mar 10, 2026 at 12:28 AM, Denys Dmytriyenko wrote:
> 
> >
> > On Mon, Mar 09, 2026 at 12:08:36PM -0500, Ryan Eatmon via
> > lists.yoctoproject.org wrote:
> > > 
> > > 
> > > On 3/9/2026 12:01 PM, Mahammed Sadik Shaik wrote:
> > > >Add -ffile-prefix-map flags to KCFLAGS to remove build path
> > > >references from kernel module compilation, ensuring reproducible
> > > >builds and preventing absolute path leakage in binaries.
> > > >
> > > >This resolves buildpaths QA warnings during packaging.
> > > >
> > > >Signed-off-by: Mahammed Sadik Shaik <s-sadik@ti.com>
> > > >---
> > > >  meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc | 4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > >
> > > >diff --git a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> > b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> > > >index 91076c9e..8308f0e5 100644
> > > >--- a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> > > >+++ b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> > > >@@ -80,8 +80,8 @@ USER_SPACE_CFLAGS = '${CFLAGS}
> > -DLIBEXECDIR=\\\"${libexecdir}\\\" \
> > > >  TOOLS_SRC_DIR = "${S}/tools"
> > > >-EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}"
> > KDIR=${STAGING_KERNEL_BUILDDIR}"
> > > >-
> > > >+EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}"
> > KDIR=${STAGING_KERNEL_BUILDDIR} \
> > > >+    KCFLAGS='-ffile-prefix-map=${STAGING_KERNEL_BUILDDIR}/=
> > -ffile-prefix-map=${STAGING_KERNEL_DIR}/='"
> > > >  do_compile() {
> > > >          oe_runmake V=1
> > > >  }
> > 
> > Can you move V=1 into EXTRA_OEMAKE and remove overriding do_compile()
> 
> Thanks for the review Denys, Apologies for multiple replies was facing some issues with relply all in mail.
> 
> Moving V=1 into EXTRA_OEMAKE is fine, but we can't remove the do_compile() override. . This is insufficient for jailhouse, which requires building:
> 1. Kernel modules (driver/jailhouse.ko)
> 2. Hypervisor binary (hypervisor/jailhouse.bin)
> 3. Userspace tools (tools/jailhouse, jailhouse-*)
> 4. Inmate demos (inmates/demos/*) — causing the install failure for all the demos during the build.
> 
> The do_compile() override is needed to run a plain oe_runmake which hits jailhouse's top-level Makefile and builds the full project.

The default do_compile() does exactly that - calls oe_runmake:
https://git.openembedded.org/openembedded-core/tree/meta/classes-global/base.bbclass#n399


> If necessary I can send an V3 by moving V=1 into EXTRA_OEMAKE, but that doesn't serve our purpose of completely overriding the do_compile
> And also I couldn't find an existing bbclass that does "run the top-level Makefile and build everything."
> 
> > 
> > 
> > > Thank you.  I was going to comment on the v1 to not disable buildpaths.
> > 
> > +1
Mahammed Sadik Shaik March 10, 2026, 5:08 p.m. UTC | #6
On Tue, Mar 10, 2026 at 07:22 PM, Denys Dmytriyenko wrote:

>
> On Tue, Mar 10, 2026 at 01:58:45AM -0700, Sadik via lists.yoctoproject.org
> wrote:
> > On Tue, Mar 10, 2026 at 12:28 AM, Denys Dmytriyenko wrote:
> > 
> > >
> > > On Mon, Mar 09, 2026 at 12:08:36PM -0500, Ryan Eatmon via
> > > lists.yoctoproject.org wrote:
> > > > 
> > > > 
> > > > On 3/9/2026 12:01 PM, Mahammed Sadik Shaik wrote:
> > > > >Add -ffile-prefix-map flags to KCFLAGS to remove build path
> > > > >references from kernel module compilation, ensuring reproducible
> > > > >builds and preventing absolute path leakage in binaries.
> > > > >
> > > > >This resolves buildpaths QA warnings during packaging.
> > > > >
> > > > >Signed-off-by: Mahammed Sadik Shaik <s-sadik@ti.com>
> > > > >---
> > > > >  meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc | 4 ++--
> > > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > >
> > > > >diff --git a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> > > b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> > > > >index 91076c9e..8308f0e5 100644
> > > > >--- a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> > > > >+++ b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> > > > >@@ -80,8 +80,8 @@ USER_SPACE_CFLAGS = '${CFLAGS}
> > > -DLIBEXECDIR=\\\"${libexecdir}\\\" \
> > > > >  TOOLS_SRC_DIR = "${S}/tools"
> > > > >-EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX}
> CC="${CC}"
> > > KDIR=${STAGING_KERNEL_BUILDDIR}"
> > > > >-
> > > > >+EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX}
> CC="${CC}"
> > > KDIR=${STAGING_KERNEL_BUILDDIR} \
> > > > >+    KCFLAGS='-ffile-prefix-map=${STAGING_KERNEL_BUILDDIR}/=
> > > -ffile-prefix-map=${STAGING_KERNEL_DIR}/='"
> > > > >  do_compile() {
> > > > >          oe_runmake V=1
> > > > >  }
> > > 
> > > Can you move V=1 into EXTRA_OEMAKE and remove overriding do_compile()
> > 
> > Thanks for the review Denys, Apologies for multiple replies was facing some
> issues with relply all in mail.
> > 
> > Moving V=1 into EXTRA_OEMAKE is fine, but we can't remove the do_compile()
> override. . This is insufficient for jailhouse, which requires building:
> > 1. Kernel modules (driver/jailhouse.ko)
> > 2. Hypervisor binary (hypervisor/jailhouse.bin)
> > 3. Userspace tools (tools/jailhouse, jailhouse-*)
> > 4. Inmate demos (inmates/demos/*) — causing the install failure for all
> the demos during the build.
> > 
> > The do_compile() override is needed to run a plain oe_runmake which hits
> jailhouse's top-level Makefile and builds the full project.
> 
> The default do_compile() does exactly that - calls oe_runmake:
> https://git.openembedded.org/openembedded-core/tree/meta/classes-global/base.bbclass#n399

Yeah you are right, that the default base_do_compile() calls oe_runmake, which would work fine. But, the jailhouse recipe inherits module bbclass,
"inherit module python3native bash-completion deploy "
 which overrides default do_compile() with module_do_compile. resulting in compilation errors if do_compile override is removed.
If I don't use the do-compile override I am still getting build errors. I am unable to remove the module bbclass is required for building jailhouse kernel modules.

> 
> 
> > If necessary I can send an V3 by moving V=1 into EXTRA_OEMAKE, but that
> doesn't serve our purpose of completely overriding the do_compile
> > And also I couldn't find an existing bbclass that does "run the top-level
> Makefile and build everything."
> > 
> > > 
> > > 
> > > > Thank you.  I was going to comment on the v1 to not disable buildpaths.
> > > 
> > > +1
>
Mahammed Sadik Shaik March 10, 2026, 5:11 p.m. UTC | #7
On Tue, Mar 10, 2026 at 07:16 PM, Andrew Davis wrote:

>
> On 3/10/26 3:58 AM, Sadik via lists.yoctoproject.org wrote:
> > On Tue, Mar 10, 2026 at 12:28 AM, Denys Dmytriyenko wrote:
> > 
> >>
> >> On Mon, Mar 09, 2026 at 12:08:36PM -0500, Ryan Eatmon via
> >> lists.yoctoproject.org wrote:
> >>>
> >>>
> >>> On 3/9/2026 12:01 PM, Mahammed Sadik Shaik wrote:
> >>>> Add -ffile-prefix-map flags to KCFLAGS to remove build path
> >>>> references from kernel module compilation, ensuring reproducible
> >>>> builds and preventing absolute path leakage in binaries.
> >>>>
> >>>> This resolves buildpaths QA warnings during packaging.
> >>>>
> >>>> Signed-off-by: Mahammed Sadik Shaik <s-sadik@ti.com>
> >>>> ---
> >>>>   meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc | 4 ++--
> >>>>   1 file changed, 2 insertions(+), 2 deletions(-)
> >>>>
> >>>> diff --git a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> >> b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> >>>> index 91076c9e..8308f0e5 100644
> >>>> --- a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> >>>> +++ b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> >>>> @@ -80,8 +80,8 @@ USER_SPACE_CFLAGS = '${CFLAGS}
> >> -DLIBEXECDIR=\\\"${libexecdir}\\\" \
> >>>>   TOOLS_SRC_DIR = "${S}/tools"
> >>>> -EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX}
> CC="${CC}"
> >> KDIR=${STAGING_KERNEL_BUILDDIR}"
> >>>> -
> >>>> +EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX}
> CC="${CC}"
> >> KDIR=${STAGING_KERNEL_BUILDDIR} \
> >>>> +    KCFLAGS='-ffile-prefix-map=${STAGING_KERNEL_BUILDDIR}/=
> >> -ffile-prefix-map=${STAGING_KERNEL_DIR}/='"
> >>>>   do_compile() {
> >>>>           oe_runmake V=1
> >>>>   }
> >>
> >> Can you move V=1 into EXTRA_OEMAKE and remove overriding do_compile()
> > 
> > Thanks for the review Denys, Apologies for multiple replies was facing some
> issues with relply all in mail.
> > 
> > Moving V=1 into EXTRA_OEMAKE is fine, but we can't remove the do_compile()
> override. . This is insufficient for jailhouse, which requires building:
> > 1. Kernel modules (driver/jailhouse.ko)
> > 2. Hypervisor binary (hypervisor/jailhouse.bin)
> > 3. Userspace tools (tools/jailhouse, jailhouse-*)
> > 4. Inmate demos (inmates/demos/*) — causing the install failure for all
> the demos during the build.
> > 
> > The do_compile() override is needed to run a plain oe_runmake which hits
> jailhouse's top-level Makefile and builds the full project.
> > 
> 
> Does the default do_compile() not hit the top level Makefile?
Yeah Andrew, the default base_do_compile() calls oe_runmake, which would work fine. But, the jailhouse recipe inherits module bbclass,
"inherit module python3native bash-completion deploy "
If I don't use the do-compile override I am still getting build errors. The module bbclass is required for building jailhouse kernel modules.

> 
> Andrew
> 
> > If necessary I can send an V3 by moving V=1 into EXTRA_OEMAKE, but that
> doesn't serve our purpose of completely overriding the do_compile
> > And also I couldn't find an existing bbclass that does "run the top-level
> Makefile and build everything."
> > 
> >>
> >>
> >>> Thank you.  I was going to comment on the v1 to not disable buildpaths.
> >>
> >> +1
> >>
> >>
> >>
> >> 
> >>
> 
>
Andrew Davis March 10, 2026, 5:58 p.m. UTC | #8
On 3/10/26 12:08 PM, Sadik via lists.yoctoproject.org wrote:
> On Tue, Mar 10, 2026 at 07:22 PM, Denys Dmytriyenko wrote:
> 
>>
>> On Tue, Mar 10, 2026 at 01:58:45AM -0700, Sadik via lists.yoctoproject.org
>> wrote:
>>> On Tue, Mar 10, 2026 at 12:28 AM, Denys Dmytriyenko wrote:
>>>
>>>>
>>>> On Mon, Mar 09, 2026 at 12:08:36PM -0500, Ryan Eatmon via
>>>> lists.yoctoproject.org wrote:
>>>>>
>>>>>
>>>>> On 3/9/2026 12:01 PM, Mahammed Sadik Shaik wrote:
>>>>>> Add -ffile-prefix-map flags to KCFLAGS to remove build path
>>>>>> references from kernel module compilation, ensuring reproducible
>>>>>> builds and preventing absolute path leakage in binaries.
>>>>>>
>>>>>> This resolves buildpaths QA warnings during packaging.
>>>>>>
>>>>>> Signed-off-by: Mahammed Sadik Shaik <s-sadik@ti.com>
>>>>>> ---
>>>>>>   meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc | 4 ++--
>>>>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>>>>
>>>>>> diff --git a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>>>> b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>>>>>> index 91076c9e..8308f0e5 100644
>>>>>> --- a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>>>>>> +++ b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>>>>>> @@ -80,8 +80,8 @@ USER_SPACE_CFLAGS = '${CFLAGS}
>>>> -DLIBEXECDIR=\\\"${libexecdir}\\\" \
>>>>>>   TOOLS_SRC_DIR = "${S}/tools"
>>>>>> -EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX}
>> CC="${CC}"
>>>> KDIR=${STAGING_KERNEL_BUILDDIR}"
>>>>>> -
>>>>>> +EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX}
>> CC="${CC}"
>>>> KDIR=${STAGING_KERNEL_BUILDDIR} \
>>>>>> +    KCFLAGS='-ffile-prefix-map=${STAGING_KERNEL_BUILDDIR}/=
>>>> -ffile-prefix-map=${STAGING_KERNEL_DIR}/='"
>>>>>>   do_compile() {
>>>>>>           oe_runmake V=1
>>>>>>   }
>>>>
>>>> Can you move V=1 into EXTRA_OEMAKE and remove overriding do_compile()
>>>
>>> Thanks for the review Denys, Apologies for multiple replies was facing some
>> issues with relply all in mail.
>>>
>>> Moving V=1 into EXTRA_OEMAKE is fine, but we can't remove the do_compile()
>> override. . This is insufficient for jailhouse, which requires building:
>>> 1. Kernel modules (driver/jailhouse.ko)
>>> 2. Hypervisor binary (hypervisor/jailhouse.bin)
>>> 3. Userspace tools (tools/jailhouse, jailhouse-*)
>>> 4. Inmate demos (inmates/demos/*) — causing the install failure for all
>> the demos during the build.
>>>
>>> The do_compile() override is needed to run a plain oe_runmake which hits
>> jailhouse's top-level Makefile and builds the full project.
>>
>> The default do_compile() does exactly that - calls oe_runmake:
>> https://git.openembedded.org/openembedded-core/tree/meta/classes-global/base.bbclass#n399
> 
> Yeah you are right, that the default base_do_compile() calls oe_runmake, which would work fine. But, the jailhouse recipe inherits module bbclass,
> "inherit module python3native bash-completion deploy"
>   which overrides default do_compile() with module_do_compile. resulting in compilation errors if do_compile override is removed.
> If I don't use the do-compile override I am still getting build errors. I am unable to remove the module bbclass is required for building jailhouse kernel modules.
> 

Split out the kernel module building into its own recipe.

Andrew

>>
>>
>>> If necessary I can send an V3 by moving V=1 into EXTRA_OEMAKE, but that
>> doesn't serve our purpose of completely overriding the do_compile
>>> And also I couldn't find an existing bbclass that does "run the top-level
>> Makefile and build everything."
>>>
>>>>
>>>>
>>>>> Thank you.  I was going to comment on the v1 to not disable buildpaths.
>>>>
>>>> +1
>>
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#19692): https://lists.yoctoproject.org/g/meta-ti/message/19692
>> Mute This Topic: https://lists.yoctoproject.org/mt/118225330/3619733
>> Group Owner: meta-ti+owner@lists.yoctoproject.org
>> Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [afd@ti.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
Ryan Eatmon March 10, 2026, 7:35 p.m. UTC | #9
On 3/10/2026 12:58 PM, Andrew Davis via lists.yoctoproject.org wrote:
> On 3/10/26 12:08 PM, Sadik via lists.yoctoproject.org wrote:
>> On Tue, Mar 10, 2026 at 07:22 PM, Denys Dmytriyenko wrote:
>>
>>>
>>> On Tue, Mar 10, 2026 at 01:58:45AM -0700, Sadik via 
>>> lists.yoctoproject.org
>>> wrote:
>>>> On Tue, Mar 10, 2026 at 12:28 AM, Denys Dmytriyenko wrote:
>>>>
>>>>>
>>>>> On Mon, Mar 09, 2026 at 12:08:36PM -0500, Ryan Eatmon via
>>>>> lists.yoctoproject.org wrote:
>>>>>>
>>>>>>
>>>>>> On 3/9/2026 12:01 PM, Mahammed Sadik Shaik wrote:
>>>>>>> Add -ffile-prefix-map flags to KCFLAGS to remove build path
>>>>>>> references from kernel module compilation, ensuring reproducible
>>>>>>> builds and preventing absolute path leakage in binaries.
>>>>>>>
>>>>>>> This resolves buildpaths QA warnings during packaging.
>>>>>>>
>>>>>>> Signed-off-by: Mahammed Sadik Shaik <s-sadik@ti.com>
>>>>>>> ---
>>>>>>>   meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc | 4 ++--
>>>>>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>>>>>
>>>>>>> diff --git a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>>>>> b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>>>>>>> index 91076c9e..8308f0e5 100644
>>>>>>> --- a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>>>>>>> +++ b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>>>>>>> @@ -80,8 +80,8 @@ USER_SPACE_CFLAGS = '${CFLAGS}
>>>>> -DLIBEXECDIR=\\\"${libexecdir}\\\" \
>>>>>>>   TOOLS_SRC_DIR = "${S}/tools"
>>>>>>> -EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX}
>>> CC="${CC}"
>>>>> KDIR=${STAGING_KERNEL_BUILDDIR}"
>>>>>>> -
>>>>>>> +EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX}
>>> CC="${CC}"
>>>>> KDIR=${STAGING_KERNEL_BUILDDIR} \
>>>>>>> +    KCFLAGS='-ffile-prefix-map=${STAGING_KERNEL_BUILDDIR}/=
>>>>> -ffile-prefix-map=${STAGING_KERNEL_DIR}/='"
>>>>>>>   do_compile() {
>>>>>>>           oe_runmake V=1
>>>>>>>   }
>>>>>
>>>>> Can you move V=1 into EXTRA_OEMAKE and remove overriding do_compile()
>>>>
>>>> Thanks for the review Denys, Apologies for multiple replies was 
>>>> facing some
>>> issues with relply all in mail.
>>>>
>>>> Moving V=1 into EXTRA_OEMAKE is fine, but we can't remove the 
>>>> do_compile()
>>> override. . This is insufficient for jailhouse, which requires building:
>>>> 1. Kernel modules (driver/jailhouse.ko)
>>>> 2. Hypervisor binary (hypervisor/jailhouse.bin)
>>>> 3. Userspace tools (tools/jailhouse, jailhouse-*)
>>>> 4. Inmate demos (inmates/demos/*) — causing the install failure for all
>>> the demos during the build.
>>>>
>>>> The do_compile() override is needed to run a plain oe_runmake which 
>>>> hits
>>> jailhouse's top-level Makefile and builds the full project.
>>>
>>> The default do_compile() does exactly that - calls oe_runmake:
>>> https://git.openembedded.org/openembedded-core/tree/meta/classes-global/base.bbclass#n399
>>
>> Yeah you are right, that the default base_do_compile() calls 
>> oe_runmake, which would work fine. But, the jailhouse recipe inherits 
>> module bbclass,
>> "inherit module python3native bash-completion deploy"
>>   which overrides default do_compile() with module_do_compile. 
>> resulting in compilation errors if do_compile override is removed.
>> If I don't use the do-compile override I am still getting build 
>> errors. I am unable to remove the module bbclass is required for 
>> building jailhouse kernel modules.
>>
> 
> Split out the kernel module building into its own recipe.

Agreed.


> Andrew
> 
>>>
>>>
>>>> If necessary I can send an V3 by moving V=1 into EXTRA_OEMAKE, but that
>>> doesn't serve our purpose of completely overriding the do_compile
>>>> And also I couldn't find an existing bbclass that does "run the 
>>>> top-level
>>> Makefile and build everything."
>>>>
>>>>>
>>>>>
>>>>>> Thank you.  I was going to comment on the v1 to not disable 
>>>>>> buildpaths.
>>>>>
>>>>> +1
>>>
>>>
>>>
>>>
>>>
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#19694): https://lists.yoctoproject.org/g/meta-ti/message/19694
> Mute This Topic: https://lists.yoctoproject.org/mt/118225330/6551054
> Group Owner: meta-ti+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [reatmon@ti.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Mahammed Sadik Shaik March 10, 2026, 11:58 p.m. UTC | #10
On Wed, Mar 11, 2026 at 01:05 AM, Ryan Eatmon wrote:

>
> 
> 
> On 3/10/2026 12:58 PM, Andrew Davis via lists.yoctoproject.org wrote:
> > On 3/10/26 12:08 PM, Sadik via lists.yoctoproject.org wrote:
> >> On Tue, Mar 10, 2026 at 07:22 PM, Denys Dmytriyenko wrote:
> >>
> >>>
> >>> On Tue, Mar 10, 2026 at 01:58:45AM -0700, Sadik via 
> >>> lists.yoctoproject.org
> >>> wrote:
> >>>> On Tue, Mar 10, 2026 at 12:28 AM, Denys Dmytriyenko wrote:
> >>>>
> >>>>>
> >>>>> On Mon, Mar 09, 2026 at 12:08:36PM -0500, Ryan Eatmon via
> >>>>> lists.yoctoproject.org wrote:
> >>>>>>
> >>>>>>
> >>>>>> On 3/9/2026 12:01 PM, Mahammed Sadik Shaik wrote:
> >>>>>>> Add -ffile-prefix-map flags to KCFLAGS to remove build path
> >>>>>>> references from kernel module compilation, ensuring reproducible
> >>>>>>> builds and preventing absolute path leakage in binaries.
> >>>>>>>
> >>>>>>> This resolves buildpaths QA warnings during packaging.
> >>>>>>>
> >>>>>>> Signed-off-by: Mahammed Sadik Shaik <s-sadik@ti.com>
> >>>>>>> ---
> >>>>>>>   meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc | 4 ++--
> >>>>>>>   1 file changed, 2 insertions(+), 2 deletions(-)
> >>>>>>>
> >>>>>>> diff --git a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> >>>>> b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> >>>>>>> index 91076c9e..8308f0e5 100644
> >>>>>>> --- a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> >>>>>>> +++ b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> >>>>>>> @@ -80,8 +80,8 @@ USER_SPACE_CFLAGS = '${CFLAGS}
> >>>>> -DLIBEXECDIR=\\\"${libexecdir}\\\" \
> >>>>>>>   TOOLS_SRC_DIR = "${S}/tools"
> >>>>>>> -EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX}
> >>> CC="${CC}"
> >>>>> KDIR=${STAGING_KERNEL_BUILDDIR}"
> >>>>>>> -
> >>>>>>> +EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX}
> >>> CC="${CC}"
> >>>>> KDIR=${STAGING_KERNEL_BUILDDIR} \
> >>>>>>> +    KCFLAGS='-ffile-prefix-map=${STAGING_KERNEL_BUILDDIR}/=
> >>>>> -ffile-prefix-map=${STAGING_KERNEL_DIR}/='"
> >>>>>>>   do_compile() {
> >>>>>>>           oe_runmake V=1
> >>>>>>>   }
> >>>>>
> >>>>> Can you move V=1 into EXTRA_OEMAKE and remove overriding do_compile()
> >>>>
> >>>> Thanks for the review Denys, Apologies for multiple replies was 
> >>>> facing some
> >>> issues with relply all in mail.
> >>>>
> >>>> Moving V=1 into EXTRA_OEMAKE is fine, but we can't remove the 
> >>>> do_compile()
> >>> override. . This is insufficient for jailhouse, which requires building:
> >>>> 1. Kernel modules (driver/jailhouse.ko)
> >>>> 2. Hypervisor binary (hypervisor/jailhouse.bin)
> >>>> 3. Userspace tools (tools/jailhouse, jailhouse-*)
> >>>> 4. Inmate demos (inmates/demos/*) — causing the install failure for all
> >>> the demos during the build.
> >>>>
> >>>> The do_compile() override is needed to run a plain oe_runmake which 
> >>>> hits
> >>> jailhouse's top-level Makefile and builds the full project.
> >>>
> >>> The default do_compile() does exactly that - calls oe_runmake:
> >>>
> https://git.openembedded.org/openembedded-core/tree/meta/classes-global/base.bbclass#n399
> >>
> >> Yeah you are right, that the default base_do_compile() calls 
> >> oe_runmake, which would work fine. But, the jailhouse recipe inherits 
> >> module bbclass,
> >> "inherit module python3native bash-completion deploy"
> >>   which overrides default do_compile() with module_do_compile. 
> >> resulting in compilation errors if do_compile override is removed.
> >> If I don't use the do-compile override I am still getting build 
> >> errors. I am unable to remove the module bbclass is required for 
> >> building jailhouse kernel modules.
> >>
> > 
> > Split out the kernel module building into its own recipe.
> 
> Agreed.

Yeah I am sending  an follow up patch for these changes, meanwhile this series is good to go right?

> 
> 
> > Andrew
> > 
> >>>
> >>>
> >>>> If necessary I can send an V3 by moving V=1 into EXTRA_OEMAKE, but that
> >>> doesn't serve our purpose of completely overriding the do_compile
> >>>> And also I couldn't find an existing bbclass that does "run the 
> >>>> top-level
> >>> Makefile and build everything."
> >>>>
> >>>>>
> >>>>>
> >>>>>> Thank you.  I was going to comment on the v1 to not disable 
> >>>>>> buildpaths.
> >>>>>
> >>>>> +1
> >>>
> >>>
> >>>
> >>>
> >>>
> > 
> > 
> > 
> > 
> > 
> 
> -- 
> Ryan Eatmon                reatmon@ti.com
> -----------------------------------------
> Texas Instruments, Inc.  -  LCPD  -  MGTS
>
diff mbox series

Patch

diff --git a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
index 91076c9e..8308f0e5 100644
--- a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
+++ b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
@@ -80,8 +80,8 @@  USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \
 
 TOOLS_SRC_DIR = "${S}/tools"
 
-EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}" KDIR=${STAGING_KERNEL_BUILDDIR}"
-
+EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}" KDIR=${STAGING_KERNEL_BUILDDIR} \
+    KCFLAGS='-ffile-prefix-map=${STAGING_KERNEL_BUILDDIR}/= -ffile-prefix-map=${STAGING_KERNEL_DIR}/='"
 do_compile() {
         oe_runmake V=1
 }