diff mbox series

[master,v4,3/3] ti-jailhouse: Fix buildpaths QA warning and cleanup

Message ID 20260311190537.3340422-4-s-sadik@ti.com
State New
Headers show
Series jailhouse: Fix build issues and QA warnings | expand

Commit Message

Mahammed Sadik Shaik March 11, 2026, 7:05 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.

inherit module-base kernel-module-split for building kernel modules

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

This resolves buildpaths QA warnings during packaging.

Signed-off-by: Mahammed Sadik Shaik <s-sadik@ti.com>
---
 .../recipes-ti/jailhouse/ti-jailhouse.inc     | 36 +++++++++++--------
 1 file changed, 21 insertions(+), 15 deletions(-)
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..08c2814e 100644
--- a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
+++ b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
@@ -47,7 +47,7 @@  B = "${S}"
 
 DEPENDS = "virtual/kernel dtc-native python3-mako-native python3-mako make-native"
 
-inherit module python3native bash-completion deploy setuptools3
+inherit module-base kernel-module-split python3native bash-completion deploy
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 COMPATIBLE_MACHINE = "(ti-soc)"
@@ -66,22 +66,28 @@  JH_SYSCONFIG_CELL:am62lxx ?= "k3-am62l3-evm.cell"
 JH_SYSCONFIG_CELL:j7 ?= "k3-j721e-evm.cell"
 JH_SYSCONFIG_CELL:j7200-evm ?= "k3-j7200-evm.cell"
 
-do_configure() {
-        if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ];
-        then
-            cp ${STAGING_DIR_HOST}/${CELLCONF_DIR}/*.c ${S}/configs/
-        fi
-}
+EXTRA_OEMAKE = "\
+    V=1 \
+    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}/=' \
+"
 
-USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \
-                    -DJAILHOUSE_VERSION=\\\"$JAILHOUSE_VERSION\\\" \
-                    -Wall -Wextra -Wmissing-declarations -Wmissing-prototypes -Werror \
-                    -I../driver'
+USER_SPACE_CFLAGS = "\
+    ${CFLAGS} \
+    -DLIBEXECDIR=\\\"${libexecdir}\\\" \
+    -DJAILHOUSE_VERSION=\\\"$JAILHOUSE_VERSION\\\" \
+    -Wall -Wextra -Wmissing-declarations -Wmissing-prototypes -Werror \
+    -I../driver \
+"
 
 TOOLS_SRC_DIR = "${S}/tools"
 
-EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}" KDIR=${STAGING_KERNEL_BUILDDIR}"
-
-do_compile() {
-        oe_runmake V=1
+do_configure() {
+    if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ]; then
+        cp ${STAGING_DIR_HOST}/${CELLCONF_DIR}/*.c ${S}/configs/
+    fi
 }