[openwrt/openwrt] target.mk: fix arm architecture level detection

LEDE Commits lede-commits at lists.infradead.org
Wed Jul 3 04:09:57 PDT 2024


ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d55083fbcaea9cdd2ebc10a2d38989ad485a5357

commit d55083fbcaea9cdd2ebc10a2d38989ad485a5357
Author: Lu jicong <jiconglu58 at gmail.com>
AuthorDate: Tue Jul 2 21:01:49 2024 +0800

    target.mk: fix arm architecture level detection
    
    Now kernel configs of armv6k CPUs don't include CONFIG_CPU_V6.
    So armv6k CPUs cannot be detected as arm_v6.
    Fix this by adding detection for CONFIG_CPU_V6K.
    
    Signed-off-by: Lu jicong <jiconglu58 at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15855
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 include/target.mk | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/include/target.mk b/include/target.mk
index 386abf2ef1..c9ff3cbb7c 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -346,7 +346,15 @@ ifeq ($(DUMP),1)
     ifneq ($(CONFIG_CPU_MIPS32_R2),)
       FEATURES += mips16
     endif
-    FEATURES += $(foreach v,6 7,$(if $(CONFIG_CPU_V$(v)),arm_v$(v)))
+    ifneq ($(CONFIG_CPU_V6),)
+      FEATURES += arm_v6
+    endif
+    ifneq ($(CONFIG_CPU_V6K),)
+      FEATURES += arm_v6
+    endif
+    ifneq ($(CONFIG_CPU_V7),)
+      FEATURES += arm_v7
+    endif
 
     # remove duplicates
     FEATURES:=$(sort $(FEATURES))




More information about the lede-commits mailing list