mirror of
https://github.com/dynup/kpatch
synced 2025-03-11 05:07:53 +00:00
kpatch-build: Add UTS_UBUNTU_RELEASE_ABI symbol for utsrelease.h
The UTS_UBUNTU_RELEASE_ABI symbol is in utsrelease.h as installed by linux-headers-`uname -r`. However when building a module with kpatch-build utsrelease.h gets regenerated and doesn't include the ABI variable. This patch just adds the additional define based on the input ARCHVERSION.
This commit is contained in:
parent
f9cfd80718
commit
254e8bbe8d
@ -602,6 +602,14 @@ echo "Building patch module: kpatch-$PATCHNAME.ko"
|
||||
cp "$OBJDIR/.config" "$SRCDIR"
|
||||
cd "$SRCDIR"
|
||||
make prepare >> "$LOGFILE" 2>&1 || die
|
||||
|
||||
if [[ $DISTRO == ubuntu ]]; then
|
||||
# UBUNTU: add UTS_UBUNTU_RELEASE_ABI to utsrelease.h after regenerating it
|
||||
UBUNTU_ABI=${ARCHVERSION#*-}
|
||||
UBUNTU_ABI=${UBUNTU_ABI%-*}
|
||||
echo "#define UTS_UBUNTU_RELEASE_ABI "$UBUNTU_ABI"" >> "$SRCDIR"/include/generated/utsrelease.h
|
||||
fi
|
||||
|
||||
cd "$TEMPDIR/output"
|
||||
ld -r -o ../patch/output.o $(find . -name "*.o") >> "$LOGFILE" 2>&1 || die
|
||||
md5sum ../patch/output.o | awk '{printf "%s\0", $1}' > checksum.tmp || die
|
||||
|
Loading…
Reference in New Issue
Block a user