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

openwrt at daniel.thecshore.com openwrt at daniel.thecshore.com
Wed Jan 20 13:20:05 EST 2016


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

Minor fixes so that the former 'Default' profile (now All)
not only builds all profiles but acts correctly in the
new multi-profile build machinery/menuconfig

Signed-off-by: Daniel Dickinson <openwrt at daniel.thecshore.com>
---
 target/linux/ramips/image/Makefile                 |  7 +++++--
 target/linux/ramips/mt7620/profiles/00-default.mk  |  3 +++
 target/linux/ramips/mt7620/profiles/01-unified.mk  | 16 ++++++++++++++++
 target/linux/ramips/mt7620/target.mk               |  1 +
 target/linux/ramips/mt7621/profiles/00-default.mk  |  3 +++
 target/linux/ramips/mt7621/profiles/01-unified.mk  | 16 ++++++++++++++++
 target/linux/ramips/mt7621/target.mk               |  1 +
 target/linux/ramips/mt7628/profiles/00-default.mk  |  3 +++
 target/linux/ramips/mt7628/profiles/01-unified.mk  | 16 ++++++++++++++++
 target/linux/ramips/mt7628/target.mk               |  1 +
 target/linux/ramips/mt7688/profiles/00-default.mk  |  3 +++
 target/linux/ramips/mt7688/profiles/01-mediatek.mk | 18 ------------------
 target/linux/ramips/mt7688/profiles/01-unified.mk  | 16 ++++++++++++++++
 target/linux/ramips/mt7688/profiles/02-mediatek.mk | 18 ++++++++++++++++++
 target/linux/ramips/mt7688/target.mk               |  1 +
 target/linux/ramips/rt288x/profiles/00-default.mk  |  3 +++
 target/linux/ramips/rt288x/profiles/01-unified.mk  | 16 ++++++++++++++++
 target/linux/ramips/rt288x/target.mk               |  1 +
 target/linux/ramips/rt305x/profiles/00-default.mk  |  3 +++
 target/linux/ramips/rt305x/profiles/01-unified.mk  | 16 ++++++++++++++++
 target/linux/ramips/rt305x/target.mk               |  1 +
 target/linux/ramips/rt3883/profiles/00-default.mk  |  3 +++
 target/linux/ramips/rt3883/profiles/01-unified.mk  | 16 ++++++++++++++++
 target/linux/ramips/rt3883/target.mk               |  1 +
 24 files changed, 163 insertions(+), 20 deletions(-)
 create mode 100644 target/linux/ramips/mt7620/profiles/01-unified.mk
 create mode 100644 target/linux/ramips/mt7621/profiles/01-unified.mk
 create mode 100644 target/linux/ramips/mt7628/profiles/01-unified.mk
 delete mode 100644 target/linux/ramips/mt7688/profiles/01-mediatek.mk
 create mode 100644 target/linux/ramips/mt7688/profiles/01-unified.mk
 create mode 100644 target/linux/ramips/mt7688/profiles/02-mediatek.mk
 create mode 100644 target/linux/ramips/rt288x/profiles/01-unified.mk
 create mode 100644 target/linux/ramips/rt305x/profiles/01-unified.mk
 create mode 100644 target/linux/ramips/rt3883/profiles/01-unified.mk

diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 55b9cf4..d6887d4 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -19,7 +19,7 @@ VMLINUX:=$(IMG_PREFIX)-vmlinux
 UIMAGE:=$(IMG_PREFIX)-uImage
 
 define Image/Build/Initramfs
-	$(call Image/Build/Profile/$(PROFILE),initramfs)
+	$(call Image/Build/Profile/$(if $(filter $(PROFILE),$(PROFILES_BUILD)),multi-profile,$(PROFILE),initramfs))
 endef
 
 DEVICE_VARS += DTS
@@ -1112,6 +1112,9 @@ define Image/Build/Profile/Default
 endef
 endif
 
+define Image/Build/Profile/Unified
+	true
+endif
 
 ifndef TARGET_DEVICES
 #
@@ -1137,7 +1140,7 @@ endef
 define Image/Build
 	$(call Image/Build/$(1))
 	dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
-	$(call Image/Build/Profile/$(PROFILE),$(1))
+	$(foreach profile,$(PROFILES_BUILD),$(call Image/Build/Profile/$(profile),$(1)))
 endef
 endif
 
