From 118c657bd160fb68c29cade49e726128b1c0fa8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Mon, 4 Nov 2024 09:02:19 +0000 Subject: [PATCH 1/6] Revert "openwrt-keyring: fix missing 24.10 usign key by installing it" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 37784c48e93c663dafc99454c24bebf4e258556f as the preference is to have single explicit key for each release/branch. Signed-off-by: Petr Štetiar Link: https://github.com/openwrt/openwrt/pull/16852 Signed-off-by: Robert Marko --- package/system/openwrt-keyring/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/package/system/openwrt-keyring/Makefile b/package/system/openwrt-keyring/Makefile index e499fc0beb..029463817b 100644 --- a/package/system/openwrt-keyring/Makefile +++ b/package/system/openwrt-keyring/Makefile @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openwrt-keyring -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/keyring.git @@ -40,8 +40,6 @@ define Package/openwrt-keyring/install $(INSTALL_DIR) $(1)/etc/opkg/keys/ # Public usign key for unattended snapshot builds $(INSTALL_DATA) $(PKG_BUILD_DIR)/usign/b5043e70f9a75cde $(1)/etc/opkg/keys/ - # Public usign key for 24.10 release builds - $(INSTALL_DATA) $(PKG_BUILD_DIR)/usign/d310c6f2833e97f7 $(1)/etc/opkg/keys/ endef endif From 72dec105fb99a949d7ecf2a3d0ac29880007d602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Mon, 4 Nov 2024 09:04:04 +0000 Subject: [PATCH 2/6] openwrt-keyring: apk: use just snapshot key explicitly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently we're going to ship all the apk keys in the keyring, but the preference is to ship and use single release/branch specific key so lets use openwrt-snapshots.pem for apk explicitly as well. Fixes: 2cea05002489 ("openwrt-keyring: add apk public key for signing of package indexes") Signed-off-by: Petr Štetiar Link: https://github.com/openwrt/openwrt/pull/16852 Signed-off-by: Robert Marko --- package/system/openwrt-keyring/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/system/openwrt-keyring/Makefile b/package/system/openwrt-keyring/Makefile index 029463817b..7f237ed9fa 100644 --- a/package/system/openwrt-keyring/Makefile +++ b/package/system/openwrt-keyring/Makefile @@ -33,7 +33,7 @@ Build/Compile= ifneq ($(CONFIG_USE_APK),) define Package/openwrt-keyring/install $(INSTALL_DIR) $(1)/etc/apk/keys/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/apk/*.pem $(1)/etc/apk/keys/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/apk/openwrt-snapshots.pem $(1)/etc/apk/keys/ endef else define Package/openwrt-keyring/install From 5695267847c2fe51290fdbde6ecd7114654f7988 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Sun, 24 Nov 2024 21:15:08 +0100 Subject: [PATCH 3/6] ramips: mt7621: support openwrt,netdev-name for renaming interfaces Edgerouter X currently has its eth1 port on the switch missing since there is a naming conflict currently. So, as the root cause is mixing kernel support for DSA interfaces having predictable names set via "label" property vs others having it assigned dynamically lets avoid the conflict by using our own custom property as suggested upstream [1]. So, add support via "openwrt,netdev-name" property and use it on ERX. Fixes: 2a25c6ace8d8 ("ramips: get rid of downstream network device label patch") Fixes: #15643 Link: https://github.com/openwrt/openwrt/pull/17062 Signed-off-by: Robert Marko --- .../ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts | 3 ++- .../ramips/dts/mt7621_ubnt_edgerouter-x.dts | 2 +- .../ramips/dts/mt7621_ubnt_edgerouter-x.dtsi | 17 +++++++++++------ .../base-files/lib/preinit/04_set_netdev_label | 8 ++++++++ 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts index 50a77c3877..9f1e0a8d20 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts @@ -69,11 +69,12 @@ ports { port@5 { reg = <5>; - label = "eth5"; + openwrt,netdev-name = "eth5"; phy-handle = <&ephy7>; phy-mode = "rgmii-rxid"; nvmem-cells = <&macaddr_factory_22 5>; nvmem-cell-names = "mac-address"; + /delete-property/ label; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts index 80467c88e9..c0230e13b4 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts @@ -7,7 +7,7 @@ &gmac1 { status = "okay"; - label = "eth0"; + openwrt,netdev-name = "eth0"; phy-handle = <ðphy0>; nvmem-cells = <&macaddr_factory_22 0>; diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi index dc9908ba34..40433c1c43 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi @@ -22,42 +22,47 @@ &gmac0 { nvmem-cells = <&macaddr_factory_22 0>; nvmem-cell-names = "mac-address"; - label = "dsa"; + openwrt,netdev-name = "dsa"; }; &switch0 { ports { port@0 { status = "okay"; - label = "eth0"; + openwrt,netdev-name = "eth0"; + /delete-property/ label; }; port@1 { status = "okay"; - label = "eth1"; + openwrt,netdev-name = "eth1"; nvmem-cells = <&macaddr_factory_22 1>; nvmem-cell-names = "mac-address"; + /delete-property/ label; }; port@2 { status = "okay"; - label = "eth2"; + openwrt,netdev-name = "eth2"; nvmem-cells = <&macaddr_factory_22 2>; nvmem-cell-names = "mac-address"; + /delete-property/ label; }; port@3 { status = "okay"; - label = "eth3"; + openwrt,netdev-name = "eth3"; nvmem-cells = <&macaddr_factory_22 3>; nvmem-cell-names = "mac-address"; + /delete-property/ label; }; port@4 { status = "okay"; - label = "eth4"; + openwrt,netdev-name = "eth4"; nvmem-cells = <&macaddr_factory_22 4>; nvmem-cell-names = "mac-address"; + /delete-property/ label; }; }; }; diff --git a/target/linux/ramips/mt7621/base-files/lib/preinit/04_set_netdev_label b/target/linux/ramips/mt7621/base-files/lib/preinit/04_set_netdev_label index 110e023b96..2c5e420f93 100644 --- a/target/linux/ramips/mt7621/base-files/lib/preinit/04_set_netdev_label +++ b/target/linux/ramips/mt7621/base-files/lib/preinit/04_set_netdev_label @@ -10,6 +10,14 @@ set_netdev_labels() { [ "$netdev" = "$label" ] && continue ip link set "$netdev" name "$label" done + + for dir in /sys/class/net/*; do + [ -r "$dir/of_node/openwrt,netdev-name" ] || continue + read -r label < "$dir/of_node/openwrt,netdev-name" + netdev="${dir##*/}" + [ "$netdev" = "$label" ] && continue + ip link set "$netdev" name "$label" + done } boot_hook_add preinit_main set_netdev_labels From 341cc047b9174280d89f1b5494a42837ccbadb12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Mon, 25 Nov 2024 21:23:54 +0000 Subject: [PATCH 4/6] Revert "target,base-files: unify handling of procd-ujail" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ac640718aa0ceae55969bb9e7e45d00bb7bc228a as it removes base-files package when KERNEL_NAMESPACES is deselected, as base-files depends on procd-ujail which needs KERNEL_NAMESPACES. Fixes: #17075 Link: https://github.com/openwrt/openwrt/pull/17081 Link: https://github.com/openwrt/openwrt/pull/17081 Signed-off-by: Petr Štetiar --- include/target.mk | 5 +++++ package/base-files/Makefile | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/target.mk b/include/target.mk index 1b32bf905d..02ea68b15c 100644 --- a/include/target.mk +++ b/include/target.mk @@ -90,6 +90,11 @@ else endif endif +# include ujail on systems with enough storage +ifeq ($(filter small_flash,$(FEATURES)),) + DEFAULT_PACKAGES+=procd-ujail +endif + # Add device specific packages (here below to allow device type set from subtarget) DEFAULT_PACKAGES += $(DEFAULT_PACKAGES.$(DEVICE_TYPE)) diff --git a/package/base-files/Makefile b/package/base-files/Makefile index ff7891f18c..b90ee3a64e 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -43,7 +43,7 @@ define Package/base-files +netifd +libc +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:openwrt-keyring \ +NAND_SUPPORT:ubi-utils +fstools +fwtool \ +SELINUX:procd-selinux +!SELINUX:procd +USE_SECCOMP:procd-seccomp \ - +SELINUX:busybox-selinux +!SELINUX:busybox +!SMALL_FLASH:procd-ujail + +SELINUX:busybox-selinux +!SELINUX:busybox TITLE:=Base filesystem for OpenWrt URL:=http://openwrt.org/ VERSION:=$(PKG_RELEASE)~$(lastword $(subst -, ,$(REVISION))) From 1bdb6d84046ec1c47f28c57651358470ed212ec3 Mon Sep 17 00:00:00 2001 From: George Oldfort Date: Tue, 26 Nov 2024 06:42:25 +0100 Subject: [PATCH 5/6] mediatek: remove ktd-202x driver filogic image (Aer Vero W6m) Image build fails with PR #16861 merged while PR #16860 not merged. Removing kmod-leds-ktd202x from filogic.mk will fix the build process. Fixes: 2898d1d1269a ("mediatek: add support for Acer Predator W6d and Acer Vero W6m") Signed-off-by: George Oldfort Link: https://github.com/openwrt/openwrt/pull/17087 Signed-off-by: Hauke Mehrtens --- target/linux/mediatek/image/filogic.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index 672790f1a7..3a36fbc46b 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -186,7 +186,7 @@ define Device/acer_vero-w6m DEVICE_DTS := mt7986a-acer-vero-w6m DEVICE_DTS_DIR := ../dts DEVICE_DTS_LOADADDR := 0x47000000 - DEVICE_PACKAGES := kmod-leds-ktd202x kmod-mt7915e kmod-mt7916-firmware kmod-mt7986-firmware mt7986-wo-firmware e2fsprogs f2fsck mkf2fs + DEVICE_PACKAGES := kmod-mt7915e kmod-mt7916-firmware kmod-mt7986-firmware mt7986-wo-firmware e2fsprogs f2fsck mkf2fs IMAGES := sysupgrade.bin KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb KERNEL_INITRAMFS := kernel-bin | lzma | \ From c857145e034f623e31ab2028049a547ecd94ce85 Mon Sep 17 00:00:00 2001 From: Eric Fahlgren Date: Fri, 22 Nov 2024 09:00:25 -0800 Subject: [PATCH 6/6] build: profiles.json: add kernel version information MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently downstream tools like ASU lack information about kernel version to find out the relevant kmod build folder on downloads server. So lets fix it by providing a new `linux_kernel` JSON array which would for the start provide Linux kernel version, revision and vermagic information. "linux_kernel": { "release": "1", "vermagic": "b57450c07d3a786158c3601fc5cee57d", "version": "6.6.61" }, Fixes: openwrt/openwrt#17036 Fixes: efahl/owut#9 Co-developed-by: Petr Štetiar Signed-off-by: Eric Fahlgren Link: https://github.com/openwrt/openwrt/pull/17042 Signed-off-by: Petr Štetiar --- scripts/json_overview_image_info.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py index 0d2cf7f1ef..96921c2743 100755 --- a/scripts/json_overview_image_info.py +++ b/scripts/json_overview_image_info.py @@ -47,7 +47,13 @@ for device_id, profile in output.get("profiles", {}).items(): if output: - default_packages, output["arch_packages"] = run( + ( + default_packages, + output["arch_packages"], + linux_version, + linux_release, + linux_vermagic, + ) = run( [ "make", "--no-print-directory", @@ -55,6 +61,9 @@ if output: "target/linux/", "val.DEFAULT_PACKAGES", "val.ARCH_PACKAGES", + "val.LINUX_VERSION", + "val.LINUX_RELEASE", + "val.LINUX_VERMAGIC", "V=s", ], stdout=PIPE, @@ -64,7 +73,11 @@ if output: ).stdout.splitlines() output["default_packages"] = sorted(default_packages.split()) - + output["linux_kernel"] = { + "version": linux_version, + "release": linux_release, + "vermagic": linux_vermagic, + } output_path.write_text(json.dumps(output, sort_keys=True, separators=(",", ":"))) else: print("JSON info file script could not find any JSON files for target")