File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,8 +63,12 @@ cp "$KERNEL_BUILD/.config" "$STAGE_BUILD/"
6363cp " $KERNEL_BUILD /Module.symvers" " $STAGE_BUILD /"
6464[ -f " $KERNEL_BUILD /modules.order" ] && cp " $KERNEL_BUILD /modules.order" " $STAGE_BUILD /"
6565
66- # Top-level Makefile (kbuild entry point when using O=)
66+ # Top-level Makefile (kbuild entry point when using O=).
67+ # kbuild generates this with an absolute include path; rewrite it to use a
68+ # relative "source" symlink so the prebuilt tarball is machine-independent.
6769cp " $KERNEL_BUILD /Makefile" " $STAGE_BUILD /"
70+ sed -i " s|^include .*/linux-${KERNEL_VERSION} /Makefile|include source/Makefile|" \
71+ " $STAGE_BUILD /Makefile"
6872
6973# Config stamp (for setup.sh staleness detection)
7074[ -f " $KERNEL_BUILD /.config-stamp" ] && cp " $KERNEL_BUILD /.config-stamp" " $STAGE_BUILD /"
@@ -93,6 +97,12 @@ rsync -a \
9397 --exclude=' *.a' --exclude=' .tmp_*' \
9498 " $KERNEL_BUILD /scripts/" " $STAGE_BUILD /scripts/"
9599
100+ # objtool (host tool required for out-of-tree module builds with CONFIG_OBJTOOL)
101+ if [ -f " $KERNEL_BUILD /tools/objtool/objtool" ]; then
102+ mkdir -p " $STAGE_BUILD /tools/objtool"
103+ cp " $KERNEL_BUILD /tools/objtool/objtool" " $STAGE_BUILD /tools/objtool/"
104+ fi
105+
96106# bzImage for QEMU boot
97107mkdir -p " $STAGE_BUILD /arch/x86/boot"
98108cp " $KERNEL_BUILD /arch/x86/boot/bzImage" " $STAGE_BUILD /arch/x86/boot/"
You can’t perform that action at this time.
0 commit comments