From 4e89180cd6d417e8ccfadcc0d62a0a1e1567d384 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 17 Oct 2020 22:37:28 +0200 Subject: Kernel: T2990: Update Linux Kernel to v4.19.152 --- packages/linux-kernel/Jenkinsfile | 2 +- ...pped-in-debian-in-linux-tools-version-pac.patch | 95 ++++++++++++++++++++++ ...uilddeb-add-linux-tools-package-with-perf.patch | 93 --------------------- ...mpilation-error-due-to-discarded-const-qu.patch | 31 +++++++ 4 files changed, 127 insertions(+), 94 deletions(-) create mode 100644 packages/linux-kernel/patches/kernel/0003-Perf-is-shipped-in-debian-in-linux-tools-version-pac.patch delete mode 100644 packages/linux-kernel/patches/kernel/0003-RFC-builddeb-add-linux-tools-package-with-perf.patch create mode 100644 packages/linux-kernel/patches/kernel/0004-perf-fix-compilation-error-due-to-discarded-const-qu.patch (limited to 'packages') diff --git a/packages/linux-kernel/Jenkinsfile b/packages/linux-kernel/Jenkinsfile index 2b182211..bec5b39f 100644 --- a/packages/linux-kernel/Jenkinsfile +++ b/packages/linux-kernel/Jenkinsfile @@ -92,7 +92,7 @@ pipeline { doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CleanCheckout'], [$class: 'CloneOption', depth: 1, noTags: false, reference: '', shallow: true]], - branches: [[name: 'v4.19.148' ]], + branches: [[name: 'v4.19.152' ]], userRemoteConfigs: [[credentialsId: 'GitHub-vyosbot', url: 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git']]]) } } diff --git a/packages/linux-kernel/patches/kernel/0003-Perf-is-shipped-in-debian-in-linux-tools-version-pac.patch b/packages/linux-kernel/patches/kernel/0003-Perf-is-shipped-in-debian-in-linux-tools-version-pac.patch new file mode 100644 index 00000000..de0487f6 --- /dev/null +++ b/packages/linux-kernel/patches/kernel/0003-Perf-is-shipped-in-debian-in-linux-tools-version-pac.patch @@ -0,0 +1,95 @@ +From be73c78420d9a23accfa9568e451046272ceab84 Mon Sep 17 00:00:00 2001 +From: Riku Voipio +Date: Sat, 17 Oct 2020 10:30:37 +0000 +Subject: [PATCH] Perf is shipped in debian in linux-tools-$version package + +Extend the existing to builddeb script to build perf if BUILD_TOOLS=y is +added the make deb-pkg line + +Some features of this patch I'm uncomfortable with: + +1. Relative paths are resoved to absolute ones + Especially with separate O= buildd, perf build from tools/perf dir + fail. + +2. Unsetting LDFLAGS + make -> shell (builddeb) -> make expands variables. The LDFLAGS as + set by toplevel makefile are for kernel, so we just unset the flag + here. + +3. Replaces ubuntu/debian packages instead attempting to fit to + the linux-base/linux-tools-common frameworks. I think people who + want to run "make deb-pkg" for their kernels would rather keep this + simple. + +4. More tools than just perf could be built - unfortunately most + tools fail to have a working "install" target and/or else have + build process inconsistent with other tools. A topic for another + patch series. + +Signed-off-by: Riku Voipio +--- + scripts/package/builddeb | 31 ++++++++++++++++++++++++++++++- + 1 file changed, 30 insertions(+), 1 deletion(-) + +diff --git a/scripts/package/builddeb b/scripts/package/builddeb +index 0b31f4f1f92c..517a54e64509 100755 +--- a/scripts/package/builddeb ++++ b/scripts/package/builddeb +@@ -39,10 +39,12 @@ tmpdir="$objtree/debian/tmp" + kernel_headers_dir="$objtree/debian/hdrtmp" + libc_headers_dir="$objtree/debian/headertmp" + dbg_dir="$objtree/debian/dbgtmp" ++tools_dir="$objtree/debian/toolstmp" + packagename=linux-image-$version + kernel_headers_packagename=linux-headers-$version + libc_headers_packagename=linux-libc-dev + dbg_packagename=$packagename-dbg ++tools_packagename=linux-tools-$version + + if [ "$ARCH" = "um" ] ; then + packagename=user-mode-linux-$version +@@ -65,7 +67,7 @@ esac + BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)" + + # Setup the directory structure +-rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" $objtree/debian/files ++rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" "$tools_dir" $objtree/debian/files + mkdir -m 755 -p "$tmpdir/DEBIAN" + mkdir -p "$tmpdir/lib" "$tmpdir/boot" + mkdir -p "$kernel_headers_dir/lib/modules/$version/" +@@ -194,4 +196,31 @@ if [ -n "$BUILD_DEBUG" ] ; then + create_package "$dbg_packagename" "$dbg_dir" + fi + ++if [ -n "$BUILD_TOOLS" ] ++then ++ # HACK - change output dir from relative to absolute ++ mkdir -p $tools_dir ++ tools_dest=`readlink -f $tools_dir` ++ if [ -n "$O" ] ++ then ++ output=`readlink -f $objtree` ++ mkdir -p $output/tools/perf ++ output="O=$output/tools/perf" ++ fi ++ $MAKE V=1 -C $srctree/tools/perf $output LDFLAGS= srctree=$KBUILD_SRC prefix=$tools_dest/usr install ++ cat <> debian/control ++ ++Package: $tools_packagename ++Architecture: any ++Replaces: linux-base, linux-tools-common ++Depends: \${shlibs:Depends} ++Description: Performance analysis tools for Linux $version ++ This package contains the 'perf' performance analysis tools for Linux ++ kernel version $version . ++EOF ++ ++ dpkg-shlibdeps $tools_dest/usr/bin/* $tools_dest/usr/lib*/traceevent/plugins/* ++ create_package "$tools_packagename" "$tools_dir" ++fi ++ + exit 0 +-- +2.20.1 + diff --git a/packages/linux-kernel/patches/kernel/0003-RFC-builddeb-add-linux-tools-package-with-perf.patch b/packages/linux-kernel/patches/kernel/0003-RFC-builddeb-add-linux-tools-package-with-perf.patch deleted file mode 100644 index 38d5b980..00000000 --- a/packages/linux-kernel/patches/kernel/0003-RFC-builddeb-add-linux-tools-package-with-perf.patch +++ /dev/null @@ -1,93 +0,0 @@ -From: Riku Voipio - -Perf is shipped in debian in linux-tools-$version package. Extend -the existing to builddeb script to build perf if BUILD_TOOLS=y -is added the make deb-pkg line - -Some features of this patch I'm uncomfortable with: - -1. Relative paths are resoved to absolute ones - Especially with separate O= buildd, perf build from tools/perf dir - fail. - -2. Unsetting LDFLAGS - make -> shell (builddeb) -> make expands variables. The LDFLAGS as - set by toplevel makefile are for kernel, so we just unset the flag - here. - -3. Replaces ubuntu/debian packages instead attempting to fit to - the linux-base/linux-tools-common frameworks. I think people who - want to run "make deb-pkg" for their kernels would rather keep this - simple. - -4. More tools than just perf could be built - unfortunately most - tools fail to have a working "install" target and/or else have - build process inconsistent with other tools. A topic for another - patch series. - -Signed-off-by: Riku Voipio ---- - scripts/package/builddeb | 31 ++++++++++++++++++++++++++++++- - 1 file changed, 30 insertions(+), 1 deletion(-) - -diff --git a/scripts/package/builddeb b/scripts/package/builddeb -index 0b31f4f1f92c..629144b4226b 100755 ---- a/scripts/package/builddeb -+++ b/scripts/package/builddeb -@@ -39,10 +39,12 @@ tmpdir="$objtree/debian/tmp" - kernel_headers_dir="$objtree/debian/hdrtmp" - libc_headers_dir="$objtree/debian/headertmp" - dbg_dir="$objtree/debian/dbgtmp" -+tools_dir="$objtree/debian/toolstmp" - packagename=linux-image-$version - kernel_headers_packagename=linux-headers-$version - libc_headers_packagename=linux-libc-dev - dbg_packagename=$packagename-dbg -+tools_packagename=linux-tools-$version - - if [ "$ARCH" = "um" ] ; then - packagename=user-mode-linux-$version -@@ -65,7 +67,7 @@ esac - BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)" - - # Setup the directory structure --rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" $objtree/debian/files -+rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" "$tools_dir" $objtree/debian/files - mkdir -m 755 -p "$tmpdir/DEBIAN" - mkdir -p "$tmpdir/lib" "$tmpdir/boot" - mkdir -p "$kernel_headers_dir/lib/modules/$version/" -@@ -194,4 +196,31 @@ if [ -n "$BUILD_DEBUG" ] ; then - create_package "$dbg_packagename" "$dbg_dir" - fi - -+if [ -n "$BUILD_TOOLS" ] -+then -+ # HACK - change output dir from relative to absolute -+ mkdir -p $tools_dir -+ tools_dest=`readlink -f $tools_dir` -+ if [ -n "$O" ] -+ then -+ output=`readlink -f $objtree` -+ mkdir -p $output/tools/perf -+ output="O=$output/tools/perf" -+ fi -+ $MAKE -C $srctree/tools/perf $output LDFLAGS= srctree=$KBUILD_SRC prefix=$tools_dest/usr install -+ cat <> debian/control -+ -+Package: $tools_packagename -+Architecture: any -+Replaces: linux-base, linux-tools-common -+Depends: \${shlibs:Depends} -+Description: Performance analysis tools for Linux $version -+ This package contains the 'perf' performance analysis tools for Linux -+ kernel version $version . -+EOF -+ -+ dpkg-shlibdeps $tools_dest/usr/bin/* $tools_dest/usr/lib*/traceevent/plugins/* -+ create_package "$tools_packagename" "$tools_dir" -+fi -+ - exit 0 --- -2.20.1 - diff --git a/packages/linux-kernel/patches/kernel/0004-perf-fix-compilation-error-due-to-discarded-const-qu.patch b/packages/linux-kernel/patches/kernel/0004-perf-fix-compilation-error-due-to-discarded-const-qu.patch new file mode 100644 index 00000000..35c392f7 --- /dev/null +++ b/packages/linux-kernel/patches/kernel/0004-perf-fix-compilation-error-due-to-discarded-const-qu.patch @@ -0,0 +1,31 @@ +From b61355d12854a6a400e4ddfc79f2f849ac9656dc Mon Sep 17 00:00:00 2001 +From: Christian Poessinger +Date: Sat, 17 Oct 2020 17:09:26 +0000 +Subject: [PATCH] perf: fix compilation error due to discarded const qualifier + +--- + tools/perf/Makefile.config | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config +index ae0c5bee8014..51a48ea869dd 100644 +--- a/tools/perf/Makefile.config ++++ b/tools/perf/Makefile.config +@@ -230,12 +230,12 @@ FEATURE_CHECK_LDFLAGS-libpython-version := $(PYTHON_EMBED_LDOPTS) + CFLAGS += -fno-omit-frame-pointer + CFLAGS += -ggdb3 + CFLAGS += -funwind-tables +-CFLAGS += -Wall ++CFLAGS += -Wno-discarded-qualifiers + CFLAGS += -Wextra + CFLAGS += -std=gnu99 + + CXXFLAGS += -std=gnu++11 -fno-exceptions -fno-rtti +-CXXFLAGS += -Wall ++CXXFLAGS += -Wno-discarded-qualifiers + CXXFLAGS += -fno-omit-frame-pointer + CXXFLAGS += -ggdb3 + CXXFLAGS += -funwind-tables +-- +2.20.1 + -- cgit v1.2.3