Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion devtools/pack-prebuilt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@ cp "$KERNEL_BUILD/.config" "$STAGE_BUILD/"
cp "$KERNEL_BUILD/Module.symvers" "$STAGE_BUILD/"
[ -f "$KERNEL_BUILD/modules.order" ] && cp "$KERNEL_BUILD/modules.order" "$STAGE_BUILD/"

# Top-level Makefile (kbuild entry point when using O=)
# Top-level Makefile (kbuild entry point when using O=).
# kbuild generates this with an absolute include path; rewrite it to use a
# relative "source" symlink so the prebuilt tarball is machine-independent.
cp "$KERNEL_BUILD/Makefile" "$STAGE_BUILD/"
sed -i "s|^include .*/linux-${KERNEL_VERSION}/Makefile|include source/Makefile|" \
"$STAGE_BUILD/Makefile"

# Config stamp (for setup.sh staleness detection)
[ -f "$KERNEL_BUILD/.config-stamp" ] && cp "$KERNEL_BUILD/.config-stamp" "$STAGE_BUILD/"
Expand Down Expand Up @@ -93,6 +97,12 @@ rsync -a \
--exclude='*.a' --exclude='.tmp_*' \
"$KERNEL_BUILD/scripts/" "$STAGE_BUILD/scripts/"

# objtool (host tool required for out-of-tree module builds with CONFIG_OBJTOOL)
if [ -f "$KERNEL_BUILD/tools/objtool/objtool" ]; then
mkdir -p "$STAGE_BUILD/tools/objtool"
cp "$KERNEL_BUILD/tools/objtool/objtool" "$STAGE_BUILD/tools/objtool/"
fi

# bzImage for QEMU boot
mkdir -p "$STAGE_BUILD/arch/x86/boot"
cp "$KERNEL_BUILD/arch/x86/boot/bzImage" "$STAGE_BUILD/arch/x86/boot/"
Expand Down