[OpenWrt-Devel] [PATCH 02/13] ar71xx: Allow to select a subset of profiles for building

openwrt at daniel.thecshore.com openwrt at daniel.thecshore.com
Mon Jan 18 21:50:02 EST 2016


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

ar71xx is has one of the largest sets of images and it is
therefore very useful to be able select a subset > 1 of
target profiles for a build.  This patch adds the menuconfig
and ar71xx image makefile parts needed to enable this
functionality.

Signed-off-by: Daniel Dickinson <openwrt at daniel.thecshore.com>
---
 package/boot/uboot-ar71xx/Makefile                  |  2 +-
 target/linux/ar71xx/generic/profiles/00-all.mk      | 15 +++++++++++++++
 target/linux/ar71xx/generic/profiles/00-default.mk  | 17 -----------------
 target/linux/ar71xx/generic/profiles/000-default.mk | 18 ++++++++++++++++++
 target/linux/ar71xx/image/Makefile                  |  7 ++++---
 target/linux/ar71xx/nand/profiles/00-all.mk         | 15 +++++++++++++++
 target/linux/ar71xx/nand/profiles/000-default.mk    | 16 ++++++++++++++++
 7 files changed, 69 insertions(+), 21 deletions(-)
 create mode 100644 target/linux/ar71xx/generic/profiles/00-all.mk
 delete mode 100644 target/linux/ar71xx/generic/profiles/00-default.mk
 create mode 100644 target/linux/ar71xx/generic/profiles/000-default.mk
 create mode 100644 target/linux/ar71xx/nand/profiles/00-all.mk
 create mode 100644 target/linux/ar71xx/nand/profiles/000-default.mk

diff --git a/package/boot/uboot-ar71xx/Makefile b/package/boot/uboot-ar71xx/Makefile
index 7c4bb6c..e92faa0 100644
--- a/package/boot/uboot-ar71xx/Makefile
+++ b/package/boot/uboot-ar71xx/Makefile
@@ -44,7 +44,7 @@ define Package/uboot-ar71xx-$(1)
   TITLE:=$(2)
   DEPENDS:=@TARGET_ar71xx_generic
   URL:=http://www.denx.de/wiki/U-Boot
-  DEFAULT:=y if (TARGET_ar71xx_generic_NBG_460N_550N_550NH || TARGET_ar71xx_generic_Default || CONFIG_TARGET_ar71xx_generic_Minimal)
+  DEFAULT:=y if (TARGET_ar71xx_generic_NBG_460N_550N_550NH || TARGET_ar71xx_generic_All || CONFIG_TARGET_ar71xx_generic_Minimal)
   VARIANT:=$(1)
 endef
 endef
diff --git a/target/linux/ar71xx/generic/profiles/00-all.mk b/target/linux/ar71xx/generic/profiles/00-all.mk
new file mode 100644
index 0000000..09dfa79
--- /dev/null
+++ b/target/linux/ar71xx/generic/profiles/00-all.mk
@@ -0,0 +1,15 @@
+#
+# Copyright (C) 2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+	NAME:=All Profiles
+endef
+
+define Profile/All/Description
+	All selects building images for all profiles
+endef
+$(eval $(call Profile,All))
diff --git a/target/linux/ar71xx/generic/profiles/00-default.mk b/target/linux/ar71xx/generic/profiles/00-default.mk
deleted file mode 100644
index 36c4aa6..0000000
--- a/target/linux/ar71xx/generic/profiles/00-default.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright (C) 2009 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Default
-	NAME:=Default Profile (all drivers)
-	PACKAGES:= \
-		kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-usbdev
-endef
-
-define Profile/Default/Description
-	Default package set compatible with most boards.
-endef
-$(eval $(call Profile,Default))
diff --git a/target/linux/ar71xx/generic/profiles/000-default.mk b/target/linux/ar71xx/generic/profiles/000-default.mk
new file mode 100644
index 0000000..a38f82d
--- /dev/null
+++ b/target/linux/ar71xx/generic/profiles/000-default.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Default
+	NAME:=Default Profile
+	PACKAGES:= \
+		kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-usbdev
+	PROFILE_SKIP_DEFAULT:=1
+endef
+
+define Profile/Default/Description
+	Default package set compatible with most boards.
+endef
+$(eval $(call Profile,Default))
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 22fe1fe..a94d893 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -10,7 +10,7 @@ JFFS2_BLOCKSIZE = 64k 128k 256k
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
-IMAGE_PROFILE:=$(if $(PROFILE),$(PROFILE),Default)
+IMAGE_PROFILE:=$$(if $$(1),$$(1),All)
 
 KERNEL_LOADADDR = 0x80060000
 
@@ -143,7 +143,7 @@ DEVICE_VARS += UBNT_BOARD UBNT_CHIP UBNT_TYPE
 define Device/Default
   BOARDNAME :=
   DEVICE_PROFILE = $$(BOARDNAME)
-  PROFILES = Default Minimal $$(DEVICE_PROFILE)
+  PROFILES = All Minimal $$(DEVICE_PROFILE)
   MTDPARTS :=
   IMAGES := sysupgrade.bin
   BLOCKSIZE := 64k
@@ -1386,6 +1386,7 @@ endef
 define MkuImageOKLI
 	$(call MkuImage,lzma,-M 0x4f4b4c49,$(KDIR)/vmlinux.bin.lzma,$(KDIR_TMP)/vmlinux-$(1).okli)
 endef
+
 endif
 
 # $(1): name of the 1st file.
@@ -2529,7 +2530,7 @@ $(eval $(call MultiProfile,WNDR4300,WNDR3700V4 WNDR4300V1))
 endif # ifeq ($(SUBTARGET),nand)
 
 
-$(eval $(call MultiProfile,Default,$(SINGLE_PROFILES)))
+$(eval $(call MultiProfile,All,$(SINGLE_PROFILES)))
 
 define Image/Build/squashfs
 	cp $(KDIR)/root.squashfs $(KDIR)/root.squashfs-raw
diff --git a/target/linux/ar71xx/nand/profiles/00-all.mk b/target/linux/ar71xx/nand/profiles/00-all.mk
new file mode 100644
index 0000000..09dfa79
--- /dev/null
+++ b/target/linux/ar71xx/nand/profiles/00-all.mk
@@ -0,0 +1,15 @@
+#
+# Copyright (C) 2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+	NAME:=All Profiles
+endef
+
+define Profile/All/Description
+	All selects building images for all profiles
+endef
+$(eval $(call Profile,All))
diff --git a/target/linux/ar71xx/nand/profiles/000-default.mk b/target/linux/ar71xx/nand/profiles/000-default.mk
new file mode 100644
index 0000000..ebc85fc
--- /dev/null
+++ b/target/linux/ar71xx/nand/profiles/000-default.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Default
+	NAME:=Default Profile
+	PROFILE_SKIP_DEFAULT:=1
+endef
+
+define Profile/Default/Description
+	Default package set compatible with most boards.
+endef
+$(eval $(call Profile,Default))
-- 
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