From 04ee513ededec3c396af2787ad9deb93447e25aa Mon Sep 17 00:00:00 2001 From: Tomasz Maciej Nowak Date: Tue, 11 Jul 2023 16:06:21 +0200 Subject: [PATCH 01/16] ib: split out processing user provided packages Some device recipes remove default target packages. If user tries to add them back they will be ignored, since packages list is processed in one go. Process the device recipe packages first and do user ones later, so additions won't get filtered out. Signed-off-by: Tomasz Maciej Nowak (cherry picked from commit e40b9a7fa002154e85459791101a0444d99dfb86) --- target/imagebuilder/files/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile index eadb0ebe85..a8708bc882 100644 --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile @@ -108,9 +108,11 @@ _call_info: FORCE echo 'Available Profiles:' echo; $(PROFILE_LIST) -BUILD_PACKAGES:=$(USER_PACKAGES) $(sort $(DEFAULT_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel) +BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel) # "-pkgname" in the package list means remove "pkgname" from the package list BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES)) +BUILD_PACKAGES:=$(USER_PACKAGES) $(BUILD_PACKAGES) +BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES)) PACKAGES:= _call_image: staging_dir/host/.prereq-build From 47054075e2a8d37a4f83d27572c4b97b08b8cb5c Mon Sep 17 00:00:00 2001 From: Tomasz Maciej Nowak Date: Tue, 11 Jul 2023 16:09:49 +0200 Subject: [PATCH 02/16] sdk: rename README + update Makefile 'help' target fails not finding a file, so follow up on a change[2] made as a fix for main README[1]. 1. d0113711a31f ("README: port to 21st century") 2. 751486b31fd9 ("build: fix README.md reference after rename") Signed-off-by: Tomasz Maciej Nowak (cherry picked from commit 2d5f7035cf45801158bed6f5d0ac0de0002c1810) (cherry picked from commit e9911f10e482f3174f745a36c0c9fd7964758caf) Signed-off-by: Christian Lamparter --- target/sdk/Makefile | 2 +- target/sdk/files/{README.SDK => README.md} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename target/sdk/files/{README.SDK => README.md} (100%) diff --git a/target/sdk/Makefile b/target/sdk/Makefile index be7e1ebf51..c0ba6a2726 100644 --- a/target/sdk/Makefile +++ b/target/sdk/Makefile @@ -147,7 +147,7 @@ $(BIN_DIR)/$(SDK_NAME).tar.xz: clean ./files/Config.in \ ./files/Makefile \ ./files/include/prepare.mk \ - ./files/README.SDK \ + ./files/README.md \ $(SDK_BUILD_DIR)/ mkdir -p $(SDK_BUILD_DIR)/package/kernel $(CP) \ diff --git a/target/sdk/files/README.SDK b/target/sdk/files/README.md similarity index 100% rename from target/sdk/files/README.SDK rename to target/sdk/files/README.md From 4ceaf439a56a856f664a5edbbcad2d8f08d0f6c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Sun, 23 Jul 2023 22:41:18 +0200 Subject: [PATCH 03/16] bcm53xx: add BCM53573 Ethernet fix sent upstream for v6.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems that DSA-based b53 driver never worked with BCM53573 SoCs and BCM53125. In case of swconfig-based b53 this fixes a regression. Switching bgmac from using mdiobus_register() to of_mdiobus_register() resulted in MDIO device (BCM53125) having of_node set (see of_mdiobus_register_phy()). That made downstream b53 driver read invalid data from DT and broke Ethernet support. Signed-off-by: Rafał Miłecki (cherry picked from commit 79fd3e62b4910731c13692b2daa2083e0f95c023) --- ...M53573-Fix-Tenda-AC9-switch-CPU-port.patch | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 target/linux/bcm53xx/patches-5.4/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch diff --git a/target/linux/bcm53xx/patches-5.4/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch b/target/linux/bcm53xx/patches-5.4/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch new file mode 100644 index 0000000000..7a35dcad81 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.4/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch @@ -0,0 +1,28 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Sun, 23 Jul 2023 19:48:13 +0200 +Subject: [PATCH 1/3] ARM: dts: BCM53573: Fix Tenda AC9 switch CPU port +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Primary Ethernet interface is connected to the port 8 (not 5). + +Fixes: 64612828628c ("ARM: dts: BCM53573: Add Tenda AC9 switch ports") +Signed-off-by: Rafał Miłecki +--- + arch/arm/boot/dts/broadcom/bcm47189-tenda-ac9.dts | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/arm/boot/dts/bcm47189-tenda-ac9.dts ++++ b/arch/arm/boot/dts/bcm47189-tenda-ac9.dts +@@ -135,8 +135,8 @@ + label = "lan4"; + }; + +- port@5 { +- reg = <5>; ++ port@8 { ++ reg = <8>; + label = "cpu"; + ethernet = <&gmac0>; + }; From 170d9e447df0f52882a8b7a61bf940b062b2cacc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Sat, 29 Jul 2023 17:02:28 +0200 Subject: [PATCH 04/16] bcm53xx: backport more DT changes queued for v6.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Those sort out BCM53573 Ethernet info finally. Signed-off-by: Rafał Miłecki (cherry picked from commit ca8868a51127f6081a524d47eab937b90af0bf05) --- ...Fix-Ethernet-info-for-Luxul-devices.patch} | 5 +- ...M-dts-bcm5301x-Add-SEAMA-compatibles.patch | 36 +++++++ ...53573-Fix-Tenda-AC9-switch-CPU-port.patch} | 7 +- ...-Describe-BCM53125-switch-ports-in-t.patch | 97 +++++++++++++++++++ ...-BCM53573-Add-BCM53125-switch-port-5.patch | 36 +++++++ ...M53573-Add-Ethernet-interfaces-links.patch | 73 ++++++++++++++ ...-Disable-second-Ethernet-on-Luxul-de.patch | 39 ++++++++ ...-BCM5301X-Describe-partition-formats.patch | 25 ----- 8 files changed, 290 insertions(+), 28 deletions(-) rename target/linux/bcm53xx/patches-5.4/{130-ARM-dts-BCM53573-Fix-Ethernet-info-for-Luxul-devices.patch => 044-v6.6-0009-ARM-dts-BCM53573-Fix-Ethernet-info-for-Luxul-devices.patch} (88%) create mode 100644 target/linux/bcm53xx/patches-5.4/044-v6.6-0010-ARM-dts-bcm5301x-Add-SEAMA-compatibles.patch rename target/linux/bcm53xx/patches-5.4/{131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch => 044-v6.6-0011-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch} (69%) create mode 100644 target/linux/bcm53xx/patches-5.4/044-v6.6-0012-ARM-dts-BCM53573-Describe-BCM53125-switch-ports-in-t.patch create mode 100644 target/linux/bcm53xx/patches-5.4/044-v6.6-0013-ARM-dts-BCM53573-Add-BCM53125-switch-port-5.patch create mode 100644 target/linux/bcm53xx/patches-5.4/044-v6.6-0014-ARM-dts-BCM53573-Add-Ethernet-interfaces-links.patch create mode 100644 target/linux/bcm53xx/patches-5.4/044-v6.6-0015-ARM-dts-BCM53573-Disable-second-Ethernet-on-Luxul-de.patch delete mode 100644 target/linux/bcm53xx/patches-5.4/321-ARM-dts-BCM5301X-Describe-partition-formats.patch diff --git a/target/linux/bcm53xx/patches-5.4/130-ARM-dts-BCM53573-Fix-Ethernet-info-for-Luxul-devices.patch b/target/linux/bcm53xx/patches-5.4/044-v6.6-0009-ARM-dts-BCM53573-Fix-Ethernet-info-for-Luxul-devices.patch similarity index 88% rename from target/linux/bcm53xx/patches-5.4/130-ARM-dts-BCM53573-Fix-Ethernet-info-for-Luxul-devices.patch rename to target/linux/bcm53xx/patches-5.4/044-v6.6-0009-ARM-dts-BCM53573-Fix-Ethernet-info-for-Luxul-devices.patch index 381a8c3894..07dd9296b6 100644 --- a/target/linux/bcm53xx/patches-5.4/130-ARM-dts-BCM53573-Fix-Ethernet-info-for-Luxul-devices.patch +++ b/target/linux/bcm53xx/patches-5.4/044-v6.6-0009-ARM-dts-BCM53573-Fix-Ethernet-info-for-Luxul-devices.patch @@ -1,5 +1,6 @@ +From 44ad8207806973f4e4f7d870fff36cc01f494250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Thu, 13 Jul 2023 13:05:44 +0200 +Date: Thu, 13 Jul 2023 13:11:45 +0200 Subject: [PATCH] ARM: dts: BCM53573: Fix Ethernet info for Luxul devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -27,6 +28,8 @@ to work properly. Fixes: 9fb90ae6cae7 ("ARM: dts: BCM53573: Describe on-SoC BCM53125 rev 4 switch") Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20230713111145.14864-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli --- .../boot/dts/broadcom/bcm47189-luxul-xap-1440.dts | 13 +++++++++++++ .../boot/dts/broadcom/bcm47189-luxul-xap-810.dts | 13 +++++++++++++ diff --git a/target/linux/bcm53xx/patches-5.4/044-v6.6-0010-ARM-dts-bcm5301x-Add-SEAMA-compatibles.patch b/target/linux/bcm53xx/patches-5.4/044-v6.6-0010-ARM-dts-bcm5301x-Add-SEAMA-compatibles.patch new file mode 100644 index 0000000000..f23873e111 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.4/044-v6.6-0010-ARM-dts-bcm5301x-Add-SEAMA-compatibles.patch @@ -0,0 +1,36 @@ +From 72ec77d74d28be7359ef77971cdee38b60af9e49 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Thu, 13 Jul 2023 00:16:42 +0200 +Subject: [PATCH] ARM: dts: bcm5301x: Add SEAMA compatibles + +This adds SEAMA compatibles to the firmware partition of these +two D-Link devices. + +Signed-off-by: Linus Walleij +Link: https://lore.kernel.org/r/20230713-seama-partitions-v4-2-69e577453d40@linaro.org +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/broadcom/bcm47094-dlink-dir-885l.dts | 1 + + arch/arm/boot/dts/broadcom/bcm47094-dlink-dir-890l.dts | 1 + + 2 files changed, 2 insertions(+) + +--- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts ++++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts +@@ -33,6 +33,7 @@ + #size-cells = <1>; + + partition@0 { ++ compatible = "seama"; + label = "firmware"; + reg = <0x00000000 0x08000000>; + }; +--- a/arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts ++++ b/arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts +@@ -149,6 +149,7 @@ + * partitions: this device uses SEAMA. + */ + firmware@0 { ++ compatible = "seama"; + label = "firmware"; + reg = <0x00000000 0x08000000>; + }; diff --git a/target/linux/bcm53xx/patches-5.4/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch b/target/linux/bcm53xx/patches-5.4/044-v6.6-0011-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch similarity index 69% rename from target/linux/bcm53xx/patches-5.4/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch rename to target/linux/bcm53xx/patches-5.4/044-v6.6-0011-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch index 7a35dcad81..d5cb817e8e 100644 --- a/target/linux/bcm53xx/patches-5.4/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch +++ b/target/linux/bcm53xx/patches-5.4/044-v6.6-0011-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch @@ -1,6 +1,7 @@ +From 7141209db9c335ab261a17933809a3e660ebdc12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Sun, 23 Jul 2023 19:48:13 +0200 -Subject: [PATCH 1/3] ARM: dts: BCM53573: Fix Tenda AC9 switch CPU port +Date: Sun, 23 Jul 2023 21:54:14 +0200 +Subject: [PATCH] ARM: dts: BCM53573: Fix Tenda AC9 switch CPU port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -9,6 +10,8 @@ Primary Ethernet interface is connected to the port 8 (not 5). Fixes: 64612828628c ("ARM: dts: BCM53573: Add Tenda AC9 switch ports") Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20230723195416.7831-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli --- arch/arm/boot/dts/broadcom/bcm47189-tenda-ac9.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/bcm53xx/patches-5.4/044-v6.6-0012-ARM-dts-BCM53573-Describe-BCM53125-switch-ports-in-t.patch b/target/linux/bcm53xx/patches-5.4/044-v6.6-0012-ARM-dts-BCM53573-Describe-BCM53125-switch-ports-in-t.patch new file mode 100644 index 0000000000..ab27495078 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.4/044-v6.6-0012-ARM-dts-BCM53573-Describe-BCM53125-switch-ports-in-t.patch @@ -0,0 +1,97 @@ +From 8d6b61ecad2f1c939813c5c4517d53e04672dc48 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Sun, 23 Jul 2023 21:54:15 +0200 +Subject: [PATCH] ARM: dts: BCM53573: Describe BCM53125 switch ports in the + main DTS +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +BCM53125 always has 5 ports with GPHYs (for LAN/WAN ports) and 2 IMP +ports. It seems the best place to describe that in the main .dtsi. +Device specific bits can go to device .dts files. This will help +avoiding some code duplication. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20230723195416.7831-2-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + .../boot/dts/broadcom/bcm47189-tenda-ac9.dts | 7 ----- + arch/arm/boot/dts/broadcom/bcm53573.dtsi | 26 ++++++++++++++++++- + 2 files changed, 25 insertions(+), 8 deletions(-) + +--- a/arch/arm/boot/dts/bcm47189-tenda-ac9.dts ++++ b/arch/arm/boot/dts/bcm47189-tenda-ac9.dts +@@ -111,34 +111,27 @@ + + ports { + port@0 { +- reg = <0>; + label = "wan"; + }; + + port@1 { +- reg = <1>; + label = "lan1"; + }; + + port@2 { +- reg = <2>; + label = "lan2"; + }; + + port@3 { +- reg = <3>; + label = "lan3"; + }; + + port@4 { +- reg = <4>; + label = "lan4"; + }; + + port@8 { +- reg = <8>; + label = "cpu"; +- ethernet = <&gmac0>; + }; + }; + }; +--- a/arch/arm/boot/dts/bcm53573.dtsi ++++ b/arch/arm/boot/dts/bcm53573.dtsi +@@ -192,10 +192,34 @@ + + status = "disabled"; + +- /* ports are defined in board DTS */ + ports { + #address-cells = <1>; + #size-cells = <0>; ++ ++ port@0 { ++ reg = <0>; ++ }; ++ ++ port@1 { ++ reg = <1>; ++ }; ++ ++ port@2 { ++ reg = <2>; ++ }; ++ ++ port@3 { ++ reg = <3>; ++ }; ++ ++ port@4 { ++ reg = <4>; ++ }; ++ ++ port@8 { ++ reg = <8>; ++ ethernet = <&gmac0>; ++ }; + }; + }; + }; diff --git a/target/linux/bcm53xx/patches-5.4/044-v6.6-0013-ARM-dts-BCM53573-Add-BCM53125-switch-port-5.patch b/target/linux/bcm53xx/patches-5.4/044-v6.6-0013-ARM-dts-BCM53573-Add-BCM53125-switch-port-5.patch new file mode 100644 index 0000000000..cc9e86ac75 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.4/044-v6.6-0013-ARM-dts-BCM53573-Add-BCM53125-switch-port-5.patch @@ -0,0 +1,36 @@ +From d95b1caeea194962220db1778ce7fe71cdba788b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Sun, 23 Jul 2023 21:54:16 +0200 +Subject: [PATCH] ARM: dts: BCM53573: Add BCM53125 switch port 5 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It's connected to the extra Ethernet interface. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20230723195416.7831-3-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/broadcom/bcm53573.dtsi | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/arch/arm/boot/dts/bcm53573.dtsi ++++ b/arch/arm/boot/dts/bcm53573.dtsi +@@ -216,6 +216,16 @@ + reg = <4>; + }; + ++ port@5 { ++ reg = <5>; ++ ethernet = <&gmac1>; ++ ++ fixed-link { ++ speed = <1000>; ++ full-duplex; ++ }; ++ }; ++ + port@8 { + reg = <8>; + ethernet = <&gmac0>; diff --git a/target/linux/bcm53xx/patches-5.4/044-v6.6-0014-ARM-dts-BCM53573-Add-Ethernet-interfaces-links.patch b/target/linux/bcm53xx/patches-5.4/044-v6.6-0014-ARM-dts-BCM53573-Add-Ethernet-interfaces-links.patch new file mode 100644 index 0000000000..f97d4edd75 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.4/044-v6.6-0014-ARM-dts-BCM53573-Add-Ethernet-interfaces-links.patch @@ -0,0 +1,73 @@ +From e0ae343a2c1b782a346d9b844ea65e1d49c428b2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 24 Jul 2023 12:12:27 +0200 +Subject: [PATCH] ARM: dts: BCM53573: Add Ethernet interfaces links +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +BCM53573 has 2 Ethernet interfaces each connected to one of switch ports +in the default design. They both use fixed links. + +An exception are Luxul XAP devices that have switch replaced by a single +PHY. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20230724101227.5420-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + .../boot/dts/broadcom/bcm47189-luxul-xap-1440.dts | 2 ++ + .../arm/boot/dts/broadcom/bcm47189-luxul-xap-810.dts | 2 ++ + arch/arm/boot/dts/broadcom/bcm53573.dtsi | 12 ++++++++++++ + 3 files changed, 16 insertions(+) + +--- a/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts ++++ b/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts +@@ -50,6 +50,8 @@ + phy-mode = "rgmii"; + phy-handle = <&bcm54210e>; + ++ /delete-node/ fixed-link; ++ + mdio { + /delete-node/ switch@1e; + +--- a/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts ++++ b/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts +@@ -86,6 +86,8 @@ + phy-mode = "rgmii"; + phy-handle = <&bcm54210e>; + ++ /delete-node/ fixed-link; ++ + mdio { + /delete-node/ switch@1e; + +--- a/arch/arm/boot/dts/bcm53573.dtsi ++++ b/arch/arm/boot/dts/bcm53573.dtsi +@@ -181,6 +181,12 @@ + + gmac0: ethernet@5000 { + reg = <0x5000 0x1000>; ++ phy-mode = "internal"; ++ ++ fixed-link { ++ speed = <1000>; ++ full-duplex; ++ }; + + mdio { + #address-cells = <1>; +@@ -237,6 +243,12 @@ + + gmac1: ethernet@b000 { + reg = <0xb000 0x1000>; ++ phy-mode = "internal"; ++ ++ fixed-link { ++ speed = <1000>; ++ full-duplex; ++ }; + }; + + pmu@12000 { diff --git a/target/linux/bcm53xx/patches-5.4/044-v6.6-0015-ARM-dts-BCM53573-Disable-second-Ethernet-on-Luxul-de.patch b/target/linux/bcm53xx/patches-5.4/044-v6.6-0015-ARM-dts-BCM53573-Disable-second-Ethernet-on-Luxul-de.patch new file mode 100644 index 0000000000..166f602452 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.4/044-v6.6-0015-ARM-dts-BCM53573-Disable-second-Ethernet-on-Luxul-de.patch @@ -0,0 +1,39 @@ +From d8835601e3c306fda78f8736f1aef688e99e892d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 24 Jul 2023 12:11:59 +0200 +Subject: [PATCH] ARM: dts: BCM53573: Disable second Ethernet on Luxul devices +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +XAP-810 and XAP-1440 both have a single Ethernet port and BCM54210E PHY. +Their second Ethernet interface is not connected to anything. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20230724101159.5289-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/broadcom/bcm47189-luxul-xap-1440.dts | 4 ++++ + arch/arm/boot/dts/broadcom/bcm47189-luxul-xap-810.dts | 4 ++++ + 2 files changed, 8 insertions(+) + +--- a/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts ++++ b/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts +@@ -60,3 +60,7 @@ + }; + }; + }; ++ ++&gmac1 { ++ status = "disabled"; ++}; +--- a/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts ++++ b/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts +@@ -96,3 +96,7 @@ + }; + }; + }; ++ ++&gmac1 { ++ status = "disabled"; ++}; diff --git a/target/linux/bcm53xx/patches-5.4/321-ARM-dts-BCM5301X-Describe-partition-formats.patch b/target/linux/bcm53xx/patches-5.4/321-ARM-dts-BCM5301X-Describe-partition-formats.patch deleted file mode 100644 index f2861177dd..0000000000 --- a/target/linux/bcm53xx/patches-5.4/321-ARM-dts-BCM5301X-Describe-partition-formats.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 7166207bd1d8c46d09d640d46afc685df9bb9083 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Thu, 22 Nov 2018 09:21:49 +0100 -Subject: [PATCH] ARM: dts: BCM5301X: Describe partition formats -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -It's needed by OpenWrt for custom partitioning. - -Signed-off-by: Rafał Miłecki ---- - arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 1 + - 1 file changed, 1 insertion(+) - ---- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts -+++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts -@@ -35,6 +35,7 @@ - partition@0 { - label = "firmware"; - reg = <0x00000000 0x08000000>; -+ compatible = "seama"; - }; - }; - }; From 383ae905a2991759f1cee402e52e58fbcefafbd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 25 Jul 2023 09:51:35 +0200 Subject: [PATCH 05/16] urngd: update to the latest master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7aefb47 jitterentropy-rngd: update to the v1.2.0 What's interesting about jitterentropy-rngd v1.2.0 release is that it bumps its copy of jitterentropy-library from v2.2.0 to the v3.0.0. That bump includes a relevant commit 3130cd9 ("replace LSFR with SHA-3 256"). When initializing entropy jent calculates time delta. Time values are obtained using clock_gettime() + CLOCK_REALTIME. There is no guarantee from CLOCK_REALTIME of unique values and slow devices often return duplicated ones. A switch from jent_lfsr_time() to jent_hash_time() resulted in many less cases of zero delta and avoids ECOARSETIME. Long story short: on some system this fixes: [ 6.722725] urngd: jent-rng init failed, err: 2 This is important change for BCM53573 which doesn't include hwrng and seems to have arch_timer running at 36,8 Hz. Signed-off-by: Rafał Miłecki (cherry picked from commit c74b5e09e692839b39c8325b5f8dc5f2a3b3896c) --- package/system/urngd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/urngd/Makefile b/package/system/urngd/Makefile index 54a1f457d2..ec3068acf9 100644 --- a/package/system/urngd/Makefile +++ b/package/system/urngd/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/urngd.git -PKG_SOURCE_DATE:=2020-01-21 -PKG_SOURCE_VERSION:=c7f7b6b65b82eda4675b42d8cd28d76ea7aebf1a -PKG_MIRROR_HASH:=2d31025b79fe130c579d6c3f4bf4dc12abc43a7319b20a5cdca24ae363ec70f3 +PKG_SOURCE_DATE:=2023-07-25 +PKG_SOURCE_VERSION:=7aefb47be57df0467d97d539f7fe9e23e607a3b4 +PKG_MIRROR_HASH:=427d4228fd65cf4320b8c212e710b86bcbfcdd4239f4e67132b3b471f7437202 PKG_LICENSE:=GPL-2.0 BSD-3-Clause PKG_LICENSE_FILES:= From ac52e2013a03126ef181e596e6e63271cdbb3d35 Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Sat, 9 Sep 2023 12:44:42 +0200 Subject: [PATCH 06/16] x86: geode: fix hwrng register accesses When the membase and pci_dev pointer were moved to a new struct in priv, the actual membase users were left untouched, and they started reading out arbitrary memory behind the struct instead of registers. This unfortunately turned the RNG into a constant number generator, depending on the content of what was at that offset. To fix this, update geode_rng_data_{read,present}() to also get the membase via amd_geode_priv, and properly read from the right addresses again. Closes #13417. Reported-by: Timur I. Davletshin Tested-by: Timur I. Davletshin Suggested-by: Jo-Philipp Wich Signed-off-by: Jonas Gorski (cherry picked from commit 09d13cd8d87cc50fde67bbe81c6cca4b799b2724) --- ...-hwrng-geode-fix-accessing-registers.patch | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 target/linux/x86/patches-5.4/120-hwrng-geode-fix-accessing-registers.patch diff --git a/target/linux/x86/patches-5.4/120-hwrng-geode-fix-accessing-registers.patch b/target/linux/x86/patches-5.4/120-hwrng-geode-fix-accessing-registers.patch new file mode 100644 index 0000000000..4c8015013b --- /dev/null +++ b/target/linux/x86/patches-5.4/120-hwrng-geode-fix-accessing-registers.patch @@ -0,0 +1,47 @@ +From 859bd2e0c0052967536f3f902716f204d5a978b1 Mon Sep 17 00:00:00 2001 +From: Jonas Gorski +Date: Fri, 8 Sep 2023 22:48:33 +0200 +Subject: [PATCH] hwrng: geode: fix accessing registers + +When the membase and pci_dev pointer were moved to a new struct in priv, +the actual membase users were left untouched, and they started reading +out arbitrary memory behind the struct instead of registers. This +unfortunately turned the RNG into a constant number generator, depending +on the content of what was at that offset. + +To fix this, update geode_rng_data_{read,present}() to also get the +membase via amd_geode_priv, and properly read from the right addresses +again. + +Fixes: 9f6ec8dc574e ("hwrng: geode - Fix PCI device refcount leak") +Reported-by: Timur I. Davletshin +Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217882 +Tested-by: Timur I. Davletshin +Suggested-by: Jo-Philipp Wich +Signed-off-by: Jonas Gorski +--- + drivers/char/hw_random/geode-rng.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/char/hw_random/geode-rng.c ++++ b/drivers/char/hw_random/geode-rng.c +@@ -58,7 +58,8 @@ struct amd_geode_priv { + + static int geode_rng_data_read(struct hwrng *rng, u32 *data) + { +- void __iomem *mem = (void __iomem *)rng->priv; ++ struct amd_geode_priv *priv = (struct amd_geode_priv *)rng->priv; ++ void __iomem *mem = priv->membase; + + *data = readl(mem + GEODE_RNG_DATA_REG); + +@@ -67,7 +68,8 @@ static int geode_rng_data_read(struct hw + + static int geode_rng_data_present(struct hwrng *rng, int wait) + { +- void __iomem *mem = (void __iomem *)rng->priv; ++ struct amd_geode_priv *priv = (struct amd_geode_priv *)rng->priv; ++ void __iomem *mem = priv->membase; + int data, i; + + for (i = 0; i < 20; i++) { From 9bc1deec7f6c571151faf6f5260d5ad455d4a4a7 Mon Sep 17 00:00:00 2001 From: Davide Fioravanti Date: Wed, 2 Sep 2020 01:18:16 +0200 Subject: [PATCH 07/16] base-files: add minimal mmc support Added minimal mmc support for helper functions: - find_mmc_part: Look for a given partition name. Returns the coresponding partition path - caldata_extract_mmc: Look for a given partition name and then extracts the calibration data - mmc_get_mac_binary: Returns the mac address from a given partition name and offset Signed-off-by: Davide Fioravanti Signed-off-by: Robert Marko [replace dd with caldata_dd, moved sysupgrade mmc to orbi] Signed-off-by: Christian Lamparter (cherry picked from commit 6e137943442fb0ab66c34462fa19e5a4260eddd5) --- package/base-files/files/lib/functions.sh | 13 +++++++++++++ package/base-files/files/lib/functions/caldata.sh | 13 +++++++++++++ package/base-files/files/lib/functions/system.sh | 9 +++++++++ 3 files changed, 35 insertions(+) diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index 2bad45324f..3a246934ef 100644 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -313,6 +313,19 @@ find_mtd_part() { echo "${INDEX:+$PREFIX$INDEX}" } +find_mmc_part() { + local DEVNAME PARTNAME + + if grep -q "$1" /proc/mtd; then + echo "" && return 0 + fi + + for DEVNAME in /sys/block/mmcblk*/mmcblk*p*; do + PARTNAME="$(grep PARTNAME ${DEVNAME}/uevent | cut -f2 -d'=')" + [ "$PARTNAME" = "$1" ] && echo "/dev/$(basename $DEVNAME)" && return 0 + done +} + group_add() { local name="$1" local gid="$2" diff --git a/package/base-files/files/lib/functions/caldata.sh b/package/base-files/files/lib/functions/caldata.sh index 2177cf8415..d7b88c7dce 100644 --- a/package/base-files/files/lib/functions/caldata.sh +++ b/package/base-files/files/lib/functions/caldata.sh @@ -48,6 +48,19 @@ caldata_extract_ubi() { caldata_die "failed to extract calibration data from $ubi" } +caldata_extract_mmc() { + local part=$1 + local offset=$(($2)) + local count=$(($3)) + local mmc_part + + mmc_part=$(find_mmc_part $part) + [ -n "$mmc_part" ] || caldata_die "no mmc partition found for partition $part" + + caldata_dd $mmc_part /lib/firmware/$FIRMWARE $count $offset || \ + caldata_die "failed to extract calibration data from $mmc_part" +} + caldata_extract_reverse() { local part=$1 local offset=$2 diff --git a/package/base-files/files/lib/functions/system.sh b/package/base-files/files/lib/functions/system.sh index 80e417182a..0ac2912014 100644 --- a/package/base-files/files/lib/functions/system.sh +++ b/package/base-files/files/lib/functions/system.sh @@ -135,6 +135,15 @@ mtd_get_part_size() { done < /proc/mtd } +mmc_get_mac_binary() { + local part_name="$1" + local offset="$2" + local part + + part=$(find_mmc_part "$part_name") + get_mac_binary "$part" "$offset" +} + macaddr_add() { local mac=$1 local val=$2 From faec1771f60844eb58ae0e47b696baae556dd55a Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 1 Nov 2021 13:58:20 +0000 Subject: [PATCH 08/16] base-files: allow specifiying rootdev for find_mmc_part Some devices got more than one mmc device. Allow specifying the root device as 2nd parameter of find_mmc_part so scripts can avoid matching irrelevant partitions on wrong mmc device. Signed-off-by: Daniel Golle (cherry picked from commit 9f223a20bd5f0cbec9f34427588b645ae38433ff) --- package/base-files/files/lib/functions.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index 3a246934ef..7022755e4c 100644 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -314,13 +314,19 @@ find_mtd_part() { } find_mmc_part() { - local DEVNAME PARTNAME + local DEVNAME PARTNAME ROOTDEV if grep -q "$1" /proc/mtd; then echo "" && return 0 fi - for DEVNAME in /sys/block/mmcblk*/mmcblk*p*; do + if [ -n "$2" ]; then + ROOTDEV="$2" + else + ROOTDEV="mmcblk*" + fi + + for DEVNAME in /sys/block/$ROOTDEV/mmcblk*p*; do PARTNAME="$(grep PARTNAME ${DEVNAME}/uevent | cut -f2 -d'=')" [ "$PARTNAME" = "$1" ] && echo "/dev/$(basename $DEVNAME)" && return 0 done From 7c89acbebf38d7ce0989158d32e6ee7f466ad641 Mon Sep 17 00:00:00 2001 From: Enrico Mioso Date: Wed, 1 Dec 2021 16:17:55 +0100 Subject: [PATCH 09/16] base-files: add eMMC sysupgrade support Adds generic support for sysupgrading on eMMC-based devices. Provide function emmc_do_upgrade and emmc_copy_config to be used in /lib/upgrade/platform.sh instead of redundantly implementing the same logic over and over again. Similar to generic sysupgrade on NAND, use environment variables CI_KERNPART, CI_ROOTPART and newly introduce CI_DATAPART to indicate GPT partition names to be used. On devices with more than one MMC block device, CI_ROOTDEV can be used to specify the MMC device for partition name lookups. Also allow to select block devices directly using EMMC_KERN_DEV, EMMC_ROOT_DEV and EMMC_DATA_DEV, as using GPT partition names is not always an option (e.g. when forced to use MBR). To easily handle writing kernel and rootfs make use of sysupgrade.tar format convention which is also already used for generic NAND support. Signed-off-by: Enrico Mioso Signed-off-by: Daniel Golle CC: Li Zhang CC: TruongSinh Tran-Nguyen (cherry picked from commit 57c1f3f9c5c699cc215bebde772552787c632570) --- package/base-files/Makefile | 9 +++ package/base-files/files/lib/upgrade/emmc.sh | 64 ++++++++++++++++++++ scripts/target-metadata.pl | 1 + target/Config.in | 3 + 4 files changed, 77 insertions(+) create mode 100644 package/base-files/files/lib/upgrade/emmc.sh diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 8a1ddf96f5..6e64c8c817 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -23,6 +23,7 @@ PKG_LICENSE:=GPL-2.0 PKG_CONFIG_DEPENDS += \ CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE \ CONFIG_NAND_SUPPORT \ + CONFIG_EMMC_SUPPORT \ CONFIG_CLEAN_IPKG \ CONFIG_PER_FEED_REPO \ $(foreach feed,$(FEEDS_AVAILABLE),CONFIG_FEED_$(feed)) @@ -124,10 +125,18 @@ ifeq ($(CONFIG_NAND_SUPPORT),) endef endif +ifeq ($(CONFIG_EMMC_SUPPORT),) + define Package/base-files/emmc-support + rm -f $(1)/lib/upgrade/emmc.sh + endef +endif + + define Package/base-files/install $(CP) ./files/* $(1)/ $(Package/base-files/install-key) $(Package/base-files/nand-support) + $(Package/base-files/emmc-support) if [ -d $(GENERIC_PLATFORM_DIR)/base-files/. ]; then \ $(CP) $(GENERIC_PLATFORM_DIR)/base-files/* $(1)/; \ fi diff --git a/package/base-files/files/lib/upgrade/emmc.sh b/package/base-files/files/lib/upgrade/emmc.sh new file mode 100644 index 0000000000..15fa370cd9 --- /dev/null +++ b/package/base-files/files/lib/upgrade/emmc.sh @@ -0,0 +1,64 @@ +# Copyright (C) 2021 OpenWrt.org +# + +. /lib/functions.sh + +emmc_upgrade_tar() { + local tar_file="$1" + [ "$CI_KERNPART" -a -z "$EMMC_KERN_DEV" ] && export EMMC_KERN_DEV="$(find_mmc_part $CI_KERNPART $CI_ROOTDEV)" + [ "$CI_ROOTPART" -a -z "$EMMC_ROOT_DEV" ] && export EMMC_ROOT_DEV="$(find_mmc_part $CI_ROOTPART $CI_ROOTDEV)" + [ "$CI_DATAPART" -a -z "$EMMC_DATA_DEV" ] && export EMMC_DATA_DEV="$(find_mmc_part $CI_DATAPART $CI_ROOTDEV)" + local has_kernel + local has_rootfs + local board_dir=$(tar tf "$tar_file" | grep -m 1 '^sysupgrade-.*/$') + board_dir=${board_dir%/} + + tar tf "$tar_file" ${board_dir}/kernel 1>/dev/null 2>/dev/null && has_kernel=1 + tar tf "$tar_file" ${board_dir}/root 1>/dev/null 2>/dev/null && has_rootfs=1 + + [ "$has_kernel" = 1 -a "$EMMC_KERN_DEV" ] && + export EMMC_KERNEL_BLOCKS=$(($(tar xf "$tar_file" ${board_dir}/kernel -O | dd of="$EMMC_KERN_DEV" bs=512 2>&1 | grep "records out" | cut -d' ' -f1))) + + [ "$has_rootfs" = 1 -a "$EMMC_ROOT_DEV" ] && + export EMMC_ROOTFS_BLOCKS=$(($(tar xf "$tar_file" ${board_dir}/root -O | dd of="$EMMC_ROOT_DEV" bs=512 2>&1 | grep "records out" | cut -d' ' -f1))) + + if [ -z "$UPGRADE_BACKUP" ]; then + if [ "$EMMC_DATA_DEV" ]; then + dd if=/dev/zero of="$EMMC_DATA_DEV" bs=512 count=8 + elif [ "$EMMC_ROOTFS_BLOCKS" ]; then + dd if=/dev/zero of="$EMMC_ROOT_DEV" bs=512 seek=$EMMC_ROOTFS_BLOCKS count=8 + elif [ "$EMMC_KERNEL_BLOCKS" ]; then + dd if=/dev/zero of="$EMMC_KERN_DEV" bs=512 seek=$EMMC_KERNEL_BLOCKS count=8 + fi + fi +} + +emmc_upgrade_fit() { + local fit_file="$1" + [ "$CI_KERNPART" -a -z "$EMMC_KERN_DEV" ] && export EMMC_KERN_DEV="$(find_mmc_part $CI_KERNPART $CI_ROOTDEV)" + + if [ "$EMMC_KERN_DEV" ]; then + export EMMC_KERNEL_BLOCKS=$(($(get_image "$fit_file" | fwtool -i /dev/null -T - | dd of="$EMMC_KERN_DEV" bs=512 2>&1 | grep "records out" | cut -d' ' -f1))) + + [ -z "$UPGRADE_BACKUP" ] && dd if=/dev/zero of="$EMMC_KERN_DEV" bs=512 seek=$EMMC_KERNEL_BLOCKS count=8 + fi +} + +emmc_copy_config() { + if [ "$EMMC_DATA_DEV" ]; then + dd if="$UPGRADE_BACKUP" of="$EMMC_DATA_DEV" bs=512 + elif [ "$EMMC_ROOTFS_BLOCKS" ]; then + dd if="$UPGRADE_BACKUP" of="$EMMC_ROOT_DEV" bs=512 seek=$EMMC_ROOTFS_BLOCKS + elif [ "$EMMC_KERNEL_BLOCKS" ]; then + dd if="$UPGRADE_BACKUP" of="$EMMC_KERN_DEV" bs=512 seek=$EMMC_KERNEL_BLOCKS + fi +} + +emmc_do_upgrade() { + local file_type=$(identify $1) + + case "$file_type" in + "fit") emmc_upgrade_fit $1;; + *) emmc_upgrade_tar $1;; + esac +} diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl index d4d4325816..95311f53e5 100755 --- a/scripts/target-metadata.pl +++ b/scripts/target-metadata.pl @@ -14,6 +14,7 @@ sub target_config_features(@) { /^audio$/ and $ret .= "\tselect AUDIO_SUPPORT\n"; /^display$/ and $ret .= "\tselect DISPLAY_SUPPORT\n"; /^dt$/ and $ret .= "\tselect USES_DEVICETREE\n"; + /^emmc$/ and $ret .= "\tselect EMMC_SUPPORT\n"; /^gpio$/ and $ret .= "\tselect GPIO_SUPPORT\n"; /^pci$/ and $ret .= "\tselect PCI_SUPPORT\n"; /^pcie$/ and $ret .= "\tselect PCIE_SUPPORT\n"; diff --git a/target/Config.in b/target/Config.in index 43de4710df..201ab32a26 100644 --- a/target/Config.in +++ b/target/Config.in @@ -92,6 +92,9 @@ config HAS_MIPS16 config RFKILL_SUPPORT bool +config EMMC_SUPPORT + bool + config NAND_SUPPORT bool From cd655a8b3038fef1c0fb1c10653f6e4122d460f7 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Sat, 12 Mar 2022 22:04:30 -0800 Subject: [PATCH 10/16] base-files: Align rootfs_data upgrades to 64KiB on eMMC Rootfs overlays get created at a ROOTDEV_OVERLAY_ALIGN (64KiB) alignment after the rootfs, but emmc_do_upgrade() is assuming it comes at the very next 512-byte sector. Suggested-by: Christian Lamparter Signed-off-by: Brian Norris (move spaces around, mention fstools' libtoolfs) Signed-off-by: Christian Lamparter (cherry picked from commit e8a0c55909427703b7c72ed46326531397287b20) --- package/base-files/files/lib/upgrade/emmc.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/base-files/files/lib/upgrade/emmc.sh b/package/base-files/files/lib/upgrade/emmc.sh index 15fa370cd9..c3b02864aa 100644 --- a/package/base-files/files/lib/upgrade/emmc.sh +++ b/package/base-files/files/lib/upgrade/emmc.sh @@ -19,8 +19,11 @@ emmc_upgrade_tar() { [ "$has_kernel" = 1 -a "$EMMC_KERN_DEV" ] && export EMMC_KERNEL_BLOCKS=$(($(tar xf "$tar_file" ${board_dir}/kernel -O | dd of="$EMMC_KERN_DEV" bs=512 2>&1 | grep "records out" | cut -d' ' -f1))) - [ "$has_rootfs" = 1 -a "$EMMC_ROOT_DEV" ] && + [ "$has_rootfs" = 1 -a "$EMMC_ROOT_DEV" ] && { export EMMC_ROOTFS_BLOCKS=$(($(tar xf "$tar_file" ${board_dir}/root -O | dd of="$EMMC_ROOT_DEV" bs=512 2>&1 | grep "records out" | cut -d' ' -f1))) + # Account for 64KiB ROOTDEV_OVERLAY_ALIGN in libfstools + EMMC_ROOTFS_BLOCKS=$(((EMMC_ROOTFS_BLOCKS + 127) & ~127)) + } if [ -z "$UPGRADE_BACKUP" ]; then if [ "$EMMC_DATA_DEV" ]; then From 683751adda2abec9a9df1a0e398526fc98d99640 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Thu, 12 Jan 2023 21:32:16 -0800 Subject: [PATCH 11/16] base-files: Remove nand.sh dependency from emmc upgrade emmc_do_upgrade() relies on identify() from the nand.sh upgrade helper. This only works because FEATURES=emmc targets also tend to include FEATURES=nand. Rename identify_magic() to identify_magic_long() to match the common.sh style and make it clear it pairs with other *_long() variants (and not, say *_word()). Signed-off-by: Brian Norris (cherry picked from commit d3c19c71f6044eff1677563365cea0f9e919b462) --- .../base-files/files/lib/upgrade/common.sh | 24 +++++++++++++++ package/base-files/files/lib/upgrade/emmc.sh | 2 +- package/base-files/files/lib/upgrade/nand.sh | 29 ++----------------- 3 files changed, 27 insertions(+), 28 deletions(-) diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index 13dbb7ab25..a2a063c9cf 100644 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -135,6 +135,30 @@ get_magic_fat32() { (get_image "$@" | dd bs=1 count=5 skip=82) 2>/dev/null } +identify_magic_long() { + local magic=$1 + case "$magic" in + "55424923") + echo "ubi" + ;; + "31181006") + echo "ubifs" + ;; + "68737173") + echo "squashfs" + ;; + "d00dfeed") + echo "fit" + ;; + "4349"*) + echo "combined" + ;; + *) + echo "unknown $magic" + ;; + esac +} + part_magic_efi() { local magic=$(get_magic_gpt "$@") [ "$magic" = "EFI PART" ] diff --git a/package/base-files/files/lib/upgrade/emmc.sh b/package/base-files/files/lib/upgrade/emmc.sh index c3b02864aa..49cffe1c65 100644 --- a/package/base-files/files/lib/upgrade/emmc.sh +++ b/package/base-files/files/lib/upgrade/emmc.sh @@ -58,7 +58,7 @@ emmc_copy_config() { } emmc_do_upgrade() { - local file_type=$(identify $1) + local file_type=$(identify_magic_long "$(get_magic_long "$1")") case "$file_type" in "fit") emmc_upgrade_fit $1;; diff --git a/package/base-files/files/lib/upgrade/nand.sh b/package/base-files/files/lib/upgrade/nand.sh index e6f58df4f5..f2a01dc0c1 100644 --- a/package/base-files/files/lib/upgrade/nand.sh +++ b/package/base-files/files/lib/upgrade/nand.sh @@ -63,37 +63,12 @@ get_magic_long_tar() { ( tar xf $1 $2 -O | dd bs=4 count=1 | hexdump -v -n 4 -e '1/1 "%02x"') 2> /dev/null } -identify_magic() { - local magic=$1 - case "$magic" in - "55424923") - echo "ubi" - ;; - "31181006") - echo "ubifs" - ;; - "68737173") - echo "squashfs" - ;; - "d00dfeed") - echo "fit" - ;; - "4349"*) - echo "combined" - ;; - *) - echo "unknown $magic" - ;; - esac -} - - identify() { - identify_magic $(nand_get_magic_long "$1" "${2:-0}") + identify_magic_long $(nand_get_magic_long "$1" "${2:-0}") } identify_tar() { - identify_magic $(get_magic_long_tar "$1" "$2") + identify_magic_long $(get_magic_long_tar "$1" "$2") } nand_restore_config() { From 9431f3625bc6831e775c1bb820a3a3caacb26f03 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Mon, 18 Sep 2023 22:53:14 +0200 Subject: [PATCH 12/16] packages: assign PKG_CPE_ID for all missing packages The PKG_CPE_ID links to NIST CPE version 2.2. Assign PKG_CPE_ID to all remaining package which have a CPE ID. Not every package has CPE id. Related: https://github.com/openwrt/packages/issues/8534 Signed-off-by: Alexander Couzens --- package/firmware/intel-microcode/Makefile | 1 + package/libs/gmp/Makefile | 1 + package/libs/libbsd/Makefile | 1 + package/libs/libnetfilter-conntrack/Makefile | 1 + package/libs/libpcap/Makefile | 1 + package/network/utils/ebtables/Makefile | 1 + package/network/utils/ipset/Makefile | 1 + package/network/utils/iw/Makefile | 1 + package/utils/adb/Makefile | 1 + package/utils/bsdiff/Makefile | 1 + package/utils/dtc/Makefile | 2 ++ package/utils/lua/Makefile | 1 + package/utils/lua5.3/Makefile | 1 + 13 files changed, 14 insertions(+) diff --git a/package/firmware/intel-microcode/Makefile b/package/firmware/intel-microcode/Makefile index 5175f5f53c..c45002fba3 100644 --- a/package/firmware/intel-microcode/Makefile +++ b/package/firmware/intel-microcode/Makefile @@ -15,6 +15,7 @@ PKG_SOURCE:=intel-microcode_3.$(PKG_VERSION).1.tar.xz PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/non-free/i/intel-microcode/ PKG_HASH:=4cf6c3638bb52d9d45c1916af866fd0929628a6f459daac3edfd369149e9c665 PKG_BUILD_DIR:=$(BUILD_DIR)/intel-microcode-3.$(PKG_VERSION).1 +PKG_CPE_ID:=cpe:/a:intel:microcode PKG_BUILD_DEPENDS:=iucode-tool/host diff --git a/package/libs/gmp/Makefile b/package/libs/gmp/Makefile index eb7d808139..2796f8d2df 100644 --- a/package/libs/gmp/Makefile +++ b/package/libs/gmp/Makefile @@ -19,6 +19,7 @@ PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 PKG_FIXUP:=autoreconf PKG_LICENSE:=GPL-2.0-or-later +PKG_CPE_ID:=cpe:/a:gmplib:gmp PKG_USE_MIPS16:=0 diff --git a/package/libs/libbsd/Makefile b/package/libs/libbsd/Makefile index 26e05f79a1..5f9ff45633 100644 --- a/package/libs/libbsd/Makefile +++ b/package/libs/libbsd/Makefile @@ -10,6 +10,7 @@ PKG_HASH:=34b8adc726883d0e85b3118fa13605e179a62b31ba51f676136ecb2d0bc1a887 PKG_LICENSE:=BSD-4-Clause PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:freedesktop:libbsd PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 diff --git a/package/libs/libnetfilter-conntrack/Makefile b/package/libs/libnetfilter-conntrack/Makefile index 2020709d01..7f525724b0 100644 --- a/package/libs/libnetfilter-conntrack/Makefile +++ b/package/libs/libnetfilter-conntrack/Makefile @@ -18,6 +18,7 @@ PKG_HASH:=0cd13be008923528687af6c6b860f35392d49251c04ee0648282d36b1faec1cf PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:netfilter:libnetfilter_conntrack PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 diff --git a/package/libs/libpcap/Makefile b/package/libs/libpcap/Makefile index ea82536e9d..7eb0c3f714 100644 --- a/package/libs/libpcap/Makefile +++ b/package/libs/libpcap/Makefile @@ -16,6 +16,7 @@ PKG_SOURCE_URL:=http://www.tcpdump.org/release/ PKG_HASH:=635237637c5b619bcceba91900666b64d56ecb7be63f298f601ec786ce087094 PKG_MAINTAINER:=Felix Fietkau +PKG_CPE_ID:=cpe:/a:tcpdump:libpcap PKG_ASLR_PIE_REGULAR:=1 PKG_BUILD_PARALLEL:=1 diff --git a/package/network/utils/ebtables/Makefile b/package/network/utils/ebtables/Makefile index 732e9bf2b5..4d7f0334ec 100644 --- a/package/network/utils/ebtables/Makefile +++ b/package/network/utils/ebtables/Makefile @@ -17,6 +17,7 @@ PKG_SOURCE_VERSION:=48cff25dfea5b37e16ba5dc6601e98ab140f5f99 PKG_MIRROR_HASH:=1327cdc3402e5e3056819e4e9b6f9d4a5bfd401f2c4f58447afb2c3c73fc8aac PKG_LICENSE:=GPL-2.0 +PKG_CPE_ID:=cpe:/a:netfilter:ebtables include $(INCLUDE_DIR)/package.mk diff --git a/package/network/utils/ipset/Makefile b/package/network/utils/ipset/Makefile index bc4945e0f6..c31fcb168a 100644 --- a/package/network/utils/ipset/Makefile +++ b/package/network/utils/ipset/Makefile @@ -18,6 +18,7 @@ PKG_HASH:=0e7d44caa9c153d96a9b5f12644fbe35a632537a5a7f653792b72e53d9d5c2db PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0 +PKG_CPE_ID:=cpe:/a:netfilter:ipset PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/package/network/utils/iw/Makefile b/package/network/utils/iw/Makefile index 8e11046189..f9aec5b0f9 100644 --- a/package/network/utils/iw/Makefile +++ b/package/network/utils/iw/Makefile @@ -18,6 +18,7 @@ PKG_MIRROR_HASH:=797b322bc03952f3127ae0a7da476c14ada1bbe9a9ae234a56dd6f864c568e1 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 +PKG_CPE_ID:=cpe:/a:kernel:iw include $(INCLUDE_DIR)/package.mk diff --git a/package/utils/adb/Makefile b/package/utils/adb/Makefile index 0482a40da1..c207c333b2 100644 --- a/package/utils/adb/Makefile +++ b/package/utils/adb/Makefile @@ -13,6 +13,7 @@ PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) PKG_MAINTAINER:=Henryk Heisig +PKG_CPE_ID:=cpe:/a:google:android_debug_bridge include $(INCLUDE_DIR)/package.mk diff --git a/package/utils/bsdiff/Makefile b/package/utils/bsdiff/Makefile index db1f320872..5145872071 100644 --- a/package/utils/bsdiff/Makefile +++ b/package/utils/bsdiff/Makefile @@ -18,6 +18,7 @@ PKG_MAINTAINER:=Hauke Mehrtens HOST_BUILD_DEPENDS:=bzip2/host PKG_LICENSE:=BSD-2-Clause +PKG_CPE_ID:=cpe:/a:daemonology:bsdiff include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/utils/dtc/Makefile b/package/utils/dtc/Makefile index deec4e3ad6..060229a59e 100644 --- a/package/utils/dtc/Makefile +++ b/package/utils/dtc/Makefile @@ -12,6 +12,8 @@ PKG_HASH:=10503b0217e1b07933e29e8d347a00015b2431bea5f59afe0bed3af30340c82d PKG_SOURCE_URL:=@KERNEL/software/utils/dtc PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=GPL +PKG_CPE_ID:=cpe:/a:dtc_project:dtc + PKG_INSTALL:=1 PKG_MAINTAINER:=Yousong Zhou diff --git a/package/utils/lua/Makefile b/package/utils/lua/Makefile index d262d1e1fc..f39e432524 100644 --- a/package/utils/lua/Makefile +++ b/package/utils/lua/Makefile @@ -19,6 +19,7 @@ PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYRIGHT +PKG_CPE_ID:=cpe:/a:lua:lua HOST_PATCH_DIR := ./patches-host diff --git a/package/utils/lua5.3/Makefile b/package/utils/lua5.3/Makefile index c9e9bebb1a..4333072b30 100644 --- a/package/utils/lua5.3/Makefile +++ b/package/utils/lua5.3/Makefile @@ -19,6 +19,7 @@ PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYRIGHT +PKG_CPE_ID:=cpe:/a:lua:lua HOST_PATCH_DIR := ./patches-host From ddc361f1a62e53e492df31ded4453662c57434b1 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Tue, 19 Sep 2023 00:10:03 +0200 Subject: [PATCH 13/16] tools: assign PKG_CPE_ID The PKG_CPE_ID links to NIST CPE version 2.2. Assign PKG_CPE_ID to all remaining tools which have a CPE ID. Not every tool has CPE id. Related: https://github.com/openwrt/packages/issues/8534 Signed-off-by: Alexander Couzens --- tools/bison/Makefile | 1 + tools/gmp/Makefile | 1 + tools/mtd-utils/Makefile | 1 + tools/sed/Makefile | 1 + tools/zip/Makefile | 1 + 5 files changed, 5 insertions(+) diff --git a/tools/bison/Makefile b/tools/bison/Makefile index 8f3043fcb8..f07a128b01 100644 --- a/tools/bison/Makefile +++ b/tools/bison/Makefile @@ -12,6 +12,7 @@ PKG_VERSION:=3.7.4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/$(PKG_NAME) PKG_HASH:=a3b5813f48a11e540ef26f46e4d288c0c25c7907d9879ae50e430ec49f63c010 +PKG_CPE_ID:=cpe:/a:gnu:bison HOST_BUILD_PARALLEL:=1 diff --git a/tools/gmp/Makefile b/tools/gmp/Makefile index 967cf6817b..48f556f4fc 100644 --- a/tools/gmp/Makefile +++ b/tools/gmp/Makefile @@ -12,6 +12,7 @@ PKG_VERSION:=6.2.1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/gmp/ PKG_HASH:=fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2 +PKG_CPE_ID:=cpe:/a:gmplib:gmp HOST_FIXUP:=autoreconf diff --git a/tools/mtd-utils/Makefile b/tools/mtd-utils/Makefile index 7eebcfb827..5268dd03a3 100644 --- a/tools/mtd-utils/Makefile +++ b/tools/mtd-utils/Makefile @@ -13,6 +13,7 @@ PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/mtd-utils/ PKG_HASH:=8ad4c5f34716d40646aa28724a2f5616d325a6f119254f914e26976f1f76e9d6 +PKG_CPE_ID:=cpe:/a:mtd-utils_project:mtd-utils PKG_FIXUP:=autoreconf diff --git a/tools/sed/Makefile b/tools/sed/Makefile index 4218ac2d59..58f70c4ad9 100644 --- a/tools/sed/Makefile +++ b/tools/sed/Makefile @@ -12,6 +12,7 @@ PKG_VERSION:=4.8 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/$(PKG_NAME) PKG_HASH:=f79b0cfea71b37a8eeec8490db6c5f7ae7719c35587f21edb0617f370eeff633 +PKG_CPE_ID:=cpe:/a:gnu:sed export SED:= HOST_BUILD_PARALLEL:=1 diff --git a/tools/zip/Makefile b/tools/zip/Makefile index 7dd81a1b8b..4490cf9213 100644 --- a/tools/zip/Makefile +++ b/tools/zip/Makefile @@ -17,6 +17,7 @@ PKG_HASH:=f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369 PKG_LICENSE:=BSD-4-Clause PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:zip_project:zip HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)/zip$(PKG_REV) HOST_BUILD_PARALLEL:=1 From 0ab10075285ed232dac346b3ad5be68da6cb32ee Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Tue, 19 Sep 2023 00:23:40 +0200 Subject: [PATCH 14/16] toolchain: assign PKG_CPE_ID The PKG_CPE_ID links to NIST CPE version 2.2. Assign PKG_CPE_ID to all remaining package which have a CPE ID. Not every package has a CPE id. Related: https://github.com/openwrt/packages/issues/8534 Signed-off-by: Alexander Couzens --- toolchain/binutils/Makefile | 1 + toolchain/gcc/common.mk | 1 + toolchain/gdb/Makefile | 1 + toolchain/glibc/common.mk | 1 + toolchain/kernel-headers/Makefile | 1 + toolchain/nasm/Makefile | 1 + 6 files changed, 6 insertions(+) diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile index da86794480..fcccb02946 100644 --- a/toolchain/binutils/Makefile +++ b/toolchain/binutils/Makefile @@ -12,6 +12,7 @@ BIN_VERSION:=$(PKG_VERSION) PKG_SOURCE_URL:=@GNU/binutils/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_CPE_ID:=cpe:/a:gnu:binutils TAR_OPTIONS += --exclude='*.rej' diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index 55fad1fcc4..079eeaeb0e 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -27,6 +27,7 @@ GCC_DIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_CPE_ID:=cpe:/a:gnu:gcc ifeq ($(PKG_VERSION),7.5.0) PKG_HASH:=b81946e7f01f90528a1f7352ab08cc602b9ccc05d4e44da4bd501c5a189ee661 diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile index 05e3c7de3c..29b872e822 100644 --- a/toolchain/gdb/Makefile +++ b/toolchain/gdb/Makefile @@ -13,6 +13,7 @@ PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/gdb PKG_HASH:=f82f1eceeec14a3afa2de8d9b0d3c91d5a3820e23e0a01bbb70ef9f0276b62c0 +PKG_CPE_ID:=cpe:/a:gnu:gdb GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION) HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(GDB_DIR) diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk index acc40d632b..4b8387bfb3 100644 --- a/toolchain/glibc/common.mk +++ b/toolchain/glibc/common.mk @@ -16,6 +16,7 @@ PKG_SOURCE_VERSION:=55446dd8a2d7b84d966fe4248427c02845b036d4 PKG_MIRROR_HASH:=ef5ae2f63828aa3330e36ee2ec81a2de874c11d4dc24f0229109ab5581f29d76 PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz +PKG_CPE_ID:=cpe:/a:gnu:glibc HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_SOURCE_SUBDIR) CUR_BUILD_DIR:=$(HOST_BUILD_DIR)-$(VARIANT) diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile index eea0ffbde0..cd25f8a6de 100644 --- a/toolchain/kernel-headers/Makefile +++ b/toolchain/kernel-headers/Makefile @@ -17,6 +17,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=linux PKG_VERSION:=$(LINUX_VERSION) PKG_SOURCE:=$(LINUX_SOURCE) +PKG_CPE_ID:=cpe:/o:linux:linux_kernel ifneq ($(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)) diff --git a/toolchain/nasm/Makefile b/toolchain/nasm/Makefile index f733c52912..5cef7bde83 100644 --- a/toolchain/nasm/Makefile +++ b/toolchain/nasm/Makefile @@ -11,6 +11,7 @@ PKG_SOURCE_URL:=https://www.nasm.us/pub/nasm/releasebuilds/$(PKG_VERSION)/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_HASH:=3caf6729c1073bf96629b57cee31eeb54f4f8129b01902c73428836550b30a3f +PKG_CPE_ID:=cpe:/a:nasm:nasm HOST_BUILD_PARALLEL:=1 From 41d3d25142d8974bec768427aa7fc7e73d555df5 Mon Sep 17 00:00:00 2001 From: Arne Zachlod Date: Wed, 13 Sep 2023 18:20:03 +0200 Subject: [PATCH 15/16] toolchain: musl: add PKG_CPE_ID Vulnerabilities of musl libc are tracked as cpe:/a:musl-libc:musl Signed-off-by: Arne Zachlod --- toolchain/musl/common.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/toolchain/musl/common.mk b/toolchain/musl/common.mk index 68098f5c6a..f3bf34820a 100644 --- a/toolchain/musl/common.mk +++ b/toolchain/musl/common.mk @@ -14,6 +14,7 @@ PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://musl.libc.org/releases/ PKG_HASH:=1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3 +PKG_CPE_ID:=cpe:/a:musl-libc:musl LIBC_SO_VERSION:=$(PKG_VERSION) PATCH_DIR:=$(PATH_PREFIX)/patches From c5dc0e01df4338d796e3ae427de60a6e3e9acc1c Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 24 Sep 2023 20:16:21 +0200 Subject: [PATCH 16/16] treewide: Add extra CPE identifier This adds some Common Platform Enumerations (CPE) identifiers which I found. Signed-off-by: Hauke Mehrtens --- package/boot/at91bootstrap/Makefile | 1 + package/libs/popt/Makefile | 1 + package/libs/sysfsutils/Makefile | 1 + package/system/iucode-tool/Makefile | 1 + 4 files changed, 4 insertions(+) diff --git a/package/boot/at91bootstrap/Makefile b/package/boot/at91bootstrap/Makefile index f66472fa9c..913e70ca73 100644 --- a/package/boot/at91bootstrap/Makefile +++ b/package/boot/at91bootstrap/Makefile @@ -10,6 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=at91bootstrap PKG_VERSION:=v3.9.3 +PKG_CPE_ID:=cpe:/a:linux4sam:at91bootstrap PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git diff --git a/package/libs/popt/Makefile b/package/libs/popt/Makefile index 34ae4d7c61..3e7f027a88 100644 --- a/package/libs/popt/Makefile +++ b/package/libs/popt/Makefile @@ -18,6 +18,7 @@ PKG_SOURCE_URL:= \ http://rpm5.org/files/popt/ PKG_HASH:=e728ed296fe9f069a0e005003c3d6b2dde3d9cad453422a10d6558616d304cc8 PKG_LICENSE:=MIT +PKG_CPE_ID:=cpe:/a:popt_project:popt PKG_FIXUP:=autoreconf PKG_REMOVE_FILES:=autogen.sh aclocal.m4 diff --git a/package/libs/sysfsutils/Makefile b/package/libs/sysfsutils/Makefile index 8ce9a40f91..75951d6300 100644 --- a/package/libs/sysfsutils/Makefile +++ b/package/libs/sysfsutils/Makefile @@ -15,6 +15,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/linux-diag PKG_HASH:=e865de2c1f559fff0d3fc936e660c0efaf7afe662064f2fb97ccad1ec28d208a PKG_MAINTAINER:=Jo-Philipp Wich +PKG_CPE_ID:=cpe:/a:sysfsutils_project:sysfsutils PKG_LICENSE:=LGPL-2.1 PKG_LICENSE_FILES:=COPYING cmd/GPL lib/LGPL diff --git a/package/system/iucode-tool/Makefile b/package/system/iucode-tool/Makefile index b8227ed4a1..e830a94ed9 100644 --- a/package/system/iucode-tool/Makefile +++ b/package/system/iucode-tool/Makefile @@ -14,6 +14,7 @@ PKG_RELEASE:=1 PKG_SOURCE:=iucode-tool_$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://gitlab.com/iucode-tool/releases/raw/latest PKG_HASH:=12b88efa4d0d95af08db05a50b3dcb217c0eb2bfc67b483779e33d498ddb2f95 +PKG_CPE_ID:=cpe:/a:iucode-tool_project:iucode-tool PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone