]> git.proxmox.com Git - zfsonlinux.git/blob - spl-patches/0006-Linux-4.18-compat-Kconfig.patch
9ca70989424d2e40ceba09e2780e9accb3713e70
[zfsonlinux.git] / spl-patches / 0006-Linux-4.18-compat-Kconfig.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Brian Behlendorf <behlendorf1@llnl.gov>
3 Date: Wed, 12 Sep 2018 20:42:34 -0400
4 Subject: [PATCH] Linux 4.18 compat: Kconfig
5
6 The kernel's top level Kconfig was updated in 4.18 such that it
7 no longer matches the expected pattern preventing the spl source
8 from being inserted. Simplify the existing logic to always insert
9 the entry at the end of the file since an exact location is not
10 required, unlike in the Makefile.
11
12 Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
13 Issue #7890
14
15 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 ---
17 copy-builtin | 27 +--------------------------
18 1 file changed, 1 insertion(+), 26 deletions(-)
19
20 diff --git a/copy-builtin b/copy-builtin
21 index 34c482b..b8e3a08 100755
22 --- a/copy-builtin
23 +++ b/copy-builtin
24 @@ -88,32 +88,7 @@ EOF
25 done
26 } > "$KERNEL_DIR/spl/Kbuild"
27
28 -add_after()
29 -{
30 - local FILE="$1"
31 - local MARKER="$2"
32 - local NEW="$3"
33 - local LINE
34 -
35 - while IFS='' read -r LINE
36 - do
37 - echo "$LINE"
38 -
39 - if [ -n "$MARKER" -a "$LINE" = "$MARKER" ]
40 - then
41 - echo "$NEW"
42 - MARKER=''
43 - if IFS='' read -r LINE
44 - then
45 - [ "$LINE" != "$NEW" ] && echo "$LINE"
46 - fi
47 - fi
48 - done < "$FILE" > "$FILE.new"
49 -
50 - mv "$FILE.new" "$FILE"
51 -}
52 -
53 -add_after "$KERNEL_DIR/Kconfig" 'source "arch/$SRCARCH/Kconfig"' 'source "spl/Kconfig"'
54 +echo 'source "spl/Kconfig"' >>"$KERNEL_DIR/Kconfig"
55 # We must take care to build SPL before ZFS, otherwise the symbols required
56 # to link ZFS will not be available.
57 sed -i 's~mm/ fs/~mm/ spl/ fs/~' "$KERNEL_DIR/Makefile"