Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile original module for create-diff-object #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 8 additions & 0 deletions kpatch-build/kpatch-build
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ do
cp -f "$OBJDIR/$i" "$TEMPDIR/patched/$i" || die
done

unset KCFLAGS
echo "Extracting new and modified ELF sections"
FILES="$(cat "$TEMPDIR/changed_objs")"
cd "$TEMPDIR"
Expand All @@ -552,6 +553,13 @@ for i in $FILES; do
if [[ $KOBJFILE = vmlinux ]]; then
KOBJFILE=$VMLINUX
else
cd "$SRCDIR"
patch -p1 -R -d "$SRCDIR" < "$SRCDIR/$APPLIEDPATCHFILE" &> /dev/null
make "-j$CPUS" $KOBJFILE "O=$OBJDIR" >> "$LOGFILE" 2>&1 || die
cd "$OBJDIR"

# pass original module to create-diff-object
cp -f "$KOBJFILE" "$TEMPDIR/module/$KOBJFILE" || die
KOBJFILE="$TEMPDIR/module/$KOBJFILE"
fi
cd $TEMPDIR
Expand Down