summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-kernel
diff options
context:
space:
mode:
authorZang Ruochen <zangrc.fnst@cn.fujitsu.com>2019-08-09 16:34:56 +0800
committerKhem Raj <raj.khem@gmail.com>2019-08-11 08:58:05 -0700
commitff074c9bfd8fd38f0975014cfbd77058bdbda2c8 (patch)
treea64a0aafb409b9c3a341dd4abd25b2460d0a60c4 /meta-oe/recipes-kernel
parent493aa5b8967f632912acc5d9becf97e50f93cbd1 (diff)
downloadmeta-openembedded-ff074c9bfd8fd38f0975014cfbd77058bdbda2c8.tar.gz
kpatch: upgrade 0.61 -> 0.71
-Refresh the following patch: kpatch/0001-kpatch-build-add-cross-compilation-support.patch kpatch/0002-kpatch-build-allow-overriding-of-distro-name.patch Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-kernel')
-rw-r--r--meta-oe/recipes-kernel/kpatch/kpatch/0001-kpatch-build-add-cross-compilation-support.patch52
-rw-r--r--meta-oe/recipes-kernel/kpatch/kpatch/0002-kpatch-build-allow-overriding-of-distro-name.patch24
-rw-r--r--meta-oe/recipes-kernel/kpatch/kpatch_git.bb4
3 files changed, 43 insertions, 37 deletions
diff --git a/meta-oe/recipes-kernel/kpatch/kpatch/0001-kpatch-build-add-cross-compilation-support.patch b/meta-oe/recipes-kernel/kpatch/kpatch/0001-kpatch-build-add-cross-compilation-support.patch
index ab3b12764..348d82acc 100644
--- a/meta-oe/recipes-kernel/kpatch/kpatch/0001-kpatch-build-add-cross-compilation-support.patch
+++ b/meta-oe/recipes-kernel/kpatch/kpatch/0001-kpatch-build-add-cross-compilation-support.patch
@@ -1,6 +1,6 @@
1From 70de3fecbc551907c4fd504cfff385c73be8db75 Mon Sep 17 00:00:00 2001 1From 21909e3f9096fa8e4825df8c65114ee92ab3d532 Mon Sep 17 00:00:00 2001
2From: Ruslan Bilovol <rbilovol@cisco.com> 2From: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
3Date: Tue, 19 Dec 2017 15:59:04 +0200 3Date: Wed, 7 Aug 2019 02:57:35 +0900
4Subject: [PATCH] kpatch-build: add cross-compilation support 4Subject: [PATCH] kpatch-build: add cross-compilation support
5 5
6This patch introduces new option for kpatch-build 6This patch introduces new option for kpatch-build
@@ -17,44 +17,45 @@ possible to pass multy-component strings like
17Upstream-Status: Pending 17Upstream-Status: Pending
18 18
19Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com> 19Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com>
20
21--- 20---
22 kpatch-build/kpatch-build | 13 +++++++++++-- 21 kpatch-build/kpatch-build | 13 +++++++++++--
23 kpatch-build/kpatch-gcc | 4 ++-- 22 kpatch-build/kpatch-gcc | 4 ++--
24 2 files changed, 13 insertions(+), 4 deletions(-) 23 2 files changed, 13 insertions(+), 4 deletions(-)
25 24
26diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build 25diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build
27index a76913f..4a011aa 100755 26index 9ef3809..463dab1 100755
28--- a/kpatch-build/kpatch-build 27--- a/kpatch-build/kpatch-build
29+++ b/kpatch-build/kpatch-build 28+++ b/kpatch-build/kpatch-build
30@@ -197,7 +197,7 @@ gcc_version_check() { 29@@ -198,7 +198,7 @@ gcc_version_check() {
31 # gcc --version varies between distributions therefore extract version 30 # gcc --version varies between distributions therefore extract version
32 # by compiling a test file and compare it to vmlinux's version. 31 # by compiling a test file and compare it to vmlinux's version.
33 echo 'void main(void) {}' > "$c" 32 echo 'void main(void) {}' > "$c"
34- out="$(gcc -c -pg -ffunction-sections -o "$o" "$c" 2>&1)" 33- out="$(gcc -c -pg -ffunction-sections -o "$o" "$c" 2>&1)"
35+ out="$(${KPATCH_CROSS_COMPILE}gcc -c -pg -ffunction-sections -o "$o" "$c" 2>&1)" 34+ out="$(${KPATCH_CROSS_COMPILE}gcc -c -pg -ffunction-sections -o "$o" "$c" 2>&1)"
36 gccver="$(gcc_version_from_file "$o")" 35 gccver="$(gcc_version_from_file "$o")"
37 kgccver="$(gcc_version_from_file "$VMLINUX")" 36 if [[ -n "$OOT_MODULE" ]]; then
38 rm -f "$c" "$o" 37 kgccver="$(gcc_version_from_file "$OOT_MODULE")"
39@@ -392,12 +392,14 @@ usage() { 38@@ -411,6 +411,8 @@ usage() {
40 echo " -d, --debug Enable 'xtrace' and keep scratch files" >&2
41 echo " in <CACHEDIR>/tmp" >&2
42 echo " (can be specified multiple times)" >&2 39 echo " (can be specified multiple times)" >&2
40 echo " -e, --oot-module Enable patching out-of-tree module," >&2
41 echo " specify current version of module" >&2
43+ echo " --cross-compile Specify the prefix used for all executables" >&2 42+ echo " --cross-compile Specify the prefix used for all executables" >&2
44+ echo " used during compilation" >&2 43+ echo " used during compilation" >&2
45 echo " --skip-cleanup Skip post-build cleanup" >&2 44 echo " --skip-cleanup Skip post-build cleanup" >&2
46 echo " --skip-gcc-check Skip gcc version matching check" >&2 45 echo " --skip-gcc-check Skip gcc version matching check" >&2
46 echo " (not recommended)" >&2
47@@ -416,7 +418,7 @@ usage() {
47 echo " (not recommended)" >&2 48 echo " (not recommended)" >&2
48 } 49 }
49 50
50-options="$(getopt -o ha:r:s:c:v:j:t:n:o:d -l "help,archversion:,sourcerpm:,sourcedir:,config:,vmlinux:,jobs:,target:,name:,output:,debug,skip-gcc-check,skip-cleanup" -- "$@")" || die "getopt failed" 51-options="$(getopt -o ha:r:s:c:v:j:t:n:o:de: -l "help,archversion:,sourcerpm:,sourcedir:,config:,vmlinux:,jobs:,target:,name:,output:,oot-module:,debug,skip-gcc-check,skip-cleanup" -- "$@")" || die "getopt failed"
51+options="$(getopt -o ha:r:s:c:v:j:t:n:o:d -l "help,archversion:,sourcerpm:,sourcedir:,config:,vmlinux:,jobs:,target:,name:,output:,debug,cross-compile:,skip-gcc-check,skip-cleanup" -- "$@")" || die "getopt failed" 52+options="$(getopt -o ha:r:s:c:v:j:t:n:o:de: -l "help,archversion:,sourcerpm:,sourcedir:,config:,vmlinux:,jobs:,target:,name:,output:,oot-module:,debug,cross-compile:,skip-gcc-check,skip-cleanup" -- "$@")" || die "getopt failed"
52 53
53 eval set -- "$options" 54 eval set -- "$options"
54 55
55@@ -455,6 +457,10 @@ while [[ $# -gt 0 ]]; do 56@@ -479,6 +481,10 @@ while [[ $# -gt 0 ]]; do
56 echo "DEBUG mode enabled" 57 OOT_MODULE="$(readlink -f "$2")"
57 fi 58 shift
58 ;; 59 ;;
59+ --cross-compile) 60+ --cross-compile)
60+ KPATCH_CROSS_COMPILE="$2" 61+ KPATCH_CROSS_COMPILE="$2"
@@ -63,17 +64,17 @@ index a76913f..4a011aa 100755
63 --skip-cleanup) 64 --skip-cleanup)
64 echo "Skipping cleanup" 65 echo "Skipping cleanup"
65 SKIPCLEANUP=1 66 SKIPCLEANUP=1
66@@ -710,6 +716,8 @@ if [[ $DEBUG -ge 4 ]]; then 67@@ -757,6 +763,8 @@ if [[ $DEBUG -ge 4 ]]; then
67 export KPATCH_GCC_DEBUG=1 68 export KPATCH_GCC_DEBUG=1
68 fi 69 fi
69 70
70+export KPATCH_CROSS_COMPILE 71+export KPATCH_CROSS_COMPILE
71+ 72+
72 echo "Building original kernel" 73 echo "Building original source"
73 ./scripts/setlocalversion --save-scmversion || die 74 [[ -n "$OOT_MODULE" ]] || ./scripts/setlocalversion --save-scmversion || die
74 unset KPATCH_GCC_TEMPDIR 75 unset KPATCH_GCC_TEMPDIR
75@@ -874,6 +882,7 @@ cd "$TEMPDIR/patch" || die 76@@ -940,6 +948,7 @@ fi
76 KPATCH_BUILD="$SRCDIR" KPATCH_NAME="$MODNAME" \ 77 KPATCH_BUILD="$KPATCH_BUILD" KPATCH_NAME="$MODNAME" \
77 KBUILD_EXTRA_SYMBOLS="$KBUILD_EXTRA_SYMBOLS" \ 78 KBUILD_EXTRA_SYMBOLS="$KBUILD_EXTRA_SYMBOLS" \
78 KPATCH_LDFLAGS="$KPATCH_LDFLAGS" \ 79 KPATCH_LDFLAGS="$KPATCH_LDFLAGS" \
79+CROSS_COMPILE="$KPATCH_CROSS_COMPILE" \ 80+CROSS_COMPILE="$KPATCH_CROSS_COMPILE" \
@@ -81,7 +82,7 @@ index a76913f..4a011aa 100755
81 82
82 if ! "$KPATCH_MODULE"; then 83 if ! "$KPATCH_MODULE"; then
83diff --git a/kpatch-build/kpatch-gcc b/kpatch-build/kpatch-gcc 84diff --git a/kpatch-build/kpatch-gcc b/kpatch-build/kpatch-gcc
84index 2d56da1..59a4255 100755 85index 9663290..56e6c8f 100755
85--- a/kpatch-build/kpatch-gcc 86--- a/kpatch-build/kpatch-gcc
86+++ b/kpatch-build/kpatch-gcc 87+++ b/kpatch-build/kpatch-gcc
87@@ -8,7 +8,7 @@ TOOLCHAINCMD="$1" 88@@ -8,7 +8,7 @@ TOOLCHAINCMD="$1"
@@ -93,9 +94,12 @@ index 2d56da1..59a4255 100755
93 fi 94 fi
94 95
95 declare -a args=("$@") 96 declare -a args=("$@")
96@@ -82,4 +82,4 @@ elif [[ "$TOOLCHAINCMD" = "ld" ]] ; then 97@@ -84,4 +84,4 @@ elif [[ "$TOOLCHAINCMD" = "ld" ]] ; then
97 done 98 done
98 fi 99 fi
99 100
100-exec "$TOOLCHAINCMD" "${args[@]}" 101-exec "$TOOLCHAINCMD" "${args[@]}"
101+exec ${KPATCH_CROSS_COMPILE}${TOOLCHAINCMD} "${args[@]}" 102+exec ${KPATCH_CROSS_COMPILE}${TOOLCHAINCMD} "${args[@]}"
103--
1042.7.4
105
diff --git a/meta-oe/recipes-kernel/kpatch/kpatch/0002-kpatch-build-allow-overriding-of-distro-name.patch b/meta-oe/recipes-kernel/kpatch/kpatch/0002-kpatch-build-allow-overriding-of-distro-name.patch
index 13cdc6bfb..603a1475a 100644
--- a/meta-oe/recipes-kernel/kpatch/kpatch/0002-kpatch-build-allow-overriding-of-distro-name.patch
+++ b/meta-oe/recipes-kernel/kpatch/kpatch/0002-kpatch-build-allow-overriding-of-distro-name.patch
@@ -1,6 +1,6 @@
1From 15838a86d5ea94fa05976ea32fd847b18261b403 Mon Sep 17 00:00:00 2001 1From 4143fa0092fe4cafee10b24a97d3ad0b41ab7a30 Mon Sep 17 00:00:00 2001
2From: Ruslan Bilovol <rbilovol@cisco.com> 2From: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
3Date: Tue, 2 Jan 2018 14:50:03 +0200 3Date: Wed, 7 Aug 2019 03:24:39 +0900
4Subject: [PATCH] kpatch-build: allow overriding of distro name 4Subject: [PATCH] kpatch-build: allow overriding of distro name
5 5
6It is sometimes useful to have ability to override 6It is sometimes useful to have ability to override
@@ -14,17 +14,16 @@ implements all needed functionality
14Upstream-Status: Pending 14Upstream-Status: Pending
15 15
16Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com> 16Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com>
17
18--- 17---
19 kpatch-build/kpatch-build | 9 +++++++-- 18 kpatch-build/kpatch-build | 9 +++++++--
20 1 file changed, 7 insertions(+), 2 deletions(-) 19 1 file changed, 7 insertions(+), 2 deletions(-)
21 20
22diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build 21diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build
23index 4a011aa..eb6cd64 100755 22index 39933fc..c0258a2 100755
24--- a/kpatch-build/kpatch-build 23--- a/kpatch-build/kpatch-build
25+++ b/kpatch-build/kpatch-build 24+++ b/kpatch-build/kpatch-build
26@@ -394,12 +394,13 @@ usage() { 25@@ -413,12 +413,13 @@ usage() {
27 echo " (can be specified multiple times)" >&2 26 echo " specify current version of module" >&2
28 echo " --cross-compile Specify the prefix used for all executables" >&2 27 echo " --cross-compile Specify the prefix used for all executables" >&2
29 echo " used during compilation" >&2 28 echo " used during compilation" >&2
30+ echo " --distro Override distro name" >&2 29+ echo " --distro Override distro name" >&2
@@ -33,12 +32,12 @@ index 4a011aa..eb6cd64 100755
33 echo " (not recommended)" >&2 32 echo " (not recommended)" >&2
34 } 33 }
35 34
36-options="$(getopt -o ha:r:s:c:v:j:t:n:o:d -l "help,archversion:,sourcerpm:,sourcedir:,config:,vmlinux:,jobs:,target:,name:,output:,debug,cross-compile:,skip-gcc-check,skip-cleanup" -- "$@")" || die "getopt failed" 35-options="$(getopt -o ha:r:s:c:v:j:t:n:o:de: -l "help,archversion:,sourcerpm:,sourcedir:,config:,vmlinux:,jobs:,target:,name:,output:,oot-module:,debug,cross-compile:,skip-gcc-check,skip-cleanup" -- "$@")" || die "getopt failed"
37+options="$(getopt -o ha:r:s:c:v:j:t:n:o:d -l "help,archversion:,sourcerpm:,sourcedir:,config:,vmlinux:,jobs:,target:,name:,output:,debug,cross-compile:,distro:,skip-gcc-check,skip-cleanup" -- "$@")" || die "getopt failed" 36+options="$(getopt -o ha:r:s:c:v:j:t:n:o:de: -l "help,archversion:,sourcerpm:,sourcedir:,config:,vmlinux:,jobs:,target:,name:,output:,oot-module:,debug,cross-compile:,distro:,skip-gcc-check,skip-cleanup" -- "$@")" || die "getopt failed"
38 37
39 eval set -- "$options" 38 eval set -- "$options"
40 39
41@@ -461,6 +462,10 @@ while [[ $# -gt 0 ]]; do 40@@ -485,6 +486,10 @@ while [[ $# -gt 0 ]]; do
42 KPATCH_CROSS_COMPILE="$2" 41 KPATCH_CROSS_COMPILE="$2"
43 shift 42 shift
44 ;; 43 ;;
@@ -49,7 +48,7 @@ index 4a011aa..eb6cd64 100755
49 --skip-cleanup) 48 --skip-cleanup)
50 echo "Skipping cleanup" 49 echo "Skipping cleanup"
51 SKIPCLEANUP=1 50 SKIPCLEANUP=1
52@@ -539,7 +544,7 @@ fi 51@@ -571,7 +576,7 @@ fi
53 # Don't check external file. 52 # Don't check external file.
54 # shellcheck disable=SC1091 53 # shellcheck disable=SC1091
55 source /etc/os-release 54 source /etc/os-release
@@ -58,3 +57,6 @@ index 4a011aa..eb6cd64 100755
58 if [[ "$DISTRO" = fedora ]] || [[ "$DISTRO" = rhel ]] || [[ "$DISTRO" = ol ]] || [[ "$DISTRO" = centos ]]; then 57 if [[ "$DISTRO" = fedora ]] || [[ "$DISTRO" = rhel ]] || [[ "$DISTRO" = ol ]] || [[ "$DISTRO" = centos ]]; then
59 [[ -z "$VMLINUX" ]] && VMLINUX="/usr/lib/debug/lib/modules/$ARCHVERSION/vmlinux" 58 [[ -z "$VMLINUX" ]] && VMLINUX="/usr/lib/debug/lib/modules/$ARCHVERSION/vmlinux"
60 [[ -e "$VMLINUX" ]] || die "kernel-debuginfo-$ARCHVERSION not installed" 59 [[ -e "$VMLINUX" ]] || die "kernel-debuginfo-$ARCHVERSION not installed"
60--
612.7.4
62
diff --git a/meta-oe/recipes-kernel/kpatch/kpatch_git.bb b/meta-oe/recipes-kernel/kpatch/kpatch_git.bb
index 024cca655..dc247942f 100644
--- a/meta-oe/recipes-kernel/kpatch/kpatch_git.bb
+++ b/meta-oe/recipes-kernel/kpatch/kpatch_git.bb
@@ -2,9 +2,9 @@ require kpatch.inc
2 2
3LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" 3LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
4 4
5SRCREV = "7f550f01bd308cf058ae782327d29c8916cc5602" 5SRCREV = "d7c5810e2a6acacfa5fec1e38d2f75af8e8c818c"
6 6
7PV = "0.6.1+git${SRCPV}" 7PV = "0.7.1+git${SRCPV}"
8 8
9S = "${WORKDIR}/git" 9S = "${WORKDIR}/git"
10 10