From cdfe413d263409e33eda936c34c4338eed66b5a5 Mon Sep 17 00:00:00 2001 From: Mieczyslaw Nalewaj Date: Mon, 11 Nov 2024 09:14:28 +0100 Subject: [PATCH 1/6] spidev_test: fix version for APK Refactor version of spidev_test for APK. Signed-off-by: Mieczyslaw Nalewaj Link: https://github.com/openwrt/openwrt/pull/16917 Signed-off-by: Robert Marko --- package/utils/spidev_test/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/utils/spidev_test/Makefile b/package/utils/spidev_test/Makefile index fef5c8f646..d264a8950a 100644 --- a/package/utils/spidev_test/Makefile +++ b/package/utils/spidev_test/Makefile @@ -9,7 +9,8 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=spidev-test -PKG_RELEASE:=$(LINUX_VERSION) +PKG_VERSION:=$(LINUX_VERSION) +PKG_RELEASE:=1 PKG_BUILD_DIR:=$(LINUX_DIR)/tools/spi-$(TARGET_DIR_NAME) PKG_BUILD_PARALLEL:=1 @@ -20,7 +21,7 @@ define Package/spidev-test CATEGORY:=Utilities DEPENDS:=+kmod-spi-dev TITLE:=SPI testing utility - VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE) + VERSION:=$(LINUX_VERSION)-r$(PKG_RELEASE) URL:=http://www.kernel.org endef From 44598c233dd9a676bc34666968f33f8b9ff4dd0c Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 11 Nov 2024 19:52:14 +0100 Subject: [PATCH 2/6] build: remove broken dependency of metadata on toplevel .config variables Instead of relying on .config symbols for metadata, alter the DEFAULT variable of affected packages. Fixes enabling opkg vs apk among others. Signed-off-by: Felix Fietkau --- include/target.mk | 40 ++-------------------------------- package/system/apk/Makefile | 1 + package/system/opkg/Makefile | 1 + package/system/procd/Makefile | 3 +++ package/utils/busybox/Makefile | 2 ++ 5 files changed, 9 insertions(+), 38 deletions(-) diff --git a/include/target.mk b/include/target.mk index d13902ad6e..3dc0acff5c 100644 --- a/include/target.mk +++ b/include/target.mk @@ -77,45 +77,9 @@ else endif endif -ifneq ($(DUMP),) - # Parse generic config that might be set before a .config is generated to modify the - # default package configuration - # Keep DYNAMIC_DEF_PKG_CONF in sync with toplevel.mk to reflect the same configs - DYNAMIC_DEF_PKG_CONF := CONFIG_USE_APK CONFIG_SELINUX CONFIG_SMALL_FLASH CONFIG_SECCOMP - $(foreach config, $(DYNAMIC_DEF_PKG_CONF), \ - $(eval $(config) := $(shell grep "$(config)=y" $(TOPDIR)/.config 2>/dev/null)) \ - ) - # The config options that are enabled by default and where other default - # packages depends on needs to be set if they are missing in the .config. - ifeq ($(shell grep "CONFIG_SECCOMP" $(TOPDIR)/.config 2>/dev/null),) - ifeq ($(filter $(BOARD), uml),) - ifneq ($(filter $(ARCH), aarch64 arm armeb mips mipsel mips64 mips64el i386 powerpc x86_64),) - CONFIG_SECCOMP := y - endif - endif - endif -endif - -ifneq ($(CONFIG_USE_APK),) -DEFAULT_PACKAGES+=apk-mbedtls -else -DEFAULT_PACKAGES+=opkg -endif - -ifneq ($(CONFIG_SELINUX),) -DEFAULT_PACKAGES+=busybox-selinux procd-selinux -else -DEFAULT_PACKAGES+=busybox procd -endif - # include ujail on systems with enough storage -ifeq ($(CONFIG_SMALL_FLASH),) -DEFAULT_PACKAGES+=procd-ujail -endif - -# include seccomp ld-preload hooks if kernel supports it -ifneq ($(CONFIG_SECCOMP),) -DEFAULT_PACKAGES+=procd-seccomp +ifeq ($(filter small_flash,$(FEATURES)),) + DEFAULT_PACKAGES+=procd-ujail endif # Add device specific packages (here below to allow device type set from subtarget) diff --git a/package/system/apk/Makefile b/package/system/apk/Makefile index cd1b56caf6..2d637fa180 100644 --- a/package/system/apk/Makefile +++ b/package/system/apk/Makefile @@ -36,6 +36,7 @@ define Package/apk-mbedtls $(Package/apk/default) TITLE += (mbedtls) DEPENDS +=+libmbedtls + DEFAULT:=y if USE_APK VARIANT:=mbedtls DEFAULT_VARIANT:=1 CONFLICTS:=apk-openssl diff --git a/package/system/opkg/Makefile b/package/system/opkg/Makefile index 9fea969ae9..e7c45e3523 100644 --- a/package/system/opkg/Makefile +++ b/package/system/opkg/Makefile @@ -39,6 +39,7 @@ define Package/opkg CATEGORY:=Base system TITLE:=opkg package manager DEPENDS:=+uclient-fetch +libpthread +libubox + DEFAULT:=y if !USE_APK URL:=$(PKG_SOURCE_URL) MENU:=1 endef diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 86de4babfd..9ff6fb80f7 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -50,6 +50,7 @@ define Package/procd $(call Package/procd/Default) VARIANT:=default CONFLICTS:=procd-selinux + DEFAULT:=y if !SELINUX endef define Package/procd-selinux @@ -58,6 +59,7 @@ define Package/procd-selinux TITLE += with SELinux support PROVIDES:=procd VARIANT:=selinux + DEFAULT:=y if SELINUX endef define Package/procd-ujail @@ -73,6 +75,7 @@ define Package/procd-seccomp CATEGORY:=Base system DEPENDS:=@SECCOMP +libubox +libblobmsg-json TITLE:=OpenWrt process seccomp helper + utrace + DEFAULT:=y if SECCOMP endef define Package/uxc diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile index 4ef470df75..7b591db716 100644 --- a/package/utils/busybox/Makefile +++ b/package/utils/busybox/Makefile @@ -56,6 +56,7 @@ define Package/busybox $(call Package/busybox/Default) CONFLICTS:=busybox-selinux VARIANT:=default + DEFAULT:=y if !SELINUX endef define Package/busybox-selinux @@ -64,6 +65,7 @@ define Package/busybox-selinux DEPENDS += +libselinux VARIANT:=selinux PROVIDES:=busybox + DEFAULT:=y if SELINUX endef define Package/busybox/description From 1f3d5858b441cf4e1195b96242dd08d68538e83d Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 9 Nov 2024 15:46:26 -0800 Subject: [PATCH 3/6] mdadm: backport musl patch Needed to fix compilation with GCC14. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/16912 Signed-off-by: Robert Marko --- package/utils/mdadm/Makefile | 2 +- package/utils/mdadm/patches/060-gcc14.patch | 24 +++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 package/utils/mdadm/patches/060-gcc14.patch diff --git a/package/utils/mdadm/Makefile b/package/utils/mdadm/Makefile index c2778fe351..b521daaefc 100644 --- a/package/utils/mdadm/Makefile +++ b/package/utils/mdadm/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mdadm PKG_VERSION:=4.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/raid/mdadm diff --git a/package/utils/mdadm/patches/060-gcc14.patch b/package/utils/mdadm/patches/060-gcc14.patch new file mode 100644 index 0000000000..545a40ac0a --- /dev/null +++ b/package/utils/mdadm/patches/060-gcc14.patch @@ -0,0 +1,24 @@ +From 8bda86099089b44129ef6206764f9de47a45f0db Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Tue, 12 Mar 2024 11:01:50 +0100 +Subject: [PATCH] util.c: add limits.h include for NAME_MAX definition + +Add limits.h include for NAME_MAX definition. + +Signed-off-by: Alexander Kanavin +Signed-off-by: Mariusz Tkaczyk +--- + util.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/util.c ++++ b/util.c +@@ -36,7 +36,7 @@ + #include + #include + #include +- ++#include + + /* + * following taken from linux/blkpg.h because they aren't From 3e42526404f021094ae3fa41524c396d753f4c6c Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 11 Nov 2024 12:23:01 -0800 Subject: [PATCH 4/6] ramips: mt7621: fix typo Missing u caused the regulator to fail probe. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/16925 Signed-off-by: Robert Marko --- target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts b/target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts index 2d06b949f2..41173dd129 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts +++ b/target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts @@ -96,7 +96,7 @@ reg_usb_power: regulator { compatible = "regulator-fixed"; - reglator-name = "usb_power"; + regulator-name = "usb_power"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; From fc9ec5bd3d22d50654af154fc779517fa7aecb33 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 10 Nov 2024 00:31:18 +0100 Subject: [PATCH 5/6] include: cmake.mk: honor CONFIG_DEBUG Set CMAKE_BUILD_TYPE according to CONFIG_DEBUG. Signed-off-by: Daniel Golle --- include/cmake.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/cmake.mk b/include/cmake.mk index 87309dd045..f59410c2f3 100644 --- a/include/cmake.mk +++ b/include/cmake.mk @@ -97,7 +97,7 @@ define Build/Configure/Default -DCMAKE_SYSTEM_NAME=Linux \ -DCMAKE_SYSTEM_VERSION=1 \ -DCMAKE_SYSTEM_PROCESSOR=$(ARCH) \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=$(if $(CONFIG_DEBUG),Debug,Release) \ -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \ -DCMAKE_C_COMPILER_LAUNCHER="$(CMAKE_C_COMPILER_LAUNCHER)" \ From be3e7a84bd37f29e14e4c6a89b8c79bc9808c36c Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 10 Nov 2024 00:32:05 +0100 Subject: [PATCH 6/6] include: meson.mk: honor CONFIG_DEBUG Set buildtype according to CONFIG_DEBUG. Signed-off-by: Daniel Golle --- include/meson.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/meson.mk b/include/meson.mk index 2a20c2bd6b..ff452d8b01 100644 --- a/include/meson.mk +++ b/include/meson.mk @@ -124,7 +124,7 @@ define Build/Configure/Meson $(call Meson/CreateCrossFile,$(PKG_BUILD_DIR)/openwrt-cross.txt) $(call Meson, \ setup \ - --buildtype plain \ + --buildtype $(if $(CONFIG_DEBUG),debug,plain) \ --native-file $(PKG_BUILD_DIR)/openwrt-native.txt \ --cross-file $(PKG_BUILD_DIR)/openwrt-cross.txt \ -Ddefault_library=both \