From a249f56843ee4c406c0e09d91590a645f4f05461 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 31 Oct 2022 07:30:27 -0500 Subject: [PATCH] Add one more patch the kernel guys ignored, and fix typo in module build. Patch was sent to kernel at https://lkml.iu.edu/hypermail/linux/kernel/2202.0/01505.html --- scripts/mkroot.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/mkroot.sh b/scripts/mkroot.sh index 17a15184..473d224f 100755 --- a/scripts/mkroot.sh +++ b/scripts/mkroot.sh @@ -261,9 +261,10 @@ else announce "linux-$KARCH" pushd "$LINUX" && make distclean && popd && cp -sfR "$LINUX" "$TEMP/linux" && pushd "$TEMP/linux" && - # Fix x86-64 and sh2eb + # Fix x86-64, sh2eb, and building with cc pointing to llvm or gcc sed -Eis '/select HAVE_(STACK_VALIDATION|OBJTOOL)/d' arch/x86/Kconfig && sed -is 's/depends on !SMP/& || !MMU/' mm/Kconfig && + sed -i 's@=\(.*[ )]\)gcc$@:=\1$(shell $(CROSS_COMPILE)cc --version >/dev/null 2>\&1 \&\& echo cc || echo gcc)@' Makefile && # Write linux-miniconfig { echo "# make ARCH=$KARCH allnoconfig KCONFIG_ALLCONFIG=linux-miniconfig" @@ -294,7 +295,7 @@ else [ -n "$DTB" ] && { cp "$DTB" "$OUTPUT/linux.dtb" || exit 1 ;} if [ -n "$MODULES" ]; then make ARCH=$KARCH INSTALL_MOD_PATH=modz modules_install && - (cd mods && find lib/modules | cpio -o -H newc $CPIO_OPTS ) | gzip \ + (cd modz && find lib/modules | cpio -o -H newc $CPIO_OPTS ) | gzip \ > "$OUTPUT/modules.cpio.gz" || exit 1 fi cp "$VMLINUX" "$OUTPUT"/linux-kernel && cd .. && rm -rf linux && popd ||exit 1 -- 2.39.2