diff --git a/target/linux/ramips/mt7620/profiles/00-default.mk b/target/linux/ramips/mt7620/profiles/00-default.mk
index b4f8a79..2f2b0cd 100644
--- a/target/linux/ramips/mt7620/profiles/00-default.mk
+++ b/target/linux/ramips/mt7620/profiles/00-default.mk
@@ -7,6 +7,9 @@
 
 define Profile/Default
 	NAME:=Default Profile
+	PROFILE_TYPE:=meta
+	PROFILE_DEFAULT:=1
+	PROFILE_IMAGES_TYPE:=all
 endef
 
 define Profile/Default/Description
diff --git a/target/linux/ramips/mt7620/profiles/01-unified.mk b/target/linux/ramips/mt7620/profiles/01-unified.mk
new file mode 100644
index 0000000..27bd4a5
--- /dev/null
+++ b/target/linux/ramips/mt7620/profiles/01-unified.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2011 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 or all selected profiles)
+	PROFILE_TYPE:=unified
+endef
+
+define Profile/Unified/Description
+	Build selected images with a profile which is the merge of all selected profiles.
+endef
+$(eval $(call Profile,Unified))
diff --git a/target/linux/ramips/mt7620/target.mk b/target/linux/ramips/mt7620/target.mk
index 99763b0..249d9c7 100644
--- a/target/linux/ramips/mt7620/target.mk
+++ b/target/linux/ramips/mt7620/target.mk
@@ -8,6 +8,7 @@ ARCH_PACKAGES:=ramips_24kec
 FEATURES+=usb
 CPU_TYPE:=24kec
 CPU_SUBTYPE:=dsp
+TARGET_MULTI_SELECT:=1
 
 DEFAULT_PACKAGES += kmod-rt2800-pci kmod-rt2800-soc kmod-mt76
 
diff --git a/target/linux/ramips/mt7621/profiles/00-default.mk b/target/linux/ramips/mt7621/profiles/00-default.mk
index b4f8a79..65808f9 100644
--- a/target/linux/ramips/mt7621/profiles/00-default.mk
+++ b/target/linux/ramips/mt7621/profiles/00-default.mk
@@ -7,6 +7,9 @@
 
 define Profile/Default
 	NAME:=Default Profile
+	PROFILE_TYPE:=meta
+	PROFILE_IMAGES_TYPE:=all
+	PROFILE_DEFAULT:=1
 endef
 
 define Profile/Default/Description
diff --git a/target/linux/ramips/mt7621/profiles/01-unified.mk b/target/linux/ramips/mt7621/profiles/01-unified.mk
new file mode 100644
index 0000000..27bd4a5
--- /dev/null
+++ b/target/linux/ramips/mt7621/profiles/01-unified.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2011 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 or all selected profiles)
+	PROFILE_TYPE:=unified
+endef
+
+define Profile/Unified/Description
+	Build selected images with a profile which is the merge of all selected profiles.
+endef
+$(eval $(call Profile,Unified))
diff --git a/target/linux/ramips/mt7621/target.mk b/target/linux/ramips/mt7621/target.mk
index 4e38dbd..7c0a602 100644
--- a/target/linux/ramips/mt7621/target.mk
+++ b/target/linux/ramips/mt7621/target.mk
@@ -9,6 +9,7 @@ FEATURES+=usb
 CPU_TYPE:=1004kc
 CPU_SUBTYPE:=dsp
 CFLAGS:=-Os -pipe -mmt -mips32r2 -mtune=1004kc
+TARGET_MULTI_SELECT:=1
 
 DEFAULT_PACKAGES += kmod-mt76
 
diff --git a/target/linux/ramips/mt7628/profiles/00-default.mk b/target/linux/ramips/mt7628/profiles/00-default.mk
index b4f8a79..65808f9 100644
--- a/target/linux/ramips/mt7628/profiles/00-default.mk
+++ b/target/linux/ramips/mt7628/profiles/00-default.mk
@@ -7,6 +7,9 @@
 
 define Profile/Default
 	NAME:=Default Profile
+	PROFILE_TYPE:=meta
+	PROFILE_IMAGES_TYPE:=all
+	PROFILE_DEFAULT:=1
 endef
 
 define Profile/Default/Description
diff --git a/target/linux/ramips/mt7628/profiles/01-unified.mk b/target/linux/ramips/mt7628/profiles/01-unified.mk
new file mode 100644
index 0000000..27bd4a5
--- /dev/null
+++ b/target/linux/ramips/mt7628/profiles/01-unified.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2011 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 or all selected profiles)
+	PROFILE_TYPE:=unified
+endef
+
+define Profile/Unified/Description
+	Build selected images with a profile which is the merge of all selected profiles.
+endef
+$(eval $(call Profile,Unified))
diff --git a/target/linux/ramips/mt7628/target.mk b/target/linux/ramips/mt7628/target.mk
index 2269721..2fee9d3 100644
--- a/target/linux/ramips/mt7628/target.mk
+++ b/target/linux/ramips/mt7628/target.mk
@@ -8,6 +8,7 @@ ARCH_PACKAGES:=ramips_24kec
 FEATURES+=usb
 CPU_TYPE:=24kec
 CPU_SUBTYPE:=dsp
