summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/linux/kernel-devsrc.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/linux/kernel-devsrc.bb')
-rw-r--r--meta/recipes-kernel/linux/kernel-devsrc.bb11
1 files changed, 10 insertions, 1 deletions
diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
index 3900489ac5..e17c0ea0ab 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -240,6 +240,15 @@ do_install() {
# Copy .config to include/config/auto.conf so "make prepare" is unnecessary.
cp $kerneldir/build/.config $kerneldir/build/include/config/auto.conf
+ # make the scripts python3 safe. We won't be running these, and if they are
+ # left as /usr/bin/python rootfs assembly will fail, since we only have python3
+ # in the RDEPENDS (and the python3 package does not include /usr/bin/python)
+ for ss in $(find $kerneldir/build/scripts -type f -name '*'); do
+ sed -i 's,/usr/bin/python2,/usr/bin/env python3,' "$ss"
+ sed -i 's,/usr/bin/env python2,/usr/bin/env python3,' "$ss"
+ sed -i 's,/usr/bin/python,/usr/bin/env python3,' "$ss"
+ done
+
chown -R root:root ${D}
}
@@ -249,7 +258,7 @@ do_install[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
FILES_${PN} = "${KERNEL_BUILD_ROOT} ${KERNEL_SRC_PATH}"
FILES_${PN}-dbg += "${KERNEL_BUILD_ROOT}*/build/scripts/*/.debug/*"
-RDEPENDS_${PN} = "bc python flex bison ${TCLIBC}-utils"
+RDEPENDS_${PN} = "bc python3 flex bison ${TCLIBC}-utils"
# 4.15+ needs these next two RDEPENDS
RDEPENDS_${PN} += "openssl-dev util-linux"
# and x86 needs a bit more for 4.15+