diff mbox series

kernel-devsrc: drop unused scripts/mksysmap to avoid sed dependency

Message ID 20261102171300.3830206-1-roshs@qti.qualcomm.com
State Under Review
Headers show
Series kernel-devsrc: drop unused scripts/mksysmap to avoid sed dependency | expand

Commit Message

Roshan Sivakumar Nov. 2, 2026, 5:13 p.m. UTC
scripts/mksysmap is a '#!/bin/sed -f' script that is consumed only by
scripts/link-vmlinux.sh during a full vmlinux link (NM | sed -f mksysmap
> System.map). External module builds against kernel-devsrc never relink
vmlinux, so the script is never used in this package.

Because it is packaged with a '#!/bin/sed' shebang, the RPM 6 interpreter
dependency generator emits "Requires: /bin/sed" for kernel-devsrc. Only
full GNU sed provides /bin/sed (busybox provides /usr/bin/sed), so SDK
population fails with "nothing provides /bin/sed" on images using busybox
sed.

Remove the script in do_install, mirroring the existing removal of
scripts/package/debian/rules (dropped to avoid an RDEPENDS on make). This
clears the spurious /bin/sed dependency without pulling full sed into the
package or the SDK.

Assisted-by: Claude Code:claude-opus-4.8
Signed-off-by: Roshan Sivakumar <roshs@qti.qualcomm.com>
---
 meta/recipes-kernel/linux/kernel-devsrc.bb | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
index 90bdbfc534..7da7e270c3 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -158,6 +158,13 @@  do_install() {
         # Remove as we else would ned to RDEPEND on make
         rm $kerneldir/build/scripts/package/debian/rules 2>/dev/null || :
 
+        # scripts/mksysmap is a '#!/bin/sed -f' script that is only consumed by
+        # scripts/link-vmlinux.sh during a full vmlinux link. External module
+        # builds never relink vmlinux, so it is unused here. Remove it as otherwise
+        # we would need to pull sed into the package/SDK to satisfy
+        # the dependency generated via the RPM shebang dependency generator (Requires: /bin/sed).
+        rm $kerneldir/build/scripts/mksysmap 2>/dev/null || :
+
         # tools/include is needed by the archscripts host tools that
         # 'make scripts prepare' rebuilds on target (e.g. x86 vdso2c) and
 	# not checked against objtool as it previously was.