+TARGET_MULTI_SELECT:=1
 
 define Target/Description
 	Build firmware images for Ralink MT7628 based boards.
diff --git a/target/linux/ramips/mt7688/profiles/00-default.mk b/target/linux/ramips/mt7688/profiles/00-default.mk
index b4f8a79..2f2b0cd 100644
--- a/target/linux/ramips/mt7688/profiles/00-default.mk
+++ b/target/linux/ramips/mt7688/profiles/00-default.mk
@@ -7,6 +7,9 @@
 
 define Profile/Default
 	NAME:=Default Profile
+	PROFILE_TYPE:=meta
+	PROFILE_DEFAULT:=1
+	PROFILE_IMAGES_TYPE:=all
 endef
 
 define Profile/Default/Description
diff --git a/target/linux/ramips/mt7688/profiles/01-mediatek.mk b/target/linux/ramips/mt7688/profiles/01-mediatek.mk
deleted file mode 100644
index 1ef824d..0000000
--- a/target/linux/ramips/mt7688/profiles/01-mediatek.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (C) 2015 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/LinkIt7688
-	NAME:=LinkIt7688
-	PACKAGES:=\
-		kmod-usb-core kmod-usb2 kmod-usb-ohci \
-		uboot-envtools kmod-ledtrig-netdev
-endef
-
-define Profile/LinkIt7688/Description
-	Default package set compatible with LinkIt Smart7688 dev board.
-endef
-$(eval $(call Profile,LinkIt7688))
diff --git a/target/linux/ramips/mt7688/profiles/01-unified.mk b/target/linux/ramips/mt7688/profiles/01-unified.mk
new file mode 100644
index 0000000..27bd4a5
--- /dev/null
+++ b/target/linux/ramips/mt7688/profiles/01-unified.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2011 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 or all selected profiles)
+	PROFILE_TYPE:=unified
+endef
+
+define Profile/Unified/Description
+	Build selected images with a profile which is the merge of all selected profiles.
+endef
+$(eval $(call Profile,Unified))
diff --git a/target/linux/ramips/mt7688/profiles/02-mediatek.mk b/target/linux/ramips/mt7688/profiles/02-mediatek.mk
new file mode 100644
index 0000000..1ef824d
--- /dev/null
+++ b/target/linux/ramips/mt7688/profiles/02-mediatek.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/LinkIt7688
+	NAME:=LinkIt7688
+	PACKAGES:=\
+		kmod-usb-core kmod-usb2 kmod-usb-ohci \
+		uboot-envtools kmod-ledtrig-netdev
+endef
+
+define Profile/LinkIt7688/Description
+	Default package set compatible with LinkIt Smart7688 dev board.
+endef
+$(eval $(call Profile,LinkIt7688))
diff --git a/target/linux/ramips/mt7688/target.mk b/target/linux/ramips/mt7688/target.mk
index 37b5ebc..f6d8226 100644
--- a/target/linux/ramips/mt7688/target.mk
+++ b/target/linux/ramips/mt7688/target.mk
@@ -8,6 +8,7 @@ ARCH_PACKAGES:=ramips_24kec
 FEATURES+=usb
 CPU_TYPE:=24kec
 CPU_SUBTYPE:=dsp
+TARGET_MULTI_SELECT:=1
 
 define Target/Description
 	Build firmware images for Ralink MT7688 based boards.
diff --git a/target/linux/ramips/rt288x/profiles/00-default.mk b/target/linux/ramips/rt288x/profiles/00-default.mk
index 64501f7..eaa28af 100644
--- a/target/linux/ramips/rt288x/profiles/00-default.mk
+++ b/target/linux/ramips/rt288x/profiles/00-default.mk
@@ -7,6 +7,9 @@
 
 define Profile/Default
 	NAME:=Default Profile
+	PROFILE_TYPE:=meta
+	PROFILE_DEFAULT:=1
+	PROFILE_IMAGES_TYPE:=all
 endef
 
 define Profile/Default/Description
