From c6479a4be4351e8b2f07bfc40b73134d2ad16509 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Thu, 25 Jun 2026 17:14:49 +0200 Subject: Kernel: T9010: update existing patches to remove "hunk off" notices --- .../0001-linkstate-ip-device-attribute.patch | 16 +++- .../kernel/0002-build-linux-perf-package.patch | 105 +++++++++++++++++++++ .../kernel/0003-build-linux-perf-package.patch | 102 -------------------- 3 files changed, 117 insertions(+), 106 deletions(-) create mode 100644 scripts/package-build/linux-kernel/patches/kernel/0002-build-linux-perf-package.patch delete mode 100644 scripts/package-build/linux-kernel/patches/kernel/0003-build-linux-perf-package.patch (limited to 'scripts/package-build/linux-kernel') diff --git a/scripts/package-build/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch b/scripts/package-build/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch index ff0bc955..563a8cec 100644 --- a/scripts/package-build/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch +++ b/scripts/package-build/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch @@ -27,6 +27,7 @@ Refreshed against Linux 6.18.x: 8 files changed, 34 insertions(+) diff --git a/Documentation/networking/ip-sysctl.rst b/Documentation/networking/ip-sysctl.rst +index 7a637e87005f..982c76d0b0ab 100644 --- a/Documentation/networking/ip-sysctl.rst +++ b/Documentation/networking/ip-sysctl.rst @@ -2042,6 +2042,17 @@ src_valid_mark - BOOLEAN @@ -48,6 +49,7 @@ diff --git a/Documentation/networking/ip-sysctl.rst b/Documentation/networking/i - 1 - Allows you to have multiple network interfaces on the same subnet, and have the ARPs for each interface be answered diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h +index dccbeb25f701..b16f70e491d6 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h @@ -139,6 +139,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev) @@ -59,6 +61,7 @@ diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h struct in_ifaddr { struct hlist_node addr_lst; diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h +index 7294e4e89b79..5243afbd98b8 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h @@ -91,6 +91,7 @@ struct ipv6_devconf { @@ -70,6 +73,7 @@ diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h struct ctl_table_header *sysctl_header; }; diff --git a/include/uapi/linux/ip.h b/include/uapi/linux/ip.h +index 5bd7ce934d74..cfe694a9810f 100644 --- a/include/uapi/linux/ip.h +++ b/include/uapi/linux/ip.h @@ -189,6 +189,7 @@ enum @@ -81,6 +85,7 @@ diff --git a/include/uapi/linux/ip.h b/include/uapi/linux/ip.h }; diff --git a/include/uapi/linux/ipv6.h b/include/uapi/linux/ipv6.h +index d4d3ae774b26..8495f1b69a64 100644 --- a/include/uapi/linux/ipv6.h +++ b/include/uapi/linux/ipv6.h @@ -200,6 +200,7 @@ enum { @@ -92,6 +97,7 @@ diff --git a/include/uapi/linux/ipv6.h b/include/uapi/linux/ipv6.h }; diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c +index 942a887bf089..e6df2bfc4e40 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -2652,6 +2652,7 @@ static struct devinet_sysctl_table { @@ -103,9 +109,10 @@ diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c }; diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c +index b2e1328371d3..769d4e1f5cbf 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c -@@ -5716,6 +5716,7 @@ static void ipv6_store_devconf(const struct ipv6_devconf *cnf, +@@ -5718,6 +5718,7 @@ static void ipv6_store_devconf(const struct ipv6_devconf *cnf, READ_ONCE(cnf->accept_untracked_na); array[DEVCONF_ACCEPT_RA_MIN_LFT] = READ_ONCE(cnf->accept_ra_min_lft); array[DEVCONF_FORCE_FORWARDING] = READ_ONCE(cnf->force_forwarding); @@ -113,7 +120,7 @@ diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c } static inline size_t inet6_ifla6_size(void) -@@ -7251,6 +7252,13 @@ static const struct ctl_table addrconf_sysctl[] = { +@@ -7253,6 +7254,13 @@ static const struct ctl_table addrconf_sysctl[] = { .extra1 = (void *)SYSCTL_ZERO, .extra2 = (void *)SYSCTL_ONE, }, @@ -128,9 +135,10 @@ diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c .procname = "ioam6_id", .data = &ipv6_devconf.ioam6_id, diff --git a/net/ipv6/route.c b/net/ipv6/route.c +index f89220929c4e..8f92ef14d884 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c -@@ -714,6 +714,14 @@ static inline void rt6_probe(struct fib6_nh *fib6_nh) +@@ -717,6 +717,14 @@ static inline void rt6_probe(struct fib6_nh *fib6_nh) } #endif @@ -145,7 +153,7 @@ diff --git a/net/ipv6/route.c b/net/ipv6/route.c /* * Default Router Selection (RFC 2461 6.3.6) */ -@@ -755,6 +763,8 @@ static int rt6_score_route(const struct fib6_nh *nh, u32 fib6_flags, int oif, +@@ -758,6 +766,8 @@ static int rt6_score_route(const struct fib6_nh *nh, u32 fib6_flags, int oif, if (!m && (strict & RT6_LOOKUP_F_IFACE)) return RT6_NUD_FAIL_HARD; diff --git a/scripts/package-build/linux-kernel/patches/kernel/0002-build-linux-perf-package.patch b/scripts/package-build/linux-kernel/patches/kernel/0002-build-linux-perf-package.patch new file mode 100644 index 00000000..3ca6d248 --- /dev/null +++ b/scripts/package-build/linux-kernel/patches/kernel/0002-build-linux-perf-package.patch @@ -0,0 +1,105 @@ +From: Christian Breunig +Subject: [PATCH] VyOS: build a linux-perf Debian package alongside the kernel + +The upstream "make bindeb-pkg" target stopped emitting a perf package +quite a while ago. Re-add it by hooking into the new builddeb / mkdebian +infrastructure: + + * mkdebian: emit a "linux-perf-${KERNELRELEASE}" stanza in + debian/control whenever the architecture is not user-mode-linux. + * scripts/package/debian/rules: add a "binary-perf" target so the + binary build loop processes the new package. + * builddeb: add an install_perf() helper that invokes + "make -C tools/perf install" with prefix=/usr and DESTDIR pointing + at the package staging directory, plus a dispatch case for + "linux-perf-*" packages. + +Refreshed for Linux 6.18.x: the old patch targeted the previous loop +based scripts/package/builddeb (one-shot builddeb invocation that +iterated over every package); since v6.7 the package build is driven +per-package from debian/rules, so we have to extend that mechanism +instead. +--- + scripts/package/builddeb | 16 ++++++++++++++++ + scripts/package/debian/rules | 3 ++- + scripts/package/mkdebian | 12 ++++++++++++ + 3 files changed, 30 insertions(+), 1 deletion(-) + +diff --git a/scripts/package/builddeb b/scripts/package/builddeb +index ba1defc61652..61e5d3b8447d 100755 +--- a/scripts/package/builddeb ++++ b/scripts/package/builddeb +@@ -162,6 +162,20 @@ install_libc_headers () { + mv "$pdir/usr/include/asm" "$pdir/usr/include/${DEB_HOST_MULTIARCH}" + } + ++install_perf () { ++ pdir=debian/$1 ++ ++ rm -rf "$pdir" ++ mkdir -p "$pdir" ++ ++ # In-source kernel builds export srctree as a relative path ("."). ++ # "make -C tools/perf" changes the working directory, which breaks ++ # Makefile.perf's "include $(srctree)/tools/build/Makefile.include" ++ # unless srctree is absolute. Force an absolute path here. ++ $MAKE -C "$srctree/tools/perf" srctree="$(realpath "$srctree")" \ ++ prefix=/usr DESTDIR="$(pwd)/$pdir" install ++} ++ + package=$1 + + case "${package}" in +@@ -173,4 +187,6 @@ linux-libc-dev) + install_libc_headers "${package}";; + linux-headers-*) + install_kernel_headers "${package}";; ++linux-perf-*) ++ install_perf "${package}";; + esac +diff --git a/scripts/package/debian/rules b/scripts/package/debian/rules +index a417a7f8bbc1..3b6905034b4c 100755 +--- a/scripts/package/debian/rules ++++ b/scripts/package/debian/rules +@@ -27,13 +27,14 @@ make-opts = ARCH=$(ARCH) KERNELRELEASE=$(KERNELRELEASE) \ + $(addprefix KBUILD_BUILD_VERSION=,$(revision)) \ + $(addprefix CROSS_COMPILE=,$(CROSS_COMPILE)) + +-binary-targets := $(addprefix binary-, image image-dbg headers libc-dev) ++binary-targets := $(addprefix binary-, image image-dbg headers libc-dev perf) + + all-packages = $(shell dh_listpackages) + image-package = $(filter linux-image-% user-%, $(filter-out %-dbg, $(all-packages))) + image-dbg-package = $(filter %-dbg, $(all-packages)) + libc-dev-package = $(filter linux-libc-dev, $(all-packages)) + headers-package = $(filter linux-headers-%, $(all-packages)) ++perf-package = $(filter linux-perf-%, $(all-packages)) + + mk-files = $(patsubst binary-%,debian/%.files,$1) + package = $($(@:binary-%=%-package)) +diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian +index d4b007b38a47..45a5f06b803d 100755 +--- a/scripts/package/mkdebian ++++ b/scripts/package/mkdebian +@@ -247,6 +247,18 @@ Description: Linux kernel headers for ${KERNELRELEASE} on $debarch + This is useful for people who need to build external modules + EOF + fi ++ ++cat <> debian/control ++ ++Package: linux-perf-${KERNELRELEASE} ++Section: devel ++Architecture: $debarch ++Depends: libpfm4, libslang2, libtraceevent1 ++Description: Performance analysis tools for Linux ${KERNELRELEASE} ++ This package contains the 'perf' performance analysis tools for Linux ++ kernel version ${KERNELRELEASE}. ++Multi-Arch: same ++EOF + fi + + if is_enabled CONFIG_DEBUG_INFO; then +-- +2.39.5 + diff --git a/scripts/package-build/linux-kernel/patches/kernel/0003-build-linux-perf-package.patch b/scripts/package-build/linux-kernel/patches/kernel/0003-build-linux-perf-package.patch deleted file mode 100644 index 32254849..00000000 --- a/scripts/package-build/linux-kernel/patches/kernel/0003-build-linux-perf-package.patch +++ /dev/null @@ -1,102 +0,0 @@ -From: Christian Breunig -Subject: [PATCH] VyOS: build a linux-perf Debian package alongside the kernel - -The upstream "make bindeb-pkg" target stopped emitting a perf package -quite a while ago. Re-add it by hooking into the new builddeb / mkdebian -infrastructure: - - * mkdebian: emit a "linux-perf-${KERNELRELEASE}" stanza in - debian/control whenever the architecture is not user-mode-linux. - * scripts/package/debian/rules: add a "binary-perf" target so the - binary build loop processes the new package. - * builddeb: add an install_perf() helper that invokes - "make -C tools/perf install" with prefix=/usr and DESTDIR pointing - at the package staging directory, plus a dispatch case for - "linux-perf-*" packages. - -Refreshed for Linux 6.18.x: the old patch targeted the previous loop -based scripts/package/builddeb (one-shot builddeb invocation that -iterated over every package); since v6.7 the package build is driven -per-package from debian/rules, so we have to extend that mechanism -instead. ---- - scripts/package/builddeb | 16 ++++++++++++++++ - scripts/package/debian/rules | 3 ++- - scripts/package/mkdebian | 12 ++++++++++++ - 3 files changed, 30 insertions(+), 1 deletion(-) - -diff --git a/scripts/package/builddeb b/scripts/package/builddeb ---- a/scripts/package/builddeb -+++ b/scripts/package/builddeb -@@ -156,6 +156,20 @@ install_libc_headers () { - mv "$pdir/usr/include/asm" "$pdir/usr/include/${DEB_HOST_MULTIARCH}" - } - -+install_perf () { -+ pdir=debian/$1 -+ -+ rm -rf "$pdir" -+ mkdir -p "$pdir" -+ -+ # In-source kernel builds export srctree as a relative path ("."). -+ # "make -C tools/perf" changes the working directory, which breaks -+ # Makefile.perf's "include $(srctree)/tools/build/Makefile.include" -+ # unless srctree is absolute. Force an absolute path here. -+ $MAKE -C "$srctree/tools/perf" srctree="$(realpath "$srctree")" \ -+ prefix=/usr DESTDIR="$(pwd)/$pdir" install -+} -+ - package=$1 - - case "${package}" in -@@ -167,4 +181,6 @@ linux-libc-dev) - install_libc_headers "${package}";; - linux-headers-*) - install_kernel_headers "${package}";; -+linux-perf-*) -+ install_perf "${package}";; - esac -diff --git a/scripts/package/debian/rules b/scripts/package/debian/rules ---- a/scripts/package/debian/rules -+++ b/scripts/package/debian/rules -@@ -27,13 +27,14 @@ make-opts = ARCH=$(ARCH) KERNELRELEASE=$(KERNELRELEASE) \ - $(addprefix KBUILD_BUILD_VERSION=,$(revision)) \ - $(addprefix CROSS_COMPILE=,$(CROSS_COMPILE)) - --binary-targets := $(addprefix binary-, image image-dbg headers libc-dev) -+binary-targets := $(addprefix binary-, image image-dbg headers libc-dev perf) - - all-packages = $(shell dh_listpackages) - image-package = $(filter linux-image-% user-%, $(filter-out %-dbg, $(all-packages))) - image-dbg-package = $(filter %-dbg, $(all-packages)) - libc-dev-package = $(filter linux-libc-dev, $(all-packages)) - headers-package = $(filter linux-headers-%, $(all-packages)) -+perf-package = $(filter linux-perf-%, $(all-packages)) - - mk-files = $(patsubst binary-%,debian/%.files,$1) - package = $($(@:binary-%=%-package)) -diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian ---- a/scripts/package/mkdebian -+++ b/scripts/package/mkdebian -@@ -247,6 +247,18 @@ Description: Linux kernel headers for ${KERNELRELEASE} on $debarch - This is useful for people who need to build external modules - EOF - fi -+ -+cat <> debian/control -+ -+Package: linux-perf-${KERNELRELEASE} -+Section: devel -+Architecture: $debarch -+Depends: libpfm4, libslang2, libtraceevent1 -+Description: Performance analysis tools for Linux ${KERNELRELEASE} -+ This package contains the 'perf' performance analysis tools for Linux -+ kernel version ${KERNELRELEASE}. -+Multi-Arch: same -+EOF - fi - - if is_enabled CONFIG_DEBUG_INFO; then --- -2.39.5 - -- cgit v1.2.3