From 3001d3c5d446bf53fc222640d49a4cc79e04a2f3 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sun, 9 Jun 2024 19:34:46 +0200 Subject: [PATCH 1/5] mpc85xx: fix WS-AP3710i boot On master, the bootwrapper link-address for all simpleImage targets was relocated to 0x15000000 due to growing kernel size. This was not done on OpenWrt 23.05, as the decompressed kernel still fits. However, with the wrapper for the WS-AP3710i, the bootloader attempts execute in-place with the uImage load-address of 0x1000000. As the image is compiled without the uImage header in mind, this naturally fails. In order to fix this, link the WS-AP3715i simpleImage at 0x15000000 as done in master. This will force the bootloader to relocate the code to the proper address and skip XIP. Signed-off-by: David Bauer --- target/linux/mpc85xx/image/p1020.mk | 4 ++-- .../106-powerpc-85xx-ws-ap3710i-support.patch | 12 +++++++----- .../107-powerpc-85xx-add-ws-ap3825i-support.patch | 8 ++++---- .../109-powerpc-85xx-add-ws-ap3715i-support.patch | 4 ++-- .../110-powerpc-85xx-br200-wp-support.patch | 2 +- .../111-powerpc-85xx-hpe-msm-support.patch | 2 +- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/target/linux/mpc85xx/image/p1020.mk b/target/linux/mpc85xx/image/p1020.mk index b9fb15ed93211..1ec90a233d9c5 100644 --- a/target/linux/mpc85xx/image/p1020.mk +++ b/target/linux/mpc85xx/image/p1020.mk @@ -63,8 +63,8 @@ define Device/enterasys_ws-ap3710i DEVICE_MODEL := WS-AP3710i BLOCKSIZE := 128k KERNEL_NAME := simpleImage.ws-ap3710i - KERNEL_ENTRY := 0x1000000 - KERNEL_LOADADDR := 0x1000000 + KERNEL_ENTRY := 0x1500000 + KERNEL_LOADADDR := 0x1500000 KERNEL = kernel-bin | uImage none KERNEL_INITRAMFS := kernel-bin | uImage none IMAGES := sysupgrade.bin diff --git a/target/linux/mpc85xx/patches-5.15/106-powerpc-85xx-ws-ap3710i-support.patch b/target/linux/mpc85xx/patches-5.15/106-powerpc-85xx-ws-ap3710i-support.patch index 1edc2aa56bd9d..c189d695abf9d 100644 --- a/target/linux/mpc85xx/patches-5.15/106-powerpc-85xx-ws-ap3710i-support.patch +++ b/target/linux/mpc85xx/patches-5.15/106-powerpc-85xx-ws-ap3710i-support.patch @@ -48,13 +48,15 @@ --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper -@@ -326,7 +326,8 @@ adder875-redboot) - platformo="$object/fixed-head.o $object/redboot-8xx.o" +@@ -331,6 +331,11 @@ simpleboot-tl-wdr4900-v1) + link_address='0x1000000' binary=y ;; --simpleboot-tl-wdr4900-v1) -+simpleboot-tl-wdr4900-v1|\ +simpleboot-ws-ap3710i) ++ platformo="$object/fixed-head.o $object/simpleboot.o" ++ link_address='0x1500000' ++ binary=y ++ ;; + simpleboot-*) platformo="$object/fixed-head.o $object/simpleboot.o" - link_address='0x1000000' binary=y diff --git a/target/linux/mpc85xx/patches-5.15/107-powerpc-85xx-add-ws-ap3825i-support.patch b/target/linux/mpc85xx/patches-5.15/107-powerpc-85xx-add-ws-ap3825i-support.patch index 3f05c906af839..ddd16d369e815 100644 --- a/target/linux/mpc85xx/patches-5.15/107-powerpc-85xx-add-ws-ap3825i-support.patch +++ b/target/linux/mpc85xx/patches-5.15/107-powerpc-85xx-add-ws-ap3825i-support.patch @@ -47,12 +47,12 @@ WS-AP3825i AP. --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper -@@ -327,7 +327,8 @@ adder875-redboot) +@@ -326,7 +326,8 @@ adder875-redboot) + platformo="$object/fixed-head.o $object/redboot-8xx.o" binary=y ;; - simpleboot-tl-wdr4900-v1|\ --simpleboot-ws-ap3710i) -+simpleboot-ws-ap3710i|\ +-simpleboot-tl-wdr4900-v1) ++simpleboot-tl-wdr4900-v1|\ +simpleboot-ws-ap3825i) platformo="$object/fixed-head.o $object/simpleboot.o" link_address='0x1000000' diff --git a/target/linux/mpc85xx/patches-5.15/109-powerpc-85xx-add-ws-ap3715i-support.patch b/target/linux/mpc85xx/patches-5.15/109-powerpc-85xx-add-ws-ap3715i-support.patch index fe9abbb1e2fd8..ad8f4840b9897 100644 --- a/target/linux/mpc85xx/patches-5.15/109-powerpc-85xx-add-ws-ap3715i-support.patch +++ b/target/linux/mpc85xx/patches-5.15/109-powerpc-85xx-add-ws-ap3715i-support.patch @@ -40,10 +40,10 @@ image-$(CONFIG_MVME7100) += dtbImage.mvme7100 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper -@@ -328,6 +328,7 @@ adder875-redboot) +@@ -327,6 +327,7 @@ adder875-redboot) + binary=y ;; simpleboot-tl-wdr4900-v1|\ - simpleboot-ws-ap3710i|\ +simpleboot-ws-ap3715i|\ simpleboot-ws-ap3825i) platformo="$object/fixed-head.o $object/simpleboot.o" diff --git a/target/linux/mpc85xx/patches-5.15/110-powerpc-85xx-br200-wp-support.patch b/target/linux/mpc85xx/patches-5.15/110-powerpc-85xx-br200-wp-support.patch index ef05df3430371..51968a0c91533 100644 --- a/target/linux/mpc85xx/patches-5.15/110-powerpc-85xx-br200-wp-support.patch +++ b/target/linux/mpc85xx/patches-5.15/110-powerpc-85xx-br200-wp-support.patch @@ -53,5 +53,5 @@ ;; +simpleboot-br200-wp|\ simpleboot-tl-wdr4900-v1|\ - simpleboot-ws-ap3710i|\ simpleboot-ws-ap3715i|\ + simpleboot-ws-ap3825i) diff --git a/target/linux/mpc85xx/patches-5.15/111-powerpc-85xx-hpe-msm-support.patch b/target/linux/mpc85xx/patches-5.15/111-powerpc-85xx-hpe-msm-support.patch index 10ad4b98bdd08..d9c2e83efa850 100644 --- a/target/linux/mpc85xx/patches-5.15/111-powerpc-85xx-hpe-msm-support.patch +++ b/target/linux/mpc85xx/patches-5.15/111-powerpc-85xx-hpe-msm-support.patch @@ -1,6 +1,6 @@ --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig -@@ -114,6 +114,17 @@ config FIREBOX_T10 +@@ -123,6 +123,17 @@ config FIREBOX_T10 This board is a VPN Gateway-Router with a Freescale P1010 SoC. From d8415fa2708b91f8b3cf67c11ed307e76d4b05a2 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Fri, 14 Jun 2024 22:50:26 +0200 Subject: [PATCH 2/5] mpc85xx: fix Enterasys WS-AP3710i eth mac-address With the introduction of the simpleImage loader, the MAC address is not set by the bootloader anymore. Fix this by reading the MAC address from the U-Boot environment partition. Signed-off-by: David Bauer (cherry picked from commit 22f92cce22401ef7df44357a7e6921d2cf45c840) --- target/linux/mpc85xx/base-files/lib/preinit/10_fix_eth_mac.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/linux/mpc85xx/base-files/lib/preinit/10_fix_eth_mac.sh b/target/linux/mpc85xx/base-files/lib/preinit/10_fix_eth_mac.sh index ddb9bef1416ae..fc4beaef1a8cc 100644 --- a/target/linux/mpc85xx/base-files/lib/preinit/10_fix_eth_mac.sh +++ b/target/linux/mpc85xx/base-files/lib/preinit/10_fix_eth_mac.sh @@ -3,6 +3,9 @@ preinit_set_mac_address() { case $(board_name) in + enterasys,ws-ap3710i) + ip link set dev eth0 address $(mtd_get_mac_ascii cfg1 ethaddr) + ;; enterasys,ws-ap3715i|\ extreme-networks,ws-ap3825i) ip link set dev eth0 address $(mtd_get_mac_ascii cfg1 ethaddr) From e367ba9ec4cde1159120fd34d3dbbd99f38da72a Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sun, 16 Jun 2024 01:33:19 +0200 Subject: [PATCH 3/5] mpc85xx: fix label-mac-address for Enterasys WS-AP3710i The WS-AP3710i does not correctly expose its label-mac on eth0 anymore since the change to simpleLoader. Fix this by obtaining the label-mac from the U-Boot environment. Signed-off-by: David Bauer (cherry picked from commit e321e70ddcd82e0b4a5ad695b83a88d44cde02b4) --- target/linux/mpc85xx/base-files/etc/board.d/02_network | 4 ++++ .../linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/target/linux/mpc85xx/base-files/etc/board.d/02_network b/target/linux/mpc85xx/base-files/etc/board.d/02_network index caf00ef414abf..2574ebc9b9458 100644 --- a/target/linux/mpc85xx/base-files/etc/board.d/02_network +++ b/target/linux/mpc85xx/base-files/etc/board.d/02_network @@ -16,6 +16,10 @@ aerohive,hiveap-330|\ enterasys,ws-ap3715i) ucidef_set_interfaces_lan_wan "eth1" "eth0" ;; +enterasys,ws-ap3710i) + ucidef_set_interface_lan "eth0" + ucidef_set_label_macaddr "$(mtd_get_mac_ascii cfg1 ethaddr)" + ;; hpe,msm460) ucidef_set_interface_lan "eth0" ;; diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts index 2eb6f6e21ec9b..4c223bb60235e 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts @@ -15,7 +15,6 @@ led-failsafe = &led_power_red; led-running = &led_power_green; led-upgrade = &led_power_red; - label-mac-device = &enet0; }; chosen { From 50148a40d2b0de8adddd8f11b95d6436355c431e Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 16 May 2024 22:15:08 +0200 Subject: [PATCH 4/5] mt76: update to Git HEAD (2024-03-18) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit a903d3169193 wifi: mt76: mt7921: fix a potential association failure upon resuming eb0d0ce344f3 wifi: mt76: mt7921: fix suspend issue on MediaTek COB platform 841bf82e9958 wifi: mt76: fix the issue of missing txpwr settings from ch153 to ch177 ce7ccc540168 wifi: mt76: Remove redundant assignment to variable tidno a238df940d6f wifi: mt76: mt7915: initialize rssi on adding stations 46c7d1849dbd wifi: mt76: replace skb_put with skb_put_zero b5640b3153c7 wifi: mt76: fix tx packet loss when scanning on DBDC 7b054e5cb3af wifi: mt76: mt7915: fix mcu command format for mt7915 tx stats 3f27a64a8010 wifi: mt76: mt7915: fix bogus Tx/Rx airtime duration values 4f681a8fbc91 wifi: mt76: mt7915: fix HE PHY capabilities IE for station mode 8ede229eb8b5 wifi: mt76: mt7915: only set MT76_MCU_RESET for the main phy 2330781b8c5f wifi: mt76: mt7996: only set MT76_MCU_RESET for the main phy e5fb6995e7eb wifi: mt76: mt7915: add support for disabling in-band discovery b4a917417c85 wifi: mt76: mt7915: add mt7986, mt7916 and mt7981 pre-calibration 2135e201e7a9 mt76: mt7915: add fallback in case of missing precal data Signed-off-by: Felix Fietkau (cherry picked from commit 85ad6b9569683d6cc5808d1797af7de0e781aa1d) Signed-off-by: Rafał Miłecki --- package/kernel/mt76/Makefile | 6 ++-- ...e-issue-of-missing-txpwr-settings-fr.patch | 28 ------------------- 2 files changed, 3 insertions(+), 31 deletions(-) delete mode 100644 package/kernel/mt76/patches/0001-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 9957c99999fa5..cb71d9eeaec6f 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2024-02-03 -PKG_SOURCE_VERSION:=6124ea9135ed512671933f5520c46842906c78bc -PKG_MIRROR_HASH:=acc326d7b15c9c72b494ed601300be329553f896e65c7f045e6a09327304c34a +PKG_SOURCE_DATE:=2024-03-18 +PKG_SOURCE_VERSION:=2135e201e7a9339e018d4e2d4a33c73266e674d7 +PKG_MIRROR_HASH:=810f636c60c86e6a426c676c3bf7aaea2f711feb31f4a66889d485112b612745 PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 diff --git a/package/kernel/mt76/patches/0001-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch b/package/kernel/mt76/patches/0001-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch deleted file mode 100644 index ef7816a1a70c9..0000000000000 --- a/package/kernel/mt76/patches/0001-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 841bf82e99581f648325bee570de98892cad894f Mon Sep 17 00:00:00 2001 -From: Ming Yen Hsieh -Date: Wed, 7 Feb 2024 11:31:23 +0800 -Subject: [PATCH] wifi: mt76: fix the issue of missing txpwr settings from - ch153 to ch177 - -Because the number of channels to be configured is calculated using the %, -and it results in 0 when there's an exact division, this leads to some -channels not having their tx power configured. - -Fixes: 7801da338856 ("wifi: mt76: mt7921: enable set txpower for UNII-4") -Signed-off-by: Ming Yen Hsieh -Signed-off-by: Felix Fietkau ---- - mt76_connac_mcu.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/mt76_connac_mcu.c -+++ b/mt76_connac_mcu.c -@@ -2104,7 +2104,7 @@ mt76_connac_mcu_rate_txpower_band(struct - int j, msg_len, num_ch; - struct sk_buff *skb; - -- num_ch = i == batch_size - 1 ? n_chan % batch_len : batch_len; -+ num_ch = i == batch_size - 1 ? n_chan - i * batch_len : batch_len; - msg_len = sizeof(tx_power_tlv) + num_ch * sizeof(sku_tlbv); - skb = mt76_mcu_msg_alloc(dev, NULL, msg_len); - if (!skb) { From cc0527b36281e7347f4da1b1169e11e7215c8c60 Mon Sep 17 00:00:00 2001 From: Roman Azarenko Date: Tue, 4 Jun 2024 18:00:03 +0200 Subject: [PATCH 5/5] build: add explicit timezone in CycloneDX SBOM The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. Per the CycloneDX 1.4 spec, the `metadata.timestamp` field contains the date/time when the BOM was created [1]. Before the change, the value generated by the package-metadata.pl script would look like this: 2024-06-03T15:51:10 CycloneDX 1.4 relies on the JSON Schema specification version draft-07, which defines the `date-time` format [2] as derived from RFC 3339, section 5.6 [3]. In this format, the `time-offset` component is required, however in the original version of package-metadata.pl it is omitted. This is causing problems with OWASP Dependency-Track version 4.11.0 or newer, where it now validates submitted SBOMs against the JSON schema by default [4]. SBOMs with incorrect timestamp values are rejected with the following error: { "detail": "Schema validation failed", "errors": [ "$.metadata.timestamp: 2024-06-03T15:51:10 is an invalid date-time" ], "status": 400, "title": "The uploaded BOM is invalid" } Add explicit `Z` (UTC) timezone offset in the `timestamp` field to satisfy the CycloneDX schema. [1]: https://github.com/CycloneDX/specification/blob/1.4/schema/bom-1.4.schema.json#L116-L121 [2]: https://json-schema.org/draft-07/draft-handrews-json-schema-validation-01#rfc.section.7.3.1 [3]: https://datatracker.ietf.org/doc/html/rfc3339#section-5.6 [4]: https://github.com/DependencyTrack/dependency-track/pull/3522 Signed-off-by: Roman Azarenko (cherry picked from commit 2ded629864de779df8ddd0224a875edf17f9fea5) Link: https://github.com/openwrt/openwrt/pull/15693 Signed-off-by: Christian Marangi --- scripts/package-metadata.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index b4855ce67ab5e..1b46714afe238 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -653,7 +653,7 @@ sub dump_cyclonedxsbom_json { serialNumber => "urn:uuid:$uuid", version => 1, metadata => { - timestamp => gmtime->datetime, + timestamp => gmtime->datetime . 'Z', }, "components" => [@components], };