diff --git a/target/linux/ramips/rt288x/profiles/01-unified.mk b/target/linux/ramips/rt288x/profiles/01-unified.mk
new file mode 100644
index 0000000..27bd4a5
--- /dev/null
+++ b/target/linux/ramips/rt288x/profiles/01-unified.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2011 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 or all selected profiles)
+	PROFILE_TYPE:=unified
+endef
+
+define Profile/Unified/Description
+	Build selected images with a profile which is the merge of all selected profiles.
+endef
+$(eval $(call Profile,Unified))
diff --git a/target/linux/ramips/rt288x/target.mk b/target/linux/ramips/rt288x/target.mk
index 1e20e51..22b1346 100644
--- a/target/linux/ramips/rt288x/target.mk
+++ b/target/linux/ramips/rt288x/target.mk
@@ -5,6 +5,7 @@
 SUBTARGET:=rt288x
 BOARDNAME:=RT288x based boards
 CPU_TYPE:=mips32r2
+TARGET_MULTI_SELECT:=1
 
 DEFAULT_PACKAGES += kmod-rt2800-soc
 
diff --git a/target/linux/ramips/rt305x/profiles/00-default.mk b/target/linux/ramips/rt305x/profiles/00-default.mk
index b4f8a79..1b758e9 100644
--- a/target/linux/ramips/rt305x/profiles/00-default.mk
+++ b/target/linux/ramips/rt305x/profiles/00-default.mk
@@ -7,6 +7,9 @@
 
 define Profile/Default
 	NAME:=Default Profile
+	PROFILE_TYPE:=meta
+	PROFILE_DEFAULT:=1
+	PROFILE_IMAGES_TYPES:=all
 endef
 
 define Profile/Default/Description
diff --git a/target/linux/ramips/rt305x/profiles/01-unified.mk b/target/linux/ramips/rt305x/profiles/01-unified.mk
new file mode 100644
index 0000000..27bd4a5
--- /dev/null
+++ b/target/linux/ramips/rt305x/profiles/01-unified.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2011 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 or all selected profiles)
+	PROFILE_TYPE:=unified
+endef
+
+define Profile/Unified/Description
+	Build selected images with a profile which is the merge of all selected profiles.
+endef
+$(eval $(call Profile,Unified))
diff --git a/target/linux/ramips/rt305x/target.mk b/target/linux/ramips/rt305x/target.mk
index b97554f..2d300b2 100644
--- a/target/linux/ramips/rt305x/target.mk
+++ b/target/linux/ramips/rt305x/target.mk
@@ -8,6 +8,7 @@ ARCH_PACKAGES:=ramips_24kec
 FEATURES+=usb ramdisk
 CPU_TYPE:=24kec
 CPU_SUBTYPE:=dsp
+TARGET_MULTI_SELECT:=1
 
 DEFAULT_PACKAGES += kmod-rt2800-soc
 
diff --git a/target/linux/ramips/rt3883/profiles/00-default.mk b/target/linux/ramips/rt3883/profiles/00-default.mk
index 2a8dc44..6a1f574 100644
--- a/target/linux/ramips/rt3883/profiles/00-default.mk
+++ b/target/linux/ramips/rt3883/profiles/00-default.mk
@@ -7,6 +7,9 @@
 
 define Profile/Default
 	NAME:=Default Profile
+	PROFILE_TYPE:=meta
+	PROFILE_DEFAULT:=1
+	PROFILE_IMAGES_TYPE:=all
 endef
 
 define Profile/Default/Description
diff --git a/target/linux/ramips/rt3883/profiles/01-unified.mk b/target/linux/ramips/rt3883/profiles/01-unified.mk
new file mode 100644
index 0000000..27bd4a5
--- /dev/null
+++ b/target/linux/ramips/rt3883/profiles/01-unified.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2011 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 or all selected profiles)
+	PROFILE_TYPE:=unified
+endef
+
+define Profile/Unified/Description
+	Build selected images with a profile which is the merge of all selected profiles.
+endef
+$(eval $(call Profile,Unified))
diff --git a/target/linux/ramips/rt3883/target.mk b/target/linux/ramips/rt3883/target.mk
index 96c9e93..3ccf983 100644
--- a/target/linux/ramips/rt3883/target.mk
+++ b/target/linux/ramips/rt3883/target.mk
@@ -8,6 +8,7 @@ ARCH_PACKAGES:=ramips_24kec
 FEATURES+=usb pci
 CPU_TYPE:=74kc
 CPU_SUBTYPE:=dsp2
+TARGET_MULTI_SELECT:=1
 
 DEFAULT_PACKAGES += kmod-rt2800-pci kmod-rt2800-soc
 
-- 
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