Files
archived-meta-tegra/recipes-kernel/linux/kernel-devsrc.bbappend
Matt Madison 5548ffe2af kernel-devsrc.bbappend: Use ${bindir}/env awk
Use ${bindir}/env awk instead of /bin/awk in kernel tools and
scripts. This fixes kernel-devsrc package installation failures
because awk is typically not installed in /bin.

References:
https://gerrit.automotivelinux.org/gerrit/gitweb?p=AGL/meta-agl.git;a=commit;h=4bfc821810cdee47611c6d3e94d771971f51fa75
https://lists.yoctoproject.org/pipermail/meta-intel/2017-January/004519.html
https://patchwork.openembedded.org/patch/136699/
http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-cache/commit/?h=yocto-4.9&id=d0e0a36eec57f5dfa02045776c69092c145f5000

Also included some workarounds to enable building kernel-devsrc
with the very old kernel in L4T R21.x for the TK1.

(#139)

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Matt Madison <matt@madison.systems>
2019-06-20 07:36:35 -07:00

34 lines
956 B
Plaintext

KERNEL_AWKSCRIPTDIRS ?= "scripts tools arch/*/tools"
do_install_prepend_tegra124() {
touch ${S}/Build
if [ ! -e ${S}/arch/arm/kernel/module.lds ]; then
touch ${S}/arch/arm/kernel/module.lds
remove_module_lds=yes
fi
if [ ! -d ${S}/arch/x86/entry ]; then
mkdir -p ${S}/arch/x86/entry/syscalls
touch ${S}/arch/x86/entry/syscalls/syscall_32.tbl
remove_arch_x86_entry=yes
fi
}
do_install_append() {
(
cd $kerneldir/build
for i in $(grep -srI "^#!/bin/awk" ${KERNEL_AWKSCRIPTDIRS} | cut -d":" -f1); do
sed -i -e "s,^#!/bin/awk,#!${bindir}/env awk," $i
done
)
}
do_install_append_tegra124() {
rm -f ${S}/Build $kerneldir/build/Build
if [ "$remove_module_lds" = "yes" ]; then
rm -f ${S}/arch/arm/kernel/module.lds $kerneldir/build/arch/arm/kernel/module.lds
fi
if [ "$remove_arch_x86_entry" = "yes" ]; then
rm -rf ${S}/arch/x86/entry kerneldir/build/arch/x86/entry
fi
}