Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Linux 4.18 compat: Kconfig
The kernel's top level Kconfig was updated in 4.18 such that it
no longer matches the expected pattern preventing the spl source
from being inserted.  Simplify the existing logic to always insert
the entry at the end of the file since an exact location is not
required, unlike in the Makefile.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #7890
  • Loading branch information
behlendorf committed Sep 13, 2018
1 parent 0235e53 commit 88611c5
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions copy-builtin
Expand Up @@ -88,32 +88,7 @@ EOF
done
} > "$KERNEL_DIR/spl/Kbuild"

add_after()
{
local FILE="$1"
local MARKER="$2"
local NEW="$3"
local LINE

while IFS='' read -r LINE
do
echo "$LINE"

if [ -n "$MARKER" -a "$LINE" = "$MARKER" ]
then
echo "$NEW"
MARKER=''
if IFS='' read -r LINE
then
[ "$LINE" != "$NEW" ] && echo "$LINE"
fi
fi
done < "$FILE" > "$FILE.new"

mv "$FILE.new" "$FILE"
}

add_after "$KERNEL_DIR/Kconfig" 'source "arch/$SRCARCH/Kconfig"' 'source "spl/Kconfig"'
echo 'source "spl/Kconfig"' >>"$KERNEL_DIR/Kconfig"
# We must take care to build SPL before ZFS, otherwise the symbols required
# to link ZFS will not be available.
sed -i 's~mm/ fs/~mm/ spl/ fs/~' "$KERNEL_DIR/Makefile"
Expand Down

0 comments on commit 88611c5

Please sign in to comment.