From 3f5619f259de42af4404e0e36d11df4adcef9f5e Mon Sep 17 00:00:00 2001 From: Johannes Kimmel Date: Tue, 15 Dec 2020 00:31:52 +0100 Subject: [PATCH 01/23] vxlan: allow for dynamic source ip selection (FS#3426) By setting 'auto', the zero address or the empty string as source address (option ipaddr, option ip6addr), vxlan will choose one dynamically. This helps in setups where a wan ip or prefix changes. This corresponse to setting up an vxlan tunnel with: proto vxlan6: # ip link add vx0 type vxlan id ID local :: ... proto vxlan: # ip link add vx0 type vxlan id ID local 0.0.0.0 ... While it is possible to not specify a source ip at all, the kernel will default to setting up a ipv4 tunnel. The kernel will take any hint from source and peer ips to figure out, what tunnel type to use. To make sure we setup an ipv6 tunnel for proto vxlan6, this workaround is needed. This will not change the behaviour of currently working configurations. However this will allow former broken configurations, namely those not specifying both a source address and tunnel interface, to setup a tunnel interface. Previously those configurations weren't reporting an error and were stueck in a setup loop like in Bug FS#3426. This change lifts the currently very strict behaviour and should fix the following bug: Fixes: FS#3426 Ref: https://bugs.openwrt.org/index.php?do=details&task_id=3426 Signed-off-by: Johannes Kimmel --- package/network/config/vxlan/Makefile | 2 +- package/network/config/vxlan/files/vxlan.sh | 35 +++++++-------------- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/package/network/config/vxlan/Makefile b/package/network/config/vxlan/Makefile index 0b4d6713f9..97972d6d85 100644 --- a/package/network/config/vxlan/Makefile +++ b/package/network/config/vxlan/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vxlan -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/config/vxlan/files/vxlan.sh b/package/network/config/vxlan/files/vxlan.sh index 5c1c484c47..a087c4a3ce 100755 --- a/package/network/config/vxlan/files/vxlan.sh +++ b/package/network/config/vxlan/files/vxlan.sh @@ -114,18 +114,11 @@ proto_vxlan_setup() { ( proto_add_host_dependency "$cfg" '' "$tunlink" ) - [ -z "$ipaddr" ] && { - local wanif="$tunlink" - if [ -z "$wanif" ] && ! network_find_wan wanif; then - proto_notify_error "$cfg" "NO_WAN_LINK" - exit - fi - - if ! network_get_ipaddr ipaddr "$wanif"; then - proto_notify_error "$cfg" "NO_WAN_LINK" - exit - fi - } + case "$ipaddr" in + "auto"|"") + ipaddr="0.0.0.0" + ;; + esac vxlan_generic_setup "$cfg" 'vxlan' "$ipaddr" "$peeraddr" } @@ -138,18 +131,12 @@ proto_vxlan6_setup() { ( proto_add_host_dependency "$cfg" '' "$tunlink" ) - [ -z "$ip6addr" ] && { - local wanif="$tunlink" - if [ -z "$wanif" ] && ! network_find_wan6 wanif; then - proto_notify_error "$cfg" "NO_WAN_LINK" - exit - fi - - if ! network_get_ipaddr6 ip6addr "$wanif"; then - proto_notify_error "$cfg" "NO_WAN_LINK" - exit - fi - } + case "$ip6addr" in + "auto"|"") + # ensure tunnel via ipv6 + ip6addr="::" + ;; + esac vxlan_generic_setup "$cfg" 'vxlan6' "$ip6addr" "$peer6addr" } From a7ff013eb6669d787d0fded9ef2faa4cdd8d3bf1 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 28 Dec 2020 14:58:40 +0100 Subject: [PATCH 02/23] netifd: update to the latest version 39fb8c3edc74 wireless: add support for not killing processes on teardown Signed-off-by: Felix Fietkau --- package/network/config/netifd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile index b25ce559b9..0bac5840a4 100644 --- a/package/network/config/netifd/Makefile +++ b/package/network/config/netifd/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git -PKG_SOURCE_DATE:=2020-12-14 -PKG_SOURCE_VERSION:=88c6003e2b4fdc0c990045ff140bf19b37ba745a -PKG_MIRROR_HASH:=6b4c98f1dfff65e4e2bc5aee7c7ad9a48ad530a4acac69ee3cd6809974305900 +PKG_SOURCE_DATE:=2020-12-28 +PKG_SOURCE_VERSION:=39fb8c3edc74a7e419d95e2946a0b5a1206edc25 +PKG_MIRROR_HASH:=53d71140a7eeedb86929d0868b6816aa5b24123ba2aa7fc072cb79c2e9258fee PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 From e1851720f10a7706a3654b64585b622de6adcf3d Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 28 Dec 2020 15:01:00 +0100 Subject: [PATCH 03/23] hostapd: do not restart hostapd instance on wireless restarts Add the flag that prevents netifd from killing hostapd/wpa_supplicant Signed-off-by: Felix Fietkau --- package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 2 +- package/network/services/hostapd/files/hostapd.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index e12a804271..95b6c817ff 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -1021,7 +1021,7 @@ drv_mac80211_setup() { ubus wait_for hostapd ubus call hostapd config_add "{\"iface\":\"$primary_ap\", \"config\":\"${hostapd_conf_file}\"}" local hostapd_pid=$(ubus call service list '{"name": "wpad"}' | jsonfilter -l 1 -e "@['wpad'].instances['hostapd'].pid") - wireless_add_process "$hostapd_pid" "/usr/sbin/hostapd" 1 + wireless_add_process "$hostapd_pid" "/usr/sbin/hostapd" 1 1 fi ret="$?" [ "$ret" != 0 ] && { diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 78f6a19612..fc78e2fb90 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -1379,7 +1379,7 @@ wpa_supplicant_run() { [ "$ret" != 0 ] && wireless_setup_vif_failed WPA_SUPPLICANT_FAILED local supplicant_pid=$(ubus call service list '{"name": "wpad"}' | jsonfilter -l 1 -e "@['wpad'].instances['supplicant'].pid") - wireless_add_process "$supplicant_pid" "/usr/sbin/wpa_supplicant" 1 + wireless_add_process "$supplicant_pid" "/usr/sbin/wpa_supplicant" 1 1 return $ret } From cc9d5b5a488d3a43068f621a1ef184f06e43bede Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Tue, 29 Dec 2020 18:19:08 -1000 Subject: [PATCH 04/23] build/prereq: merge ifndef IB block together Multiple prereq checks are only required within the build system but not for the ImageBuilder. These checks are excluded by using ifndef IB. This commit merges the three ifndef IB blocks together. Signed-off-by: Paul Spooren --- include/prereq-build.mk | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index 5045fabdfb..fb11a070a1 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -38,9 +38,7 @@ $(eval $(call TestHostCommand,working-gcc, \ it appears to be broken, \ echo 'int main(int argc, char **argv) { return 0; }' | \ gcc -x c -o $(TMP_DIR)/a.out -)) -endif -ifndef IB $(eval $(call SetupHostCommand,g++, \ Please install the GNU C++ Compiler (g++) 4.8 or later, \ $(CXX) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \ @@ -53,14 +51,12 @@ $(eval $(call TestHostCommand,working-g++, \ echo 'int main(int argc, char **argv) { return 0; }' | \ g++ -x c++ -o $(TMP_DIR)/a.out - -lstdc++ && \ $(TMP_DIR)/a.out)) -endif -ifndef IB $(eval $(call TestHostCommand,ncurses, \ Please install ncurses. (Missing libncurses.so or ncurses.h), \ echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \ gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out - -lncurses)) -endif +endif # IB ifeq ($(HOST_OS),Linux) zlib_link_flags := -Wl,-Bstatic -lz -Wl,-Bdynamic From c5d033a34d0050dad83567eccd36dc6c7827ffe3 Mon Sep 17 00:00:00 2001 From: Sven Wegener Date: Mon, 28 Dec 2020 13:37:27 +0100 Subject: [PATCH 05/23] tools/fakeroot: remove undefined symbol messages glibc started to return errors from dlerror() for dlsym() lookup failures which results in a lot of messages from fakeroot like dlsym(acl_get_fd): staging_dir/host/lib/libfakeroot.so: undefined symbol: acl_get_fd dlsym(acl_get_file): staging_dir/host/lib/libfakeroot.so: undefined symbol: acl_get_file dlsym(acl_set_fd): staging_dir/host/lib/libfakeroot.so: undefined symbol: acl_set_fd when building OpenWrt using a recent glibc. Use the patch from the upstream Debian package to silence these messages. Link: https://bugs.debian.org/830912 Fixes: FS#3393 Signed-off-by: Sven Wegener --- tools/fakeroot/Makefile | 1 + .../patches/200-hide-dlsym-error.patch | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 tools/fakeroot/patches/200-hide-dlsym-error.patch diff --git a/tools/fakeroot/Makefile b/tools/fakeroot/Makefile index 9ab2679626..8c30ee71c3 100644 --- a/tools/fakeroot/Makefile +++ b/tools/fakeroot/Makefile @@ -6,6 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fakeroot PKG_VERSION:=1.24 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz PKG_SOURCE_URL:=http://deb.debian.org/debian/pool/main/f/fakeroot diff --git a/tools/fakeroot/patches/200-hide-dlsym-error.patch b/tools/fakeroot/patches/200-hide-dlsym-error.patch new file mode 100644 index 0000000000..3fd34c8778 --- /dev/null +++ b/tools/fakeroot/patches/200-hide-dlsym-error.patch @@ -0,0 +1,32 @@ +Description: Hide error from dlsym() + dlsym(), starting in glibc 2.24 actually reports errors. In our case, + we try to get ACL functions which are not in the glibc. This causes + failures in test suites, so hide those messages for non-debugging + purposes for now. It also makes the build logs annoying to read. +Author: Julian Andres Klode +Origin: vendor +Bug-Debian: https://bugs.debian.org/830912 +Forwarded: no +Last-Update: 2016-08-12 + +--- a/libfakeroot.c ++++ b/libfakeroot.c +@@ -256,10 +256,16 @@ void load_library_symbols(void){ + /* clear dlerror() just in case dlsym() legitimately returns NULL */ + msg = dlerror(); + *(next_wrap[i].doit)=dlsym(get_libc(), next_wrap[i].name); ++ + if ( (msg = dlerror()) != NULL){ +- fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg); +-/* abort ();*/ ++#ifdef LIBFAKEROOT_DEBUGGING ++ if (fakeroot_debug) { ++ fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg); ++/* abort ();*/ ++ } ++#endif + } ++ + } + } + From c22b689cf89f5a17ed6e35c1fb92c19b4a7126ae Mon Sep 17 00:00:00 2001 From: Russell Senior Date: Wed, 30 Dec 2020 23:16:22 -0800 Subject: [PATCH 06/23] iproute2: update to 5.10.0 c8faeca5 (ss: mptcp: fix add_addr_accepted stat print, 2020-11-18) 0d78e8ea (tc: pedit: fix memory leak in print_pedit, 2020-12-11) ec1346ac (devlink: fix memory leak in cmd_dev_flash(), 2020-12-11) 309e6027 (man: tc-flower: fix manpage, 2020-12-11) 376367d9 (uapi: merge in change to bpf.h, 2020-12-14) 2e80ae89 (Merge branch 'gcc-10' into main, 2020-12-03) 755b1c58 (tc/mqprio: json-ify output, 2020-12-02) 975c4944 (ip/netns: use flock when setting up /run/netns, 2020-11-27) fb054cb3 (uapi: update devlink.h, 2020-11-29) c95d63e4 (uapi: update devlink.h, 2020-11-29) cae2e929 (f_u32: fix compiler gcc-10 compiler warning, 2020-11-29) c0149839 (misc: fix compiler warning in ifstat and nstat, 2020-11-29) 2319db90 (tc: fix compiler warnings in ip6 pedit, 2020-11-29) 5bdc4e91 (bridge: fix string length warning, 2020-11-29) f8176999 (devlink: fix uninitialized warning, 2020-11-29) 7a49ff9d (bridge: report correct version, 2020-11-15) 8682f588 (tc-mpls: fix manpage example and help message string, 2020-11-02) 7c7a0fe0 (tc-vlan: fix help and error message strings, 2020-11-02) 72f88bd4 (uapi: update kernel headers from 5.10-rc2, 2020-11-08) b90c39be (rdma: fix spelling error in comment, 2020-11-08) c8424b73 (man: fix spelling errors, 2020-11-08) cbf64817 (tc/m_gate: fix spelling errors, 2020-11-08) 14b189f0 (uapi: updates from 5.10-rc1, 2020-11-03) 9fc5bf73 (libnetlink: define __aligned conditionally, 2020-10-26) eb12cc9a (Merge branch 'main' into next, 2020-10-25) f1298d76 (m_mpls: test the 'mac_push' action after 'modify', 2020-10-22) 2b7a7684 (Merge branch 'tipc-encryption' into next, 2020-10-20) 2bf1ba5a (tipc: add option to set rekeying for encryption, 2020-10-16) 5fb36818 (tipc: add option to set master key for encryption, 2020-10-16) b4edd6a8 (Merge branch 'tc-mpls-l2-vpn' into next Guillaume Nault says:, 2020-10-20) 02a261b5 (m_mpls: add mac_push action, 2020-10-19) d61167dd (m_vlan: add pop_eth and push_eth actions, 2020-10-19) 3342688a (devlink: display elapsed time during flash update, 2020-10-14) cb7ce51c (v5.9.0, 2020-10-15) b5a583fb (Merge branch 'main' into next Signed-off-by: David Ahern , 2020-10-11) 78120128 (genl: ctrl: print op -> policy idx mapping, 2020-10-03) 91c54917 (Merge branch 'bridge-igmpv3-mldv2' into next Nikolay Aleksandrov says:, 2020-10-11) 86588450 (bridge: mdb: print protocol when available, 2020-10-08) 2de81d1e (bridge: mdb: print source list when available, 2020-10-08) 1d28c480 (bridge: mdb: print filter mode when available, 2020-10-08) e331677e (bridge: mdb: show igmpv3/mldv2 flags, 2020-10-08) f94e8b07 (bridge: mdb: print fast_leave flag, 2020-10-08) 547b3197 (bridge: mdb: add support for source address, 2020-10-08) f905191a (Update kernel headers, 2020-10-11) 4322b13c (ip xfrm: support setting XFRMA_SET_MARK_MASK attribute in states, 2020-10-02) 8dc1db80 (devlink: Add health reporter test command support, 2020-10-01) 01216471 (devlink: support setting the overwrite mask attribute, 2020-09-30) 34be2d26 (Update kernel headers, 2020-10-07) d2be31d9 (ss: add support for xdp statistics, 2020-09-24) f481515c (Update kernel headers, 2020-09-29) b8663da0 (ip: promote missed packets to the -s row, 2020-09-16) cec67df9 (Merge branch 'devlink-controller-external-info' into next Parav Pandit says:, 2020-09-22) 748cbad3 (devlink: Show controller number of a devlink port, 2020-09-18) 8fadd011 (devlink: Show external port attribute, 2020-09-18) 454429e8 (Update kernel headers, 2020-09-22) ad34d5fa (iproute2: ss: add support to expose various inet sockopts, 2020-08-19) c8eb4b52 (Update kernel headers, 2020-09-08) abee772f (tipc: support 128bit node identity for peer removing, 2020-08-27) 6fd53b2a (iplink: add support for protodown reason, 2020-08-28) af27494d (ip xfrm: support printing XFRMA_SET_MARK_MASK attribute in states, 2020-08-28) 275eed9b (Merge branch 'main' into next, 2020-09-01) cc889b82 (genl: ctrl: support dumping netlink policy, 2020-08-24) d5acae24 (libnetlink: add nl_print_policy() helper, 2020-08-24) 784fa9f6 (libnetlink: add rtattr_for_each_nested() iteration macro, 2020-08-24) OpenWrt patches unchanged. Successfully built for ramips/mt7621 and x86/geode with: CONFIG_PACKAGE_devlink=m CONFIG_PACKAGE_genl=m CONFIG_PACKAGE_ip-bridge=m CONFIG_PACKAGE_ip-full=m CONFIG_PACKAGE_ip-tiny=m CONFIG_PACKAGE_nstat=m CONFIG_PACKAGE_rdma=m CONFIG_PACKAGE_ss=m CONFIG_PACKAGE_tc=m Minimally run-tested ip-tiny on ramips/mt7621 (ubnt-erx). Signed-off-by: Russell Senior --- package/network/utils/iproute2/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 237f84736b..a20916f6ca 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iproute2 -PKG_VERSION:=5.9.0 +PKG_VERSION:=5.10.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 -PKG_HASH:=a25dac94bcdcf2f73316c7f812115ea7a5710580bad892b08a83d00c6b33dacf +PKG_HASH:=a54a34ae309c0406b2d1fb3a46158613ffb83d33fefd5d4a27f0010237ac53e9 PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=iptables PKG_LICENSE:=GPL-2.0 From 9b1b89229f0efef43a738f91875e0fd9fcc42277 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Thu, 31 Dec 2020 19:25:45 +0100 Subject: [PATCH 07/23] kernel: bump 5.4 to 5.4.86 Removed upstreamed patches: pending-5.4/499-mtd-parser-cmdline-Fix-parsing-of-part-names-with-co.patch Manually merged: pending-5.4/611-netfilter_match_bypass_default_table.patch layerscape/302-dts-0112-arm64-dts-fsl-ls1028a-prepare-dts-for-overlay.patch Build-tested: ipq806x/R7800, bcm27xx/bcm2711, ath79/{generic,tiny}, ipq40xx, octeon, ramips/mt7621, realtek, x86/64 Run-tested: ipq806x/R7800, realtek Signed-off-by: Adrian Schmutzler Tested-by: John Audia Tested-by: Stijn Segers --- include/kernel-version.mk | 4 +- .../ath25/patches-5.4/130-watchdog.patch | 2 +- ...an-up-boot_command_line-initializati.patch | 6 +- ...support-for-boot-console-with-arbitr.patch | 2 +- ...-0027-mm-Remove-the-PFN-busy-warning.patch | 2 +- ...i_h5-Don-t-send-conf_req-when-ACTIVE.patch | 2 +- ...CS_HIGH-if-GPIO-descriptors-are-used.patch | 4 +- ..._descriptor-fixup-moved-to-spi_setup.patch | 2 +- ...te-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch | 2 +- .../patches-5.4/831-old_gpio_wdt.patch | 2 +- .../905-BCM53573-minor-hacks.patch | 2 +- .../generic/hack-5.4/221-module_exports.patch | 2 +- ...e_mem_map-with-ARCH_PFN_OFFSET-calcu.patch | 2 +- ...-rs5c372-support_alarms_up_to_1_week.patch | 10 ++- ...he_alarm_to_be_used_as_wakeup_source.patch | 12 ++-- ...ne-Fix-parsing-of-part-names-with-co.patch | 61 ------------------- .../530-jffs2_make_lzma_available.patch | 2 +- ...etfilter_match_bypass_default_checks.patch | 2 +- ...netfilter_match_bypass_default_table.patch | 4 +- ...e-allow-building-only-hashes-ciphers.patch | 4 +- ...-use-AES-fallback-for-small-requests.patch | 2 +- .../0069-arm-boot-add-dts-files.patch | 3 +- ...mem-Add-support-for-krait-based-socs.patch | 2 +- .../900-arm-add-cmdline-override.patch | 2 +- ...s1028a-Add-Felix-switch-port-DT-node.patch | 2 +- ...-fsl-ls1028a-prepare-dts-for-overlay.patch | 2 +- ...c-Some-apis-are-made-public-for-vfio.patch | 4 +- ...-spi-make-spi-max-frequency-optional.patch | 2 +- .../0303-mtd-spinand-disable-on-die-ECC.patch | 4 +- ...agate-resolved-link-config-via-mac_l.patch | 6 +- ...avoid_error_message_for_optional_IRQ.patch | 4 +- 31 files changed, 47 insertions(+), 115 deletions(-) delete mode 100644 target/linux/generic/pending-5.4/499-mtd-parser-cmdline-Fix-parsing-of-part-names-with-co.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 3dd2496cb8..dcbc45823b 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-5.4 = .85 +LINUX_VERSION-5.4 = .86 -LINUX_KERNEL_HASH-5.4.85 = 1de3586d8e7a9a814726610745d80907a267590d2770ec1079ef2875c4984008 +LINUX_KERNEL_HASH-5.4.86 = eb36b5fc6ef7b953acba0a3e62d872e0330c4d34b38d58f5714493a4fe3b0e8b remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/ath25/patches-5.4/130-watchdog.patch b/target/linux/ath25/patches-5.4/130-watchdog.patch index 8a5bd83418..b0bdd88bd1 100644 --- a/target/linux/ath25/patches-5.4/130-watchdog.patch +++ b/target/linux/ath25/patches-5.4/130-watchdog.patch @@ -212,7 +212,7 @@ +MODULE_ALIAS("platform:" DRIVER_NAME); --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig -@@ -1830,6 +1830,13 @@ config PIC32_DMT +@@ -1832,6 +1832,13 @@ config PIC32_DMT To compile this driver as a loadable module, choose M here. The module will be called pic32-dmt. diff --git a/target/linux/ath79/patches-5.4/0001-MIPS-cmdline-Clean-up-boot_command_line-initializati.patch b/target/linux/ath79/patches-5.4/0001-MIPS-cmdline-Clean-up-boot_command_line-initializati.patch index 4cadd5a86f..eedc7498be 100644 --- a/target/linux/ath79/patches-5.4/0001-MIPS-cmdline-Clean-up-boot_command_line-initializati.patch +++ b/target/linux/ath79/patches-5.4/0001-MIPS-cmdline-Clean-up-boot_command_line-initializati.patch @@ -44,11 +44,9 @@ Origin: upstream, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org -diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c -index b8884de89c81e1b444b218a15519556b4a374089..e56dd6c25d46336fcb9af21326f697d0c37aac1c 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c -@@ -538,11 +538,88 @@ static void __init check_kernel_sections_mem(void) +@@ -538,11 +538,88 @@ static void __init check_kernel_sections } } @@ -142,7 +140,7 @@ index b8884de89c81e1b444b218a15519556b4a374089..e56dd6c25d46336fcb9af21326f697d0 /* * arch_mem_init - initialize memory management subsystem -@@ -570,48 +647,12 @@ static void __init arch_mem_init(char **cmdline_p) +@@ -570,48 +647,12 @@ static void __init arch_mem_init(char ** { extern void plat_mem_setup(void); diff --git a/target/linux/ath79/patches-5.4/921-serial-core-add-support-for-boot-console-with-arbitr.patch b/target/linux/ath79/patches-5.4/921-serial-core-add-support-for-boot-console-with-arbitr.patch index dc863a511b..dac2064cbb 100644 --- a/target/linux/ath79/patches-5.4/921-serial-core-add-support-for-boot-console-with-arbitr.patch +++ b/target/linux/ath79/patches-5.4/921-serial-core-add-support-for-boot-console-with-arbitr.patch @@ -30,7 +30,7 @@ Signed-off-by: Sungbo Eo uport->cons->cflag = 0; } /* -@@ -2104,8 +2106,10 @@ uart_set_options(struct uart_port *port, +@@ -2108,8 +2110,10 @@ uart_set_options(struct uart_port *port, * Allow the setting of the UART parameters with a NULL console * too: */ diff --git a/target/linux/bcm27xx/patches-5.4/950-0027-mm-Remove-the-PFN-busy-warning.patch b/target/linux/bcm27xx/patches-5.4/950-0027-mm-Remove-the-PFN-busy-warning.patch index 0ca1cb7e06..d643656746 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0027-mm-Remove-the-PFN-busy-warning.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0027-mm-Remove-the-PFN-busy-warning.patch @@ -14,7 +14,7 @@ Signed-off-by: Eric Anholt --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -8511,8 +8511,6 @@ int alloc_contig_range(unsigned long sta +@@ -8512,8 +8512,6 @@ int alloc_contig_range(unsigned long sta /* Make sure the range is really isolated. */ if (test_pages_isolated(outer_start, end, false)) { diff --git a/target/linux/bcm27xx/patches-5.4/950-0084-hci_h5-Don-t-send-conf_req-when-ACTIVE.patch b/target/linux/bcm27xx/patches-5.4/950-0084-hci_h5-Don-t-send-conf_req-when-ACTIVE.patch index bb33353984..a800039f88 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0084-hci_h5-Don-t-send-conf_req-when-ACTIVE.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0084-hci_h5-Don-t-send-conf_req-when-ACTIVE.patch @@ -11,7 +11,7 @@ other with conf_req and conf_rsp messages, in a demented game of tag. --- a/drivers/bluetooth/hci_h5.c +++ b/drivers/bluetooth/hci_h5.c -@@ -339,7 +339,8 @@ static void h5_handle_internal_rx(struct +@@ -342,7 +342,8 @@ static void h5_handle_internal_rx(struct h5_link_control(hu, conf_req, 3); } else if (memcmp(data, conf_req, 2) == 0) { h5_link_control(hu, conf_rsp, 2); diff --git a/target/linux/bcm27xx/patches-5.4/950-0653-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch b/target/linux/bcm27xx/patches-5.4/950-0653-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch index 69602fa17e..42d22c3003 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0653-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0653-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch @@ -23,7 +23,7 @@ Signed-off-by: Phil Elwell --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -3114,6 +3114,7 @@ static int __spi_validate_bits_per_word( +@@ -3115,6 +3115,7 @@ static int __spi_validate_bits_per_word( */ int spi_setup(struct spi_device *spi) { @@ -31,7 +31,7 @@ Signed-off-by: Phil Elwell unsigned bad_bits, ugly_bits; int status; -@@ -3131,6 +3132,14 @@ int spi_setup(struct spi_device *spi) +@@ -3132,6 +3133,14 @@ int spi_setup(struct spi_device *spi) (SPI_TX_DUAL | SPI_TX_QUAD | SPI_TX_OCTAL | SPI_RX_DUAL | SPI_RX_QUAD | SPI_RX_OCTAL))) return -EINVAL; diff --git a/target/linux/bcm27xx/patches-5.4/950-0672-spi-use_gpio_descriptor-fixup-moved-to-spi_setup.patch b/target/linux/bcm27xx/patches-5.4/950-0672-spi-use_gpio_descriptor-fixup-moved-to-spi_setup.patch index 450e212ac7..8792faa0c9 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0672-spi-use_gpio_descriptor-fixup-moved-to-spi_setup.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0672-spi-use_gpio_descriptor-fixup-moved-to-spi_setup.patch @@ -37,7 +37,7 @@ Signed-off-by: Phil Elwell --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -1792,15 +1792,6 @@ static int of_spi_parse_dt(struct spi_co +@@ -1793,15 +1793,6 @@ static int of_spi_parse_dt(struct spi_co } spi->chip_select = value; diff --git a/target/linux/bcm27xx/patches-5.4/950-0697-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch b/target/linux/bcm27xx/patches-5.4/950-0697-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch index 2bf0f1a267..e4b2e7ed2a 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0697-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0697-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch @@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -3126,8 +3126,8 @@ int spi_setup(struct spi_device *spi) +@@ -3127,8 +3127,8 @@ int spi_setup(struct spi_device *spi) if (ctlr->use_gpio_descriptors && ctlr->cs_gpiods && ctlr->cs_gpiods[spi->chip_select] && !(spi->mode & SPI_CS_HIGH)) { diff --git a/target/linux/bcm47xx/patches-5.4/831-old_gpio_wdt.patch b/target/linux/bcm47xx/patches-5.4/831-old_gpio_wdt.patch index 0f87417d38..8414a181bb 100644 --- a/target/linux/bcm47xx/patches-5.4/831-old_gpio_wdt.patch +++ b/target/linux/bcm47xx/patches-5.4/831-old_gpio_wdt.patch @@ -4,7 +4,7 @@ Signed-off-by: Mathias Adam --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig -@@ -1655,6 +1655,15 @@ config WDT_MTX1 +@@ -1657,6 +1657,15 @@ config WDT_MTX1 Hardware driver for the MTX-1 boards. This is a watchdog timer that will reboot the machine after a 100 seconds timer expired. diff --git a/target/linux/bcm53xx/patches-5.4/905-BCM53573-minor-hacks.patch b/target/linux/bcm53xx/patches-5.4/905-BCM53573-minor-hacks.patch index 3b0a3323af..f47ea95c95 100644 --- a/target/linux/bcm53xx/patches-5.4/905-BCM53573-minor-hacks.patch +++ b/target/linux/bcm53xx/patches-5.4/905-BCM53573-minor-hacks.patch @@ -61,7 +61,7 @@ Signed-off-by: Rafał Miłecki #include #include #include -@@ -910,6 +911,16 @@ static void arch_timer_of_configure_rate +@@ -919,6 +920,16 @@ static void arch_timer_of_configure_rate if (of_property_read_u32(np, "clock-frequency", &arch_timer_rate)) arch_timer_rate = rate; diff --git a/target/linux/generic/hack-5.4/221-module_exports.patch b/target/linux/generic/hack-5.4/221-module_exports.patch index 673add540d..f651cd902e 100644 --- a/target/linux/generic/hack-5.4/221-module_exports.patch +++ b/target/linux/generic/hack-5.4/221-module_exports.patch @@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau --- a/scripts/Makefile.build +++ b/scripts/Makefile.build -@@ -353,7 +353,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $( +@@ -349,7 +349,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $( # Linker scripts preprocessor (.lds.S -> .lds) # --------------------------------------------------------------------------- quiet_cmd_cpp_lds_S = LDS $@ diff --git a/target/linux/generic/pending-5.4/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/target/linux/generic/pending-5.4/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch index 942ce27a3a..6acb2dc386 100644 --- a/target/linux/generic/pending-5.4/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch +++ b/target/linux/generic/pending-5.4/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch @@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -6883,7 +6883,7 @@ static void __ref alloc_node_mem_map(str +@@ -6884,7 +6884,7 @@ static void __ref alloc_node_mem_map(str mem_map = NODE_DATA(0)->node_mem_map; #if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM) if (page_to_pfn(mem_map) != pgdat->node_start_pfn) diff --git a/target/linux/generic/pending-5.4/190-rtc-rs5c372-support_alarms_up_to_1_week.patch b/target/linux/generic/pending-5.4/190-rtc-rs5c372-support_alarms_up_to_1_week.patch index 83cab4e6d7..13b79b5c09 100644 --- a/target/linux/generic/pending-5.4/190-rtc-rs5c372-support_alarms_up_to_1_week.patch +++ b/target/linux/generic/pending-5.4/190-rtc-rs5c372-support_alarms_up_to_1_week.patch @@ -12,11 +12,9 @@ Signed-off-by: Daniel González Cabanelas drivers/rtc/rtc-rs5c372.c | 48 ++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 6 deletions(-) -diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c -index 3bd6eaa0d..94b778c6e 100644 --- a/drivers/rtc/rtc-rs5c372.c +++ b/drivers/rtc/rtc-rs5c372.c -@@ -393,7 +393,9 @@ static int rs5c_read_alarm(struct device *dev, struct rtc_wkalrm *t) +@@ -393,7 +393,9 @@ static int rs5c_read_alarm(struct device { struct i2c_client *client = to_i2c_client(dev); struct rs5c372 *rs5c = i2c_get_clientdata(client); @@ -27,7 +25,7 @@ index 3bd6eaa0d..94b778c6e 100644 status = rs5c_get_regs(rs5c); if (status < 0) -@@ -403,6 +405,30 @@ static int rs5c_read_alarm(struct device *dev, struct rtc_wkalrm *t) +@@ -403,6 +405,30 @@ static int rs5c_read_alarm(struct device t->time.tm_sec = 0; t->time.tm_min = bcd2bin(rs5c->regs[RS5C_REG_ALARM_A_MIN] & 0x7f); t->time.tm_hour = rs5c_reg2hr(rs5c, rs5c->regs[RS5C_REG_ALARM_A_HOURS]); @@ -58,7 +56,7 @@ index 3bd6eaa0d..94b778c6e 100644 /* ... and status */ t->enabled = !!(rs5c->regs[RS5C_REG_CTRL1] & RS5C_CTRL1_AALE); -@@ -417,12 +443,20 @@ static int rs5c_set_alarm(struct device *dev, struct rtc_wkalrm *t) +@@ -417,12 +443,20 @@ static int rs5c_set_alarm(struct device struct rs5c372 *rs5c = i2c_get_clientdata(client); int status, addr, i; unsigned char buf[3]; @@ -83,7 +81,7 @@ index 3bd6eaa0d..94b778c6e 100644 /* REVISIT: round up tm_sec */ -@@ -443,7 +477,9 @@ static int rs5c_set_alarm(struct device *dev, struct rtc_wkalrm *t) +@@ -443,7 +477,9 @@ static int rs5c_set_alarm(struct device /* set alarm */ buf[0] = bin2bcd(t->time.tm_min); buf[1] = rs5c_hr2reg(rs5c, t->time.tm_hour); diff --git a/target/linux/generic/pending-5.4/191-rtc-rs5c372-let_the_alarm_to_be_used_as_wakeup_source.patch b/target/linux/generic/pending-5.4/191-rtc-rs5c372-let_the_alarm_to_be_used_as_wakeup_source.patch index d5c8c23f65..7e9d0e66c0 100644 --- a/target/linux/generic/pending-5.4/191-rtc-rs5c372-let_the_alarm_to_be_used_as_wakeup_source.patch +++ b/target/linux/generic/pending-5.4/191-rtc-rs5c372-let_the_alarm_to_be_used_as_wakeup_source.patch @@ -15,11 +15,9 @@ Signed-off-by: Daniel González Cabanelas drivers/rtc/rtc-rs5c372.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c -index 94b778c6e..76775d66e 100644 --- a/drivers/rtc/rtc-rs5c372.c +++ b/drivers/rtc/rtc-rs5c372.c -@@ -654,6 +654,7 @@ static int rs5c372_probe(struct i2c_client *client, +@@ -654,6 +654,7 @@ static int rs5c372_probe(struct i2c_clie int err = 0; int smbus_mode = 0; struct rs5c372 *rs5c372; @@ -27,7 +25,7 @@ index 94b778c6e..76775d66e 100644 dev_dbg(&client->dev, "%s\n", __func__); -@@ -689,6 +690,12 @@ static int rs5c372_probe(struct i2c_client *client, +@@ -689,6 +690,12 @@ static int rs5c372_probe(struct i2c_clie else rs5c372->type = id->driver_data; @@ -40,7 +38,7 @@ index 94b778c6e..76775d66e 100644 /* we read registers 0x0f then 0x00-0x0f; skip the first one */ rs5c372->regs = &rs5c372->buf[1]; rs5c372->smbus = smbus_mode; -@@ -722,6 +729,8 @@ static int rs5c372_probe(struct i2c_client *client, +@@ -722,6 +729,8 @@ static int rs5c372_probe(struct i2c_clie goto exit; } @@ -49,7 +47,7 @@ index 94b778c6e..76775d66e 100644 /* if the oscillator lost power and no other software (like * the bootloader) set it up, do it here. * -@@ -748,6 +757,10 @@ static int rs5c372_probe(struct i2c_client *client, +@@ -748,6 +757,10 @@ static int rs5c372_probe(struct i2c_clie ); /* REVISIT use client->irq to register alarm irq ... */ @@ -60,7 +58,7 @@ index 94b778c6e..76775d66e 100644 rs5c372->rtc = devm_rtc_device_register(&client->dev, rs5c372_driver.driver.name, &rs5c372_rtc_ops, THIS_MODULE); -@@ -761,6 +774,9 @@ static int rs5c372_probe(struct i2c_client *client, +@@ -761,6 +774,9 @@ static int rs5c372_probe(struct i2c_clie if (err) goto exit; diff --git a/target/linux/generic/pending-5.4/499-mtd-parser-cmdline-Fix-parsing-of-part-names-with-co.patch b/target/linux/generic/pending-5.4/499-mtd-parser-cmdline-Fix-parsing-of-part-names-with-co.patch deleted file mode 100644 index 8724c1b7d3..0000000000 --- a/target/linux/generic/pending-5.4/499-mtd-parser-cmdline-Fix-parsing-of-part-names-with-co.patch +++ /dev/null @@ -1,61 +0,0 @@ -From: Sven Eckelmann -Date: Sun, 22 Nov 2020 00:48:33 +0100 -Subject: [PATCH RFC] mtd: parser: cmdline: Fix parsing of part-names with colons - -Some devices (especially QCA ones) are already using hardcoded partition -names with colons in it. The OpenMesh A62 for example provides following -mtd relevant information via cmdline: - - root=31:11 mtdparts=spi0.0:256k(0:SBL1),128k(0:MIBIB),384k(0:QSEE),64k(0:CDT),64k(0:DDRPARAMS),64k(0:APPSBLENV),512k(0:APPSBL),64k(0:ART),64k(custom),64k(0:KEYS),0x002b0000(kernel),0x00c80000(rootfs),15552k(inactive) rootfsname=rootfs rootwait - -The change to split only on the last colon between mtd-id and partitions -will cause newpart to see following string for the first partition: - - KEYS),0x002b0000(kernel),0x00c80000(rootfs),15552k(inactive) - -Such a partition list cannot be parsed and thus the device fails to boot. - -Avoid this behavior by making sure that the start of the first part-name -("(") will also be the last byte the mtd-id split algorithm is using for -its colon search. - -Forwarded: https://patchwork.ozlabs.org/project/linux-mtd/patch/20201122001533.985641-1-sven@narfation.org/ -Fixes: eb13fa022741 ("mtd: parser: cmdline: Support MTD names containing one or more colons") -Signed-off-by: Sven Eckelmann - ---- a/drivers/mtd/parsers/cmdlinepart.c -+++ b/drivers/mtd/parsers/cmdlinepart.c -@@ -218,7 +218,7 @@ static int mtdpart_setup_real(char *s) - struct cmdline_mtd_partition *this_mtd; - struct mtd_partition *parts; - int mtd_id_len, num_parts; -- char *p, *mtd_id, *semicol; -+ char *p, *mtd_id, *semicol, *open_parenth; - - /* - * Replace the first ';' by a NULL char so strrchr can work -@@ -228,6 +228,13 @@ static int mtdpart_setup_real(char *s) - if (semicol) - *semicol = '\0'; - -+ /* make sure that part-names with ":" will not be handled as -+ * part of the mtd-id with an ":" -+ */ -+ open_parenth = strchr(s, '('); -+ if (open_parenth) -+ *open_parenth = '\0'; -+ - mtd_id = s; - - /* -@@ -237,6 +244,10 @@ static int mtdpart_setup_real(char *s) - */ - p = strrchr(s, ':'); - -+ /* Restore the '(' now. */ -+ if (open_parenth) -+ *open_parenth = '('; -+ - /* Restore the ';' now. */ - if (semicol) - *semicol = ';'; diff --git a/target/linux/generic/pending-5.4/530-jffs2_make_lzma_available.patch b/target/linux/generic/pending-5.4/530-jffs2_make_lzma_available.patch index 46c04408a5..eb0e51d574 100644 --- a/target/linux/generic/pending-5.4/530-jffs2_make_lzma_available.patch +++ b/target/linux/generic/pending-5.4/530-jffs2_make_lzma_available.patch @@ -244,7 +244,7 @@ Signed-off-by: Alexandros C. Couloumbis +} --- a/fs/jffs2/super.c +++ b/fs/jffs2/super.c -@@ -360,14 +360,41 @@ static int __init init_jffs2_fs(void) +@@ -377,14 +377,41 @@ static int __init init_jffs2_fs(void) BUILD_BUG_ON(sizeof(struct jffs2_raw_inode) != 68); BUILD_BUG_ON(sizeof(struct jffs2_raw_summary) != 32); diff --git a/target/linux/generic/pending-5.4/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-5.4/610-netfilter_match_bypass_default_checks.patch index 703ac8215e..7a49ce0c39 100644 --- a/target/linux/generic/pending-5.4/610-netfilter_match_bypass_default_checks.patch +++ b/target/linux/generic/pending-5.4/610-netfilter_match_bypass_default_checks.patch @@ -69,7 +69,7 @@ Signed-off-by: Felix Fietkau return -ENOMEM; @@ -818,6 +846,7 @@ copy_entries_to_user(unsigned int total_ - const struct xt_table_info *private = table->private; + const struct xt_table_info *private = xt_table_get_private_protected(table); int ret = 0; const void *loc_cpu_entry; + u8 flags; diff --git a/target/linux/generic/pending-5.4/611-netfilter_match_bypass_default_table.patch b/target/linux/generic/pending-5.4/611-netfilter_match_bypass_default_table.patch index baf738a8d2..1792534835 100644 --- a/target/linux/generic/pending-5.4/611-netfilter_match_bypass_default_table.patch +++ b/target/linux/generic/pending-5.4/611-netfilter_match_bypass_default_table.patch @@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau /* Initialization */ + WARN_ON(!(table->valid_hooks & (1 << hook))); + local_bh_disable(); -+ private = READ_ONCE(table->private); /* Address dependency. */ ++ private = rcu_access_pointer(table->private); + cpu = smp_processor_id(); + table_base = private->entries; + @@ -80,7 +80,7 @@ Signed-off-by: Felix Fietkau - WARN_ON(!(table->valid_hooks & (1 << hook))); - local_bh_disable(); addend = xt_write_recseq_begin(); -- private = READ_ONCE(table->private); /* Address dependency. */ +- private = rcu_access_pointer(table->private); - cpu = smp_processor_id(); - table_base = private->entries; jumpstack = (struct ipt_entry **)private->jumpstack[cpu]; diff --git a/target/linux/ipq40xx/patches-5.4/0013-v5.6-crypto-qce-allow-building-only-hashes-ciphers.patch b/target/linux/ipq40xx/patches-5.4/0013-v5.6-crypto-qce-allow-building-only-hashes-ciphers.patch index bcd5551f54..5b1372d08f 100644 --- a/target/linux/ipq40xx/patches-5.4/0013-v5.6-crypto-qce-allow-building-only-hashes-ciphers.patch +++ b/target/linux/ipq40xx/patches-5.4/0013-v5.6-crypto-qce-allow-building-only-hashes-ciphers.patch @@ -20,7 +20,7 @@ Signed-off-by: Herbert Xu --- a/drivers/crypto/Kconfig +++ b/drivers/crypto/Kconfig -@@ -616,6 +616,14 @@ config CRYPTO_DEV_QCE +@@ -617,6 +617,14 @@ config CRYPTO_DEV_QCE tristate "Qualcomm crypto engine accelerator" depends on ARCH_QCOM || COMPILE_TEST depends on HAS_IOMEM @@ -35,7 +35,7 @@ Signed-off-by: Herbert Xu select CRYPTO_AES select CRYPTO_LIB_DES select CRYPTO_ECB -@@ -623,10 +631,57 @@ config CRYPTO_DEV_QCE +@@ -624,10 +632,57 @@ config CRYPTO_DEV_QCE select CRYPTO_XTS select CRYPTO_CTR select CRYPTO_BLKCIPHER diff --git a/target/linux/ipq40xx/patches-5.4/0015-v5.7-crypto-qce-use-AES-fallback-for-small-requests.patch b/target/linux/ipq40xx/patches-5.4/0015-v5.7-crypto-qce-use-AES-fallback-for-small-requests.patch index 55d15f56b5..0b5c8c6d66 100644 --- a/target/linux/ipq40xx/patches-5.4/0015-v5.7-crypto-qce-use-AES-fallback-for-small-requests.patch +++ b/target/linux/ipq40xx/patches-5.4/0015-v5.7-crypto-qce-use-AES-fallback-for-small-requests.patch @@ -28,7 +28,7 @@ Signed-off-by: Herbert Xu --- a/drivers/crypto/Kconfig +++ b/drivers/crypto/Kconfig -@@ -683,6 +683,29 @@ choice +@@ -684,6 +684,29 @@ choice endchoice diff --git a/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch b/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch index 795684cdf5..a5fce41112 100644 --- a/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch +++ b/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch @@ -10,7 +10,8 @@ Signed-off-by: John Crispin --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -843,6 +843,22 @@ dtb-$(CONFIG_ARCH_QCOM) += \ +@@ -842,7 +842,23 @@ dtb-$(CONFIG_ARCH_QCOM) += \ + qcom-ipq4019-ap.dk04.1-c3.dtb \ qcom-ipq4019-ap.dk07.1-c1.dtb \ qcom-ipq4019-ap.dk07.1-c2.dtb \ + qcom-ipq8062-wg2600hp3.dtb \ diff --git a/target/linux/ipq806x/patches-5.4/092-1-v5.7-qcom-cpufreq-nvmem-Add-support-for-krait-based-socs.patch b/target/linux/ipq806x/patches-5.4/092-1-v5.7-qcom-cpufreq-nvmem-Add-support-for-krait-based-socs.patch index 87a4bf108e..be20756a10 100644 --- a/target/linux/ipq806x/patches-5.4/092-1-v5.7-qcom-cpufreq-nvmem-Add-support-for-krait-based-socs.patch +++ b/target/linux/ipq806x/patches-5.4/092-1-v5.7-qcom-cpufreq-nvmem-Add-support-for-krait-based-socs.patch @@ -358,4 +358,4 @@ Signed-off-by: Viresh Kumar + { .compatible = "qcom,msm8960", .data = &match_data_krait }, {}, }; - + MODULE_DEVICE_TABLE(of, qcom_cpufreq_match_list); diff --git a/target/linux/ipq806x/patches-5.4/900-arm-add-cmdline-override.patch b/target/linux/ipq806x/patches-5.4/900-arm-add-cmdline-override.patch index bb3aa2622c..60b160ae62 100644 --- a/target/linux/ipq806x/patches-5.4/900-arm-add-cmdline-override.patch +++ b/target/linux/ipq806x/patches-5.4/900-arm-add-cmdline-override.patch @@ -1,6 +1,6 @@ --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -1836,6 +1836,14 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_MANGL +@@ -1838,6 +1838,14 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_MANGL Only command line ATAG will be processed, the rest of the ATAGs sent by bootloader will be ignored. diff --git a/target/linux/layerscape/patches-5.4/302-dts-0074-arm64-dts-fsl-ls1028a-Add-Felix-switch-port-DT-node.patch b/target/linux/layerscape/patches-5.4/302-dts-0074-arm64-dts-fsl-ls1028a-Add-Felix-switch-port-DT-node.patch index 7a1aa87cf2..4976a467b4 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0074-arm64-dts-fsl-ls1028a-Add-Felix-switch-port-DT-node.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0074-arm64-dts-fsl-ls1028a-Add-Felix-switch-port-DT-node.patch @@ -48,7 +48,7 @@ Signed-off-by: Claudiu Manoil ethernet@0,4 { compatible = "fsl,enetc-ptp"; reg = <0x000400 0 0 0 0>; - clocks = <&clockgen 4 0>; + clocks = <&clockgen 2 3>; little-endian; }; + switch@0,5 { diff --git a/target/linux/layerscape/patches-5.4/302-dts-0112-arm64-dts-fsl-ls1028a-prepare-dts-for-overlay.patch b/target/linux/layerscape/patches-5.4/302-dts-0112-arm64-dts-fsl-ls1028a-prepare-dts-for-overlay.patch index ccadbf99bc..1584a0c402 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0112-arm64-dts-fsl-ls1028a-prepare-dts-for-overlay.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0112-arm64-dts-fsl-ls1028a-prepare-dts-for-overlay.patch @@ -386,7 +386,7 @@ Signed-off-by: Alex Marginean --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi @@ -774,30 +774,39 @@ - clocks = <&clockgen 4 0>; + clocks = <&clockgen 2 3>; little-endian; }; - switch@0,5 { diff --git a/target/linux/layerscape/patches-5.4/701-net-0142-bus-fsl-mc-Some-apis-are-made-public-for-vfio.patch b/target/linux/layerscape/patches-5.4/701-net-0142-bus-fsl-mc-Some-apis-are-made-public-for-vfio.patch index 404ea7e723..74d1c2a4eb 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0142-bus-fsl-mc-Some-apis-are-made-public-for-vfio.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0142-bus-fsl-mc-Some-apis-are-made-public-for-vfio.patch @@ -18,7 +18,7 @@ Signed-off-by: Laurentiu Tudor --- a/drivers/bus/fsl-mc/fsl-mc-allocator.c +++ b/drivers/bus/fsl-mc/fsl-mc-allocator.c -@@ -547,6 +547,7 @@ void fsl_mc_init_all_resource_pools(stru +@@ -549,6 +549,7 @@ void fsl_mc_init_all_resource_pools(stru mutex_init(&res_pool->mutex); } } @@ -26,7 +26,7 @@ Signed-off-by: Laurentiu Tudor static void fsl_mc_cleanup_resource_pool(struct fsl_mc_device *mc_bus_dev, enum fsl_mc_pool_type pool_type) -@@ -571,6 +572,7 @@ void fsl_mc_cleanup_all_resource_pools(s +@@ -573,6 +574,7 @@ void fsl_mc_cleanup_all_resource_pools(s for (pool_type = 0; pool_type < FSL_MC_NUM_POOL_TYPES; pool_type++) fsl_mc_cleanup_resource_pool(mc_bus_dev, pool_type); } diff --git a/target/linux/mediatek/patches-5.4/0001-v5.7-spi-make-spi-max-frequency-optional.patch b/target/linux/mediatek/patches-5.4/0001-v5.7-spi-make-spi-max-frequency-optional.patch index 966916ef29..8487c3dda0 100644 --- a/target/linux/mediatek/patches-5.4/0001-v5.7-spi-make-spi-max-frequency-optional.patch +++ b/target/linux/mediatek/patches-5.4/0001-v5.7-spi-make-spi-max-frequency-optional.patch @@ -20,7 +20,7 @@ Signed-off-by: Mark Brown --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -1802,13 +1802,8 @@ static int of_spi_parse_dt(struct spi_co +@@ -1803,13 +1803,8 @@ static int of_spi_parse_dt(struct spi_co spi->mode |= SPI_CS_HIGH; /* Device speed */ diff --git a/target/linux/mediatek/patches-5.4/0303-mtd-spinand-disable-on-die-ECC.patch b/target/linux/mediatek/patches-5.4/0303-mtd-spinand-disable-on-die-ECC.patch index 5c18ea0f74..56b9585d7f 100644 --- a/target/linux/mediatek/patches-5.4/0303-mtd-spinand-disable-on-die-ECC.patch +++ b/target/linux/mediatek/patches-5.4/0303-mtd-spinand-disable-on-die-ECC.patch @@ -11,7 +11,7 @@ Signed-off-by: Xiangsheng Hou --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c -@@ -491,7 +491,7 @@ static int spinand_mtd_read(struct mtd_i +@@ -495,7 +495,7 @@ static int spinand_mtd_read(struct mtd_i int ret = 0; if (ops->mode != MTD_OPS_RAW && spinand->eccinfo.ooblayout) @@ -20,7 +20,7 @@ Signed-off-by: Xiangsheng Hou mutex_lock(&spinand->lock); -@@ -539,7 +539,7 @@ static int spinand_mtd_write(struct mtd_ +@@ -543,7 +543,7 @@ static int spinand_mtd_write(struct mtd_ int ret = 0; if (ops->mode != MTD_OPS_RAW && mtd->ooblayout) diff --git a/target/linux/mediatek/patches-5.4/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch b/target/linux/mediatek/patches-5.4/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch index b6734a38dc..96fa3be1ef 100644 --- a/target/linux/mediatek/patches-5.4/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch +++ b/target/linux/mediatek/patches-5.4/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch @@ -95,7 +95,7 @@ Signed-off-by: David S. Miller } netif_tx_start_all_queues(port->dev); -@@ -5125,8 +5129,11 @@ static void mvpp2_mac_config(struct phyl +@@ -5126,8 +5130,11 @@ static void mvpp2_mac_config(struct phyl mvpp2_port_enable(port); } @@ -107,8 +107,8 @@ Signed-off-by: David S. Miller + int speed, int duplex, + bool tx_pause, bool rx_pause) { - struct net_device *dev = to_net_dev(config->dev); - struct mvpp2_port *port = netdev_priv(dev); + struct mvpp2_port *port = mvpp2_phylink_to_port(config); + u32 val; --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -449,9 +449,10 @@ static void mtk_mac_link_down(struct phy diff --git a/target/linux/mvebu/patches-5.4/007-gpio-mvebu-avoid_error_message_for_optional_IRQ.patch b/target/linux/mvebu/patches-5.4/007-gpio-mvebu-avoid_error_message_for_optional_IRQ.patch index 8ef2897c97..c680de5938 100644 --- a/target/linux/mvebu/patches-5.4/007-gpio-mvebu-avoid_error_message_for_optional_IRQ.patch +++ b/target/linux/mvebu/patches-5.4/007-gpio-mvebu-avoid_error_message_for_optional_IRQ.patch @@ -18,11 +18,9 @@ Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-mvebu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c -index d2b999c7987f1..3c9f4fb3d5a28 100644 --- a/drivers/gpio/gpio-mvebu.c +++ b/drivers/gpio/gpio-mvebu.c -@@ -1245,7 +1245,7 @@ static int mvebu_gpio_probe(struct platform_device *pdev) +@@ -1253,7 +1253,7 @@ static int mvebu_gpio_probe(struct platf * pins. */ for (i = 0; i < 4; i++) { From 9dc15e36c8b82f0c30abba846c5f5e50ec7968ee Mon Sep 17 00:00:00 2001 From: David Bauer Date: Fri, 1 Jan 2021 15:41:33 +0100 Subject: [PATCH 08/23] ath79: drop upstreamed patch This patch was backported to the 5.4 kernel tree as commit c2d5c4df27e0 at least since release v5.4.28. Since then, it enables RX an TX ready override twice. Signed-off-by: David Bauer --- ...uart-set-UART_CS_-RX-TX-_READY_ORIDE.patch | 64 ------------------- ...61-tty-serial-ar933x-uart-rs485-gpio.patch | 14 ++-- 2 files changed, 7 insertions(+), 71 deletions(-) delete mode 100644 target/linux/ath79/patches-5.4/0060-serial-ar933x_uart-set-UART_CS_-RX-TX-_READY_ORIDE.patch diff --git a/target/linux/ath79/patches-5.4/0060-serial-ar933x_uart-set-UART_CS_-RX-TX-_READY_ORIDE.patch b/target/linux/ath79/patches-5.4/0060-serial-ar933x_uart-set-UART_CS_-RX-TX-_READY_ORIDE.patch deleted file mode 100644 index 30828d693c..0000000000 --- a/target/linux/ath79/patches-5.4/0060-serial-ar933x_uart-set-UART_CS_-RX-TX-_READY_ORIDE.patch +++ /dev/null @@ -1,64 +0,0 @@ -From patchwork Fri Feb 7 09:53:35 2020 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Daniel Golle -X-Patchwork-Id: 1190470 -Date: Fri, 7 Feb 2020 11:53:35 +0200 -From: Daniel Golle -To: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org -Cc: Greg Kroah-Hartman , - Jiri Slaby , - Chuanhong Guo , - Eitan Cohen , - Ori Gofen -Subject: [PATCH] serial: ar933x_uart: set UART_CS_{RX,TX}_READY_ORIDE -Message-ID: <20200207095335.GA179836@makrotopia.org> -MIME-Version: 1.0 -Content-Disposition: inline -Sender: linux-kernel-owner@vger.kernel.org -Precedence: bulk -List-ID: -X-Mailing-List: linux-kernel@vger.kernel.org - -On AR934x this UART is usually not initialized by the bootloader -as it is only used as a secondary serial port while the primary -UART is a newly introduced NS16550-compatible. -In order to make use of the ar933x-uart on AR934x without RTS/CTS -hardware flow control, one needs to set the -UART_CS_{RX,TX}_READY_ORIDE bits as other than on AR933x where this -UART is used as primary/console, the bootloader on AR934x typically -doesn't set those bits. -Setting them explicitely on AR933x should not do any harm, so just -set them unconditionally. - -Tested-by: Chuanhong Guo -Signed-off-by: Daniel Golle ---- - drivers/tty/serial/ar933x_uart.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - ---- a/drivers/tty/serial/ar933x_uart.c -+++ b/drivers/tty/serial/ar933x_uart.c -@@ -290,6 +290,10 @@ static void ar933x_uart_set_termios(stru - ar933x_uart_rmw_set(up, AR933X_UART_CS_REG, - AR933X_UART_CS_TX_READY_ORIDE | AR933X_UART_CS_RX_READY_ORIDE); - -+ /* enable RX and TX ready overide */ -+ ar933x_uart_rmw_set(up, AR933X_UART_CS_REG, -+ AR933X_UART_CS_TX_READY_ORIDE | AR933X_UART_CS_RX_READY_ORIDE); -+ - /* reenable the UART */ - ar933x_uart_rmw(up, AR933X_UART_CS_REG, - AR933X_UART_CS_IF_MODE_M << AR933X_UART_CS_IF_MODE_S, -@@ -424,6 +428,10 @@ static int ar933x_uart_startup(struct ua - - /* enable RX and TX ready overide */ - ar933x_uart_rmw_set(up, AR933X_UART_CS_REG, -+ AR933X_UART_CS_TX_READY_ORIDE | AR933X_UART_CS_RX_READY_ORIDE); -+ -+ /* enable RX and TX ready overide */ -+ ar933x_uart_rmw_set(up, AR933X_UART_CS_REG, - AR933X_UART_CS_TX_READY_ORIDE | AR933X_UART_CS_RX_READY_ORIDE); - - /* Enable RX interrupts */ diff --git a/target/linux/ath79/patches-5.4/0061-tty-serial-ar933x-uart-rs485-gpio.patch b/target/linux/ath79/patches-5.4/0061-tty-serial-ar933x-uart-rs485-gpio.patch index fda91bfe7e..59c46d507a 100644 --- a/target/linux/ath79/patches-5.4/0061-tty-serial-ar933x-uart-rs485-gpio.patch +++ b/target/linux/ath79/patches-5.4/0061-tty-serial-ar933x-uart-rs485-gpio.patch @@ -160,7 +160,7 @@ v2: use bool to indicate ongoing half-duplex send, use it afterwards } static void ar933x_uart_break_ctl(struct uart_port *port, int break_state) -@@ -340,11 +397,20 @@ static void ar933x_uart_rx_chars(struct +@@ -336,11 +393,20 @@ static void ar933x_uart_rx_chars(struct static void ar933x_uart_tx_chars(struct ar933x_uart_port *up) { struct circ_buf *xmit = &up->port.state->xmit; @@ -181,7 +181,7 @@ v2: use bool to indicate ongoing half-duplex send, use it afterwards count = up->port.fifosize; do { unsigned int rdata; -@@ -372,8 +438,14 @@ static void ar933x_uart_tx_chars(struct +@@ -368,8 +434,14 @@ static void ar933x_uart_tx_chars(struct if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) uart_write_wakeup(&up->port); @@ -197,7 +197,7 @@ v2: use bool to indicate ongoing half-duplex send, use it afterwards } static irqreturn_t ar933x_uart_interrupt(int irq, void *dev_id) -@@ -435,8 +507,7 @@ static int ar933x_uart_startup(struct ua +@@ -427,8 +499,7 @@ static int ar933x_uart_startup(struct ua AR933X_UART_CS_TX_READY_ORIDE | AR933X_UART_CS_RX_READY_ORIDE); /* Enable RX interrupts */ @@ -207,7 +207,7 @@ v2: use bool to indicate ongoing half-duplex send, use it afterwards spin_unlock_irqrestore(&up->port.lock, flags); -@@ -519,6 +590,21 @@ static const struct uart_ops ar933x_uart +@@ -511,6 +582,21 @@ static const struct uart_ops ar933x_uart .verify_port = ar933x_uart_verify_port, }; @@ -229,7 +229,7 @@ v2: use bool to indicate ongoing half-duplex send, use it afterwards #ifdef CONFIG_SERIAL_AR933X_CONSOLE static struct ar933x_uart_port * ar933x_console_ports[CONFIG_SERIAL_AR933X_NR_UARTS]; -@@ -688,6 +774,8 @@ static int ar933x_uart_probe(struct plat +@@ -680,6 +766,8 @@ static int ar933x_uart_probe(struct plat goto err_disable_clk; } @@ -238,7 +238,7 @@ v2: use bool to indicate ongoing half-duplex send, use it afterwards port->mapbase = mem_res->start; port->line = id; port->irq = irq_res->start; -@@ -698,6 +786,7 @@ static int ar933x_uart_probe(struct plat +@@ -690,6 +778,7 @@ static int ar933x_uart_probe(struct plat port->regshift = 2; port->fifosize = AR933X_UART_FIFO_SIZE; port->ops = &ar933x_uart_ops; @@ -246,7 +246,7 @@ v2: use bool to indicate ongoing half-duplex send, use it afterwards baud = ar933x_uart_get_baud(port->uartclk, AR933X_UART_MAX_SCALE, 1); up->min_baud = max_t(unsigned int, baud, AR933X_UART_MIN_BAUD); -@@ -705,6 +794,18 @@ static int ar933x_uart_probe(struct plat +@@ -697,6 +786,18 @@ static int ar933x_uart_probe(struct plat baud = ar933x_uart_get_baud(port->uartclk, 0, AR933X_UART_MAX_STEP); up->max_baud = min_t(unsigned int, baud, AR933X_UART_MAX_BAUD); From ba40da9045f77feb04abe63eb8a92f13f9efe471 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Tue, 29 Dec 2020 14:49:20 -0300 Subject: [PATCH 09/23] wolfssl: Update to v4.6.0-stable This version fixes a large number of bugs, although no security vulnerabilities are listed. Full changelog at: https://www.wolfssl.com/docs/wolfssl-changelog/ or, as part of the version's README.md: https://github.com/wolfSSL/wolfssl/blob/v4.6.0-stable/README.md Due a number of API additions, size increases from 374.7K to 408.8K for arm_cortex_a9_vfpv3-d16. The ABI does not change from previous version. Backported patches were removed; remaining patch was refreshed. Signed-off-by: Eneas U de Queiroz --- package/libs/wolfssl/Makefile | 6 +- .../patches/100-disable-hardening-check.patch | 2 +- .../patches/110-fix-build-on-big-endian.patch | 27 ---- .../200-fix-checkhostname-matching.patch | 123 ------------------ 4 files changed, 4 insertions(+), 154 deletions(-) delete mode 100644 package/libs/wolfssl/patches/110-fix-build-on-big-endian.patch delete mode 100644 package/libs/wolfssl/patches/200-fix-checkhostname-matching.patch diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile index 6758f7dd08..dcc6aca40c 100644 --- a/package/libs/wolfssl/Makefile +++ b/package/libs/wolfssl/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wolfssl -PKG_VERSION:=4.5.0-stable -PKG_RELEASE:=5 +PKG_VERSION:=4.6.0-stable +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION) -PKG_HASH:=7de62300ce14daa0051bfefc7c4d6302f96cabc768b6ae49eda77523b118250c +PKG_HASH:=053aefbb02d0b06b27c5e2df6875b4b587318755b7db9d6aa8d72206b310a848 PKG_FIXUP:=libtool PKG_INSTALL:=1 diff --git a/package/libs/wolfssl/patches/100-disable-hardening-check.patch b/package/libs/wolfssl/patches/100-disable-hardening-check.patch index 43337ba970..c2793285e7 100644 --- a/package/libs/wolfssl/patches/100-disable-hardening-check.patch +++ b/package/libs/wolfssl/patches/100-disable-hardening-check.patch @@ -1,6 +1,6 @@ --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h -@@ -2128,7 +2128,7 @@ extern void uITRON4_free(void *p) ; +@@ -2248,7 +2248,7 @@ extern void uITRON4_free(void *p) ; #endif /* warning for not using harden build options (default with ./configure) */ diff --git a/package/libs/wolfssl/patches/110-fix-build-on-big-endian.patch b/package/libs/wolfssl/patches/110-fix-build-on-big-endian.patch deleted file mode 100644 index 3838865559..0000000000 --- a/package/libs/wolfssl/patches/110-fix-build-on-big-endian.patch +++ /dev/null @@ -1,27 +0,0 @@ -From b90acc91d0cd276befe7f08f87ba2dc5ee7122ff Mon Sep 17 00:00:00 2001 -From: Tesfa Mael -Date: Wed, 26 Aug 2020 10:13:06 -0700 -Subject: [PATCH] Make ByteReverseWords available for big and little endian - ---- - wolfcrypt/src/misc.c | 2 -- - 1 file changed, 2 deletions(-) - ---- a/wolfcrypt/src/misc.c -+++ b/wolfcrypt/src/misc.c -@@ -120,7 +120,6 @@ WC_STATIC WC_INLINE word32 ByteReverseWo - return rotlFixed(value, 16U); - #endif - } --#if defined(LITTLE_ENDIAN_ORDER) - /* This routine performs a byte swap of words array of a given count. */ - WC_STATIC WC_INLINE void ByteReverseWords(word32* out, const word32* in, - word32 byteCount) -@@ -131,7 +130,6 @@ WC_STATIC WC_INLINE void ByteReverseWord - out[i] = ByteReverseWord32(in[i]); - - } --#endif /* LITTLE_ENDIAN_ORDER */ - - #if defined(WORD64_AVAILABLE) && !defined(WOLFSSL_NO_WORD64_OPS) - diff --git a/package/libs/wolfssl/patches/200-fix-checkhostname-matching.patch b/package/libs/wolfssl/patches/200-fix-checkhostname-matching.patch deleted file mode 100644 index aaf14e46d9..0000000000 --- a/package/libs/wolfssl/patches/200-fix-checkhostname-matching.patch +++ /dev/null @@ -1,123 +0,0 @@ -From ea5c290d605b2af7b10d6e5ce69aa3534f52385f Mon Sep 17 00:00:00 2001 -From: Eric Blankenhorn -Date: Fri, 17 Jul 2020 08:37:02 -0500 -Subject: [PATCH] Fix CheckHostName matching - ---- - src/internal.c | 18 ++++++++++++------ - src/ssl.c | 5 +++++ - tests/api.c | 30 ++++++++++++++++++++++++++++++ - 3 files changed, 47 insertions(+), 6 deletions(-) - -diff --git a/src/internal.c b/src/internal.c -index dc57df0242..cda815d875 100644 ---- a/src/internal.c -+++ b/src/internal.c -@@ -9346,7 +9346,7 @@ int CheckForAltNames(DecodedCert* dCert, const char* domain, int* checkCN) - altName = dCert->altNames; - - if (checkCN != NULL) { -- *checkCN = altName == NULL; -+ *checkCN = (altName == NULL) ? 1 : 0; - } - - while (altName) { -@@ -9415,23 +9415,29 @@ int CheckForAltNames(DecodedCert* dCert, const char* domain, int* checkCN) - int CheckHostName(DecodedCert* dCert, const char *domainName, size_t domainNameLen) - { - int checkCN; -+ int ret = DOMAIN_NAME_MISMATCH; - - /* Assume name is NUL terminated. */ - (void)domainNameLen; - - if (CheckForAltNames(dCert, domainName, &checkCN) != 1) { -- WOLFSSL_MSG("DomainName match on alt names failed too"); -- return DOMAIN_NAME_MISMATCH; -+ WOLFSSL_MSG("DomainName match on alt names failed"); - } -+ else { -+ ret = 0; -+ } -+ - if (checkCN == 1) { - if (MatchDomainName(dCert->subjectCN, dCert->subjectCNLen, -- domainName) == 0) { -+ domainName) == 1) { -+ ret = 0; -+ } -+ else { - WOLFSSL_MSG("DomainName match on common name failed"); -- return DOMAIN_NAME_MISMATCH; - } - } - -- return 0; -+ return ret; - } - - int CheckIPAddr(DecodedCert* dCert, const char* ipasc) -diff --git a/src/ssl.c b/src/ssl.c -index 11bc08a3cb..59ad9bae60 100644 ---- a/src/ssl.c -+++ b/src/ssl.c -@@ -43661,6 +43661,11 @@ int wolfSSL_X509_check_host(WOLFSSL_X509 *x, const char *chk, size_t chklen, - (void)flags; - (void)peername; - -+ if ((x == NULL) || (chk == NULL)) { -+ WOLFSSL_MSG("Invalid parameter"); -+ return WOLFSSL_FAILURE; -+ } -+ - if (flags == WOLFSSL_NO_WILDCARDS) { - WOLFSSL_MSG("X509_CHECK_FLAG_NO_WILDCARDS not yet implemented"); - return WOLFSSL_FAILURE; -diff --git a/tests/api.c b/tests/api.c -index 774a332968..db888952d4 100644 ---- a/tests/api.c -+++ b/tests/api.c -@@ -23875,6 +23875,35 @@ static void test_wolfSSL_X509_issuer_name_hash(void) - #endif - } - -+static void test_wolfSSL_X509_check_host(void) -+{ -+#if defined(OPENSSL_EXTRA) && !defined(NO_CERTS) && !defined(NO_FILESYSTEM) \ -+ && !defined(NO_SHA) && !defined(NO_RSA) -+ -+ X509* x509; -+ const char altName[] = "example.com"; -+ -+ printf(testingFmt, "wolfSSL_X509_check_host()"); -+ -+ AssertNotNull(x509 = wolfSSL_X509_load_certificate_file(cliCertFile, -+ SSL_FILETYPE_PEM)); -+ -+ AssertIntEQ(X509_check_host(x509, altName, XSTRLEN(altName), 0, NULL), -+ WOLFSSL_SUCCESS); -+ -+ AssertIntEQ(X509_check_host(x509, NULL, 0, 0, NULL), -+ WOLFSSL_FAILURE); -+ -+ X509_free(x509); -+ -+ AssertIntEQ(X509_check_host(NULL, altName, XSTRLEN(altName), 0, NULL), -+ WOLFSSL_FAILURE); -+ -+ printf(resultFmt, passed); -+ -+#endif -+} -+ - static void test_wolfSSL_DES(void) - { - #if defined(OPENSSL_EXTRA) && !defined(NO_DES3) -@@ -36407,6 +36436,7 @@ void ApiTest(void) - test_wolfSSL_X509_INFO(); - test_wolfSSL_X509_subject_name_hash(); - test_wolfSSL_X509_issuer_name_hash(); -+ test_wolfSSL_X509_check_host(); - test_wolfSSL_DES(); - test_wolfSSL_certs(); - test_wolfSSL_ASN1_TIME_print(); From 7aa8c00e4b716f91d2b0d59c4101a29860ad929f Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 1 Jan 2021 17:04:34 +0100 Subject: [PATCH 10/23] ppp: Remove already applied patch This patch was already applied upstream and not needed here. Fixes: 06403981e1f2 ("ppp: update to version 2.4.7.git-2019-05-06") Signed-off-by: Hauke Mehrtens --- package/network/services/ppp/Makefile | 2 +- .../ppp/patches/540-save-pppol2tp_fd_str.patch | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 package/network/services/ppp/patches/540-save-pppol2tp_fd_str.patch diff --git a/package/network/services/ppp/Makefile b/package/network/services/ppp/Makefile index cabe1ecbf3..48d7120a72 100644 --- a/package/network/services/ppp/Makefile +++ b/package/network/services/ppp/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ppp -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/paulusmack/ppp diff --git a/package/network/services/ppp/patches/540-save-pppol2tp_fd_str.patch b/package/network/services/ppp/patches/540-save-pppol2tp_fd_str.patch deleted file mode 100644 index d6d44afbd0..0000000000 --- a/package/network/services/ppp/patches/540-save-pppol2tp_fd_str.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/pppd/plugins/pppol2tp/pppol2tp.c -+++ b/pppd/plugins/pppol2tp/pppol2tp.c -@@ -152,6 +152,10 @@ static int setdevname_pppol2tp(char **ar - if (pppol2tp_fd_str == NULL) - novm("PPPoL2TP FD"); - -+ pppol2tp_fd_str = strdup(*argv); -+ if (pppol2tp_fd_str == NULL) -+ novm("PPPoL2TP FD"); -+ - /* Setup option defaults. Compression options are disabled! */ - - modem = 0; From f97b3ad7269a3c816469d8aca28145797084ea1e Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 29 Dec 2020 17:09:27 -0800 Subject: [PATCH 11/23] trace-cmd: update to 2.9.1 Fixed license information. Adjusted Makefile to new install paths. Backported upstream patch to fix compilation with musl. Replaces local and incomplete patch. Signed-off-by: Rosen Penev --- package/devel/trace-cmd/Makefile | 22 ++-- .../devel/trace-cmd/patches/100-musl.patch | 104 ++++++++++++++++++ .../patches/110-mac80211_tracepoint.patch | 10 +- .../devel/trace-cmd/patches/120-limits.patch | 24 ---- 4 files changed, 121 insertions(+), 39 deletions(-) create mode 100644 package/devel/trace-cmd/patches/100-musl.patch delete mode 100644 package/devel/trace-cmd/patches/120-limits.patch diff --git a/package/devel/trace-cmd/Makefile b/package/devel/trace-cmd/Makefile index d1f73ae9bb..e15b04ad23 100644 --- a/package/devel/trace-cmd/Makefile +++ b/package/devel/trace-cmd/Makefile @@ -1,16 +1,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=trace-cmd -PKG_VERSION:=v2.6.1 -PKG_RELEASE:=3 +PKG_VERSION:=v2.9.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git/snapshot/ -PKG_HASH:=4eb79001778a77c0ada10265e7f4b5515a3e21a46f0a15c2e8cc614efdf3f5df +PKG_HASH:=9404fc3cf540ea795304608068c9db6cdb38b90584c7f3c43249785913d54b38 + +PKG_LICENSE:=GPL-2.0-only +PKG_LICENSE_FILES:=COPYING + PKG_INSTALL:=1 PKG_USE_MIPS16:=0 -PKG_LICENSE:=GPL-2.0 - PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -34,27 +36,27 @@ MAKE_FLAGS += \ NO_AUDIT=1 \ prefix=/usr -PLUGINS_DIR := $(PKG_INSTALL_DIR)/usr/lib/trace-cmd/plugins +PLUGINS_DIR := $(PKG_INSTALL_DIR)/usr/lib/traceevent/plugins PLUGINS_MAIN := function hrtimer mac80211 sched_switch TARGET_CFLAGS += --std=gnu99 -D_GNU_SOURCE define Package/trace-cmd/install - $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/trace-cmd/plugins + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/traceevent/plugins $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/trace-cmd $(1)/usr/bin/ $(CP) \ $(patsubst %,$(PLUGINS_DIR)/plugin_%.so,$(PLUGINS_MAIN)) \ - $(1)/usr/lib/trace-cmd/plugins + $(1)/usr/lib/traceevent/plugins endef define Package/trace-cmd-extra/install - $(INSTALL_DIR) $(1)/usr/lib/trace-cmd/plugins + $(INSTALL_DIR) $(1)/usr/lib/traceevent/plugins $(CP) \ $$(patsubst %,$(PLUGINS_DIR)/plugin_%.so, \ $$(filter-out $(PLUGINS_MAIN), \ $$(patsubst $(PLUGINS_DIR)/plugin_%.so,%, \ $$(wildcard $(PLUGINS_DIR)/plugin_*.so)))) \ - $(1)/usr/lib/trace-cmd/plugins + $(1)/usr/lib/traceevent/plugins endef $(eval $(call BuildPackage,trace-cmd)) diff --git a/package/devel/trace-cmd/patches/100-musl.patch b/package/devel/trace-cmd/patches/100-musl.patch new file mode 100644 index 0000000000..80b419eb82 --- /dev/null +++ b/package/devel/trace-cmd/patches/100-musl.patch @@ -0,0 +1,104 @@ +From 1a000636c1828eecdcec5360a51623ef4ffbff04 Mon Sep 17 00:00:00 2001 +From: Beniamin Sandu +Date: Mon, 30 Nov 2020 14:27:55 +0200 +Subject: trace-cmd: make it build against musl C library + +* add some missing headers and macros +* set pthread affinity using pthread_setaffinity_np after creating the thread +instead of pthread_attr_setaffinity_np (which seems to not be implemented +in musl) + +Tested using https://musl.cc/x86_64-linux-musl-native.tgz + +Link: https://lore.kernel.org/linux-trace-devel/20201130122755.31000-1-beniaminsandu@gmail.com + +Reviewed-by: Tzvetomir Stoyanov (VMware) +Signed-off-by: Beniamin Sandu +[ Fixed a whitespace issue ] +Signed-off-by: Steven Rostedt (VMware) +--- + include/trace-cmd/trace-cmd.h | 1 + + lib/trace-cmd/include/trace-cmd-local.h | 1 + + lib/tracefs/tracefs-events.c | 1 + + tracecmd/include/trace-local.h | 1 + + tracecmd/trace-tsync.c | 16 +++++++++++----- + 5 files changed, 20 insertions(+), 5 deletions(-) + +--- a/include/trace-cmd/trace-cmd.h ++++ b/include/trace-cmd/trace-cmd.h +@@ -6,6 +6,7 @@ + #ifndef _TRACE_CMD_H + #define _TRACE_CMD_H + ++#include + #include "traceevent/event-parse.h" + + #define TRACECMD_MAGIC { 23, 8, 68 } +--- a/lib/trace-cmd/include/trace-cmd-local.h ++++ b/lib/trace-cmd/include/trace-cmd-local.h +@@ -26,5 +26,6 @@ void warning(const char *fmt, ...); + #endif + #endif + ++#include + + #endif /* _TRACE_CMD_LOCAL_H */ +--- a/lib/tracefs/tracefs-events.c ++++ b/lib/tracefs/tracefs-events.c +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include "kbuffer.h" + #include "tracefs.h" +--- a/tracecmd/include/trace-local.h ++++ b/tracecmd/include/trace-local.h +@@ -8,6 +8,7 @@ + + #include + #include /* for DIR */ ++#include + + #include "trace-cmd.h" + #include "event-utils.h" +--- a/tracecmd/trace-tsync.c ++++ b/tracecmd/trace-tsync.c +@@ -104,13 +104,16 @@ int tracecmd_host_tsync(struct buffer_in + + pthread_attr_init(&attrib); + pthread_attr_setdetachstate(&attrib, PTHREAD_CREATE_JOINABLE); +- if (!get_first_cpu(&pin_mask, &mask_size)) +- pthread_attr_setaffinity_np(&attrib, mask_size, pin_mask); + + ret = pthread_create(&instance->tsync_thread, &attrib, + tsync_host_thread, &instance->tsync); +- if (!ret) ++ ++ if (!ret) { ++ if (!get_first_cpu(&pin_mask, &mask_size)) ++ pthread_setaffinity_np(instance->tsync_thread, mask_size, pin_mask); + instance->tsync_thread_running = true; ++ } ++ + if (pin_mask) + CPU_FREE(pin_mask); + pthread_attr_destroy(&attrib); +@@ -243,11 +246,14 @@ unsigned int tracecmd_guest_tsync(char * + pthread_attr_init(&attrib); + tsync->sync_proto = proto; + pthread_attr_setdetachstate(&attrib, PTHREAD_CREATE_JOINABLE); +- if (!get_first_cpu(&pin_mask, &mask_size)) +- pthread_attr_setaffinity_np(&attrib, mask_size, pin_mask); + + ret = pthread_create(thr_id, &attrib, tsync_agent_thread, tsync); + ++ if (!ret) { ++ if (!get_first_cpu(&pin_mask, &mask_size)) ++ pthread_setaffinity_np(*thr_id, mask_size, pin_mask); ++ } ++ + if (pin_mask) + CPU_FREE(pin_mask); + pthread_attr_destroy(&attrib); diff --git a/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch b/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch index e2a68972a3..cffcaa06b5 100644 --- a/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch +++ b/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch @@ -1,16 +1,16 @@ ---- a/plugin_mac80211.c -+++ b/plugin_mac80211.c -@@ -179,12 +179,15 @@ static int drv_config(struct trace_seq * +--- a/lib/traceevent/plugins/plugin_mac80211.c ++++ b/lib/traceevent/plugins/plugin_mac80211.c +@@ -165,12 +165,15 @@ static int drv_config(struct trace_seq * { 2, "IDLE" }, { 3, "QOS"}, ); -- pevent_print_num_field(s, " chan:%d/", event, "center_freq", record, 1); +- tep_print_num_field(s, " chan:%d/", event, "center_freq", record, 1); - print_enum(s, event, "channel_type", data, - { 0, "noht" }, - { 1, "ht20" }, - { 2, "ht40-" }, - { 3, "ht40+" }); -+ pevent_print_num_field(s, " chan:%d@", event, "control_freq", record, 1); ++ tep_print_num_field(s, " chan:%d@", event, "control_freq", record, 1); + print_enum(s, event, "chan_width", data, + { 0, "20_noht" }, + { 1, "20" }, diff --git a/package/devel/trace-cmd/patches/120-limits.patch b/package/devel/trace-cmd/patches/120-limits.patch deleted file mode 100644 index b9d91cc03e..0000000000 --- a/package/devel/trace-cmd/patches/120-limits.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 293ff6d5bc9d3b8bfbc3c57d20d3d2d00986c168 Mon Sep 17 00:00:00 2001 -From: Alexander Couzens -Date: Sun, 26 Nov 2017 05:22:51 +0100 -Subject: [PATCH] trace-cmd listen: Include limits.h to define PATH_MAX - -PATH_MAX is defined by limits.h. On some system it's also -defined by dirent.h but not on musl. - -Signed-off-by: Alexander Couzens -Signed-off-by: Steven Rostedt (VMware) ---- - trace-listen.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/trace-listen.c -+++ b/trace-listen.c -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - #include - #include - #include From 59b5c52a6b77e3b6edd45f2526d55efbd0a04043 Mon Sep 17 00:00:00 2001 From: Stijn Segers Date: Thu, 24 Dec 2020 14:06:17 +0100 Subject: [PATCH 12/23] cryptodev-linux: bump to 1.11, fix build against kernel 5.10. This patch bumps cryptodev-linux to the latest stable release (1.11) and fixes compilation against the next LTS (and likely OpenWrt) kernel 5.10. Signed-off-by: Stijn Segers --- package/kernel/cryptodev-linux/Makefile | 6 +-- ...x-module-loading-with-Linux-v5.0-rc5.patch | 50 ------------------- .../010-fix-build-for-kernel-v5.9-rc1.patch | 32 ++++++++++++ 3 files changed, 35 insertions(+), 53 deletions(-) delete mode 100644 package/kernel/cryptodev-linux/patches/010-Fix-module-loading-with-Linux-v5.0-rc5.patch create mode 100644 package/kernel/cryptodev-linux/patches/010-fix-build-for-kernel-v5.9-rc1.patch diff --git a/package/kernel/cryptodev-linux/Makefile b/package/kernel/cryptodev-linux/Makefile index 9bea63ebd1..85065e4eeb 100644 --- a/package/kernel/cryptodev-linux/Makefile +++ b/package/kernel/cryptodev-linux/Makefile @@ -10,12 +10,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=cryptodev-linux -PKG_VERSION:=1.10 -PKG_RELEASE:=2 +PKG_VERSION:=1.11 +PKG_RELEASE:=1 PKG_SOURCE_URL:=https://codeload.github.com/$(PKG_NAME)/$(PKG_NAME)/tar.gz/$(PKG_NAME)-$(PKG_VERSION)? PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=833ab7c5c88d2b700a7c702a151254c089a3058886a63cc7d12630e364b8ea83 +PKG_HASH:=d71fd8dafc40147586f5bc6acca8fce5088d9c576d1142fe5aeb7b0813186a11 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING diff --git a/package/kernel/cryptodev-linux/patches/010-Fix-module-loading-with-Linux-v5.0-rc5.patch b/package/kernel/cryptodev-linux/patches/010-Fix-module-loading-with-Linux-v5.0-rc5.patch deleted file mode 100644 index 5909f6dfb3..0000000000 --- a/package/kernel/cryptodev-linux/patches/010-Fix-module-loading-with-Linux-v5.0-rc5.patch +++ /dev/null @@ -1,50 +0,0 @@ -From f971e0cd4a0ebe59fb2e8e17240399bf6901b09b Mon Sep 17 00:00:00 2001 -From: "Derald D. Woods" -Date: Sun, 10 Feb 2019 13:22:19 -0600 -Subject: [PATCH] Fix module loading with Linux v5.0-rc5 - -This commit fixes this module load error: -[...] -[ 29.112091] cryptodev: loading out-of-tree module taints kernel. -[ 29.128906] cryptodev: Unknown symbol crypto_givcipher_type (err -2) -[ 29.188842] cryptodev: Unknown symbol crypto_givcipher_type (err -2) -modprobe: can't load module cryptodev (extra/cryptodev.ko): unknown symbol in module, or unknown parameter -[...] - -Upstream Linux support for unused GIVCIPHER, and others, was dropped here: - -c79b411eaa72 (crypto: skcipher - remove remnants of internal IV generators) - -Signed-off-by: Derald D. Woods ---- - cryptlib.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/cryptlib.c b/cryptlib.c -index 6e66698..4a87037 100644 ---- a/cryptlib.c -+++ b/cryptlib.c -@@ -38,7 +38,9 @@ - #include "cryptodev_int.h" - #include "cipherapi.h" - -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)) - extern const struct crypto_type crypto_givcipher_type; -+#endif - - static void cryptodev_complete(struct crypto_async_request *req, int err) - { -@@ -157,8 +159,11 @@ int cryptodev_cipher_init(struct cipher_data *out, const char *alg_name, - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)) - tfm = crypto_skcipher_tfm(out->async.s); -- if ((tfm->__crt_alg->cra_type == &crypto_ablkcipher_type) || -- (tfm->__crt_alg->cra_type == &crypto_givcipher_type)) { -+ if ((tfm->__crt_alg->cra_type == &crypto_ablkcipher_type) -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)) -+ || (tfm->__crt_alg->cra_type == &crypto_givcipher_type) -+#endif -+ ) { - struct ablkcipher_alg *alg; - - alg = &tfm->__crt_alg->cra_ablkcipher; diff --git a/package/kernel/cryptodev-linux/patches/010-fix-build-for-kernel-v5.9-rc1.patch b/package/kernel/cryptodev-linux/patches/010-fix-build-for-kernel-v5.9-rc1.patch new file mode 100644 index 0000000000..09768a1f3a --- /dev/null +++ b/package/kernel/cryptodev-linux/patches/010-fix-build-for-kernel-v5.9-rc1.patch @@ -0,0 +1,32 @@ +From 2f5e08aebf9229599aae7f25db752f74221cd71d Mon Sep 17 00:00:00 2001 +From: Joan Bruguera +Date: Fri, 14 Aug 2020 00:13:38 +0200 +Subject: [PATCH] Fix build for Linux 5.9-rc1 + +See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=64019a2e467a288a16b65ab55ddcbf58c1b00187 + https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bce617edecada007aee8610fbe2c14d10b8de2f6 + https://lore.kernel.org/lkml/CAHk-=wj_V2Tps2QrMn20_W0OJF9xqNh52XSGA42s-ZJ8Y+GyKw@mail.gmail.com/ + +Signed-off-by: Joan Bruguera +--- + zc.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/zc.c ++++ b/zc.c +@@ -76,10 +76,14 @@ int __get_userbuf(uint8_t __user *addr, + ret = get_user_pages_remote(task, mm, + (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, + pg, NULL); +-#else ++#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0)) + ret = get_user_pages_remote(task, mm, + (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, + pg, NULL, NULL); ++#else ++ ret = get_user_pages_remote(mm, ++ (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, ++ pg, NULL, NULL); + #endif + #if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)) + up_read(&mm->mmap_sem); From f3bfff9d7f85ab5f2df2728a760ddeebdb185f4c Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Wed, 30 Dec 2020 20:04:42 +0000 Subject: [PATCH 13/23] kernel-build: fix STRIP_KERNEL_EXPORTS for 64-bit kernels While parsing the nm output, we need to account for the fact that 64-bit kernels have 64-bit wide addresses. While at it, replace the grep | sed combo with a single awk invocation and a stronger regex. Fixes: 2ef0acc5fcda557fa5aaad35d27cb8cf75be96d2 "kernel-build: fix STRIP_KERNEL_EXPORTS for recent kernels" Signed-off-by: Rui Salvaterra --- include/kernel-build.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/kernel-build.mk b/include/kernel-build.mk index 22f7c4c7c7..6123c9d456 100644 --- a/include/kernel-build.mk +++ b/include/kernel-build.mk @@ -105,7 +105,7 @@ define BuildKernel xargs $(TARGET_CROSS)nm | \ awk '$$$$1 == "U" { print $$$$2 } ' | \ sort -u > $(KERNEL_BUILD_DIR)/mod_symtab.txt - $(TARGET_CROSS)nm -n $(LINUX_DIR)/vmlinux.o | grep ' [rR] __ksymtab' | sed -e 's,........ [rR] __ksymtab_,,' > $(KERNEL_BUILD_DIR)/kernel_symtab.txt + $(TARGET_CROSS)nm -n $(LINUX_DIR)/vmlinux.o | awk '/^[0-9a-f]+ [rR] __ksymtab_/ {print substr($$$$3,11)}' > $(KERNEL_BUILD_DIR)/kernel_symtab.txt grep -Ff $(KERNEL_BUILD_DIR)/mod_symtab.txt $(KERNEL_BUILD_DIR)/kernel_symtab.txt > $(KERNEL_BUILD_DIR)/sym_include.txt grep -Fvf $(KERNEL_BUILD_DIR)/mod_symtab.txt $(KERNEL_BUILD_DIR)/kernel_symtab.txt > $(KERNEL_BUILD_DIR)/sym_exclude.txt ( \ From de09355f74c326ca102cbb352fad0230e082480e Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Wed, 23 Dec 2020 13:50:33 +0000 Subject: [PATCH 14/23] kernel/hack-5.4: make UDP tunneling user-selectable UDP tunneling support isn't user-selectable, but it's required by WireGuard which is, for the time being, an out-of-tree module. We currently work around this issue by selecting an unrelated module which depends on UDP tunnelling (VXLAN). This is inconvenient, as it implies this unrelated module needs to be built-in when doing a monolithic build. Fix this inconvenience by making UDP tunneling user-selectable in the kernel configuration. Signed-off-by: Rui Salvaterra --- .../generic/hack-5.4/249-udp-tunnel-selection.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 target/linux/generic/hack-5.4/249-udp-tunnel-selection.patch diff --git a/target/linux/generic/hack-5.4/249-udp-tunnel-selection.patch b/target/linux/generic/hack-5.4/249-udp-tunnel-selection.patch new file mode 100644 index 0000000000..2c74298dfe --- /dev/null +++ b/target/linux/generic/hack-5.4/249-udp-tunnel-selection.patch @@ -0,0 +1,11 @@ +--- a/net/ipv4/Kconfig ++++ b/net/ipv4/Kconfig +@@ -315,7 +315,7 @@ config NET_IPVTI + on top. + + config NET_UDP_TUNNEL +- tristate ++ tristate "IP: UDP tunneling support" + select NET_IP_TUNNEL + default n + From 0f14aec8fcdc0863326b9d8a62c50e1682621607 Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Wed, 23 Dec 2020 13:50:34 +0000 Subject: [PATCH 15/23] kernel/modules: remove fake users from udptunnel{4,6} Since we're now able to select CONFIG_NET_UDP_TUNNEL at will, drop the fake dependencies. This is a partial revert of commit d7e040f8bccec06b64c82963be6435101423dbf1 "kernel: add fake users for udptunnel and iptunnel modules". Signed-off-by: Rui Salvaterra --- package/kernel/linux/modules/netsupport.mk | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk index 4e78ac5478..2c2fe82fa0 100644 --- a/package/kernel/linux/modules/netsupport.mk +++ b/package/kernel/linux/modules/netsupport.mk @@ -60,9 +60,7 @@ $(eval $(call KernelPackage,bonding)) define KernelPackage/udptunnel4 SUBMENU:=$(NETWORK_SUPPORT_MENU) TITLE:=IPv4 UDP tunneling support - KCONFIG:= \ - CONFIG_NET_UDP_TUNNEL \ - CONFIG_VXLAN=m + KCONFIG:=CONFIG_NET_UDP_TUNNEL HIDDEN:=1 FILES:=$(LINUX_DIR)/net/ipv4/udp_tunnel.ko AUTOLOAD:=$(call AutoLoad,32,udp_tunnel) @@ -75,9 +73,7 @@ define KernelPackage/udptunnel6 SUBMENU:=$(NETWORK_SUPPORT_MENU) TITLE:=IPv6 UDP tunneling support DEPENDS:=@IPV6 - KCONFIG:= \ - CONFIG_NET_UDP_TUNNEL \ - CONFIG_VXLAN=m + KCONFIG:=CONFIG_NET_UDP_TUNNEL HIDDEN:=1 FILES:=$(LINUX_DIR)/net/ipv6/ip6_udp_tunnel.ko AUTOLOAD:=$(call AutoLoad,32,ip6_udp_tunnel) From 49d678f0d29405883e0789297a476154eef18ec5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Old=C5=99ich=20Jedli=C4=8Dka?= Date: Sun, 8 Nov 2020 16:15:04 +0100 Subject: [PATCH 16/23] base-files: allow reusing of boolean value extraction logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `functions.sh` script has `config_get_bool()` function, which is usable when using UCI config direct access API, but there is no equivalent for the callback API. Introduce `get_bool()` function to allow reusing it from init scripts. Example: ```sh option_cb() { local option="$1" local value="$(get_bool "$2")" ... } ``` Signed-off-by: Oldřich Jedlička --- package/base-files/Makefile | 2 +- package/base-files/files/lib/functions.sh | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 35a07f2aad..da3976424f 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk include $(INCLUDE_DIR)/feeds.mk PKG_NAME:=base-files -PKG_RELEASE:=243 +PKG_RELEASE:=244 PKG_FLAGS:=nonshared PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index ee4ad1af83..272e230db2 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -118,15 +118,22 @@ config_get() { esac } +# get_bool [] +get_bool() { + local _tmp="$1" + case "$_tmp" in + 1|on|true|yes|enabled) _tmp=1;; + 0|off|false|no|disabled) _tmp=0;; + *) _tmp="$2";; + esac + echo -n "$_tmp" +} + # config_get_bool