From c6a2ffd505cf7b8ce7ea0424a7709bb8f73e6999 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Sun, 12 Sep 2021 15:59:51 +0200 Subject: [PATCH 01/26] glibc: update to latest 2.33 HEAD (bug 28213) 9b01145592 MIPS: Setup errno for {f,l,}xstat 9c676ef514 RISC-V: Update rv64 ULPs c6cadbf83a linux: Remove shmmax check from tst-sysvshm-linux 22d37364ae librt: add test (bug 28213) 27a78fd712 librt: fix NULL pointer dereference (bug 28213) Signed-off-by: Hans Dedecker --- toolchain/glibc/common.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk index 48f2aa26a4..b5f2a513b1 100644 --- a/toolchain/glibc/common.mk +++ b/toolchain/glibc/common.mk @@ -12,8 +12,8 @@ PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=b5711025bc138c0c94d90b2015d57eda404decbe -PKG_MIRROR_HASH:=6910af6ca27ea80e600c59fad25d88c51618928316f3bfcc78ad2f0c1794da16 +PKG_SOURCE_VERSION:=9b01145592fdbffbcbb949d680c152ed2bf2375d +PKG_MIRROR_HASH:=a1bf0858828ee0f68c7847ce9504bb10ce943d0c8fe801d7ba307add2a238c5b PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz From d9f4a4280e674ddb4ec75ae2d73b0f86e0c282cc Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sat, 11 Sep 2021 08:33:30 +0200 Subject: [PATCH 02/26] ipq40xx: Select correct board-2.bin for EnGenius EMD1 The board data file for the EnGenius EMD1 is not part of the default board-2.bin which is shipped by ath10k-board-qca4019. As result, the wrong calibration information will be loaded into the wifi chip. Fixes: 51f303597839 ("ipq40xx: add support for EnGenius EMD1") Signed-off-by: Sven Eckelmann --- target/linux/ipq40xx/image/generic.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index c7e3583613..b1a3bac291 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -419,6 +419,7 @@ define Device/engenius_emd1 IMAGES += factory.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size + DEVICE_PACKAGES := ipq-wifi-engenius_emd1 endef TARGET_DEVICES += engenius_emd1 From 14bd392a1cd0b8e267e4402ae27b3c5a8f66b933 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sat, 11 Sep 2021 08:33:30 +0200 Subject: [PATCH 03/26] ipq40xx: Select correct board-2.bin for EnGenius EMR3500 The board data file for the EnGenius EMR3500 is not part of the default board-2.bin which is shipped by ath10k-board-qca4019. As result, the wrong calibration information will be loaded into the wifi chip. Fixes: 3f61e5e1b97e ("ipq40xx: add support for EnGenius EMR3500") Signed-off-by: Sven Eckelmann --- target/linux/ipq40xx/image/generic.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index b1a3bac291..8b504ac84f 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -434,6 +434,7 @@ define Device/engenius_emr3500 IMAGES += factory.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size + DEVICE_PACKAGES := ipq-wifi-engenius_emr3500 endef TARGET_DEVICES += engenius_emr3500 From d0ffc175350f2be6174932dc0afd4d2737afe52d Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sat, 11 Sep 2021 08:33:30 +0200 Subject: [PATCH 04/26] ipq40xx: Fix board-2.bin package name for Plasma Cloud PA1200 The board data file for the Plasma Cloud PA1200 is not part of the default board-2.bin which is shipped by ath10k-board-qca4019. A typo in the device package name resulted in a not correctly selected package for the device specific board-2.bin. The wifi driver has therefore loaded the wrong calibration information into the wifi chip. Fixes: ea5bb6bbfee0 ("ipq40xx: add support for Plasma Cloud PA1200") Signed-off-by: Sven Eckelmann --- target/linux/ipq40xx/image/generic.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index 8b504ac84f..da1d1c15d5 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -704,7 +704,7 @@ define Device/plasmacloud_pa1200 IMAGES += factory.bin IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA1200 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata - DEVICE_PACKAGES := ipq-wifi-plasmacloud-pa1200 + DEVICE_PACKAGES := ipq-wifi-plasmacloud_pa1200 endef TARGET_DEVICES += plasmacloud_pa1200 From c7e9335e4c23f3bd074cb2b215a289b8b75f319c Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sat, 11 Sep 2021 08:33:30 +0200 Subject: [PATCH 05/26] ipq40xx: Fix board-2.bin package name for Plasma Cloud PA2200 The board data file for the Plasma Cloud PA2200 is not part of the default board-2.bin which is shipped by ath10k-board-qca4019. A typo in the device package name resulted in a not correctly selected package for the device specific board-2.bin. The wifi driver has therefore loaded the wrong calibration information into the wifi chip. Fixes: 4871fd2616ac ("ipq40xx: add support for Plasma Cloud PA2200") Signed-off-by: Sven Eckelmann --- target/linux/ipq40xx/image/generic.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index da1d1c15d5..18f5d238c7 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -720,7 +720,7 @@ define Device/plasmacloud_pa2200 IMAGES += factory.bin IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA2200 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata - DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-plasmacloud-pa2200 + DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-plasmacloud_pa2200 endef TARGET_DEVICES += plasmacloud_pa2200 From ebe800765ec883d1df4f7327199145b4d88e4264 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sat, 11 Sep 2021 09:16:11 +0200 Subject: [PATCH 06/26] ipq-wifi: Drop empty wifi package for Netgear WAC510 The ipq-wifi-netgear_wac510 package is not selected by any device and would be empty anyway. The default board-2.bin from ath10k-board-qca4019 is therefore used for this device and the package doesn't provide any visible features. Fixes: b126d9c3a3d3 ("ipq40xx: add netgear wac510 support") Signed-off-by: Sven Eckelmann --- package/firmware/ipq-wifi/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index e63e3b3ba1..e3b25bb556 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -47,7 +47,6 @@ ALLWIFIBOARDS:= \ mikrotik_sxtsq-5-ac \ mobipromo_cm520-79f \ nec_wg2600hp3 \ - netgear_wac510 \ plasmacloud_pa1200 \ plasmacloud_pa2200 \ qxwlan_e2600ac @@ -133,7 +132,6 @@ $(eval $(call generate-ipq-wifi-package,mikrotik_hap-ac2,Mikrotik hAP ac2)) $(eval $(call generate-ipq-wifi-package,mikrotik_sxtsq-5-ac,MikroTik SXTsq 5 ac)) $(eval $(call generate-ipq-wifi-package,mobipromo_cm520-79f,MobiPromo CM520-79F)) $(eval $(call generate-ipq-wifi-package,nec_wg2600hp3,NEC Platforms WG2600HP3)) -$(eval $(call generate-ipq-wifi-package,netgear_wac510,Netgear WAC510)) $(eval $(call generate-ipq-wifi-package,plasmacloud_pa1200,Plasma Cloud PA1200)) $(eval $(call generate-ipq-wifi-package,plasmacloud_pa2200,Plasma Cloud PA2200)) $(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac,Qxwlan E2600AC)) From 0470159552641c2b11ccc1b0fcfcb4ea08f2c6ab Mon Sep 17 00:00:00 2001 From: Ansuel Smith Date: Tue, 7 Sep 2021 21:47:14 +0200 Subject: [PATCH 07/26] ipq806x: switch to kernel 5.10 Move kernel version to 5.10 as has been tested by many users with positive feedback. Signed-off-by: Ansuel Smith [Tested on: ipq8064/g10; ipq8065/nbg6817] Tested-by: Stefan Lippers-Hollmann --- target/linux/ipq806x/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile index c3407217d6..1735235b45 100644 --- a/target/linux/ipq806x/Makefile +++ b/target/linux/ipq806x/Makefile @@ -10,8 +10,7 @@ CPU_TYPE:=cortex-a15 CPU_SUBTYPE:=neon-vfpv4 SUBTARGETS:=generic -KERNEL_PATCHVER:=5.4 -KERNEL_TESTING_PATCHVER:=5.10 +KERNEL_PATCHVER:=5.10 KERNELNAME:=zImage Image dtbs From d27f6e2c5d2a2315cc8fe684d117c80aa9984ca8 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 12 Sep 2021 12:56:48 +0200 Subject: [PATCH 08/26] build: Replace KERNEL_LOCKUP_DETECTOR with KERNEL_SOFTLOCKUP_DETECTOR The LOCKUP_DETECTOR configuration option split into the SOFTLOCKUP_DETECTOR and HARDLOCKUP_DETECTOR configuration option some time ago. The HARDLOCKUP_DETECTOR option is only working on some architectures, but SOFTLOCKUP_DETECTOR should work everywhere. Replace KERNEL_LOCKUP_DETECTOR with KERNEL_SOFTLOCKUP_DETECTOR. LOCKUP_DETECTOR will be selected by SOFTLOCKUP_DETECTOR automatically. Fixes: b951f53fbae3 ("build: Add additional kernel debug options") Signed-off-by: Hauke Mehrtens --- config/Config-kernel.in | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/config/Config-kernel.in b/config/Config-kernel.in index f71114b5da..d4648a5064 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -436,34 +436,22 @@ config KERNEL_PROVE_LOCKING select KERNEL_DEBUG_KERNEL default n -config KERNEL_LOCKUP_DETECTOR - bool "Compile the kernel with detect Hard and Soft Lockups" +config KERNEL_SOFTLOCKUP_DETECTOR + bool "Compile the kernel with detect Soft Lockups" depends on KERNEL_DEBUG_KERNEL help Say Y here to enable the kernel to act as a watchdog to detect - hard and soft lockups. + soft lockups. Softlockups are bugs that cause the kernel to loop in kernel mode for more than 20 seconds, without giving other tasks a chance to run. The current stack trace is displayed upon detection and the system will stay locked up. - Hardlockups are bugs that cause the CPU to loop in kernel mode - for more than 10 seconds, without letting other interrupts have a - chance to run. The current stack trace is displayed upon detection - and the system will stay locked up. - - The overhead should be minimal. A periodic hrtimer runs to - generate interrupts and kick the watchdog task every 4 seconds. - An NMI is generated every 10 seconds or so to check for hardlockups. - - The frequency of hrtimer and NMI events and the soft and hard lockup - thresholds can be controlled through the sysctl watchdog_thresh. - config KERNEL_DETECT_HUNG_TASK bool "Compile the kernel with detect Hung Tasks" depends on KERNEL_DEBUG_KERNEL - default KERNEL_LOCKUP_DETECTOR + default KERNEL_SOFTLOCKUP_DETECTOR help Say Y here to enable the kernel to detect "hung tasks", which are bugs that cause the task to be stuck in From 1a3b3dc7974c98843baeb22251dc4c580dc771d6 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 12 Sep 2021 13:05:30 +0200 Subject: [PATCH 09/26] kernel: Add missing kernel config options These options are selectable when some of the kernel debug options like KERNEL_SOFTLOCKUP_DETECTOR are selected. Signed-off-by: Hauke Mehrtens --- target/linux/archs38/config-5.4 | 1 - target/linux/generic/config-5.10 | 3 +++ target/linux/generic/config-5.4 | 3 +++ target/linux/layerscape/armv7/config-5.4 | 2 -- target/linux/layerscape/armv8_64b/config-5.4 | 2 -- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/target/linux/archs38/config-5.4 b/target/linux/archs38/config-5.4 index 7e529f7633..9847daa769 100644 --- a/target/linux/archs38/config-5.4 +++ b/target/linux/archs38/config-5.4 @@ -50,7 +50,6 @@ CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_SD=y CONFIG_BLK_SCSI_REQUEST=y -# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 CONFIG_CC_DISABLE_WARN_MAYBE_UNINITIALIZED=y CONFIG_CC_HAS_KASAN_GENERIC=y diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10 index a9160ee9b1..6954486480 100644 --- a/target/linux/generic/config-5.10 +++ b/target/linux/generic/config-5.10 @@ -682,6 +682,8 @@ CONFIG_BLOCK=y # CONFIG_BONDING is not set # CONFIG_BOOKE_WDT is not set CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT=3 +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set # CONFIG_BOOTTIME_TRACING is not set # CONFIG_BOOT_CONFIG is not set # CONFIG_BOOT_PRINTK_DELAY is not set @@ -1319,6 +1321,7 @@ CONFIG_DEBUG_KERNEL=y CONFIG_DEFAULT_CUBIC=y CONFIG_DEFAULT_DEADLINE=y CONFIG_DEFAULT_HOSTNAME="(none)" +CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 CONFIG_DEFAULT_INIT="" CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 # CONFIG_DEFAULT_NOOP is not set diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4 index a568a9ea7f..22921379c5 100644 --- a/target/linux/generic/config-5.4 +++ b/target/linux/generic/config-5.4 @@ -645,6 +645,8 @@ CONFIG_BLOCK=y # CONFIG_BONDING is not set # CONFIG_BOOKE_WDT is not set CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT=3 +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set # CONFIG_BOOT_PRINTK_DELAY is not set CONFIG_BOOT_RAW=y CONFIG_BPF=y @@ -1239,6 +1241,7 @@ CONFIG_DEBUG_KERNEL=y CONFIG_DEFAULT_CUBIC=y CONFIG_DEFAULT_DEADLINE=y CONFIG_DEFAULT_HOSTNAME="(none)" +CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 CONFIG_DEFAULT_IOSCHED="deadline" CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 # CONFIG_DEFAULT_NOOP is not set diff --git a/target/linux/layerscape/armv7/config-5.4 b/target/linux/layerscape/armv7/config-5.4 index ed2e318cd6..d1577e9bbe 100644 --- a/target/linux/layerscape/armv7/config-5.4 +++ b/target/linux/layerscape/armv7/config-5.4 @@ -72,7 +72,6 @@ CONFIG_BLK_MQ_PCI=y CONFIG_BLK_MQ_VIRTIO=y CONFIG_BLK_PM=y CONFIG_BLK_SCSI_REQUEST=y -# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 CONFIG_BOUNCE=y CONFIG_BRCMSTB_GISB_ARB=y @@ -168,7 +167,6 @@ CONFIG_DECOMPRESS_GZIP=y CONFIG_DECOMPRESS_LZMA=y CONFIG_DECOMPRESS_LZO=y CONFIG_DECOMPRESS_XZ=y -CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 CONFIG_DETECT_HUNG_TASK=y # CONFIG_DEVFREQ_GOV_PASSIVE is not set # CONFIG_DEVFREQ_GOV_PERFORMANCE is not set diff --git a/target/linux/layerscape/armv8_64b/config-5.4 b/target/linux/layerscape/armv8_64b/config-5.4 index 9214bf9fea..94a3539b03 100644 --- a/target/linux/layerscape/armv8_64b/config-5.4 +++ b/target/linux/layerscape/armv8_64b/config-5.4 @@ -88,7 +88,6 @@ CONFIG_BLK_MQ_PCI=y CONFIG_BLK_MQ_VIRTIO=y CONFIG_BLK_PM=y CONFIG_BLK_SCSI_REQUEST=y -# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 CONFIG_BSD_PROCESS_ACCT=y CONFIG_BSD_PROCESS_ACCT_V3=y @@ -182,7 +181,6 @@ CONFIG_DECOMPRESS_GZIP=y CONFIG_DECOMPRESS_LZMA=y CONFIG_DECOMPRESS_LZO=y CONFIG_DECOMPRESS_XZ=y -CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 CONFIG_DETECT_HUNG_TASK=y # CONFIG_DEVICE_THERMAL is not set CONFIG_DEVTMPFS=y From 55643e469c21ae268cd9842705ae064404094f07 Mon Sep 17 00:00:00 2001 From: Matt Merhar Date: Mon, 6 Sep 2021 19:32:48 -0400 Subject: [PATCH 10/26] kernel: fix jffs2 compilation with GCC_PLUGIN_RANDSTRUCT enabled Designated initializers are required when using the randstruct GCC plugin, otherwise an error like the following is seen: ./include/linux/lzma.h:60:31: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] Signed-off-by: Matt Merhar --- .../generic/pending-5.10/530-jffs2_make_lzma_available.patch | 2 +- .../generic/pending-5.4/530-jffs2_make_lzma_available.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/generic/pending-5.10/530-jffs2_make_lzma_available.patch b/target/linux/generic/pending-5.10/530-jffs2_make_lzma_available.patch index 1bccb30a69..c794c6fe8f 100644 --- a/target/linux/generic/pending-5.10/530-jffs2_make_lzma_available.patch +++ b/target/linux/generic/pending-5.10/530-jffs2_make_lzma_available.patch @@ -351,7 +351,7 @@ Signed-off-by: Alexandros C. Couloumbis + LZMA_FREE(address); +} + -+static ISzAlloc lzma_alloc = {p_lzma_malloc, p_lzma_free}; ++static ISzAlloc lzma_alloc = { .Alloc = p_lzma_malloc, .Free = p_lzma_free }; + +#endif --- /dev/null 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 052db7ef5c..8bd31d2e7e 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 @@ -351,7 +351,7 @@ Signed-off-by: Alexandros C. Couloumbis + LZMA_FREE(address); +} + -+static ISzAlloc lzma_alloc = {p_lzma_malloc, p_lzma_free}; ++static ISzAlloc lzma_alloc = { .Alloc = p_lzma_malloc, .Free = p_lzma_free }; + +#endif --- /dev/null From 5fb4cb07e24655a45cc489d03f85ca813eb093a0 Mon Sep 17 00:00:00 2001 From: John Audia Date: Sun, 12 Sep 2021 04:54:32 -0400 Subject: [PATCH 11/26] kernel: bump 5.10 to 5.10.64 All patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, ipq806x/R7800 Run-tested: bcm2711/RPi4B, ipq806x/R7800 No dmesg regressions, everything functional Signed-off-by: John Audia --- include/kernel-version.mk | 4 ++-- .../patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch | 2 +- ...xhci-add-quirk-for-host-controllers-that-don-t-updat.patch | 2 +- ...-0154-xhci-Use-more-event-ring-segment-table-entries.patch | 2 +- .../950-0355-xhci-quirks-add-link-TRB-quirk-for-VL805.patch | 2 +- ...usb-xhci-workaround-for-bogus-SET_DEQ_PENDING-endpoi.patch | 2 +- ...80-usb-xhci-add-support-for-performing-fake-doorbell.patch | 2 +- ....13-02-netfilter-Fix-fall-through-warnings-for-Clang.patch | 2 +- ...netfilter-nftables-update-table-flags-from-the-commi.patch | 4 ++-- ...t-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch | 4 ++-- .../generic/hack-5.10/410-block-fit-partition-parser.patch | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index ef698b9e43..925ba44e7b 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -7,10 +7,10 @@ ifdef CONFIG_TESTING_KERNEL endif LINUX_VERSION-5.4 = .143 -LINUX_VERSION-5.10 = .63 +LINUX_VERSION-5.10 = .64 LINUX_KERNEL_HASH-5.4.143 = 0953650b05a5f806d76c5691583e94e141f4f691bc0ba75a60b643740f021d24 -LINUX_KERNEL_HASH-5.10.63 = 19a15e838885a0081de5f9874e608fc3f3b1d9e69f2cc5cfa883b8b5499bcb2e +LINUX_KERNEL_HASH-5.10.64 = 3eb84bd24a2de2b4749314e34597c02401c5d6831b055ed5224adb405c35e30a 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/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch index 3148e5b465..b9ca1aa92b 100644 --- a/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch @@ -43,7 +43,7 @@ produce a noisy warning. hcd->msi_enabled = 1; --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1888,6 +1888,7 @@ struct xhci_hcd { +@@ -1891,6 +1891,7 @@ struct xhci_hcd { struct xhci_hub usb2_rhub; struct xhci_hub usb3_rhub; /* support xHCI 1.0 spec USB2 hardware LPM */ diff --git a/target/linux/bcm27xx/patches-5.10/950-0145-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch b/target/linux/bcm27xx/patches-5.10/950-0145-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch index 59a1cf11bd..aa6daa5634 100644 --- a/target/linux/bcm27xx/patches-5.10/950-0145-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch +++ b/target/linux/bcm27xx/patches-5.10/950-0145-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch @@ -80,7 +80,7 @@ Signed-off-by: Jonathan Bell /* --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1881,6 +1881,7 @@ struct xhci_hcd { +@@ -1884,6 +1884,7 @@ struct xhci_hcd { #define XHCI_DISABLE_SPARSE BIT_ULL(38) #define XHCI_SG_TRB_CACHE_SIZE_QUIRK BIT_ULL(39) #define XHCI_NO_SOFT_RETRY BIT_ULL(40) diff --git a/target/linux/bcm27xx/patches-5.10/950-0154-xhci-Use-more-event-ring-segment-table-entries.patch b/target/linux/bcm27xx/patches-5.10/950-0154-xhci-Use-more-event-ring-segment-table-entries.patch index b80544a16b..64bb43e152 100644 --- a/target/linux/bcm27xx/patches-5.10/950-0154-xhci-Use-more-event-ring-segment-table-entries.patch +++ b/target/linux/bcm27xx/patches-5.10/950-0154-xhci-Use-more-event-ring-segment-table-entries.patch @@ -47,7 +47,7 @@ Signed-off-by: Jonathan Bell val); --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1650,8 +1650,8 @@ struct urb_priv { +@@ -1653,8 +1653,8 @@ struct urb_priv { * Each segment table entry is 4*32bits long. 1K seems like an ok size: * (1K bytes * 8bytes/bit) / (4*32 bits) = 64 segment entries in the table, * meaning 64 ring segments. diff --git a/target/linux/bcm27xx/patches-5.10/950-0355-xhci-quirks-add-link-TRB-quirk-for-VL805.patch b/target/linux/bcm27xx/patches-5.10/950-0355-xhci-quirks-add-link-TRB-quirk-for-VL805.patch index 1e1b9a9510..9da1275676 100644 --- a/target/linux/bcm27xx/patches-5.10/950-0355-xhci-quirks-add-link-TRB-quirk-for-VL805.patch +++ b/target/linux/bcm27xx/patches-5.10/950-0355-xhci-quirks-add-link-TRB-quirk-for-VL805.patch @@ -51,7 +51,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1882,6 +1882,7 @@ struct xhci_hcd { +@@ -1885,6 +1885,7 @@ struct xhci_hcd { #define XHCI_SG_TRB_CACHE_SIZE_QUIRK BIT_ULL(39) #define XHCI_NO_SOFT_RETRY BIT_ULL(40) #define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(41) diff --git a/target/linux/bcm27xx/patches-5.10/950-0733-usb-xhci-workaround-for-bogus-SET_DEQ_PENDING-endpoi.patch b/target/linux/bcm27xx/patches-5.10/950-0733-usb-xhci-workaround-for-bogus-SET_DEQ_PENDING-endpoi.patch index 6e43bebf5e..67a7601ac2 100644 --- a/target/linux/bcm27xx/patches-5.10/950-0733-usb-xhci-workaround-for-bogus-SET_DEQ_PENDING-endpoi.patch +++ b/target/linux/bcm27xx/patches-5.10/950-0733-usb-xhci-workaround-for-bogus-SET_DEQ_PENDING-endpoi.patch @@ -26,7 +26,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -4255,9 +4255,9 @@ void xhci_queue_new_dequeue_state(struct +@@ -4256,9 +4256,9 @@ void xhci_queue_new_dequeue_state(struct } ep = &xhci->devs[slot_id]->eps[ep_index]; if ((ep->ep_state & SET_DEQ_PENDING)) { diff --git a/target/linux/bcm53xx/patches-5.10/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-5.10/180-usb-xhci-add-support-for-performing-fake-doorbell.patch index cae6069dfc..36fc3945c7 100644 --- a/target/linux/bcm53xx/patches-5.10/180-usb-xhci-add-support-for-performing-fake-doorbell.patch +++ b/target/linux/bcm53xx/patches-5.10/180-usb-xhci-add-support-for-performing-fake-doorbell.patch @@ -127,7 +127,7 @@ it on BCM4708 family. /* --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1881,6 +1881,7 @@ struct xhci_hcd { +@@ -1884,6 +1884,7 @@ struct xhci_hcd { #define XHCI_DISABLE_SPARSE BIT_ULL(38) #define XHCI_SG_TRB_CACHE_SIZE_QUIRK BIT_ULL(39) #define XHCI_NO_SOFT_RETRY BIT_ULL(40) diff --git a/target/linux/generic/backport-5.10/610-v5.13-02-netfilter-Fix-fall-through-warnings-for-Clang.patch b/target/linux/generic/backport-5.10/610-v5.13-02-netfilter-Fix-fall-through-warnings-for-Clang.patch index 52d04b051f..0aadc2411b 100644 --- a/target/linux/generic/backport-5.10/610-v5.13-02-netfilter-Fix-fall-through-warnings-for-Clang.patch +++ b/target/linux/generic/backport-5.10/610-v5.13-02-netfilter-Fix-fall-through-warnings-for-Clang.patch @@ -24,7 +24,7 @@ Signed-off-by: Pablo Neira Ayuso case CT_DCCP_INVALID: --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c -@@ -8369,6 +8369,7 @@ static int nf_tables_check_loops(const s +@@ -8394,6 +8394,7 @@ static int nf_tables_check_loops(const s data->verdict.chain); if (err < 0) return err; diff --git a/target/linux/generic/backport-5.10/610-v5.13-10-netfilter-nftables-update-table-flags-from-the-commi.patch b/target/linux/generic/backport-5.10/610-v5.13-10-netfilter-nftables-update-table-flags-from-the-commi.patch index ccfdb9384d..56f68feac8 100644 --- a/target/linux/generic/backport-5.10/610-v5.13-10-netfilter-nftables-update-table-flags-from-the-commi.patch +++ b/target/linux/generic/backport-5.10/610-v5.13-10-netfilter-nftables-update-table-flags-from-the-commi.patch @@ -70,7 +70,7 @@ Signed-off-by: Pablo Neira Ayuso nft_trans_table_update(trans) = true; list_add_tail(&trans->list, &ctx->net->nft.commit_list); return 0; -@@ -7878,11 +7882,10 @@ static int nf_tables_commit(struct net * +@@ -7903,11 +7907,10 @@ static int nf_tables_commit(struct net * switch (trans->msg_type) { case NFT_MSG_NEWTABLE: if (nft_trans_table_update(trans)) { @@ -86,7 +86,7 @@ Signed-off-by: Pablo Neira Ayuso } else { nft_clear(net, trans->ctx.table); } -@@ -8095,11 +8098,9 @@ static int __nf_tables_abort(struct net +@@ -8120,11 +8123,9 @@ static int __nf_tables_abort(struct net switch (trans->msg_type) { case NFT_MSG_NEWTABLE: if (nft_trans_table_update(trans)) { diff --git a/target/linux/generic/backport-5.10/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch b/target/linux/generic/backport-5.10/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch index 6489c03734..547068ee22 100644 --- a/target/linux/generic/backport-5.10/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch +++ b/target/linux/generic/backport-5.10/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch @@ -1586,7 +1586,7 @@ Signed-off-by: David S. Miller if (!is_valid_ether_addr(ndev->dev_addr)) eth_hw_addr_random(ndev); temac_do_set_mac_address(ndev); -@@ -1372,7 +1372,7 @@ static int temac_probe(struct platform_d +@@ -1370,7 +1370,7 @@ static int temac_probe(struct platform_d struct device_node *temac_np = dev_of_node(&pdev->dev), *dma_np; struct temac_local *lp; struct net_device *ndev; @@ -1595,7 +1595,7 @@ Signed-off-by: David S. Miller __be32 *p; bool little_endian; int rc = 0; -@@ -1563,8 +1563,8 @@ static int temac_probe(struct platform_d +@@ -1561,8 +1561,8 @@ static int temac_probe(struct platform_d if (temac_np) { /* Retrieve the MAC address */ diff --git a/target/linux/generic/hack-5.10/410-block-fit-partition-parser.patch b/target/linux/generic/hack-5.10/410-block-fit-partition-parser.patch index ec93472851..95067125fb 100644 --- a/target/linux/generic/hack-5.10/410-block-fit-partition-parser.patch +++ b/target/linux/generic/hack-5.10/410-block-fit-partition-parser.patch @@ -1,6 +1,6 @@ --- a/block/blk.h +++ b/block/blk.h -@@ -357,6 +357,7 @@ char *disk_name(struct gendisk *hd, int +@@ -353,6 +353,7 @@ char *disk_name(struct gendisk *hd, int #define ADDPART_FLAG_NONE 0 #define ADDPART_FLAG_RAID 1 #define ADDPART_FLAG_WHOLEDISK 2 From 51c7e1d25f6a4bc1f4906db508ab8a93a7bcaf4a Mon Sep 17 00:00:00 2001 From: John Audia Date: Sat, 4 Sep 2021 19:54:35 -0400 Subject: [PATCH 12/26] kernel: bump 5.4 to 5.4.144 Manually rebased: backport-5.4/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch All other patches automatically rebased. Build system: x86_64 Build-tested: ipq806x/R7800 Run-tested: ipq806x/R7800 Signed-off-by: John Audia --- include/kernel-version.mk | 4 +- .../910-unaligned_access_hacks.patch | 2 +- ...-Ack-pending-PHY-ints-when-resetting.patch | 2 +- ...w_table-fix-offloaded-connection-tim.patch | 8 ++-- ...t7530-add-support-for-port-mirroring.patch | 4 +- ...3-v5.8-net-dsa-mt7530-fix-VLAN-setup.patch | 6 +-- ...sfs-attributes-for-VPD-pages-0h-and-.patch | 6 +-- .../generic/hack-5.4/204-module_strip.patch | 8 ++-- ...-net-dsa-mt7530-Support-EEE-features.patch | 6 +-- ...msm-use-sdhci_set_clock-instead-of-s.patch | 2 +- ...5-usb-dwc3-add-otg-properties-update.patch | 2 +- ...e-resolved-link-config-via-mac_link_.patch | 2 +- ...se-resolved-link-config-in-mac_link_.patch | 8 ++-- ...xtend-device-data-ready-for-adding-a.patch | 12 +++--- ...530-Add-the-support-of-MT7531-switch.patch | 40 +++++++++---------- 15 files changed, 56 insertions(+), 56 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 925ba44e7b..10ceedffa5 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,10 +6,10 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-5.4 = .143 +LINUX_VERSION-5.4 = .144 LINUX_VERSION-5.10 = .64 -LINUX_KERNEL_HASH-5.4.143 = 0953650b05a5f806d76c5691583e94e141f4f691bc0ba75a60b643740f021d24 +LINUX_KERNEL_HASH-5.4.144 = bc43b98271ab3885a41c2413bed26b5a6d38795731b9c194f6e72dde45b85885 LINUX_KERNEL_HASH-5.10.64 = 3eb84bd24a2de2b4749314e34597c02401c5d6831b055ed5224adb405c35e30a remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) diff --git a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch index 55b198eb0c..d2200c8976 100644 --- a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch @@ -171,7 +171,7 @@ #define UDP_CORK 1 /* Never send partially complete segments */ --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c -@@ -271,8 +271,8 @@ nf_ct_get_tuple(const struct sk_buff *sk +@@ -266,8 +266,8 @@ nf_ct_get_tuple(const struct sk_buff *sk switch (l3num) { case NFPROTO_IPV4: diff --git a/target/linux/bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch b/target/linux/bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch index b2e7b7ee95..49d843d4d8 100644 --- a/target/linux/bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch +++ b/target/linux/bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch @@ -23,7 +23,7 @@ Signed-off-by: Phil Elwell @@ -1181,6 +1181,9 @@ static int lan78xx_link_reset(struct lan if (unlikely(ret < 0)) return -EIO; - + + /* Acknowledge any pending PHY interrupt, lest it be the last */ + phy_read(phydev, LAN88XX_INT_STS); + diff --git a/target/linux/generic/backport-5.4/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch b/target/linux/generic/backport-5.4/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch index bf89af3840..373a156429 100644 --- a/target/linux/generic/backport-5.4/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch +++ b/target/linux/generic/backport-5.4/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c -@@ -1212,18 +1212,6 @@ static bool gc_worker_can_early_drop(con +@@ -1207,18 +1207,6 @@ static bool gc_worker_can_early_drop(con return false; } @@ -39,11 +39,11 @@ Signed-off-by: Felix Fietkau - static void gc_worker(struct work_struct *work) { - unsigned int min_interval = max(HZ / GC_MAX_BUCKETS_DIV, 1u); -@@ -1260,10 +1248,8 @@ static void gc_worker(struct work_struct + unsigned long end_time = jiffies + GC_SCAN_MAX_DURATION; +@@ -1250,10 +1238,8 @@ static void gc_worker(struct work_struct + tmp = nf_ct_tuplehash_to_ctrack(h); - scanned++; - if (test_bit(IPS_OFFLOAD_BIT, &tmp->status)) { - nf_ct_offload_timeout(tmp); + if (test_bit(IPS_OFFLOAD_BIT, &tmp->status)) diff --git a/target/linux/generic/backport-5.4/745-v5.7-net-dsa-mt7530-add-support-for-port-mirroring.patch b/target/linux/generic/backport-5.4/745-v5.7-net-dsa-mt7530-add-support-for-port-mirroring.patch index 14bf827806..71a06997c3 100644 --- a/target/linux/generic/backport-5.4/745-v5.7-net-dsa-mt7530-add-support-for-port-mirroring.patch +++ b/target/linux/generic/backport-5.4/745-v5.7-net-dsa-mt7530-add-support-for-port-mirroring.patch @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1146,6 +1146,64 @@ mt7530_port_vlan_del(struct dsa_switch * +@@ -1143,6 +1143,64 @@ mt7530_port_vlan_del(struct dsa_switch * return 0; } @@ -82,7 +82,7 @@ Signed-off-by: David S. Miller static enum dsa_tag_protocol mtk_get_tag_protocol(struct dsa_switch *ds, int port) { -@@ -1523,6 +1581,8 @@ static const struct dsa_switch_ops mt753 +@@ -1520,6 +1578,8 @@ static const struct dsa_switch_ops mt753 .port_vlan_prepare = mt7530_port_vlan_prepare, .port_vlan_add = mt7530_port_vlan_add, .port_vlan_del = mt7530_port_vlan_del, diff --git a/target/linux/generic/backport-5.4/753-v5.8-net-dsa-mt7530-fix-VLAN-setup.patch b/target/linux/generic/backport-5.4/753-v5.8-net-dsa-mt7530-fix-VLAN-setup.patch index 98d213ee6e..0804cea9f7 100644 --- a/target/linux/generic/backport-5.4/753-v5.8-net-dsa-mt7530-fix-VLAN-setup.patch +++ b/target/linux/generic/backport-5.4/753-v5.8-net-dsa-mt7530-fix-VLAN-setup.patch @@ -15,7 +15,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1086,12 +1086,6 @@ mt7530_port_vlan_add(struct dsa_switch * +@@ -1083,12 +1083,6 @@ mt7530_port_vlan_add(struct dsa_switch * struct mt7530_priv *priv = ds->priv; u16 vid; @@ -28,7 +28,7 @@ Signed-off-by: David S. Miller mutex_lock(&priv->reg_mutex); for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) { -@@ -1117,12 +1111,6 @@ mt7530_port_vlan_del(struct dsa_switch * +@@ -1114,12 +1108,6 @@ mt7530_port_vlan_del(struct dsa_switch * struct mt7530_priv *priv = ds->priv; u16 vid, pvid; @@ -41,7 +41,7 @@ Signed-off-by: David S. Miller mutex_lock(&priv->reg_mutex); pvid = priv->ports[port].pvid; -@@ -1235,6 +1223,7 @@ mt7530_setup(struct dsa_switch *ds) +@@ -1232,6 +1220,7 @@ mt7530_setup(struct dsa_switch *ds) * as two netdev instances. */ dn = ds->ports[MT7530_CPU_PORT].master->dev.of_node->parent; diff --git a/target/linux/generic/backport-5.4/800-v5.5-scsi-core-Add-sysfs-attributes-for-VPD-pages-0h-and-.patch b/target/linux/generic/backport-5.4/800-v5.5-scsi-core-Add-sysfs-attributes-for-VPD-pages-0h-and-.patch index 1e6e40df03..438588f9f4 100644 --- a/target/linux/generic/backport-5.4/800-v5.5-scsi-core-Add-sysfs-attributes-for-VPD-pages-0h-and-.patch +++ b/target/linux/generic/backport-5.4/800-v5.5-scsi-core-Add-sysfs-attributes-for-VPD-pages-0h-and-.patch @@ -68,7 +68,7 @@ Signed-off-by: Martin K. Petersen kfree(sdev->inquiry); kfree(sdev); -@@ -871,6 +880,8 @@ static struct bin_attribute dev_attr_vpd +@@ -874,6 +883,8 @@ static struct bin_attribute dev_attr_vpd sdev_vpd_pg_attr(pg83); sdev_vpd_pg_attr(pg80); @@ -77,7 +77,7 @@ Signed-off-by: Martin K. Petersen static ssize_t show_inquiry(struct file *filep, struct kobject *kobj, struct bin_attribute *bin_attr, -@@ -1203,12 +1214,18 @@ static umode_t scsi_sdev_bin_attr_is_vis +@@ -1206,12 +1217,18 @@ static umode_t scsi_sdev_bin_attr_is_vis struct scsi_device *sdev = to_scsi_device(dev); @@ -96,7 +96,7 @@ Signed-off-by: Martin K. Petersen return S_IRUGO; } -@@ -1251,8 +1268,10 @@ static struct attribute *scsi_sdev_attrs +@@ -1254,8 +1271,10 @@ static struct attribute *scsi_sdev_attrs }; static struct bin_attribute *scsi_sdev_bin_attrs[] = { diff --git a/target/linux/generic/hack-5.4/204-module_strip.patch b/target/linux/generic/hack-5.4/204-module_strip.patch index 2c3de812a3..d6e25f319b 100644 --- a/target/linux/generic/hack-5.4/204-module_strip.patch +++ b/target/linux/generic/hack-5.4/204-module_strip.patch @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau config MODULES_TREE_LOOKUP --- a/kernel/module.c +++ b/kernel/module.c -@@ -1285,6 +1285,7 @@ static struct module_attribute *modinfo_ +@@ -1281,6 +1281,7 @@ static struct module_attribute *modinfo_ static const char vermagic[] = VERMAGIC_STRING; @@ -120,7 +120,7 @@ Signed-off-by: Felix Fietkau static int try_to_force_load(struct module *mod, const char *reason) { #ifdef CONFIG_MODULE_FORCE_LOAD -@@ -1296,6 +1297,7 @@ static int try_to_force_load(struct modu +@@ -1292,6 +1293,7 @@ static int try_to_force_load(struct modu return -ENOEXEC; #endif } @@ -128,7 +128,7 @@ Signed-off-by: Felix Fietkau #ifdef CONFIG_MODVERSIONS -@@ -3256,9 +3256,11 @@ static int setup_load_info(struct load_i +@@ -3256,9 +3258,11 @@ static int setup_load_info(struct load_i static int check_modinfo(struct module *mod, struct load_info *info, int flags) { @@ -141,7 +141,7 @@ Signed-off-by: Felix Fietkau if (flags & MODULE_INIT_IGNORE_VERMAGIC) modmagic = NULL; -@@ -3279,6 +3281,7 @@ static int check_modinfo(struct module * +@@ -3279,6 +3283,7 @@ static int check_modinfo(struct module * mod->name); add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK); } diff --git a/target/linux/generic/pending-5.4/761-net-dsa-mt7530-Support-EEE-features.patch b/target/linux/generic/pending-5.4/761-net-dsa-mt7530-Support-EEE-features.patch index 02b369955b..c2dc35d134 100644 --- a/target/linux/generic/pending-5.4/761-net-dsa-mt7530-Support-EEE-features.patch +++ b/target/linux/generic/pending-5.4/761-net-dsa-mt7530-Support-EEE-features.patch @@ -9,7 +9,7 @@ Content-Transfer-Encoding: 8bit Signed-off-by: René van Dorst --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1410,9 +1410,13 @@ static void mt7530_phylink_mac_config(st +@@ -1407,9 +1407,13 @@ static void mt7530_phylink_mac_config(st switch (state->speed) { case SPEED_1000: mcr_new |= PMCR_FORCE_SPEED_1000; @@ -23,7 +23,7 @@ Signed-off-by: René van Dorst break; } if (state->duplex == DUPLEX_FULL) { -@@ -1548,6 +1552,54 @@ mt7530_phylink_mac_link_state(struct dsa +@@ -1545,6 +1549,54 @@ mt7530_phylink_mac_link_state(struct dsa return 1; } @@ -78,7 +78,7 @@ Signed-off-by: René van Dorst static const struct dsa_switch_ops mt7530_switch_ops = { .get_tag_protocol = mtk_get_tag_protocol, .setup = mt7530_setup, -@@ -1575,6 +1627,8 @@ static const struct dsa_switch_ops mt753 +@@ -1572,6 +1624,8 @@ static const struct dsa_switch_ops mt753 .phylink_mac_config = mt7530_phylink_mac_config, .phylink_mac_link_down = mt7530_phylink_mac_link_down, .phylink_mac_link_up = mt7530_phylink_mac_link_up, diff --git a/target/linux/ipq40xx/patches-5.4/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch b/target/linux/ipq40xx/patches-5.4/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch index e56ab6d0f1..eaf7ae30bc 100644 --- a/target/linux/ipq40xx/patches-5.4/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch +++ b/target/linux/ipq40xx/patches-5.4/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch @@ -14,7 +14,7 @@ Signed-off-by: Robert Marko --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c -@@ -1746,7 +1746,7 @@ MODULE_DEVICE_TABLE(of, sdhci_msm_dt_mat +@@ -1763,7 +1763,7 @@ MODULE_DEVICE_TABLE(of, sdhci_msm_dt_mat static const struct sdhci_ops sdhci_msm_ops = { .reset = sdhci_reset, diff --git a/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch b/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch index 7457b6e009..fc4c853cb9 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch @@ -54,7 +54,7 @@ Signed-off-by: Peter Chen * All 3.1 IP version constants are greater than the 3.0 IP --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c -@@ -3656,6 +3656,10 @@ int dwc3_gadget_init(struct dwc3 *dwc) +@@ -3655,6 +3655,10 @@ int dwc3_gadget_init(struct dwc3 *dwc) dwc->gadget.sg_supported = true; dwc->gadget.name = "dwc3-gadget"; dwc->gadget.lpm_capable = true; diff --git a/target/linux/mediatek/patches-5.4/0601-net-dsa-propagate-resolved-link-config-via-mac_link_.patch b/target/linux/mediatek/patches-5.4/0601-net-dsa-propagate-resolved-link-config-via-mac_link_.patch index fe4f9855be..0df300b627 100644 --- a/target/linux/mediatek/patches-5.4/0601-net-dsa-propagate-resolved-link-config-via-mac_link_.patch +++ b/target/linux/mediatek/patches-5.4/0601-net-dsa-propagate-resolved-link-config-via-mac_link_.patch @@ -64,7 +64,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1443,7 +1443,9 @@ static void mt7530_phylink_mac_link_down +@@ -1440,7 +1440,9 @@ static void mt7530_phylink_mac_link_down static void mt7530_phylink_mac_link_up(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface, diff --git a/target/linux/mediatek/patches-5.4/0602-net-dsa-mt7530-use-resolved-link-config-in-mac_link_.patch b/target/linux/mediatek/patches-5.4/0602-net-dsa-mt7530-use-resolved-link-config-in-mac_link_.patch index 87235e6054..23fba85252 100644 --- a/target/linux/mediatek/patches-5.4/0602-net-dsa-mt7530-use-resolved-link-config-in-mac_link_.patch +++ b/target/linux/mediatek/patches-5.4/0602-net-dsa-mt7530-use-resolved-link-config-in-mac_link_.patch @@ -51,7 +51,7 @@ Signed-off-by: David S. Miller mutex_unlock(&priv->reg_mutex); } -@@ -1398,8 +1387,7 @@ static void mt7530_phylink_mac_config(st +@@ -1395,8 +1384,7 @@ static void mt7530_phylink_mac_config(st mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port)); mcr_new = mcr_cur; @@ -61,7 +61,7 @@ Signed-off-by: David S. Miller mcr_new |= PMCR_IFG_XMIT(1) | PMCR_MAC_MODE | PMCR_BACKOFF_EN | PMCR_BACKPR_EN | PMCR_FORCE_MODE; -@@ -1407,26 +1395,6 @@ static void mt7530_phylink_mac_config(st +@@ -1404,26 +1392,6 @@ static void mt7530_phylink_mac_config(st if (port == 5 && dsa_is_user_port(ds, 5)) mcr_new |= PMCR_EXT_PHY; @@ -88,7 +88,7 @@ Signed-off-by: David S. Miller if (mcr_new != mcr_cur) mt7530_write(priv, MT7530_PMCR_P(port), mcr_new); } -@@ -1437,7 +1405,7 @@ static void mt7530_phylink_mac_link_down +@@ -1434,7 +1402,7 @@ static void mt7530_phylink_mac_link_down { struct mt7530_priv *priv = ds->priv; @@ -97,7 +97,7 @@ Signed-off-by: David S. Miller } static void mt7530_phylink_mac_link_up(struct dsa_switch *ds, int port, -@@ -1448,8 +1416,31 @@ static void mt7530_phylink_mac_link_up(s +@@ -1445,8 +1413,31 @@ static void mt7530_phylink_mac_link_up(s bool tx_pause, bool rx_pause) { struct mt7530_priv *priv = ds->priv; diff --git a/target/linux/mediatek/patches-5.4/0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch b/target/linux/mediatek/patches-5.4/0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch index 291307791d..718ed8ea2d 100644 --- a/target/linux/mediatek/patches-5.4/0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch +++ b/target/linux/mediatek/patches-5.4/0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch @@ -47,7 +47,7 @@ Signed-off-by: Sean Wang return -EINVAL; } -@@ -1335,12 +1337,11 @@ mt7530_setup(struct dsa_switch *ds) +@@ -1332,12 +1334,11 @@ mt7530_setup(struct dsa_switch *ds) return 0; } @@ -63,7 +63,7 @@ Signed-off-by: Sean Wang switch (port) { case 0: /* Internal phy */ -@@ -1349,33 +1350,114 @@ static void mt7530_phylink_mac_config(st +@@ -1346,33 +1347,114 @@ static void mt7530_phylink_mac_config(st case 3: case 4: if (state->interface != PHY_INTERFACE_MODE_GMII) @@ -189,7 +189,7 @@ Signed-off-by: Sean Wang return; } -@@ -1443,61 +1525,44 @@ static void mt7530_phylink_mac_link_up(s +@@ -1440,61 +1522,44 @@ static void mt7530_phylink_mac_link_up(s mt7530_set(priv, MT7530_PMCR_P(port), mcr); } @@ -274,7 +274,7 @@ Signed-off-by: Sean Wang phylink_set(mask, Pause); phylink_set(mask, Asym_Pause); -@@ -1593,12 +1658,45 @@ static int mt7530_set_mac_eee(struct dsa +@@ -1590,12 +1655,45 @@ static int mt7530_set_mac_eee(struct dsa return 0; } @@ -323,7 +323,7 @@ Signed-off-by: Sean Wang .get_ethtool_stats = mt7530_get_ethtool_stats, .get_sset_count = mt7530_get_sset_count, .port_enable = mt7530_port_enable, -@@ -1615,18 +1713,43 @@ static const struct dsa_switch_ops mt753 +@@ -1612,18 +1710,43 @@ static const struct dsa_switch_ops mt753 .port_vlan_del = mt7530_port_vlan_del, .port_mirror_add = mt7530_port_mirror_add, .port_mirror_del = mt7530_port_mirror_del, @@ -372,7 +372,7 @@ Signed-off-by: Sean Wang { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, mt7530_of_match); -@@ -1664,8 +1787,21 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -1661,8 +1784,21 @@ mt7530_probe(struct mdio_device *mdiodev /* Get the hardware identifier from the devicetree node. * We will need it for some of the clock and regulator setup. */ diff --git a/target/linux/mediatek/patches-5.4/0604-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch b/target/linux/mediatek/patches-5.4/0604-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch index 2d20bbc37c..8ede862204 100644 --- a/target/linux/mediatek/patches-5.4/0604-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch +++ b/target/linux/mediatek/patches-5.4/0604-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch @@ -394,7 +394,7 @@ Signed-off-by: Sean Wang */ mt7530_write(priv, MT7530_PCR_P(port), PCR_MATRIX(dsa_user_ports(priv->ds))); -@@ -1123,27 +1447,42 @@ mt7530_port_vlan_del(struct dsa_switch * +@@ -1120,27 +1444,42 @@ mt7530_port_vlan_del(struct dsa_switch * return 0; } @@ -444,7 +444,7 @@ Signed-off-by: Sean Wang val = mt7530_read(priv, MT7530_PCR_P(port)); if (ingress) { -@@ -1158,7 +1497,7 @@ static int mt7530_port_mirror_add(struct +@@ -1155,7 +1494,7 @@ static int mt7530_port_mirror_add(struct return 0; } @@ -453,7 +453,7 @@ Signed-off-by: Sean Wang struct dsa_mall_mirror_tc_entry *mirror) { struct mt7530_priv *priv = ds->priv; -@@ -1175,9 +1514,9 @@ static void mt7530_port_mirror_del(struc +@@ -1172,9 +1511,9 @@ static void mt7530_port_mirror_del(struc mt7530_write(priv, MT7530_PCR_P(port), val); if (!priv->mirror_rx && !priv->mirror_tx) { @@ -466,7 +466,7 @@ Signed-off-by: Sean Wang } } -@@ -1283,7 +1622,7 @@ mt7530_setup(struct dsa_switch *ds) +@@ -1280,7 +1619,7 @@ mt7530_setup(struct dsa_switch *ds) PCR_MATRIX_CLR); if (dsa_is_cpu_port(ds, i)) @@ -475,7 +475,7 @@ Signed-off-by: Sean Wang else mt7530_port_disable(ds, i); -@@ -1337,6 +1676,118 @@ mt7530_setup(struct dsa_switch *ds) +@@ -1334,6 +1673,118 @@ mt7530_setup(struct dsa_switch *ds) return 0; } @@ -594,7 +594,7 @@ Signed-off-by: Sean Wang static bool mt7530_phy_mode_supported(struct dsa_switch *ds, int port, const struct phylink_link_state *state) -@@ -1375,6 +1826,47 @@ unsupported: +@@ -1372,6 +1823,47 @@ unsupported: return false; } @@ -642,7 +642,7 @@ Signed-off-by: Sean Wang static bool mt753x_phy_mode_supported(struct dsa_switch *ds, int port, const struct phylink_link_state *state) -@@ -1407,6 +1899,227 @@ mt7530_mac_config(struct dsa_switch *ds, +@@ -1404,6 +1896,227 @@ mt7530_mac_config(struct dsa_switch *ds, return 0; } @@ -870,7 +870,7 @@ Signed-off-by: Sean Wang static int mt753x_mac_config(struct dsa_switch *ds, int port, unsigned int mode, const struct phylink_link_state *state) -@@ -1442,6 +2155,8 @@ mt753x_phylink_mac_config(struct dsa_swi +@@ -1439,6 +2152,8 @@ mt753x_phylink_mac_config(struct dsa_swi if (mt753x_mac_config(ds, port, mode, state) < 0) goto unsupported; @@ -879,7 +879,7 @@ Signed-off-by: Sean Wang break; case 6: /* 1st cpu port */ if (priv->p6_interface == state->interface) -@@ -1461,7 +2176,8 @@ unsupported: +@@ -1458,7 +2173,8 @@ unsupported: return; } @@ -889,7 +889,7 @@ Signed-off-by: Sean Wang dev_err(ds->dev, "%s: in-band negotiation unsupported\n", __func__); return; -@@ -1471,7 +2187,7 @@ unsupported: +@@ -1468,7 +2184,7 @@ unsupported: mcr_new = mcr_cur; mcr_new &= ~PMCR_LINK_SETTINGS_MASK; mcr_new |= PMCR_IFG_XMIT(1) | PMCR_MAC_MODE | PMCR_BACKOFF_EN | @@ -898,7 +898,7 @@ Signed-off-by: Sean Wang /* Are we connected to external phy */ if (port == 5 && dsa_is_user_port(ds, 5)) -@@ -1481,7 +2197,18 @@ unsupported: +@@ -1478,7 +2194,18 @@ unsupported: mt7530_write(priv, MT7530_PMCR_P(port), mcr_new); } @@ -918,7 +918,7 @@ Signed-off-by: Sean Wang unsigned int mode, phy_interface_t interface) { -@@ -1490,7 +2217,19 @@ static void mt7530_phylink_mac_link_down +@@ -1487,7 +2214,19 @@ static void mt7530_phylink_mac_link_down mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK); } @@ -939,7 +939,7 @@ Signed-off-by: Sean Wang unsigned int mode, phy_interface_t interface, struct phy_device *phydev, -@@ -1500,18 +2239,29 @@ static void mt7530_phylink_mac_link_up(s +@@ -1497,18 +2236,29 @@ static void mt7530_phylink_mac_link_up(s struct mt7530_priv *priv = ds->priv; u32 mcr; @@ -971,7 +971,7 @@ Signed-off-by: Sean Wang break; } if (duplex == DUPLEX_FULL) { -@@ -1525,6 +2275,45 @@ static void mt7530_phylink_mac_link_up(s +@@ -1522,6 +2272,45 @@ static void mt7530_phylink_mac_link_up(s mt7530_set(priv, MT7530_PMCR_P(port), mcr); } @@ -1017,7 +1017,7 @@ Signed-off-by: Sean Wang static void mt7530_mac_port_validate(struct dsa_switch *ds, int port, unsigned long *supported) -@@ -1533,6 +2322,14 @@ mt7530_mac_port_validate(struct dsa_swit +@@ -1530,6 +2319,14 @@ mt7530_mac_port_validate(struct dsa_swit phylink_set(supported, 1000baseX_Full); } @@ -1032,7 +1032,7 @@ Signed-off-by: Sean Wang static void mt753x_phylink_validate(struct dsa_switch *ds, int port, unsigned long *supported, -@@ -1549,7 +2346,8 @@ mt753x_phylink_validate(struct dsa_switc +@@ -1546,7 +2343,8 @@ mt753x_phylink_validate(struct dsa_switc phylink_set_port_modes(mask); @@ -1042,7 +1042,7 @@ Signed-off-by: Sean Wang phylink_set(mask, 10baseT_Half); phylink_set(mask, 10baseT_Full); phylink_set(mask, 100baseT_Half); -@@ -1568,6 +2366,11 @@ mt753x_phylink_validate(struct dsa_switc +@@ -1565,6 +2363,11 @@ mt753x_phylink_validate(struct dsa_switc linkmode_and(supported, supported, mask); linkmode_and(state->advertising, state->advertising, mask); @@ -1054,7 +1054,7 @@ Signed-off-by: Sean Wang } static int -@@ -1658,6 +2461,63 @@ static int mt7530_set_mac_eee(struct dsa +@@ -1655,6 +2458,63 @@ static int mt7530_set_mac_eee(struct dsa return 0; } @@ -1118,7 +1118,7 @@ Signed-off-by: Sean Wang static int mt753x_phylink_mac_link_state(struct dsa_switch *ds, int port, struct phylink_link_state *state) -@@ -1711,13 +2571,14 @@ static const struct dsa_switch_ops mt753 +@@ -1708,13 +2568,14 @@ static const struct dsa_switch_ops mt753 .port_vlan_prepare = mt7530_port_vlan_prepare, .port_vlan_add = mt7530_port_vlan_add, .port_vlan_del = mt7530_port_vlan_del, @@ -1137,7 +1137,7 @@ Signed-off-by: Sean Wang .get_mac_eee = mt7530_get_mac_eee, .set_mac_eee = mt7530_set_mac_eee, }; -@@ -1745,11 +2606,26 @@ static const struct mt753x_info mt753x_t +@@ -1742,11 +2603,26 @@ static const struct mt753x_info mt753x_t .mac_port_get_state = mt7530_phylink_mac_link_state, .mac_port_config = mt7530_mac_config, }, From a88b32bf6e870baae95eeb129483c3ee1447205e Mon Sep 17 00:00:00 2001 From: John Audia Date: Mon, 13 Sep 2021 08:26:19 -0400 Subject: [PATCH 13/26] kernel: bump 5.4 to 5.4.145 Removed upstreamed: generic-backport/040-ARM-8918-2-only-build-return_address-if-needed.patch All other patches automatically rebased. Build system: x86_64 Build-tested: ipq806x/R7800 Signed-off-by: John Audia --- include/kernel-version.mk | 4 +- .../802-usb-xhci-force-msi-renesas-xhci.patch | 2 +- ...or-host-controllers-that-don-t-updat.patch | 2 +- ...ore-event-ring-segment-table-entries.patch | 2 +- ...-quirks-add-link-TRB-quirk-for-VL805.patch | 2 +- ...support-for-performing-fake-doorbell.patch | 2 +- ...-only-build-return_address-if-needed.patch | 60 ------------------- ...the-dst-buffer-to-of_get_mac_address.patch | 4 +- ...host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch | 2 +- ...735-usb-host-add-XHCI_CDNS_HOST-flag.patch | 2 +- ...-host-xhci-add-.bus_suspend-override.patch | 2 +- 11 files changed, 12 insertions(+), 72 deletions(-) delete mode 100644 target/linux/generic/backport-5.4/040-ARM-8918-2-only-build-return_address-if-needed.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 10ceedffa5..00f7c90313 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,10 +6,10 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-5.4 = .144 +LINUX_VERSION-5.4 = .145 LINUX_VERSION-5.10 = .64 -LINUX_KERNEL_HASH-5.4.144 = bc43b98271ab3885a41c2413bed26b5a6d38795731b9c194f6e72dde45b85885 +LINUX_KERNEL_HASH-5.4.145 = 5cf7782ec2e91417edf0d5e6555da6d556962c8985e33ba9e7dadba5cbdc68f9 LINUX_KERNEL_HASH-5.10.64 = 3eb84bd24a2de2b4749314e34597c02401c5d6831b055ed5224adb405c35e30a remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) diff --git a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch index 3c33253ec4..4217a1e949 100644 --- a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch @@ -43,7 +43,7 @@ produce a noisy warning. hcd->msi_enabled = 1; --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1884,6 +1884,7 @@ struct xhci_hcd { +@@ -1887,6 +1887,7 @@ struct xhci_hcd { struct xhci_hub usb2_rhub; struct xhci_hub usb3_rhub; /* support xHCI 1.0 spec USB2 hardware LPM */ diff --git a/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch b/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch index 0c3f290ea2..947b00b398 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch @@ -80,7 +80,7 @@ Signed-off-by: Jonathan Bell /* --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1874,6 +1874,7 @@ struct xhci_hcd { +@@ -1877,6 +1877,7 @@ struct xhci_hcd { #define XHCI_DEFAULT_PM_RUNTIME_ALLOW BIT_ULL(33) #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) diff --git a/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch b/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch index 1758e49761..edddd313a8 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch @@ -47,7 +47,7 @@ Signed-off-by: Jonathan Bell val); --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1650,8 +1650,8 @@ struct urb_priv { +@@ -1653,8 +1653,8 @@ struct urb_priv { * Each segment table entry is 4*32bits long. 1K seems like an ok size: * (1K bytes * 8bytes/bit) / (4*32 bits) = 64 segment entries in the table, * meaning 64 ring segments. diff --git a/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch b/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch index 149fd08d06..627ec30f06 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch @@ -51,7 +51,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1877,6 +1877,7 @@ struct xhci_hcd { +@@ -1880,6 +1880,7 @@ struct xhci_hcd { #define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(36) #define XHCI_SKIP_PHY_INIT BIT_ULL(37) #define XHCI_DISABLE_SPARSE BIT_ULL(38) diff --git a/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch index 72ea0cbd3b..5469beb53f 100644 --- a/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch +++ b/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch @@ -127,7 +127,7 @@ it on BCM4708 family. /* --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1874,6 +1874,7 @@ struct xhci_hcd { +@@ -1877,6 +1877,7 @@ struct xhci_hcd { #define XHCI_DEFAULT_PM_RUNTIME_ALLOW BIT_ULL(33) #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) diff --git a/target/linux/generic/backport-5.4/040-ARM-8918-2-only-build-return_address-if-needed.patch b/target/linux/generic/backport-5.4/040-ARM-8918-2-only-build-return_address-if-needed.patch deleted file mode 100644 index c9301f9c2a..0000000000 --- a/target/linux/generic/backport-5.4/040-ARM-8918-2-only-build-return_address-if-needed.patch +++ /dev/null @@ -1,60 +0,0 @@ -From fb033c95c94ca1ee3d16e04ebdb85d65fb55fff8 Mon Sep 17 00:00:00 2001 -From: Ben Dooks -Date: Mon, 4 Nov 2019 18:15:15 +0100 -Subject: [PATCH] ARM: 8918/2: only build return_address() if needed - -The system currently warns if the config conditions for -building return_address in arch/arm/kernel/return_address.c -are not met, leaving just an EXPORT_SYMBOL_GPL(return_address) -of a function defined to be 'static linline'. -This is a result of aeea3592a13b ("ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h"). - -Since we're not going to build anything other than an exported -symbol for something that is already being defined to be an -inline-able return of NULL, just avoid building the code to -remove the following warning: - -Fixes: aeea3592a13b ("ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h") -Signed-off-by: Ben Dooks -Signed-off-by: Russell King ---- - arch/arm/kernel/Makefile | 6 +++++- - arch/arm/kernel/return_address.c | 4 ---- - 2 files changed, 5 insertions(+), 5 deletions(-) - ---- a/arch/arm/kernel/Makefile -+++ b/arch/arm/kernel/Makefile -@@ -17,10 +17,14 @@ CFLAGS_REMOVE_return_address.o = -pg - # Object file lists. - - obj-y := elf.o entry-common.o irq.o opcodes.o \ -- process.o ptrace.o reboot.o return_address.o \ -+ process.o ptrace.o reboot.o \ - setup.o signal.o sigreturn_codes.o \ - stacktrace.o sys_arm.o time.o traps.o - -+ifneq ($(CONFIG_ARM_UNWIND),y) -+obj-$(CONFIG_FRAME_POINTER) += return_address.o -+endif -+ - obj-$(CONFIG_ATAGS) += atags_parse.o - obj-$(CONFIG_ATAGS_PROC) += atags_proc.o - obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += atags_compat.o ---- a/arch/arm/kernel/return_address.c -+++ b/arch/arm/kernel/return_address.c -@@ -7,8 +7,6 @@ - */ - #include - #include -- --#if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) - #include - - #include -@@ -53,6 +51,4 @@ void *return_address(unsigned int level) - return NULL; - } - --#endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) */ -- - EXPORT_SYMBOL_GPL(return_address); diff --git a/target/linux/generic/backport-5.4/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch b/target/linux/generic/backport-5.4/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch index ba5a068ec7..17c5242483 100644 --- a/target/linux/generic/backport-5.4/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch +++ b/target/linux/generic/backport-5.4/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch @@ -1470,7 +1470,7 @@ Signed-off-by: David S. Miller if (!is_valid_ether_addr(ndev->dev_addr)) eth_hw_addr_random(ndev); temac_do_set_mac_address(ndev); -@@ -1298,7 +1298,7 @@ static int temac_probe(struct platform_d +@@ -1296,7 +1296,7 @@ static int temac_probe(struct platform_d struct temac_local *lp; struct net_device *ndev; struct resource *res; @@ -1479,7 +1479,7 @@ Signed-off-by: David S. Miller __be32 *p; bool little_endian; int rc = 0; -@@ -1494,8 +1494,8 @@ static int temac_probe(struct platform_d +@@ -1492,8 +1492,8 @@ static int temac_probe(struct platform_d if (temac_np) { /* Retrieve the MAC address */ diff --git a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch index ffe429929b..5f0c44f953 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch @@ -184,7 +184,7 @@ Signed-off-by: Peter Chen void xhci_init_driver(struct hc_driver *drv, --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -2151,6 +2151,16 @@ int xhci_find_raw_port_number(struct usb +@@ -2154,6 +2154,16 @@ int xhci_find_raw_port_number(struct usb struct xhci_hub *xhci_get_rhub(struct usb_hcd *hcd); void xhci_hc_died(struct xhci_hcd *xhci); diff --git a/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch b/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch index e866bef1df..617374a26b 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch @@ -32,7 +32,7 @@ Signed-off-by: Peter Chen ret = xhci_handshake(&xhci->op_regs->command, --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1874,6 +1874,7 @@ struct xhci_hcd { +@@ -1877,6 +1877,7 @@ struct xhci_hcd { #define XHCI_DEFAULT_PM_RUNTIME_ALLOW BIT_ULL(33) #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) diff --git a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch index 2fc5ba3f06..f82c3accad 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch @@ -35,7 +35,7 @@ Signed-off-by: Peter Chen EXPORT_SYMBOL_GPL(xhci_init_driver); --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1917,6 +1917,7 @@ struct xhci_driver_overrides { +@@ -1920,6 +1920,7 @@ struct xhci_driver_overrides { int (*start)(struct usb_hcd *hcd); int (*check_bandwidth)(struct usb_hcd *, struct usb_device *); void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *); From c50ece58c41647880cc74c927d98b465cdfbdad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Bl=C3=A4se?= Date: Sun, 29 Aug 2021 21:21:35 +0200 Subject: [PATCH 14/26] kernel: backport switchdev fix for bridge in bridge configurations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch fixes the forwarding behavior of bridge in bridge configurations with DSA. Without it, the configuration of the upper bridge might overwrite settings of the lower bridge. For example, a vlan-aware bridge with DSA interfaces in it might be offloaded to the DSA hardware. If the bridge interface itself gets slave of a different bridge without vlan filtering, the vlan filtering setting of the lower bridge is overwritten by the upper bridge, which results in an incorrect hardware configuration. This was backported from kernel 5.7. Ref: https://lore.kernel.org/netdev/20191222192235.GK25745@shell.armlinux.org.uk/ Fixes: FS#3996 Signed-off-by: Fabian Bläse --- ...-not-propagate-bridge-updates-across.patch | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 target/linux/generic/backport-5.4/790-v5.7-net-switchdev-do-not-propagate-bridge-updates-across.patch diff --git a/target/linux/generic/backport-5.4/790-v5.7-net-switchdev-do-not-propagate-bridge-updates-across.patch b/target/linux/generic/backport-5.4/790-v5.7-net-switchdev-do-not-propagate-bridge-updates-across.patch new file mode 100644 index 0000000000..bc8014b772 --- /dev/null +++ b/target/linux/generic/backport-5.4/790-v5.7-net-switchdev-do-not-propagate-bridge-updates-across.patch @@ -0,0 +1,60 @@ +From 07c6f9805f12f1bb538ef165a092b300350384aa Mon Sep 17 00:00:00 2001 +From: Russell King +Date: Wed, 26 Feb 2020 17:14:21 +0000 +Subject: [PATCH] net: switchdev: do not propagate bridge updates across + bridges + +When configuring a tree of independent bridges, propagating changes +from the upper bridge across a bridge master to the lower bridge +ports brings surprises. + +For example, a lower bridge may have vlan filtering enabled. It +may have a vlan interface attached to the bridge master, which may +then be incorporated into another bridge. As soon as the lower +bridge vlan interface is attached to the upper bridge, the lower +bridge has vlan filtering disabled. + +This occurs because switchdev recursively applies its changes to +all lower devices no matter what. + +Reviewed-by: Ido Schimmel +Tested-by: Ido Schimmel +Signed-off-by: Russell King +Reviewed-by: Florian Fainelli +Signed-off-by: David S. Miller +--- + net/switchdev/switchdev.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/net/switchdev/switchdev.c ++++ b/net/switchdev/switchdev.c +@@ -476,6 +476,9 @@ static int __switchdev_handle_port_obj_a + * necessary to go through this helper. + */ + netdev_for_each_lower_dev(dev, lower_dev, iter) { ++ if (netif_is_bridge_master(lower_dev)) ++ continue; ++ + err = __switchdev_handle_port_obj_add(lower_dev, port_obj_info, + check_cb, add_cb); + if (err && err != -EOPNOTSUPP) +@@ -528,6 +531,9 @@ static int __switchdev_handle_port_obj_d + * necessary to go through this helper. + */ + netdev_for_each_lower_dev(dev, lower_dev, iter) { ++ if (netif_is_bridge_master(lower_dev)) ++ continue; ++ + err = __switchdev_handle_port_obj_del(lower_dev, port_obj_info, + check_cb, del_cb); + if (err && err != -EOPNOTSUPP) +@@ -579,6 +585,9 @@ static int __switchdev_handle_port_attr_ + * necessary to go through this helper. + */ + netdev_for_each_lower_dev(dev, lower_dev, iter) { ++ if (netif_is_bridge_master(lower_dev)) ++ continue; ++ + err = __switchdev_handle_port_attr_set(lower_dev, port_attr_info, + check_cb, set_cb); + if (err && err != -EOPNOTSUPP) From bd74bc9013c9b190d5f6056b2653130831abdabf Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 5 Sep 2021 04:37:14 +0200 Subject: [PATCH 15/26] kernel: add package kmod-iio-ads1015 and remove kmod-hwmon-ads1015 The hwmon driver for the ADC ADS1015 has been removed in Linux 5.4 in favor of a driver in the iio system. For details see: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2c9d5b5e This fixes: https://bugs.openwrt.org/index.php?do=details&task_id=4005 Run-tested: ramips/mt76x8 (Onion Omega 2+) Signed-off-by: Christian Pointner --- package/kernel/linux/modules/hwmon.mk | 14 -------------- package/kernel/linux/modules/iio.mk | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/package/kernel/linux/modules/hwmon.mk b/package/kernel/linux/modules/hwmon.mk index a39a8910f0..9f75293764 100644 --- a/package/kernel/linux/modules/hwmon.mk +++ b/package/kernel/linux/modules/hwmon.mk @@ -43,20 +43,6 @@ endef $(eval $(call KernelPackage,hwmon-ad7418)) -define KernelPackage/hwmon-ads1015 - TITLE:=Texas Instruments ADS1015 - KCONFIG:= CONFIG_SENSORS_ADS1015 - FILES:= $(LINUX_DIR)/drivers/hwmon/ads1015.ko - AUTOLOAD:=$(call AutoLoad,60,ads1015) - $(call AddDepends/hwmon,+kmod-i2c-core) -endef - -define KernelPackage/hwmon-ads1015/description - Kernel module for Texas Instruments ADS1015 Analog-to-Digital converter -endef - -$(eval $(call KernelPackage,hwmon-ads1015)) - define KernelPackage/hwmon-adt7410 TITLE:=ADT7410 monitoring support KCONFIG:= \ diff --git a/package/kernel/linux/modules/iio.mk b/package/kernel/linux/modules/iio.mk index 7bfbd38079..6a2e040377 100644 --- a/package/kernel/linux/modules/iio.mk +++ b/package/kernel/linux/modules/iio.mk @@ -78,6 +78,21 @@ endef $(eval $(call KernelPackage,iio-ad799x)) +define KernelPackage/iio-ads1015 + SUBMENU:=$(IIO_MENU) + DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-regmap-i2c +kmod-industrialio-triggered-buffer + TITLE:=Texas Instruments ADS1015 ADC driver + KCONFIG:= CONFIG_TI_ADS1015 + FILES:=$(LINUX_DIR)/drivers/iio/adc/ti-ads1015.ko + AUTOLOAD:=$(call AutoLoad,56,ti-ads1015) +endef + +define KernelPackage/iio-ads1015/description + This driver adds support for Texas Instruments ADS1015 and ADS1115 ADCs. +endef + +$(eval $(call KernelPackage,iio-ads1015)) + define KernelPackage/iio-hmc5843 SUBMENU:=$(IIO_MENU) DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-regmap-i2c +kmod-industrialio-triggered-buffer From 3d4867addfa1acef25f8377704d184c661fc5845 Mon Sep 17 00:00:00 2001 From: Zhao Yu <574249312@qq.com> Date: Sat, 28 Aug 2021 10:26:11 +0800 Subject: [PATCH 16/26] sunxi: enable MUSB in A7 subtarget like commit 78c1ed6. Without this,Some USB port on H3 baseboard can' work. So, need enable MUSB support on this target. Signed-off-by: Zhao Yu <574249312@qq.com> --- target/linux/sunxi/cortexa7/config-5.4 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/target/linux/sunxi/cortexa7/config-5.4 b/target/linux/sunxi/cortexa7/config-5.4 index 0b3697028f..2d013357c5 100644 --- a/target/linux/sunxi/cortexa7/config-5.4 +++ b/target/linux/sunxi/cortexa7/config-5.4 @@ -7,9 +7,17 @@ CONFIG_DWMAC_SUN8I=y # CONFIG_MACH_SUN4I is not set # CONFIG_MACH_SUN5I is not set CONFIG_MDIO_BUS_MUX=y +CONFIG_MUSB_PIO_ONLY=y +CONFIG_NOP_USB_XCEIV=y # CONFIG_PINCTRL_SUN50I_A64 is not set # CONFIG_PINCTRL_SUN50I_A64_R is not set # CONFIG_PINCTRL_SUN50I_H5 is not set # CONFIG_PINCTRL_SUN50I_H6 is not set # CONFIG_PINCTRL_SUN50I_H6_R is not set CONFIG_UNWINDER_ARM=y +CONFIG_USB_MUSB_DUAL_ROLE=y +# CONFIG_USB_MUSB_GADGET is not set +CONFIG_USB_MUSB_HDRC=y +# CONFIG_USB_MUSB_HOST is not set +CONFIG_USB_MUSB_SUNXI=y +CONFIG_USB_PHY=y From c5b44af2fc5ffe620405ccb743b6f4acc461d4de Mon Sep 17 00:00:00 2001 From: Soma Zambelly Date: Tue, 24 Aug 2021 23:46:08 +0200 Subject: [PATCH 17/26] realtek: add ZyXEL GS1900-24HPv2 support The ZyXEL GS1900-24HPv2 is a 24 port PoE switch with two SFP ports, similar to the other GS1900 switches. Specifications -------------- * Device: ZyXEL GS1900-24HPv2 * SoC: Realtek RTL8382M 500 MHz MIPS 4KEc * Flash: 16 MiB * RAM: W631GG8MB-12 128 MiB DDR3 SDRAM (stock firmware is configured to use only 64 MiB) * Ethernet: 24x 10/100/1000 Mbps, 2x SFP 100/1000 Mbps * LEDs: 1 PWR LED (green, not configurable) 1 SYS LED (green, configurable) 24 ethernet port link/activity LEDs (green, SoC controlled) 24 ethernet port PoE status LEDs 2 SFP status/activity LEDs (green, SoC controlled) * Buttons: 1 "RESTORE" button on front panel 1 "RESET" button on front panel * Power 120-240V AC C13 * UART: 1 serial header (J41) with populated standard pin connector on the left edge of the PCB, angled towards the side. The casing has a rectangular cutout on the side that provides external access to these pins. Pinout (front to back): + GND + TX + RX + VCC Serial connection parameters for both devices: 115200 8N1. Installation ------------ OEM upgrade method: (Possible on master once https://patchwork.ozlabs.org/project/openwrt/patch/20210624210408.19248-1-bjorn@mork.no/ is merged) * Log in to OEM management web interface * Navigate to Maintenance > Firmware > Management * If "Active Image" has the first option selected, OpenWrt will need to be flashed to the "Active" partition. If the second option is selected, OpenWrt will need to be flashed to the "Backup" partition. * Navigate to Maintenance > Firmware > Upload * Upload the openwrt-realtek-generic-zyxel_gs1900-24hp-v2-initramfs-kernel.bin file by your preferred method to the previously determined partition. When prompted, select to boot from the newly flashed image, and reboot the switch. * Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it: > sysupgrade -n /tmp/openwrt-realtek-generic-zyxel_gs1900-24hp-v2-squashfs-sysupgrade.bin it may be necessary to restart the network (/etc/init.d/network restart) on the running initramfs image. U-Boot TFTP method: * Configure your client with a static 192.168.1.x IP (e.g. 192.168.1.10). * Set up a TFTP server on your client and make it serve the initramfs image. * Connect serial, power up the switch, interrupt U-boot by hitting the space bar, and enable the network: > rtk network on * Since the GS1900-24HPv2 is a dual-partition device, you want to keep the OEM firmware on the backup partition for the time being. OpenWrt can only boot from the first partition anyway (hardcoded in the DTS). To make sure we are manipulating the first partition, issue the following commands: > setsys bootpartition 0 > savesys * Download the image onto the device and boot from it: > tftpboot 0x84f00000 192.168.1.10:openwrt-realtek-generic-zyxel_gs1900-24hp-v2-initramfs-kernel.bin > bootm * Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it: > sysupgrade -n /tmp/openwrt-realtek-generic-zyxel_gs1900-24hp-v2-squashfs-sysupgrade.bin it may be necessary to restart the network (/etc/init.d/network restart) on the running initramfs image. Signed-off-by: Soma Zambelly --- package/boot/uboot-envtools/files/realtek | 3 +- .../realtek/base-files/etc/board.d/02_network | 3 + .../dts/rtl8382_zyxel_gs1900-24hp-v2.dts | 117 ++++++++++++++++++ target/linux/realtek/image/Makefile | 9 ++ 4 files changed, 131 insertions(+), 1 deletion(-) create mode 100644 target/linux/realtek/dts/rtl8382_zyxel_gs1900-24hp-v2.dts diff --git a/package/boot/uboot-envtools/files/realtek b/package/boot/uboot-envtools/files/realtek index 75a399208e..914d15583b 100644 --- a/package/boot/uboot-envtools/files/realtek +++ b/package/boot/uboot-envtools/files/realtek @@ -14,7 +14,8 @@ d-link,dgs-1210-10p|\ zyxel,gs1900-8|\ zyxel,gs1900-8hp-v1|\ zyxel,gs1900-8hp-v2|\ -zyxel,gs1900-10hp) +zyxel,gs1900-10hp|\ +zyxel,gs1900-24hp-v2) idx="$(find_mtd_index u-boot-env)" [ -n "$idx" ] && \ ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x400" "0x10000" diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network index 6568017b52..58461c9c99 100644 --- a/target/linux/realtek/base-files/etc/board.d/02_network +++ b/target/linux/realtek/base-files/etc/board.d/02_network @@ -61,6 +61,9 @@ zyxel,gs1900-8hp-v1|\ zyxel,gs1900-8hp-v2) ucidef_set_poe 70 "$lan_list" ;; +zyxel,gs1900-24hp-v2) + ucidef_set_poe 170 "$lan_list" + ;; esac board_config_flush diff --git a/target/linux/realtek/dts/rtl8382_zyxel_gs1900-24hp-v2.dts b/target/linux/realtek/dts/rtl8382_zyxel_gs1900-24hp-v2.dts new file mode 100644 index 0000000000..c16152521e --- /dev/null +++ b/target/linux/realtek/dts/rtl8382_zyxel_gs1900-24hp-v2.dts @@ -0,0 +1,117 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "rtl8380_zyxel_gs1900.dtsi" + +/ { + compatible = "zyxel,gs1900-24hp-v2", "realtek,rtl838x-soc"; + model = "ZyXEL GS1900-24HP v2 Switch"; + + /* i2c of the left SFP cage: port 25 */ + i2c0: i2c-gpio-0 { + compatible = "i2c-gpio"; + sda-gpios = <&gpio1 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio1 25 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <2>; + #address-cells = <1>; + #size-cells = <0>; + }; + + sfp0: sfp-p25 { + compatible = "sff,sfp"; + i2c-bus = <&i2c0>; + los-gpio = <&gpio1 27 GPIO_ACTIVE_HIGH>; + tx-fault-gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio1 26 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio1 23 GPIO_ACTIVE_HIGH>; + }; + + /* i2c of the right SFP cage: port 26 */ + i2c1: i2c-gpio-1 { + compatible = "i2c-gpio"; + sda-gpios = <&gpio1 30 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio1 31 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <2>; + #address-cells = <1>; + #size-cells = <0>; + }; + + sfp1: sfp-p26 { + compatible = "sff,sfp"; + i2c-bus = <&i2c1>; + los-gpio = <&gpio1 33 GPIO_ACTIVE_HIGH>; + tx-fault-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio1 32 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio1 29 GPIO_ACTIVE_HIGH>; + }; +}; + +&mdio { + EXTERNAL_PHY(0) + EXTERNAL_PHY(1) + EXTERNAL_PHY(2) + EXTERNAL_PHY(3) + EXTERNAL_PHY(4) + EXTERNAL_PHY(5) + EXTERNAL_PHY(6) + EXTERNAL_PHY(7) + + EXTERNAL_PHY(16) + EXTERNAL_PHY(17) + EXTERNAL_PHY(18) + EXTERNAL_PHY(19) + EXTERNAL_PHY(20) + EXTERNAL_PHY(21) + EXTERNAL_PHY(22) + EXTERNAL_PHY(23) + + INTERNAL_PHY(24) + INTERNAL_PHY(26) +}; + +&switch0 { + ports { + SWITCH_PORT(0, 1, qsgmii) + SWITCH_PORT(1, 2, qsgmii) + SWITCH_PORT(2, 3, qsgmii) + SWITCH_PORT(3, 4, qsgmii) + SWITCH_PORT(4, 5, qsgmii) + SWITCH_PORT(5, 6, qsgmii) + SWITCH_PORT(6, 7, qsgmii) + SWITCH_PORT(7, 8, qsgmii) + + SWITCH_PORT(8, 9, internal) + SWITCH_PORT(9, 10, internal) + SWITCH_PORT(10, 11, internal) + SWITCH_PORT(11, 12, internal) + SWITCH_PORT(12, 13, internal) + SWITCH_PORT(13, 14, internal) + SWITCH_PORT(14, 15, internal) + SWITCH_PORT(15, 16, internal) + + SWITCH_PORT(16, 17, qsgmii) + SWITCH_PORT(17, 18, qsgmii) + SWITCH_PORT(18, 19, qsgmii) + SWITCH_PORT(19, 20, qsgmii) + SWITCH_PORT(20, 21, qsgmii) + SWITCH_PORT(21, 22, qsgmii) + SWITCH_PORT(22, 23, qsgmii) + SWITCH_PORT(23, 24, qsgmii) + + + port@24 { + reg = <24>; + label = "lan25"; + phy-mode = "1000base-x"; + managed = "in-band-status"; + sfp = <&sfp0>; + }; + + port@26 { + reg = <26>; + label = "lan26"; + phy-mode = "1000base-x"; + managed = "in-band-status"; + sfp = <&sfp1>; + }; + }; +}; diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile index cf0d588851..5900750797 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -153,4 +153,13 @@ define Device/zyxel_gs1900-8hp-v2 endef TARGET_DEVICES += zyxel_gs1900-8hp-v2 +define Device/zyxel_gs1900-24hp-v2 + $(Device/zyxel_gs1900) + SOC := rtl8382 + DEVICE_MODEL := GS1900-24HP + DEVICE_VARIANT := v2 + ZYXEL_VERS := ABTP +endef +TARGET_DEVICES += zyxel_gs1900-24hp-v2 + $(eval $(call BuildImage)) From 0dbe754e4328e1ade02b29f25f0ebc633305d5bb Mon Sep 17 00:00:00 2001 From: Pawel Dembicki Date: Wed, 29 Apr 2020 18:12:51 +0200 Subject: [PATCH 18/26] kirkwood: increase kernel size of Linksyses Linksyses Audi EA3500 and Viper E4200/E4500 have too small kernel partition size when kernel 5.10 is used. This patch change kernel partition to maximum size allowed by u-boot. Kernel size is overlapping rootfs now, like mvebu Linksyses and stock partition table. It fix back to stock via sysupgrade, which was broken since 18.06. Fixes: 9808b9ae02 ("kirkwood: switch to kernel 4.9") Signed-off-by: Pawel Dembicki --- .../base-files/etc/board.d/05_compat-version | 2 +- .../arch/arm/boot/dts/kirkwood-ea3500.dts | 12 +++++------ target/linux/kirkwood/image/Makefile | 21 +++++++++++-------- .../patches-5.10/105-linksys-viper-dts.patch | 21 ++++++++++++------- .../patches-5.4/105-linksys-viper-dts.patch | 21 ++++++++++++------- 5 files changed, 47 insertions(+), 30 deletions(-) diff --git a/target/linux/kirkwood/base-files/etc/board.d/05_compat-version b/target/linux/kirkwood/base-files/etc/board.d/05_compat-version index 267730b1b8..c6026c481f 100644 --- a/target/linux/kirkwood/base-files/etc/board.d/05_compat-version +++ b/target/linux/kirkwood/base-files/etc/board.d/05_compat-version @@ -11,7 +11,7 @@ case "$(board_name)" in linksys,e4200-v2|\ linksys,ea3500|\ linksys,ea4500) - ucidef_set_compat_version "1.1" + ucidef_set_compat_version "2.0" ;; esac diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-ea3500.dts b/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-ea3500.dts index b41243d8dd..f8f940dfc6 100644 --- a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-ea3500.dts +++ b/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-ea3500.dts @@ -165,22 +165,22 @@ partition@200000 { label = "kernel1"; - reg = <0x200000 0x290000>; + reg = <0x200000 0x1400000>; }; - partition@490000 { + partition@500000 { label = "rootfs1"; - reg = <0x490000 0x1170000>; + reg = <0x500000 0x1100000>; }; partition@1600000 { label = "kernel2"; - reg = <0x1600000 0x290000>; + reg = <0x1600000 0x1400000>; }; - partition@1890000 { + partition@1900000 { label = "rootfs2"; - reg = <0x1890000 0x1170000>; + reg = <0x1900000 0x1100000>; }; partition@2a00000 { diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile index c2c5bcab8f..f1cd2611d2 100644 --- a/target/linux/kirkwood/image/Makefile +++ b/target/linux/kirkwood/image/Makefile @@ -7,9 +7,12 @@ include $(INCLUDE_DIR)/image.mk KERNEL_LOADADDR:=0x8000 -define Device/dsa-migration - DEVICE_COMPAT_VERSION := 1.1 - DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA +define Device/kernel-size-migration + DEVICE_COMPAT_VERSION := 2.0 + DEVICE_COMPAT_MESSAGE := Partition design has changed compared to \ + older versions (up to 21.02) due to kernel size restrictions. \ + Upgrade via sysupgrade mechanism is not possible, so new \ + installation via factory style image is required. endef define Device/Default @@ -110,31 +113,31 @@ endef define Device/linksys_e4200-v2 $(Device/linksys) - $(Device/dsa-migration) + $(Device/kernel-size-migration) DEVICE_MODEL := E4200 DEVICE_VARIANT := v2 - KERNEL_SIZE := 2688k + KERNEL_SIZE := 3072k SUPPORTED_DEVICES += linksys,viper linksys-viper endef TARGET_DEVICES += linksys_e4200-v2 define Device/linksys_ea3500 $(Device/linksys) - $(Device/dsa-migration) + $(Device/kernel-size-migration) DEVICE_MODEL := EA3500 PAGESIZE := 512 SUBPAGESIZE := 256 BLOCKSIZE := 16k - KERNEL_SIZE := 2624k + KERNEL_SIZE := 3072k SUPPORTED_DEVICES += linksys,audi linksys-audi endef TARGET_DEVICES += linksys_ea3500 define Device/linksys_ea4500 $(Device/linksys) - $(Device/dsa-migration) + $(Device/kernel-size-migration) DEVICE_MODEL := EA4500 - KERNEL_SIZE := 2688k + KERNEL_SIZE := 3072k SUPPORTED_DEVICES += linksys,viper linksys-viper endef TARGET_DEVICES += linksys_ea4500 diff --git a/target/linux/kirkwood/patches-5.10/105-linksys-viper-dts.patch b/target/linux/kirkwood/patches-5.10/105-linksys-viper-dts.patch index 0d97ad14a2..d56a469d94 100644 --- a/target/linux/kirkwood/patches-5.10/105-linksys-viper-dts.patch +++ b/target/linux/kirkwood/patches-5.10/105-linksys-viper-dts.patch @@ -23,30 +23,37 @@ }; white-pulse { -@@ -114,22 +119,22 @@ +@@ -114,23 +119,23 @@ }; partition@200000 { - label = "kernel"; +- reg = <0x200000 0x2A0000>; + label = "kernel1"; - reg = <0x200000 0x2A0000>; ++ reg = <0x200000 0x1A00000>; }; - partition@4a0000 { +- partition@4a0000 { - label = "rootfs"; +- reg = <0x4A0000 0x1760000>; ++ partition@500000 { + label = "rootfs1"; - reg = <0x4A0000 0x1760000>; ++ reg = <0x500000 0x1700000>; }; partition@1c00000 { - label = "alt_kernel"; +- reg = <0x1C00000 0x2A0000>; + label = "kernel2"; - reg = <0x1C00000 0x2A0000>; ++ reg = <0x1C00000 0x1A00000>; }; - partition@1ea0000 { +- partition@1ea0000 { - label = "alt_rootfs"; +- reg = <0x1EA0000 0x1760000>; ++ partition@1f00000 { + label = "rootfs2"; - reg = <0x1EA0000 0x1760000>; ++ reg = <0x1F00000 0x1700000>; }; + partition@3600000 { diff --git a/target/linux/kirkwood/patches-5.4/105-linksys-viper-dts.patch b/target/linux/kirkwood/patches-5.4/105-linksys-viper-dts.patch index 0d97ad14a2..d56a469d94 100644 --- a/target/linux/kirkwood/patches-5.4/105-linksys-viper-dts.patch +++ b/target/linux/kirkwood/patches-5.4/105-linksys-viper-dts.patch @@ -23,30 +23,37 @@ }; white-pulse { -@@ -114,22 +119,22 @@ +@@ -114,23 +119,23 @@ }; partition@200000 { - label = "kernel"; +- reg = <0x200000 0x2A0000>; + label = "kernel1"; - reg = <0x200000 0x2A0000>; ++ reg = <0x200000 0x1A00000>; }; - partition@4a0000 { +- partition@4a0000 { - label = "rootfs"; +- reg = <0x4A0000 0x1760000>; ++ partition@500000 { + label = "rootfs1"; - reg = <0x4A0000 0x1760000>; ++ reg = <0x500000 0x1700000>; }; partition@1c00000 { - label = "alt_kernel"; +- reg = <0x1C00000 0x2A0000>; + label = "kernel2"; - reg = <0x1C00000 0x2A0000>; ++ reg = <0x1C00000 0x1A00000>; }; - partition@1ea0000 { +- partition@1ea0000 { - label = "alt_rootfs"; +- reg = <0x1EA0000 0x1760000>; ++ partition@1f00000 { + label = "rootfs2"; - reg = <0x1EA0000 0x1760000>; ++ reg = <0x1F00000 0x1700000>; }; + partition@3600000 { From ba59466bf4978c977c6860c8f9ba4b2de1c3ab2c Mon Sep 17 00:00:00 2001 From: Daniel Danzberger Date: Mon, 13 Sep 2021 06:23:29 +0200 Subject: [PATCH 19/26] octeontx: add linux 5.10 testing kernel support Changes from 5.4 to 5.10: ------------------------- - patches from 5.4 are all upstream for 5.10 execpt for 0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch - disable block device data integrity (DIF/DIX/T10) in default config (CONFIG_BLK_DEV_INTEGRITY) This feature is only supported by: - Enterprise SAS/SCSI HBAs and Disks - Software raid - NVMEs with metadata capabilities (most don't have this) None of which are part of any octeontx boards. - arm64 TEXT_OFFSET (0x80000) has been removed after 5.4 This will break Uimages with kernel load addresses that aren't 2MiB aligned any longer. Resulting in the kernel silently fail to boot. For Gatworks newport boards for example, the uimage kernel load and execute address is 0x20080000. These need to be changed to 0x20000000 when running kernels beyond 5.4. Tested-on: Gateworks Newport GW64xx Signed-off-by: Daniel Danzberger --- target/linux/octeontx/Makefile | 1 + target/linux/octeontx/config-5.10 | 423 ++++++++++++++++++ ...r-Gateworks-PLX-PEX860x-switch-with-.patch | 59 +++ 3 files changed, 483 insertions(+) create mode 100644 target/linux/octeontx/config-5.10 create mode 100644 target/linux/octeontx/patches-5.10/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch diff --git a/target/linux/octeontx/Makefile b/target/linux/octeontx/Makefile index c30799b744..44bbc76a43 100644 --- a/target/linux/octeontx/Makefile +++ b/target/linux/octeontx/Makefile @@ -10,6 +10,7 @@ BOARDNAME:=Octeon-TX FEATURES:=targz pcie gpio rtc usb fpu KERNEL_PATCHVER:=5.4 +KERNEL_TESTING_PATCHVER:=5.10 define Target/Description Build images for Octeon-TX CN80XX/CN81XX based boards diff --git a/target/linux/octeontx/config-5.10 b/target/linux/octeontx/config-5.10 new file mode 100644 index 0000000000..6e9cdc1de2 --- /dev/null +++ b/target/linux/octeontx/config-5.10 @@ -0,0 +1,423 @@ +CONFIG_64BIT=y +CONFIG_ARCH_DMA_ADDR_T_64BIT=y +CONFIG_ARCH_HIBERNATION_HEADER=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_KEEP_MEMBLOCK=y +CONFIG_ARCH_MMAP_RND_BITS=18 +CONFIG_ARCH_MMAP_RND_BITS_MAX=33 +CONFIG_ARCH_MMAP_RND_BITS_MIN=18 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11 +CONFIG_ARCH_PROC_KCORE_TEXT=y +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_ARCH_SPARSEMEM_DEFAULT=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_STACKWALK=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ARCH_THUNDER=y +CONFIG_ARM64=y +CONFIG_ARM64_4K_PAGES=y +CONFIG_ARM64_CNP=y +CONFIG_ARM64_CRYPTO=y +CONFIG_ARM64_ERRATUM_1165522=y +CONFIG_ARM64_ERRATUM_1286807=y +CONFIG_ARM64_ERRATUM_819472=y +CONFIG_ARM64_ERRATUM_824069=y +CONFIG_ARM64_ERRATUM_826319=y +CONFIG_ARM64_ERRATUM_827319=y +CONFIG_ARM64_ERRATUM_843419=y +CONFIG_ARM64_HW_AFDBM=y +CONFIG_ARM64_MODULE_PLTS=y +CONFIG_ARM64_PAGE_SHIFT=12 +CONFIG_ARM64_PAN=y +CONFIG_ARM64_PA_BITS=48 +CONFIG_ARM64_PA_BITS_48=y +CONFIG_ARM64_PTR_AUTH=y +CONFIG_ARM64_SVE=y +CONFIG_ARM64_TAGGED_ADDR_ABI=y +CONFIG_ARM64_UAO=y +CONFIG_ARM64_VA_BITS=48 +# CONFIG_ARM64_VA_BITS_39 is not set +CONFIG_ARM64_VA_BITS_48=y +CONFIG_ARM64_VHE=y +CONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y +CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y +CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y +CONFIG_ARM_AMBA=y +CONFIG_ARM_ARCH_TIMER=y +CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y +CONFIG_ARM_CPUIDLE=y +CONFIG_ARM_GIC=y +CONFIG_ARM_GIC_V2M=y +CONFIG_ARM_GIC_V3=y +CONFIG_ARM_GIC_V3_ITS=y +CONFIG_ARM_GIC_V3_ITS_PCI=y +CONFIG_ARM_PSCI_FW=y +CONFIG_ARM_SBSA_WATCHDOG=y +CONFIG_ATA=y +# CONFIG_ATA_SFF is not set +CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y +CONFIG_BALLOON_COMPACTION=y +CONFIG_BLK_DEV_BSG=y +CONFIG_BLK_DEV_BSGLIB=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_MQ_PCI=y +CONFIG_BLK_MQ_VIRTIO=y +CONFIG_BLK_PM=y +CONFIG_BLK_SCSI_REQUEST=y +CONFIG_CAVIUM_ERRATUM_22375=y +CONFIG_CAVIUM_ERRATUM_23144=y +CONFIG_CAVIUM_ERRATUM_23154=y +CONFIG_CAVIUM_ERRATUM_27456=y +CONFIG_CAVIUM_ERRATUM_30115=y +CONFIG_CAVIUM_TX2_ERRATUM_219=y +CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y +CONFIG_CLKDEV_LOOKUP=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_CMA=y +CONFIG_CMA_ALIGNMENT=8 +CONFIG_CMA_AREAS=7 +# CONFIG_CMA_DEBUG is not set +# CONFIG_CMA_DEBUGFS is not set +CONFIG_CMA_SIZE_MBYTES=16 +# CONFIG_CMA_SIZE_SEL_MAX is not set +CONFIG_CMA_SIZE_SEL_MBYTES=y +# CONFIG_CMA_SIZE_SEL_MIN is not set +# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set +CONFIG_COMMON_CLK=y +CONFIG_COMMON_CLK_CS2000_CP=y +# CONFIG_COMPAT_32BIT_TIME is not set +CONFIG_CONFIGFS_FS=y +CONFIG_CONTIG_ALLOC=y +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_GOV_MENU=y +CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y +CONFIG_CPU_PM=y +CONFIG_CPU_RMAP=y +CONFIG_CRASH_CORE=y +CONFIG_CRASH_DUMP=y +CONFIG_CRC16=y +CONFIG_CRC7=y +CONFIG_CRC_ITU_T=y +CONFIG_CRC_T10DIF=y +CONFIG_CRYPTO_AES_ARM64=y +CONFIG_CRYPTO_AES_ARM64_CE=y +CONFIG_CRYPTO_AES_ARM64_CE_BLK=y +CONFIG_CRYPTO_AES_ARM64_CE_CCM=y +CONFIG_CRYPTO_ANSI_CPRNG=y +CONFIG_CRYPTO_CRC32=y +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_CRCT10DIF=y +CONFIG_CRYPTO_CRYPTD=y +CONFIG_CRYPTO_DRBG=y +CONFIG_CRYPTO_DRBG_HMAC=y +CONFIG_CRYPTO_DRBG_MENU=y +CONFIG_CRYPTO_ECHAINIV=y +CONFIG_CRYPTO_GF128MUL=y +CONFIG_CRYPTO_GHASH_ARM64_CE=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_JITTERENTROPY=y +CONFIG_CRYPTO_LIB_SHA256=y +CONFIG_CRYPTO_NULL2=y +CONFIG_CRYPTO_RNG=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_RNG_DEFAULT=y +CONFIG_CRYPTO_SHA1=y +CONFIG_CRYPTO_SHA1_ARM64_CE=y +CONFIG_CRYPTO_SHA256=y +CONFIG_CRYPTO_SHA256_ARM64=y +CONFIG_CRYPTO_SHA2_ARM64_CE=y +CONFIG_CRYPTO_SIMD=y +CONFIG_DCACHE_WORD_ACCESS=y +CONFIG_DMADEVICES=y +CONFIG_DMA_CMA=y +CONFIG_DMA_DIRECT_REMAP=y +CONFIG_DMA_ENGINE=y +CONFIG_DMA_OF=y +CONFIG_DMA_PERNUMA_CMA=y +CONFIG_DMA_REMAP=y +CONFIG_DMA_SHARED_BUFFER=y +CONFIG_DTC=y +CONFIG_DT_IDLE_STATES=y +CONFIG_EDAC=y +# CONFIG_EDAC_DEBUG is not set +# CONFIG_EDAC_DMC520 is not set +CONFIG_EDAC_LEGACY_SYSFS=y +CONFIG_EDAC_SUPPORT=y +CONFIG_EDAC_THUNDERX=y +# CONFIG_EDAC_XGENE is not set +CONFIG_EEPROM_AT24=y +CONFIG_FIXED_PHY=y +CONFIG_FIX_EARLYCON_MEM=y +CONFIG_FRAME_POINTER=y +CONFIG_FREEZER=y +CONFIG_FS_IOMAP=y +CONFIG_FS_MBCACHE=y +CONFIG_FS_POSIX_ACL=y +CONFIG_FUJITSU_ERRATUM_010001=y +CONFIG_FW_CACHE=y +CONFIG_FW_LOADER_PAGED_BUF=y +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_GENERIC_ARCH_TOPOLOGY=y +CONFIG_GENERIC_BUG=y +CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y +CONFIG_GENERIC_CPU_AUTOPROBE=y +CONFIG_GENERIC_CPU_VULNERABILITIES=y +CONFIG_GENERIC_CSUM=y +CONFIG_GENERIC_EARLY_IOREMAP=y +CONFIG_GENERIC_GETTIMEOFDAY=y +CONFIG_GENERIC_IDLE_POLL_SETUP=y +CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y +CONFIG_GENERIC_IRQ_MIGRATION=y +CONFIG_GENERIC_IRQ_MULTI_HANDLER=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_GENERIC_MSI_IRQ=y +CONFIG_GENERIC_MSI_IRQ_DOMAIN=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_PHY=y +CONFIG_GENERIC_SCHED_CLOCK=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GENERIC_TIME_VSYSCALL=y +CONFIG_GLOB=y +CONFIG_GPIOLIB=y +CONFIG_GPIOLIB_IRQCHIP=y +CONFIG_GPIO_PCA953X=y +CONFIG_GPIO_PCA953X_IRQ=y +CONFIG_GPIO_THUNDERX=y +CONFIG_HANDLE_DOMAIN_IRQ=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT_MAP=y +CONFIG_HIBERNATE_CALLBACKS=y +CONFIG_HIBERNATION=y +CONFIG_HIBERNATION_SNAPSHOT_DEV=y +CONFIG_HOLES_IN_ZONE=y +CONFIG_HOTPLUG_CPU=y +CONFIG_HUGETLBFS=y +CONFIG_HUGETLB_PAGE=y +CONFIG_HWSPINLOCK=y +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_CAVIUM=y +CONFIG_HW_RANDOM_OPTEE=y +CONFIG_I2C=y +CONFIG_I2C_ALGOBIT=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX=y +CONFIG_I2C_SMBUS=y +CONFIG_I2C_THUNDERX=y +CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 +CONFIG_INITRAMFS_SOURCE="" +CONFIG_IRQCHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_DOMAIN_HIERARCHY=y +CONFIG_IRQ_FASTEOI_HIERARCHY_HANDLERS=y +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_IRQ_TIME_ACCOUNTING=y +CONFIG_IRQ_WORK=y +# CONFIG_ISDN is not set +CONFIG_JBD2=y +CONFIG_JUMP_LABEL=y +CONFIG_KEXEC=y +CONFIG_KEXEC_CORE=y +CONFIG_KSM=y +CONFIG_LIBFDT=y +CONFIG_LLD_VERSION=0 +CONFIG_LOCK_DEBUGGING_SUPPORT=y +CONFIG_LOCK_SPIN_ON_OWNER=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_MAILBOX=y +# CONFIG_MAILBOX_TEST is not set +CONFIG_MDIO_BUS=y +CONFIG_MDIO_CAVIUM=y +CONFIG_MDIO_DEVICE=y +CONFIG_MDIO_DEVRES=y +CONFIG_MDIO_THUNDER=y +CONFIG_MEMFD_CREATE=y +CONFIG_MEMORY_BALLOON=y +CONFIG_MEMORY_ISOLATION=y +CONFIG_MEMTEST=y +CONFIG_MFD_SYSCON=y +CONFIG_MIGRATION=y +CONFIG_MMC=y +CONFIG_MMC_BLOCK=y +CONFIG_MMC_CAVIUM_THUNDERX=y +CONFIG_MODULES_USE_ELF_RELA=y +CONFIG_MSDOS_FS=y +# CONFIG_MTD is not set +CONFIG_MUTEX_SPIN_ON_OWNER=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NEED_MULTIPLE_NODES=y +CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y +CONFIG_NEED_SG_DMA_LENGTH=y +CONFIG_NET_FLOW_LIMIT=y +CONFIG_NLS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NODES_SHIFT=2 +CONFIG_NO_HZ_COMMON=y +CONFIG_NO_HZ_IDLE=y +CONFIG_NR_CPUS=64 +CONFIG_NUMA=y +CONFIG_NUMA_BALANCING=y +CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y +CONFIG_NVMEM=y +CONFIG_NVMEM_SYSFS=y +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IRQ=y +CONFIG_OF_KOBJ=y +CONFIG_OF_MDIO=y +CONFIG_OF_NET=y +CONFIG_OF_NUMA=y +CONFIG_OPTEE=y +CONFIG_OPTEE_SHM_NUM_PRIV_PAGES=1 +CONFIG_PADATA=y +CONFIG_PAGE_REPORTING=y +CONFIG_PARAVIRT=y +CONFIG_PARTITION_PERCPU=y +CONFIG_PCI=y +CONFIG_PCIEAER=y +CONFIG_PCIEPORTBUS=y +CONFIG_PCIE_PME=y +CONFIG_PCI_ATS=y +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_DOMAINS_GENERIC=y +CONFIG_PCI_ECAM=y +CONFIG_PCI_HOST_COMMON=y +CONFIG_PCI_HOST_GENERIC=y +CONFIG_PCI_HOST_THUNDER_ECAM=y +CONFIG_PCI_HOST_THUNDER_PEM=y +CONFIG_PCI_IOV=y +CONFIG_PCI_MSI=y +CONFIG_PCI_MSI_IRQ_DOMAIN=y +CONFIG_PGTABLE_LEVELS=4 +CONFIG_PHYLIB=y +CONFIG_PHYS_ADDR_T_64BIT=y +CONFIG_PM=y +CONFIG_PM_CLK=y +CONFIG_PM_SLEEP=y +CONFIG_PM_SLEEP_SMP=y +CONFIG_PM_STD_PARTITION="" +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_POWER_RESET_XGENE=y +CONFIG_POWER_SUPPLY=y +CONFIG_PROC_VMCORE=y +CONFIG_QUEUED_RWLOCKS=y +CONFIG_QUEUED_SPINLOCKS=y +CONFIG_RAS=y +CONFIG_RATIONAL=y +# CONFIG_RAVE_SP_CORE is not set +CONFIG_REBOOT_MODE=y +CONFIG_REGMAP=y +CONFIG_REGMAP_I2C=y +CONFIG_REGMAP_MMIO=y +CONFIG_RESET_CONTROLLER=y +CONFIG_RFS_ACCEL=y +CONFIG_RODATA_FULL_DEFAULT_ENABLED=y +CONFIG_RPS=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_DS1672=y +CONFIG_RTC_I2C_AND_SPI=y +CONFIG_RWSEM_SPIN_ON_OWNER=y +CONFIG_SATA_AHCI=y +CONFIG_SATA_AHCI_PLATFORM=y +CONFIG_SATA_HOST=y +CONFIG_SCHED_INFO=y +CONFIG_SCHED_MC=y +CONFIG_SCSI=y +# CONFIG_SCSI_LOWLEVEL is not set +# CONFIG_SCSI_PROC_FS is not set +CONFIG_SCSI_SAS_ATA=y +CONFIG_SCSI_SAS_ATTRS=y +CONFIG_SCSI_SAS_HOST_SMP=y +CONFIG_SCSI_SAS_LIBSAS=y +CONFIG_SECCOMP=y +CONFIG_SECCOMP_FILTER=y +CONFIG_SERIAL_8250_DW=y +CONFIG_SERIAL_8250_DWLIB=y +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_FSL=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_DEV_BUS=y +CONFIG_SERIAL_DEV_CTRL_TTYPORT=y +CONFIG_SERIAL_MCTRL_GPIO=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SERIAL_XILINX_PS_UART=y +CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y +CONFIG_SG_POOL=y +CONFIG_SMP=y +CONFIG_SPARSEMEM=y +CONFIG_SPARSEMEM_EXTREME=y +CONFIG_SPARSEMEM_MANUAL=y +CONFIG_SPARSEMEM_VMEMMAP=y +CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y +CONFIG_SPARSE_IRQ=y +CONFIG_SPI=y +CONFIG_SPI_MASTER=y +CONFIG_SPI_THUNDERX=y +CONFIG_SRAM=y +CONFIG_SRCU=y +CONFIG_SWIOTLB=y +CONFIG_SWPHY=y +CONFIG_SYNC_FILE=y +CONFIG_SYSCON_REBOOT_MODE=y +CONFIG_SYSCTL_EXCEPTION_TRACE=y +CONFIG_SYS_SUPPORTS_HUGETLBFS=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +CONFIG_TASK_XACCT=y +CONFIG_TEE=y +CONFIG_THREAD_INFO_IN_TASK=y +CONFIG_THUNDER_NIC_BGX=y +CONFIG_THUNDER_NIC_PF=y +CONFIG_THUNDER_NIC_RGX=y +CONFIG_THUNDER_NIC_VF=y +CONFIG_TICK_CPU_ACCOUNTING=y +CONFIG_TIMER_OF=y +CONFIG_TIMER_PROBE=y +CONFIG_TRANSPARENT_HUGEPAGE=y +CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y +# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set +CONFIG_TRANSPARENT_HUGE_PAGECACHE=y +CONFIG_TREE_RCU=y +CONFIG_TREE_SRCU=y +CONFIG_UNMAP_KERNEL_AT_EL0=y +CONFIG_USB=y +CONFIG_USB_COMMON=y +CONFIG_USB_PCI=y +CONFIG_USB_SUPPORT=y +# CONFIG_USB_UHCI_HCD is not set +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_PCI=y +CONFIG_USB_XHCI_PLATFORM=y +CONFIG_USE_PERCPU_NUMA_NODE_ID=y +CONFIG_VIRTIO=y +CONFIG_VIRTIO_BALLOON=y +# CONFIG_VIRTIO_BLK is not set +CONFIG_VIRTIO_MMIO=y +# CONFIG_VIRTIO_NET is not set +CONFIG_VIRTIO_PCI=y +CONFIG_VIRTIO_PCI_LEGACY=y +CONFIG_VMAP_STACK=y +CONFIG_WATCHDOG_CORE=y +CONFIG_XARRAY_MULTI=y +CONFIG_XPS=y +CONFIG_XXHASH=y +CONFIG_ZONE_DMA32=y diff --git a/target/linux/octeontx/patches-5.10/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch b/target/linux/octeontx/patches-5.10/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch new file mode 100644 index 0000000000..e33a28e953 --- /dev/null +++ b/target/linux/octeontx/patches-5.10/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch @@ -0,0 +1,59 @@ +From d0ff7a1bcfe886cab1a237895b08ac51ecfe10e7 Mon Sep 17 00:00:00 2001 +From: Tim Harvey +Date: Wed, 10 Apr 2019 08:00:47 -0700 +Subject: [PATCH 04/12] PCI: add quirk for Gateworks PLX PEX860x switch with + GPIO PERST# + +Gateworks boards use PLX PEX860x switches where downstream ports +have their PERST# driven from the PEX GPIO. + +Signed-off-by: Tim Harvey +--- + drivers/pci/quirks.c | 32 ++++++++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + +--- a/drivers/pci/quirks.c ++++ b/drivers/pci/quirks.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -5625,3 +5626,34 @@ static void apex_pci_fixup_class(struct + } + DECLARE_PCI_FIXUP_CLASS_HEADER(0x1ac1, 0x089a, + PCI_CLASS_NOT_DEFINED, 8, apex_pci_fixup_class); ++ ++#ifdef CONFIG_PCI_HOST_THUNDER_PEM ++/* ++ * fixup for PLX PEX8909 bridge to configure GPIO1-7 as output High ++ * as they are used for slots1-7 PERST# ++ */ ++static void newport_pciesw_early_fixup(struct pci_dev *dev) ++{ ++ u32 dw; ++ ++ if (!of_machine_is_compatible("gw,newport")) ++ return; ++ ++ if (dev->devfn != 0) ++ return; ++ ++ dev_info(&dev->dev, "de-asserting PERST#\n"); ++ pci_read_config_dword(dev, 0x62c, &dw); ++ dw |= 0xaaa8; /* GPIO1-7 outputs */ ++ pci_write_config_dword(dev, 0x62c, dw); ++ ++ pci_read_config_dword(dev, 0x644, &dw); ++ dw |= 0xfe; /* GPIO1-7 output high */ ++ pci_write_config_dword(dev, 0x644, dw); ++ ++ msleep(100); ++} ++DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLX, 0x8609, newport_pciesw_early_fixup); ++DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLX, 0x8606, newport_pciesw_early_fixup); ++DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLX, 0x8604, newport_pciesw_early_fixup); ++#endif /* CONFIG_PCI_HOST_THUNDER_PEM */ From 7d92bb0509615550b98e2dc71091073c8258d564 Mon Sep 17 00:00:00 2001 From: Ivan Pavlov Date: Sun, 5 Sep 2021 23:08:35 +0300 Subject: [PATCH 20/26] wolfssl: update to 4.8.1-stable Changes from 4.7.0: Fix one high (OCSP verification issue) and two low vulnerabilities Improve compatibility layer Other improvements and fixes For detailed changes refer to https://github.com/wolfSSL/wolfssl/releases Signed-off-by: Ivan Pavlov --- package/libs/wolfssl/Makefile | 6 +++--- ...m-change-asm-snippets-to-get-compiling.patch | 17 +++++------------ .../patches/100-disable-hardening-check.patch | 2 +- package/libs/wolfssl/patches/200-ecc-rng.patch | 4 ++-- 4 files changed, 11 insertions(+), 18 deletions(-) diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile index 0c95288a2a..6ef80e88a9 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.7.0-stable -PKG_RELEASE:=2 +PKG_VERSION:=4.8.1-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:=b0e740b31d4d877d540ad50cc539a8873fc41af02bd3091c4357b403f7106e31 +PKG_HASH:=50db45f348f47e00c93dd244c24108220120cb3cc9d01434789229c32937c444 PKG_FIXUP:=libtool libtool-abiver PKG_INSTALL:=1 diff --git a/package/libs/wolfssl/patches/001-Maths-x86-asm-change-asm-snippets-to-get-compiling.patch b/package/libs/wolfssl/patches/001-Maths-x86-asm-change-asm-snippets-to-get-compiling.patch index 091b241285..763f9e8d06 100644 --- a/package/libs/wolfssl/patches/001-Maths-x86-asm-change-asm-snippets-to-get-compiling.patch +++ b/package/libs/wolfssl/patches/001-Maths-x86-asm-change-asm-snippets-to-get-compiling.patch @@ -13,8 +13,6 @@ SP_ASM_MUL_ADD2 and SP_ASM_SQR_ADD. wolfcrypt/src/sp_int.c | 6 +++--- 2 files changed, 23 insertions(+), 12 deletions(-) -diff --git a/wolfcrypt/src/asm.c b/wolfcrypt/src/asm.c -index b7f53d073..a37e75e02 100644 --- a/wolfcrypt/src/asm.c +++ b/wolfcrypt/src/asm.c @@ -698,33 +698,39 @@ __asm__( \ @@ -64,7 +62,7 @@ index b7f53d073..a37e75e02 100644 #define SQRADDAC(i, j) \ __asm__( \ -@@ -733,7 +739,9 @@ __asm__( \ +@@ -733,7 +739,9 @@ __asm__( "addl %%eax,%0 \n\t" \ "adcl %%edx,%1 \n\t" \ "adcl $0,%2 \n\t" \ @@ -75,7 +73,7 @@ index b7f53d073..a37e75e02 100644 #define SQRADDDB \ __asm__( \ -@@ -743,7 +751,10 @@ __asm__( \ +@@ -743,7 +751,10 @@ __asm__( "addl %6,%0 \n\t" \ "adcl %7,%1 \n\t" \ "adcl %8,%2 \n\t" \ @@ -87,11 +85,9 @@ index b7f53d073..a37e75e02 100644 #elif defined(TFM_X86_64) /* x86-64 optimized */ -diff --git a/wolfcrypt/src/sp_int.c b/wolfcrypt/src/sp_int.c -index 6070faaa9..d26702e47 100644 --- a/wolfcrypt/src/sp_int.c +++ b/wolfcrypt/src/sp_int.c -@@ -477,7 +477,7 @@ static WC_INLINE sp_int_digit sp_div_word(sp_int_digit hi, sp_int_digit lo, +@@ -476,7 +476,7 @@ static WC_INLINE sp_int_digit sp_div_wor "addl %%eax, %[l] \n\t" \ "adcl %%edx, %[h] \n\t" \ "adcl $0 , %[o] \n\t" \ @@ -100,7 +96,7 @@ index 6070faaa9..d26702e47 100644 : [a] "r" (va), [b] "r" (vb) \ : "eax", "edx", "cc" \ ) -@@ -503,7 +503,7 @@ static WC_INLINE sp_int_digit sp_div_word(sp_int_digit hi, sp_int_digit lo, +@@ -502,7 +502,7 @@ static WC_INLINE sp_int_digit sp_div_wor "addl %%eax, %[l] \n\t" \ "adcl %%edx, %[h] \n\t" \ "adcl $0 , %[o] \n\t" \ @@ -109,7 +105,7 @@ index 6070faaa9..d26702e47 100644 : [a] "r" (va), [b] "r" (vb) \ : "eax", "edx", "cc" \ ) -@@ -542,7 +542,7 @@ static WC_INLINE sp_int_digit sp_div_word(sp_int_digit hi, sp_int_digit lo, +@@ -541,7 +541,7 @@ static WC_INLINE sp_int_digit sp_div_wor "addl %%eax, %[l] \n\t" \ "adcl %%edx, %[h] \n\t" \ "adcl $0 , %[o] \n\t" \ @@ -118,6 +114,3 @@ index 6070faaa9..d26702e47 100644 : [a] "m" (va) \ : "eax", "edx", "cc" \ ) --- -2.31.1 - diff --git a/package/libs/wolfssl/patches/100-disable-hardening-check.patch b/package/libs/wolfssl/patches/100-disable-hardening-check.patch index c89ff1be9d..4141e28750 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 -@@ -2255,7 +2255,7 @@ extern void uITRON4_free(void *p) ; +@@ -2274,7 +2274,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/200-ecc-rng.patch b/package/libs/wolfssl/patches/200-ecc-rng.patch index 2d33c06209..d8581be7eb 100644 --- a/package/libs/wolfssl/patches/200-ecc-rng.patch +++ b/package/libs/wolfssl/patches/200-ecc-rng.patch @@ -11,7 +11,7 @@ RNG regardless of the built settings for wolfssl. --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c -@@ -10293,21 +10293,21 @@ void wc_ecc_fp_free(void) +@@ -10938,21 +10938,21 @@ void wc_ecc_fp_free(void) #endif /* FP_ECC */ @@ -37,7 +37,7 @@ RNG regardless of the built settings for wolfssl. --- a/wolfssl/wolfcrypt/ecc.h +++ b/wolfssl/wolfcrypt/ecc.h -@@ -584,10 +584,8 @@ WOLFSSL_API +@@ -616,10 +616,8 @@ WOLFSSL_API void wc_ecc_fp_free(void); WOLFSSL_LOCAL void wc_ecc_fp_init(void); From 8dba4741b3d4a449e0e4b85dd8cd9df7076e4ded Mon Sep 17 00:00:00 2001 From: Sander Vanheule Date: Fri, 10 Sep 2021 10:57:18 +0200 Subject: [PATCH 21/26] firmware-utils: tplink-safeloader: improve soft-version customisation Some devices using the safeloader firmware format require a minimum or specific version to be set in the soft-version metadata partition. Currently only custom text values can be provided, but not all device firmware support this format. Modify the device info struct to allow for more well-defined types of soft-version overwrites, and provide a few macros for easy value initialisation. Requires all existing values to be updated to match the new structure. Signed-off-by: Sander Vanheule [Adapt TL-WA1201-V2 entry too] Signed-off-by: Hauke Mehrtens --- tools/firmware-utils/Makefile | 2 +- tools/firmware-utils/src/tplink-safeloader.c | 167 +++++++++++-------- 2 files changed, 95 insertions(+), 74 deletions(-) diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile index ccc5e46091..995fc79ece 100644 --- a/tools/firmware-utils/Makefile +++ b/tools/firmware-utils/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME := firmware-utils -PKG_RELEASE := 10 +PKG_RELEASE := 11 include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/kernel.mk diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index dcc9d877a9..b3cfe39b2c 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -63,19 +63,40 @@ enum partition_trail_value { PART_TRAIL_NONE = 0x100 }; +/** soft-version value overwrite types + * The default (for an uninitialised soft_ver field) is to use the numerical + * version number "0.0.0" + */ +enum soft_ver_type { + SOFT_VER_TYPE_NUMERIC = 0, + SOFT_VER_TYPE_TEXT = 1, +}; + /** Firmware layout description */ struct device_info { const char *id; const char *vendor; const char *support_list; enum partition_trail_value part_trail; - const char *soft_ver; + struct { + enum soft_ver_type type; + union { + const char *text; + uint8_t num[3]; + }; + } soft_ver; uint32_t soft_ver_compat_level; struct flash_partition_entry partitions[MAX_PARTITIONS+1]; const char *first_sysupgrade_partition; const char *last_sysupgrade_partition; }; +#define SOFT_VER_TEXT(_t) {.type = SOFT_VER_TYPE_TEXT, .text = _t} +#define SOFT_VER_NUMERIC(_maj, _min, _patch) { \ + .type = SOFT_VER_TYPE_NUMERIC, \ + .num = {_maj, _min, _patch}} +#define SOFT_VER_DEFAULT SOFT_VER_NUMERIC(0, 0, 0) + struct __attribute__((__packed__)) meta_header { uint32_t length; uint32_t zero; @@ -129,7 +150,7 @@ static struct device_info boards[] = { "CPE220(TP-LINK|US|N300-2):1.1\r\n" "CPE220(TP-LINK|EU|N300-2):1.1\r\n", .part_trail = 0xff, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -168,7 +189,7 @@ static struct device_info boards[] = { "CPE210(TP-LINK|EU|N300-2):2.0\r\n" "CPE210(TP-LINK|US|N300-2):2.0\r\n", .part_trail = 0xff, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -210,7 +231,7 @@ static struct device_info boards[] = { "CPE210(TP-LINK|UN|N300-2|00000000):3.20\r\n" "CPE210(TP-LINK|US|N300-2|55530000):3.20\r\n", .part_trail = 0xff, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -251,7 +272,7 @@ static struct device_info boards[] = { "CPE220(TP-LINK|EU|N300-2):2.0\r\n" "CPE220(TP-LINK|US|N300-2):2.0\r\n", .part_trail = 0xff, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -290,7 +311,7 @@ static struct device_info boards[] = { "CPE220(TP-LINK|EU|N300-2):3.0\r\n" "CPE220(TP-LINK|US|N300-2):3.0\r\n", .part_trail = 0xff, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -329,7 +350,7 @@ static struct device_info boards[] = { "CPE520(TP-LINK|US|N300-5):1.1\r\n" "CPE520(TP-LINK|EU|N300-5):1.1\r\n", .part_trail = 0xff, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -370,7 +391,7 @@ static struct device_info boards[] = { "CPE510(TP-LINK|EU|N300-5):2.0\r\n" "CPE510(TP-LINK|US|N300-5):2.0\r\n", .part_trail = 0xff, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -414,7 +435,7 @@ static struct device_info boards[] = { "CPE510(TP-LINK|US|N300-5|55530000):3.20\r\n" "CPE510(TP-LINK|EU|N300-5|45550000):3.20\r\n", .part_trail = 0xff, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -453,7 +474,7 @@ static struct device_info boards[] = { "CPE610(TP-LINK|EU|N300-5):1.0\r\n" "CPE610(TP-LINK|US|N300-5):1.0\r\n", .part_trail = 0xff, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -492,7 +513,7 @@ static struct device_info boards[] = { "CPE610(TP-LINK|EU|N300-5):2.0\r\n" "CPE610(TP-LINK|US|N300-5):2.0\r\n", .part_trail = 0xff, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -523,7 +544,7 @@ static struct device_info boards[] = { "WBS210(TP-LINK|US|N300-2):1.20\r\n" "WBS210(TP-LINK|EU|N300-2):1.20\r\n", .part_trail = 0xff, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -554,7 +575,7 @@ static struct device_info boards[] = { "WBS210(TP-LINK|US|N300-2|55530000):2.0\r\n" "WBS210(TP-LINK|EU|N300-2|45550000):2.0\r\n", .part_trail = 0xff, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -586,7 +607,7 @@ static struct device_info boards[] = { "WBS510(TP-LINK|EU|N300-5):1.20\r\n" "WBS510(TP-LINK|CA|N300-5):1.20\r\n", .part_trail = 0xff, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -618,7 +639,7 @@ static struct device_info boards[] = { "WBS510(TP-LINK|EU|N300-5|45550000):2.0\r\n" "WBS510(TP-LINK|CA|N300-5|43410000):2.0\r\n", .part_trail = 0xff, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -648,7 +669,7 @@ static struct device_info boards[] = { "SupportList:\r\n" "{product_name:AD7200,product_ver:1.0.0,special_id:00000000}\r\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"SBL1", 0x00000, 0x20000}, @@ -692,7 +713,7 @@ static struct device_info boards[] = { "SupportList:\r\n" "{product_name:Archer C2600,product_ver:1.0.0,special_id:00000000}\r\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, /** We use a bigger os-image partition than the stock images (and thus @@ -744,7 +765,7 @@ static struct device_info boards[] = { "{product_name:Archer A7,product_ver:5.0.0,special_id:54570000}\n" "{product_name:Archer A7,product_ver:5.0.0,special_id:52550000}\n", .part_trail = 0x00, - .soft_ver = "soft_ver:1.0.0\n", + .soft_ver = SOFT_VER_TEXT("soft_ver:1.0.0\n"), /* We're using a dynamic kernel/rootfs split here */ .partitions = { @@ -782,7 +803,7 @@ static struct device_info boards[] = { "{product_name:ArcherC2,product_ver:3.0.0,special_id:55530000}\n" "{product_name:ArcherC2,product_ver:3.0.0,special_id:45550000}\n", .part_trail = 0x00, - .soft_ver = "soft_ver:3.0.1\n", + .soft_ver = SOFT_VER_TEXT("soft_ver:3.0.1\n"), /** We're using a dynamic kernel/rootfs split here */ @@ -820,7 +841,7 @@ static struct device_info boards[] = { "{product_name:ArcherC25,product_ver:1.0.0,special_id:55530000}\n" "{product_name:ArcherC25,product_ver:1.0.0,special_id:45550000}\n", .part_trail = 0x00, - .soft_ver = "soft_ver:1.0.0\n", + .soft_ver = SOFT_VER_TEXT("soft_ver:1.0.0\n"), /* We're using a dynamic kernel/rootfs split here */ .partitions = { @@ -859,7 +880,7 @@ static struct device_info boards[] = { "{product_name:Archer C58,product_ver:1.0.0,special_id:45550000}\r\n" "{product_name:Archer C58,product_ver:1.0.0,special_id:55530000}\r\n", .part_trail = 0x00, - .soft_ver = "soft_ver:1.0.0\n", + .soft_ver = SOFT_VER_TEXT("soft_ver:1.0.0\n"), .partitions = { {"fs-uboot", 0x00000, 0x10000}, @@ -894,7 +915,7 @@ static struct device_info boards[] = { "{product_name:Archer C59,product_ver:1.0.0,special_id:52550000}\r\n" "{product_name:Archer C59,product_ver:1.0.0,special_id:55530000}\r\n", .part_trail = 0x00, - .soft_ver = "soft_ver:1.0.0\n", + .soft_ver = SOFT_VER_TEXT("soft_ver:1.0.0\n"), /* We're using a dynamic kernel/rootfs split here */ .partitions = { @@ -932,7 +953,7 @@ static struct device_info boards[] = { "{product_name:Archer C59,product_ver:2.0.0,special_id:45550000}\r\n" "{product_name:Archer C59,product_ver:2.0.0,special_id:55530000}\r\n", .part_trail = 0x00, - .soft_ver = "soft_ver:2.0.0 Build 20161206 rel.7303\n", + .soft_ver = SOFT_VER_TEXT("soft_ver:2.0.0 Build 20161206 rel.7303\n"), /** We're using a dynamic kernel/rootfs split here */ .partitions = { @@ -972,7 +993,7 @@ static struct device_info boards[] = { "{product_name:Archer C6,product_ver:2.0.0,special_id:52550000}\r\n" "{product_name:Archer C6,product_ver:2.0.0,special_id:4A500000}\r\n", .part_trail = 0x00, - .soft_ver = "soft_ver:1.9.1\n", + .soft_ver = SOFT_VER_TEXT("soft_ver:1.9.1\n"), .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -1007,7 +1028,7 @@ static struct device_info boards[] = { "{product_name:Archer A6,product_ver:2.0.0,special_id:54570000}\n" "{product_name:Archer C6,product_ver:2.0.0,special_id:55530000}\n", .part_trail = 0x00, - .soft_ver = "soft_ver:1.9.1\n", + .soft_ver = SOFT_VER_TEXT("soft_ver:1.9.1\n"), .partitions = { {"factory-boot", 0x00000, 0x20000}, @@ -1043,7 +1064,7 @@ static struct device_info boards[] = { "{product_name:Archer C6,product_ver:3.20,special_id:4A500000}" "{product_name:Archer C6,product_ver:3.20,special_id:4B520000}", .part_trail = 0x00, - .soft_ver = "soft_ver:1.0.9\n", + .soft_ver = SOFT_VER_TEXT("soft_ver:1.0.9\n"), .partitions = { {"fs-uboot", 0x00000, 0x40000}, @@ -1082,7 +1103,7 @@ static struct device_info boards[] = { "{product_name:Archer A6,product_ver:3.0.0,special_id:55530000}\n" "{product_name:Archer A6,product_ver:3.0.0,special_id:54570000}\n", .part_trail = 0x00, - .soft_ver = "soft_ver:1.0.5\n", + .soft_ver = SOFT_VER_TEXT("soft_ver:1.0.5\n"), .partitions = { {"fs-uboot", 0x00000, 0x40000}, @@ -1119,7 +1140,7 @@ static struct device_info boards[] = { "SupportList:\n" "{product_name:Archer C6U,product_ver:1.0.0,special_id:45550000}\n", .part_trail = 0x00, - .soft_ver = "soft_ver:1.0.2\n", + .soft_ver = SOFT_VER_TEXT("soft_ver:1.0.2\n"), .partitions = { {"fs-uboot", 0x00000, 0x40000}, @@ -1155,7 +1176,7 @@ static struct device_info boards[] = { "{product_name:Archer C60,product_ver:1.0.0,special_id:45550000}\r\n" "{product_name:Archer C60,product_ver:1.0.0,special_id:55530000}\r\n", .part_trail = 0x00, - .soft_ver = "soft_ver:1.0.0\n", + .soft_ver = SOFT_VER_TEXT("soft_ver:1.0.0\n"), .partitions = { {"fs-uboot", 0x00000, 0x10000}, @@ -1189,7 +1210,7 @@ static struct device_info boards[] = { "{product_name:Archer C60,product_ver:2.0.0,special_id:45550000}\r\n" "{product_name:Archer C60,product_ver:2.0.0,special_id:55530000}\r\n", .part_trail = 0x00, - .soft_ver = "soft_ver:2.0.0\n", + .soft_ver = SOFT_VER_TEXT("soft_ver:2.0.0\n"), .partitions = { {"factory-boot", 0x00000, 0x1fb00}, @@ -1225,7 +1246,7 @@ static struct device_info boards[] = { "{product_name:Archer C60,product_ver:3.0.0,special_id:45550000}\r\n" "{product_name:Archer C60,product_ver:3.0.0,special_id:55530000}\r\n", .part_trail = 0x00, - .soft_ver = "soft_ver:3.0.0\n", + .soft_ver = SOFT_VER_TEXT("soft_ver:3.0.0\n"), .partitions = { {"factory-boot", 0x00000, 0x1fb00}, @@ -1261,7 +1282,7 @@ static struct device_info boards[] = { "{product_name:ArcherC5,product_ver:2.0.0,special_id:55530000}\r\n" "{product_name:ArcherC5,product_ver:2.0.0,special_id:4A500000}\r\n", /* JP version */ .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x40000}, @@ -1302,7 +1323,7 @@ static struct device_info boards[] = { "{product_name:Archer C7,product_ver:4.0.0,special_id:55530000}\n" "{product_name:Archer C7,product_ver:4.0.0,special_id:43410000}\n", .part_trail = 0x00, - .soft_ver = "soft_ver:1.0.0\n", + .soft_ver = SOFT_VER_TEXT("soft_ver:1.0.0\n"), /* We're using a dynamic kernel/rootfs split here */ .partitions = { @@ -1347,7 +1368,7 @@ static struct device_info boards[] = { "{product_name:Archer C7,product_ver:5.0.0,special_id:4B520000}\n", .part_trail = 0x00, - .soft_ver = "soft_ver:7.0.0\n", + .soft_ver = SOFT_VER_TEXT("soft_ver:7.0.0\n"), /* We're using a dynamic kernel/rootfs split here */ .partitions = { @@ -1390,7 +1411,7 @@ static struct device_info boards[] = { "product_ver:1.0.0," "special_id:00000000}\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x40000}, @@ -1423,7 +1444,7 @@ static struct device_info boards[] = { "SupportList:\r\n" "EAP120(TP-LINK|UN|N300-2):1.0\r\n", .part_trail = 0xff, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -1452,7 +1473,7 @@ static struct device_info boards[] = { "SupportList:\r\n" "EAP225-Outdoor(TP-Link|UN|AC1200-D):1.0\r\n", .part_trail = PART_TRAIL_NONE, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .soft_ver_compat_level = 1, .partitions = { @@ -1481,7 +1502,7 @@ static struct device_info boards[] = { "SupportList:\r\n" "EAP225(TP-Link|UN|AC1350-D):3.0\r\n", .part_trail = PART_TRAIL_NONE, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .soft_ver_compat_level = 1, .partitions = { @@ -1510,7 +1531,7 @@ static struct device_info boards[] = { "SupportList:\r\n" "EAP225-Wall(TP-Link|UN|AC1200-D):2.0\r\n", .part_trail = PART_TRAIL_NONE, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .soft_ver_compat_level = 1, .partitions = { @@ -1539,7 +1560,7 @@ static struct device_info boards[] = { "SupportList:\r\n" "EAP235-Wall(TP-Link|UN|AC1200-D):1.0\r\n", .part_trail = PART_TRAIL_NONE, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .soft_ver_compat_level = 1, .partitions = { @@ -1568,7 +1589,7 @@ static struct device_info boards[] = { "SupportList:\r\n" "EAP245(TP-LINK|UN|AC1750-D):1.0\r\n", .part_trail = PART_TRAIL_NONE, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -1594,7 +1615,7 @@ static struct device_info boards[] = { "SupportList:\r\n" "EAP245(TP-Link|UN|AC1750-D):3.0\r\n", .part_trail = PART_TRAIL_NONE, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .soft_ver_compat_level = 1, /** Firmware partition with dynamic kernel/rootfs split */ @@ -1628,7 +1649,7 @@ static struct device_info boards[] = { "{product_name:TL-WA1201,product_ver:2.0.0,special_id:45550000}\n" "{product_name:TL-WA1201,product_ver:2.0.0,special_id:55530000}\n", .part_trail = 0x00, - .soft_ver = "soft_ver:1.0.1 Build 20200709 rel.66244\n", + .soft_ver = SOFT_VER_TEXT("soft_ver:1.0.1 Build 20200709 rel.66244\n"), .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -1678,7 +1699,7 @@ static struct device_info boards[] = { "{product_name:TL-WA850RE,product_ver:2.0.0,special_id:41550000}\n" "{product_name:TL-WA850RE,product_ver:2.0.0,special_id:52550000}\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, /** 576KB were moved from file-system to os-image @@ -1720,7 +1741,7 @@ static struct device_info boards[] = { "{product_name:TL-WA855RE,product_ver:1.0.0,special_id:41550000}\n" "{product_name:TL-WA855RE,product_ver:1.0.0,special_id:52550000}\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -1751,7 +1772,7 @@ static struct device_info boards[] = { "SupportList:\n" "{product_name:TL-WPA8630P,product_ver:2.0.0,special_id:45550000}\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"factory-uboot", 0x00000, 0x20000}, @@ -1788,7 +1809,7 @@ static struct device_info boards[] = { "{product_name:TL-WPA8630P,product_ver:2.0.0,special_id:44450000}\n" "{product_name:TL-WPA8630P,product_ver:2.1.0,special_id:41550000}\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"factory-uboot", 0x00000, 0x20000}, @@ -1823,7 +1844,7 @@ static struct device_info boards[] = { "SupportList:\n" "{product_name:TL-WPA8630P,product_ver:2.1.0,special_id:45550000}\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"factory-uboot", 0x00000, 0x20000}, @@ -1859,7 +1880,7 @@ static struct device_info boards[] = { "{product_name:TL-WR1043N,product_ver:5.0.0,special_id:45550000}\n" "{product_name:TL-WR1043N,product_ver:5.0.0,special_id:55530000}\n", .part_trail = 0x00, - .soft_ver = "soft_ver:1.0.0\n", + .soft_ver = SOFT_VER_TEXT("soft_ver:1.0.0\n"), .partitions = { {"factory-boot", 0x00000, 0x20000}, {"fs-uboot", 0x20000, 0x20000}, @@ -1893,7 +1914,7 @@ static struct device_info boards[] = { "SupportList:\n" "{product_name:TL-WR1043ND,product_ver:4.0.0,special_id:45550000}\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, /* We're using a dynamic kernel/rootfs split here */ .partitions = { @@ -1926,7 +1947,7 @@ static struct device_info boards[] = { "{product_name:TL-WR902AC,product_ver:1.0.0,special_id:45550000}\n" "{product_name:TL-WR902AC,product_ver:1.0.0,special_id:55530000}\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, /** 384KB were moved from file-system to os-image @@ -1961,7 +1982,7 @@ static struct device_info boards[] = { "SupportList:\n" "{product_name:TL-WR941HP,product_ver:1.0.0,special_id:00000000}\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -1993,7 +2014,7 @@ static struct device_info boards[] = { "{product_name:TL-WR942N,product_ver:1.0.0,special_id:00000000}\r\n" "{product_name:TL-WR942N,product_ver:1.0.0,special_id:52550000}\r\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -2040,7 +2061,7 @@ static struct device_info boards[] = { "{product_name:RE200,product_ver:2.0.0,special_id:54570000}\n" "{product_name:RE200,product_ver:2.0.0,special_id:55530000}\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -2084,7 +2105,7 @@ static struct device_info boards[] = { "{product_name:RE200,product_ver:3.0.0,special_id:54570000}\n" "{product_name:RE200,product_ver:3.0.0,special_id:55530000}\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -2128,7 +2149,7 @@ static struct device_info boards[] = { "{product_name:RE200,product_ver:4.0.0,special_id:49440000}\n" "{product_name:RE200,product_ver:4.0.0,special_id:45470000}\n", .part_trail = 0x00, - .soft_ver = "soft_ver:1.1.0\n", + .soft_ver = SOFT_VER_TEXT("soft_ver:1.1.0\n"), .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -2171,7 +2192,7 @@ static struct device_info boards[] = { "{product_name:RE220,product_ver:2.0.0,special_id:54570000}\n" "{product_name:RE220,product_ver:2.0.0,special_id:55530000}\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -2208,7 +2229,7 @@ static struct device_info boards[] = { "{product_name:RE305,product_ver:1.0.0,special_id:41550000}\n" "{product_name:RE305,product_ver:1.0.0,special_id:43410000}\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, .partitions = { {"fs-uboot", 0x00000, 0x20000}, @@ -2244,7 +2265,7 @@ static struct device_info boards[] = { "{product_name:RE350,product_ver:1.0.0,special_id:4b520000}\n" "{product_name:RE350,product_ver:1.0.0,special_id:4a500000}\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, /** We're using a dynamic kernel/rootfs split here */ .partitions = { @@ -2275,7 +2296,7 @@ static struct device_info boards[] = { "SupportList:\n" "{product_name:RE350K,product_ver:1.0.0,special_id:00000000,product_region:US}\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, /** We're using a dynamic kernel/rootfs split here */ .partitions = { @@ -2314,7 +2335,7 @@ static struct device_info boards[] = { "{product_name:RE355,product_ver:1.0.0,special_id:4B520000}\r\n" "{product_name:RE355,product_ver:1.0.0,special_id:55534100}\r\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, /* We're using a dynamic kernel/rootfs split here */ .partitions = { @@ -2352,7 +2373,7 @@ static struct device_info boards[] = { "{product_name:RE450,product_ver:1.0.0,special_id:4B520000}\r\n" "{product_name:RE450,product_ver:1.0.0,special_id:55534100}\r\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, /** We're using a dynamic kernel/rootfs split here */ .partitions = { @@ -2391,7 +2412,7 @@ static struct device_info boards[] = { "{product_name:RE450,product_ver:2.0.0,special_id:4B520000}\r\n" "{product_name:RE450,product_ver:2.0.0,special_id:42520000}\r\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, /* We're using a dynamic kernel/rootfs split here */ .partitions = { @@ -2430,7 +2451,7 @@ static struct device_info boards[] = { "{product_name:RE450,product_ver:3.0.0,special_id:4B520000}\r\n" "{product_name:RE450,product_ver:3.0.0,special_id:42520000}\r\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, /* We're using a dynamic kernel/rootfs split here */ .partitions = { @@ -2470,7 +2491,7 @@ static struct device_info boards[] = { "{product_name:RE455,product_ver:1.0.0,special_id:4B520000}\r\n" "{product_name:RE455,product_ver:1.0.0,special_id:42520000}\r\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, /* We're using a dynamic kernel/rootfs split here */ .partitions = { @@ -2508,7 +2529,7 @@ static struct device_info boards[] = { "{product_name:RE500,product_ver:1.0.0,special_id:41550000}\r\n" "{product_name:RE500,product_ver:1.0.0,special_id:41530000}\r\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, /* We're using a dynamic kernel/rootfs split here */ .partitions = { @@ -2545,7 +2566,7 @@ static struct device_info boards[] = { "{product_name:RE650,product_ver:1.0.0,special_id:41550000}\r\n" "{product_name:RE650,product_ver:1.0.0,special_id:41530000}\r\n", .part_trail = 0x00, - .soft_ver = NULL, + .soft_ver = SOFT_VER_DEFAULT, /* We're using a dynamic kernel/rootfs split here */ .partitions = { @@ -2696,10 +2717,10 @@ static struct image_partition_entry make_soft_version( { /** If an info string is provided, use this instead of * the structured data, and include the null-termination */ - if (info->soft_ver) { - uint32_t len = strlen(info->soft_ver) + 1; + if (info->soft_ver.type == SOFT_VER_TYPE_TEXT) { + uint32_t len = strlen(info->soft_ver.text) + 1; return init_meta_partition_entry("soft-version", - info->soft_ver, len, info->part_trail); + info->soft_ver.text, len, info->part_trail); } time_t t; @@ -2714,9 +2735,9 @@ static struct image_partition_entry make_soft_version( struct soft_version s = { .pad1 = 0xff, - .version_major = 0, - .version_minor = 0, - .version_patch = 0, + .version_major = info->soft_ver.num[0], + .version_minor = info->soft_ver.num[1], + .version_patch = info->soft_ver.num[2], .year_hi = bcd((1900+tm->tm_year)/100), .year_lo = bcd(tm->tm_year%100), From 46dec9952bb059156eaf5a82759ee32cc7cd6a0f Mon Sep 17 00:00:00 2001 From: Sander Vanheule Date: Fri, 10 Sep 2021 10:57:19 +0200 Subject: [PATCH 22/26] firmware-utils: tplink-safeloader: set EAP235-Wall v1 soft-version Starting with v3 of the vendor firmware for the TP-Link EAP235-Wall v1, downgrades to firmware versions below v3 as not allowed. Since OpenWrt uses version 0.0.0 as a default, this causes the factory install to fail on devices with a recent firmware. This failure is associated by the following message on the device's serial console: EAP235/230-Wall forbid fw reverted from 3.x.x to lower version! Vendor firmware (v3) also uses build and release numbers to compare images, so identical version numbers are very unlikely to cause issues. Bump the firmware version to 3.0.0 to ensure users can install OpenWrt on their devices. Reported-by: Colton Conor Tested-by: Colton Conor Signed-off-by: Sander Vanheule --- tools/firmware-utils/src/tplink-safeloader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index b3cfe39b2c..b20d1fdd30 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -1560,7 +1560,7 @@ static struct device_info boards[] = { "SupportList:\r\n" "EAP235-Wall(TP-Link|UN|AC1200-D):1.0\r\n", .part_trail = PART_TRAIL_NONE, - .soft_ver = SOFT_VER_DEFAULT, + .soft_ver = SOFT_VER_NUMERIC(3, 0, 0), .soft_ver_compat_level = 1, .partitions = { From d2d0044ebf01b71f63cde609e09f6ac68cdfeccb Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Thu, 9 Sep 2021 05:42:33 +0000 Subject: [PATCH 23/26] dnsmasq: Update to version 2.86 Summary of upstream CHANGELOG: * Handle DHCPREBIND requests in the DHCPv6 server code. * Fix bug which caused dnsmasq to lose track of processes forked. * Major rewrite of the DNS server and domain handling code. * Revise resource handling for number of concurrent DNS queries. * Improve efficiency of DNSSEC. * Connection track mark based DNS query filtering. * Allow smaller than 64 prefix lengths in synth-domain. * Make domains generated by --synth-domain appear in replies when in authoritative mode. * Ensure CAP_NET_ADMIN capability is available when conntrack is configured. * When --dhcp-hostsfile --dhcp-optsfile and --addn-hosts are given a directory as argument, define the order in which files within that directory are read. * Support some wildcard matching of input tags to --tag-if. Signed-off-by: Etan Kissling --- package/network/services/dnsmasq/Makefile | 4 ++-- .../patches/100-remove-old-runtime-kernel-support.patch | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index 90a81b5f65..c5a8930ea7 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq -PKG_UPSTREAM_VERSION:=2.85 +PKG_UPSTREAM_VERSION:=2.86 PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION))) PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq -PKG_HASH:=ad98d3803df687e5b938080f3d25c628fe41c878752d03fbc6199787fee312fa +PKG_HASH:=28d52cfc9e2004ac4f85274f52b32e1647b4dbc9761b82e7de1e41c49907eb08 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING diff --git a/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch b/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch index b601bce1a9..4f8fe4ecbe 100644 --- a/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch +++ b/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch @@ -26,7 +26,7 @@ Signed-off-by: Kevin Darbyshire-Bryant --- a/src/dnsmasq.h +++ b/src/dnsmasq.h -@@ -1144,7 +1144,7 @@ extern struct daemon { +@@ -1201,7 +1201,7 @@ extern struct daemon { int inotifyfd; #endif #if defined(HAVE_LINUX_NETWORK) @@ -35,7 +35,7 @@ Signed-off-by: Kevin Darbyshire-Bryant #elif defined(HAVE_BSD_NETWORK) int dhcp_raw_fd, dhcp_icmp_fd, routefd; #endif -@@ -1326,9 +1326,6 @@ int read_write(int fd, unsigned char *pa +@@ -1388,9 +1388,6 @@ int read_write(int fd, unsigned char *pa void close_fds(long max_fd, int spare1, int spare2, int spare3); int wildcard_match(const char* wildcard, const char* match); int wildcard_matchn(const char* wildcard, const char* match, int num); @@ -140,7 +140,7 @@ Signed-off-by: Kevin Darbyshire-Bryant my_syslog(LOG_ERR, _("failed to update ipset %s: %s"), setname, strerror(errno)); --- a/src/util.c +++ b/src/util.c -@@ -786,22 +786,3 @@ int wildcard_matchn(const char* wildcard +@@ -796,22 +796,3 @@ int wildcard_matchn(const char* wildcard return (!num) || (*wildcard == *match); } From 02a2b44eabf607fb5405ff0d7da4ad0748d3e1b1 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Thu, 9 Sep 2021 05:43:31 +0000 Subject: [PATCH 24/26] dnsmasq: add config option for connmark DNS filtering This adds uci support to configure connmark based DNS filtering. Signed-off-by: Etan Kissling (imported from upstream mailing list https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2021q2/015151.html) Signed-off-by: Etan Kissling --- package/network/services/dnsmasq/files/dnsmasq.init | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 205bfb4cf6..9748c09b8e 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -173,6 +173,10 @@ append_ipset() { xappend "--ipset=$1" } +append_connmark_allowlist() { + xappend "--connmark-allowlist=$1" +} + append_interface() { network_get_device ifname "$1" || ifname="$1" xappend "--interface=$ifname" @@ -938,6 +942,14 @@ dnsmasq_start() config_list_foreach "$cfg" "rev_server" append_rev_server config_list_foreach "$cfg" "address" append_address config_list_foreach "$cfg" "ipset" append_ipset + + local connmark_allowlist_enable + config_get connmark_allowlist_enable "$cfg" connmark_allowlist_enable 0 + [ "$connmark_allowlist_enable" -gt 0 ] && { + append_parm "$cfg" "connmark_allowlist_enable" "--connmark-allowlist-enable" + config_list_foreach "$cfg" "connmark_allowlist" append_connmark_allowlist + } + [ -n "$BOOT" ] || { config_list_foreach "$cfg" "interface" append_interface config_list_foreach "$cfg" "notinterface" append_notinterface From 5ef4608c02ef6db9698c8d10011b9c14a8ca073b Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Sun, 12 Sep 2021 23:44:04 -1000 Subject: [PATCH 25/26] build: store artifacts in JSON Multiple profiles create artifacts, these should be stored in the JSON file as well, allowing downstream tooling to show those files, too. Artifacts don't have specific filesystems so only the fields `name`, `type` and `sha256` are available. Rename env variable names from IMAGE_ to FILE_ prefixes to reflect that images, kernels and artifacts are added with the same command. Signed-off-by: Paul Spooren --- include/image.mk | 45 ++++++++++++++++++++++++++++------ scripts/json_add_image_info.py | 24 ++++++++++-------- 2 files changed, 52 insertions(+), 17 deletions(-) diff --git a/include/image.mk b/include/image.mk index 6298e3085e..1150f84ce5 100644 --- a/include/image.mk +++ b/include/image.mk @@ -494,9 +494,9 @@ define Device/Build/initramfs DEVICE_ID="$(1)" \ BIN_DIR="$(BIN_DIR)" \ SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \ - DEVICE_IMG_NAME="$$(notdir $$^)" \ - IMAGE_TYPE="kernel" \ - IMAGE_FILESYSTEM="initramfs" \ + FILE_NAME="$$(notdir $$^)" \ + FILE_TYPE="kernel" \ + FILE_FILESYSTEM="initramfs" \ DEVICE_IMG_PREFIX="$$(DEVICE_IMG_PREFIX)" \ DEVICE_VENDOR="$$(DEVICE_VENDOR)" \ DEVICE_MODEL="$$(DEVICE_MODEL)" \ @@ -601,9 +601,9 @@ define Device/Build/image DEVICE_ID="$(DEVICE_NAME)" \ BIN_DIR="$(BIN_DIR)" \ SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \ - DEVICE_IMG_NAME="$(DEVICE_IMG_NAME)" \ - IMAGE_TYPE=$(word 1,$(subst ., ,$(2))) \ - IMAGE_FILESYSTEM="$(1)" \ + FILE_NAME="$(DEVICE_IMG_NAME)" \ + FILE_TYPE=$(word 1,$(subst ., ,$(2))) \ + FILE_FILESYSTEM="$(1)" \ DEVICE_IMG_PREFIX="$(DEVICE_IMG_PREFIX)" \ DEVICE_VENDOR="$(DEVICE_VENDOR)" \ DEVICE_MODEL="$(DEVICE_MODEL)" \ @@ -629,7 +629,9 @@ define Device/Build/image endef define Device/Build/artifact - $$(_TARGET): $(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1) + $$(_TARGET): $(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \ + $(BUILD_DIR)/json_info_files/$(DEVICE_IMG_PREFIX)-$(1).json, \ + $(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1)) $(eval $(call Device/Export,$(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1))) $(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1): $$(KDIR_KERNEL_IMAGE) $(2)-images @rm -f $$@ @@ -640,6 +642,35 @@ define Device/Build/artifact $(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1): $(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1) cp $$^ $$@ + $(BUILD_DIR)/json_info_files/$(DEVICE_IMG_PREFIX)-$(1).json: $(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1) + @mkdir -p $$(shell dirname $$@) + DEVICE_ID="$(DEVICE_NAME)" \ + BIN_DIR="$(BIN_DIR)" \ + SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \ + FILE_NAME="$(DEVICE_IMG_PREFIX)-$(1)" \ + FILE_TYPE="$(1)" \ + DEVICE_IMG_PREFIX="$(DEVICE_IMG_PREFIX)" \ + DEVICE_VENDOR="$(DEVICE_VENDOR)" \ + DEVICE_MODEL="$(DEVICE_MODEL)" \ + DEVICE_VARIANT="$(DEVICE_VARIANT)" \ + DEVICE_ALT0_VENDOR="$(DEVICE_ALT0_VENDOR)" \ + DEVICE_ALT0_MODEL="$(DEVICE_ALT0_MODEL)" \ + DEVICE_ALT0_VARIANT="$(DEVICE_ALT0_VARIANT)" \ + DEVICE_ALT1_VENDOR="$(DEVICE_ALT1_VENDOR)" \ + DEVICE_ALT1_MODEL="$(DEVICE_ALT1_MODEL)" \ + DEVICE_ALT1_VARIANT="$(DEVICE_ALT1_VARIANT)" \ + DEVICE_ALT2_VENDOR="$(DEVICE_ALT2_VENDOR)" \ + DEVICE_ALT2_MODEL="$(DEVICE_ALT2_MODEL)" \ + DEVICE_ALT2_VARIANT="$(DEVICE_ALT2_VARIANT)" \ + DEVICE_TITLE="$(DEVICE_TITLE)" \ + DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \ + TARGET="$(BOARD)" \ + SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \ + VERSION_NUMBER="$(VERSION_NUMBER)" \ + VERSION_CODE="$(VERSION_CODE)" \ + SUPPORTED_DEVICES="$(SUPPORTED_DEVICES)" \ + $(TOPDIR)/scripts/json_add_image_info.py $$@ + endef define Device/Build diff --git a/scripts/json_add_image_info.py b/scripts/json_add_image_info.py index 38cd3c487d..23033f9fc4 100755 --- a/scripts/json_add_image_info.py +++ b/scripts/json_add_image_info.py @@ -12,10 +12,10 @@ if len(argv) != 2: json_path = Path(argv[1]) bin_dir = Path(getenv("BIN_DIR")) -image_file = bin_dir / getenv("DEVICE_IMG_NAME") +file_path = bin_dir / getenv("FILE_NAME") -if not image_file.is_file(): - print("Skip JSON creation for non existing image ", image_file) +if not file_path.is_file(): + print("Skip JSON creation for non existing file", file_path) exit(0) @@ -37,9 +37,9 @@ def get_titles(): device_id = getenv("DEVICE_ID") -image_hash = hashlib.sha256(image_file.read_bytes()).hexdigest() +file_hash = hashlib.sha256(file_path.read_bytes()).hexdigest() -image_info = { +file_info = { "metadata_version": 1, "target": "{}/{}".format(getenv("TARGET"), getenv("SUBTARGET")), "version_code": getenv("VERSION_CODE"), @@ -50,10 +50,9 @@ image_info = { "image_prefix": getenv("DEVICE_IMG_PREFIX"), "images": [ { - "type": getenv("IMAGE_TYPE"), - "filesystem": getenv("IMAGE_FILESYSTEM"), - "name": getenv("DEVICE_IMG_NAME"), - "sha256": image_hash, + "type": getenv("FILE_TYPE"), + "name": getenv("FILE_NAME"), + "sha256": file_hash, } ], "device_packages": getenv("DEVICE_PACKAGES").split(), @@ -63,4 +62,9 @@ image_info = { }, } -json_path.write_text(json.dumps(image_info, separators=(",", ":"))) +if getenv("FILE_FILESYSTEM"): + file_info["profiles"][device_id]["images"][0]["filesystem"] = getenv( + "FILE_FILESYSTEM" + ) + +json_path.write_text(json.dumps(file_info, separators=(",", ":"))) From 23e4d90b617e2369a272e1873321c531a9296e4c Mon Sep 17 00:00:00 2001 From: sean lee Date: Tue, 14 Sep 2021 16:50:20 +0800 Subject: [PATCH 26/26] arm-trusted-firmware-mvebu: CZ.NIC's Secure Firmware bump to v2021.09.07 bump version and remove patches that have been applied 176d701 wtmi: Wait 1s after putting PHYs INTn pin low 2eeccfe wtmi: Change comment describing reset workaround e8c94a5 wtmi: Count RAM size from both CS0 and CS1 995979e wtmi: Rename macro e29eb29 wtmi: soc: Fix start_ap_workaround() for TF-A with debug 81245ed wtmi: Use constant name PLAT_MARVELL_MAILBOX_BASE 18ccb83 wtmi: Do a proper UART reset with clock change as described in spec 15ff106 avs: Validate VDD value from OTP 3f33626 fix: clock: a3700: change pwm clock for 600/600 and 1200/750 preset fb5e436 wtmi: uart: fix UART baudrate divisor calculation Signed-off-by: sean lee --- .../boot/arm-trusted-firmware-mvebu/Makefile | 4 +- ...ix-UART-baudrate-divisor-calculation.patch | 66 ------------------- ...change-pwm-clock-for-600-600-and-120.patch | 48 -------------- .../102-avs-Validate-VDD-value-from-OTP.patch | 52 --------------- 4 files changed, 2 insertions(+), 168 deletions(-) delete mode 100644 package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/100-wtmi-uart-fix-UART-baudrate-divisor-calculation.patch delete mode 100644 package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/101-fix-clock-a3700-change-pwm-clock-for-600-600-and-120.patch delete mode 100644 package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/102-avs-Validate-VDD-value-from-OTP.patch diff --git a/package/boot/arm-trusted-firmware-mvebu/Makefile b/package/boot/arm-trusted-firmware-mvebu/Makefile index 2369a1930a..8836388bec 100644 --- a/package/boot/arm-trusted-firmware-mvebu/Makefile +++ b/package/boot/arm-trusted-firmware-mvebu/Makefile @@ -149,13 +149,13 @@ define Download/mv-ddr-marvell endef MOX_BB_NAME:=mox-boot-builder -MOX_BB_RELEASE:=v2021.04.09 +MOX_BB_RELEASE:=v2021.09.07 MOX_BB_SOURCE:=$(MOX_BB_NAME)-$(MOX_BB_RELEASE).tar.bz2 define Download/mox-boot-builder FILE:=$(MOX_BB_SOURCE) URL:=https://gitlab.nic.cz/turris/mox-boot-builder/-/archive/$(MOX_BB_RELEASE) - HASH:=f0ed4fa25006e36a07d4256f633e3f25d6f8898dbe2e081e578251a182885520 + HASH:=fd5fe276a3b0dee3177d61c017907a8eb23cd2169478fa78e9a3a836cfe3a4a8 endef CM3_GCC_NAME:=gcc-arm diff --git a/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/100-wtmi-uart-fix-UART-baudrate-divisor-calculation.patch b/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/100-wtmi-uart-fix-UART-baudrate-divisor-calculation.patch deleted file mode 100644 index 4bd66f9107..0000000000 --- a/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/100-wtmi-uart-fix-UART-baudrate-divisor-calculation.patch +++ /dev/null @@ -1,66 +0,0 @@ -From fb5e436843614f93b30aec0a2a00e5e59a133aab Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marek=20Beh=C3=BAn?= -Date: Sat, 15 May 2021 17:44:24 +0200 -Subject: [PATCH] wtmi: uart: fix UART baudrate divisor calculation -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The UART code uses the xtal clock as parent for UART baudrate -generation, but it assumes that xtal runs at 25 MHz, which isn't -necessarily the case for all A3720 boards. - -Use get_ref_clk() to determine xtal clock rate. - -Use rounding division to compute the divisor value. - -Signed-off-by: Marek Behún -Suggested-by: Pali Rohár ---- - wtmi/types.h | 5 +++++ - wtmi/uart.c | 7 ++++--- - 2 files changed, 9 insertions(+), 3 deletions(-) - -diff --git a/wtmi/types.h b/wtmi/types.h -index 7a6c6c6..ea873fc 100644 ---- a/wtmi/types.h -+++ b/wtmi/types.h -@@ -47,4 +47,9 @@ typedef u32 size_t; - - #define maybe_unused __attribute__((unused)) - -+static inline u32 div_round_closest_u32(u32 x, u32 d) -+{ -+ return (x + d / 2) / d; -+} -+ - #endif /* __TYPES_H */ -diff --git a/wtmi/uart.c b/wtmi/uart.c -index d40633d..75864b5 100644 ---- a/wtmi/uart.c -+++ b/wtmi/uart.c -@@ -40,8 +40,6 @@ - #include "stdio.h" - #include "debug.h" - --#define UART_CLOCK_FREQ 25804800 -- - const struct uart_info uart1_info = { - .rx = 0xc0012000, - .tx = 0xc0012004, -@@ -76,8 +74,11 @@ void uart_set_stdio(const struct uart_info *info) - - void uart_reset(const struct uart_info *info, unsigned int baudrate) - { -+ u32 parent_rate = get_ref_clk() * 1000000; -+ - /* set baudrate */ -- writel((UART_CLOCK_FREQ / baudrate / 16), info->baud); -+ writel(div_round_closest_u32(parent_rate, baudrate * 16), info->baud); -+ - /* set Programmable Oversampling Stack to 0, UART defaults to 16X scheme */ - writel(0, info->possr); - --- -2.30.2 - diff --git a/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/101-fix-clock-a3700-change-pwm-clock-for-600-600-and-120.patch b/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/101-fix-clock-a3700-change-pwm-clock-for-600-600-and-120.patch deleted file mode 100644 index 6d74a053e2..0000000000 --- a/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/101-fix-clock-a3700-change-pwm-clock-for-600-600-and-120.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 3f33626ac7037bd62df9391e899f50e076e58cf7 Mon Sep 17 00:00:00 2001 -From: zachary -Date: Wed, 25 Oct 2017 15:50:29 +0800 -Subject: [PATCH] fix: clock: a3700: change pwm clock for 600/600 and 1200/750 - preset -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch is to change pwm clock from 100MHz to 50MHz for 600/600 and -1200/750 preset to align with other presets. - -Change-Id: I067e189043be8c776bd3e7015a06f8ddf2590b96 -Signed-off-by: zachary -Reviewed-on: http://vgitil04.il.marvell.com:8080/45513 -Tested-by: iSoC Platform CI -Reviewed-by: Kostya Porotchkin -Reviewed-by: Hua Jing -Signed-off-by: Marek Behún ---- - wtmi/clock.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/wtmi/clock.c b/wtmi/clock.c -index 97c2825..1a1f0c6 100644 ---- a/wtmi/clock.c -+++ b/wtmi/clock.c -@@ -447,7 +447,7 @@ static struct clock_cfg clk_cfg_all[] = {\ - /* NorthBridge */\ - {{TBG_A_S, TBG_B_S, TBG_B_S, TBG_B_S, TBG_A_P, TBG_A_P, TBG_A_P,\ - TBG_B_S, TBG_B_S, TBG_A_P, TBG_B_S, TBG_A_P, TBG_B_S},\ -- {2, 5, 2, 4, 1, 2, 6, 2}, /* DIV0 */\ -+ {4, 5, 2, 4, 1, 2, 6, 2}, /* DIV0 */\ - {1, 5, 2, 5, 2, 3, 2, 2, 3}, /* DIV1 */\ - {4, 1, 5, 1, 3, 1, 2, 0, 0, 1} }, /* DIV2 */\ - /* SouthBridge */\ -@@ -495,7 +495,7 @@ static struct clock_cfg clk_cfg_all[] = {\ - /* NorthBridge */\ - {{TBG_B_S, TBG_B_S, TBG_B_S, TBG_B_S, TBG_B_S, TBG_B_S, TBG_B_S,\ - TBG_B_S, TBG_A_S, TBG_B_S, TBG_A_P, TBG_B_S, TBG_A_S},\ -- {3, 4, 3, 4, 1, 1, 5, 1}, /* DIV0 */\ -+ {6, 4, 3, 4, 1, 1, 5, 1}, /* DIV0 */\ - {1, 6, 3, 4, 1, 6, 1, 1, 6}, /* DIV1 */\ - {4, 1, 6, 1, 3, 1, 3, 0, 0, 1} }, /* DIV2 */\ - /* SouthBridge */\ --- -2.30.2 - diff --git a/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/102-avs-Validate-VDD-value-from-OTP.patch b/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/102-avs-Validate-VDD-value-from-OTP.patch deleted file mode 100644 index d44eb21181..0000000000 --- a/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/102-avs-Validate-VDD-value-from-OTP.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 15ff10623c83ee2e626d93d16e022b115dcb608f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Pali=20Roh=C3=A1r?= -Date: Sat, 10 Apr 2021 16:56:12 +0200 -Subject: [PATCH] avs: Validate VDD value from OTP -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -CPU VDD voltage value for 1.2 GHz frequency on some Espressobin boards is -not set and raw value 0x00 is returned. In this case init_avs() function -calculated CPU VDD voltage value to 0x00 + AVS_VDD_BASE = 0.898 V, which is -too low for any operation and Espressobin board immediately crashed -init_avs() function set this low value. - -This patch fixes above issue by validating returned VDD value from OTP and -using default VDD value when invalid value is in OTP. With this patch -init_avs() function does cause CPU crash anymore. - -Signed-off-by: Pali Rohár -Signed-off-by: Marek Behún ---- - wtmi/avs.c | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -diff --git a/wtmi/avs.c b/wtmi/avs.c -index 36ca9fa..4624359 100644 ---- a/wtmi/avs.c -+++ b/wtmi/avs.c -@@ -140,10 +140,16 @@ int init_avs(u32 speed) - } - - if (svc_rev >= SVC_REVISION_2) { -- vdd_otp = ((otp_data[OTP_DATA_SVC_SPEED_ID] >> shift) + -- AVS_VDD_BASE) & AVS_VDD_MASK; -- regval |= (vdd_otp << HIGH_VDD_LIMIT_OFF); -- regval |= (vdd_otp << LOW_VDD_LIMIT_OFF); -+ vdd_otp = (otp_data[OTP_DATA_SVC_SPEED_ID] >> shift) & -+ AVS_VDD_MASK; -+ if (!vdd_otp || vdd_otp + AVS_VDD_BASE > AVS_VDD_MASK) { -+ regval |= (vdd_default << HIGH_VDD_LIMIT_OFF); -+ regval |= (vdd_default << LOW_VDD_LIMIT_OFF); -+ } else { -+ vdd_otp += AVS_VDD_BASE; -+ regval |= (vdd_otp << HIGH_VDD_LIMIT_OFF); -+ regval |= (vdd_otp << LOW_VDD_LIMIT_OFF); -+ } - } else { - regval |= (vdd_default << HIGH_VDD_LIMIT_OFF); - regval |= (vdd_default << LOW_VDD_LIMIT_OFF); --- -2.30.2 -