Skip to content

Commit 0263871

Browse files
authored
Merge pull request #376 from linesight/master
Fix prebuilt tarball hardcoding CI build path
2 parents 49e7b9f + e0dfb3e commit 0263871

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

devtools/pack-prebuilt.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,12 @@ cp "$KERNEL_BUILD/.config" "$STAGE_BUILD/"
6363
cp "$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.
6769
cp "$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
97107
mkdir -p "$STAGE_BUILD/arch/x86/boot"
98108
cp "$KERNEL_BUILD/arch/x86/boot/bzImage" "$STAGE_BUILD/arch/x86/boot/"

0 commit comments

Comments
 (0)