target.mk: fix arm architecture level detection
authorLu jicong <jiconglu58@gmail.com>
Tue, 2 Jul 2024 13:01:49 +0000 (21:01 +0800)
committerRISCi_ATOM <bob@bobcall.me>
Tue, 9 Jul 2024 16:24:11 +0000 (12:24 -0400)
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@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15855
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit d55083fbcaea9cdd2ebc10a2d38989ad485a5357)

include/target.mk

index 04fc92fe523ea61c1040d7f74142afbc43364eb7..80c5e181b958cd029fcae5d6dc31c450bb61cbb6 100644 (file)
@@ -316,7 +316,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))