[OpenWrt-Devel] [PATCH 6/8] adm5120: Translate the build all profiles profile to new multi-profile config

openwrt at daniel.thecshore.com openwrt at daniel.thecshore.com
Tue Feb 16 02:47:52 EST 2016


From: Daniel Dickinson <openwrt at daniel.thecshore.com>

Minor fixes so that the 'Generic' profile (build all images profile)
not only builds all images but acts correctly in the
new multi-profile build machinery/menuconfig.

Signed-off-by: Daniel Dickinson <openwrt at daniel.thecshore.com>
---
 target/linux/adm5120/image/Makefile                    |  4 ++--
 target/linux/adm5120/image/router_le.mk                |  5 +++++
 target/linux/adm5120/router_le/profiles/010-Generic.mk |  3 +++
 target/linux/adm5120/router_le/profiles/020-Unified.mk | 17 +++++++++++++++++
 target/linux/adm5120/router_le/target.mk               |  1 +
 5 files changed, 28 insertions(+), 2 deletions(-)
 create mode 100644 target/linux/adm5120/router_le/profiles/020-Unified.mk

diff --git a/target/linux/adm5120/image/Makefile b/target/linux/adm5120/image/Makefile
index 4ca4d48..af753e1 100644
--- a/target/linux/adm5120/image/Makefile
+++ b/target/linux/adm5120/image/Makefile
@@ -93,11 +93,11 @@ endef
 include $(SUBTARGET).mk
 
 define Image/Build
-	$(call Image/Build/Profile/$(PROFILE),$(1))
+	$(foreach profile,$(PROFILES_BUILD),$(call Image/Build/Profile/$(profile),$(1)))
 endef
 
 define Image/Build/Initramfs
-	$(call Image/Build/Profile/$(PROFILE),Initramfs)
+	$(foreach profile,$(PROFILES_BUILD),$(call Image/Build/Profile/$(profile),Initramfs))
 endef
 
 define Image/BuildKernel
diff --git a/target/linux/adm5120/image/router_le.mk b/target/linux/adm5120/image/router_le.mk
index 1e3d7f7..3561298 100644
--- a/target/linux/adm5120/image/router_le.mk
+++ b/target/linux/adm5120/image/router_le.mk
@@ -399,3 +399,8 @@ define Image/Build/Profile/Generic
 
 	$(call Image/Build/Experimental,$(1))
 endef
+
+define Image/Build/Profile/Unified
+	true
+endef
+
diff --git a/target/linux/adm5120/router_le/profiles/010-Generic.mk b/target/linux/adm5120/router_le/profiles/010-Generic.mk
index 6c3e5f3..f3439b4 100644
--- a/target/linux/adm5120/router_le/profiles/010-Generic.mk
+++ b/target/linux/adm5120/router_le/profiles/010-Generic.mk
@@ -8,6 +8,9 @@
 define Profile/Generic
 	NAME:=Generic (default)
 	PACKAGES:=
+	PROFILE_TYPE:=meta
+	PROFILE_DEFAULT:=1
+	PROFILE_IMAGES_TYPE:=all
 endef
 
 define Profile/Generic/Description
diff --git a/target/linux/adm5120/router_le/profiles/020-Unified.mk b/target/linux/adm5120/router_le/profiles/020-Unified.mk
new file mode 100644
index 0000000..1c55897
--- /dev/null
+++ b/target/linux/adm5120/router_le/profiles/020-Unified.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Unified
+	NAME:=Unified Profile (merge of all selected profiles)
+	PROFILE_TYPE:=unified
+endef
+
+define Profile/Unified/Description
+	Build all selected images with a profile that is the merge of all selected profiles.
+endef
+
+$(eval $(call Profile,Unified))
diff --git a/target/linux/adm5120/router_le/target.mk b/target/linux/adm5120/router_le/target.mk
index 6847d00..ea3c858 100644
--- a/target/linux/adm5120/router_le/target.mk
+++ b/target/linux/adm5120/router_le/target.mk
@@ -3,6 +3,7 @@ ARCH_PACKAGES:=adm5120_mipsel
 SUBTARGET:=router_le
 BOARDNAME:=Little Endian
 FEATURES+=squashfs tgz
+TARGET_MULTI_SELECT:=1
 
 define Target/Description
 	Build firmware images for Infineon/ADMtek ADM5120 based boards
-- 
2.4.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list