Skip to content
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