[OpenWrt-Devel] [PATCH 10/13] kirkwood: Add an 'All Profiles' profile

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


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

    Kirkwood has enough images to make it useful to get all profiles
    and multi-profile select working properly, so this patch adds
    an 'All Profiles' profile.

Signed-off-by: Daniel Dickinson <openwrt at daniel.thecshore.com>
---
 target/linux/kirkwood/image/Makefile          | 27 +++++++++++++++++++++++++--
 target/linux/kirkwood/profiles/000-default.mk | 19 +++++++++++++++++++
 target/linux/kirkwood/profiles/010-all.mk     | 17 +++++++++++++++++
 3 files changed, 61 insertions(+), 2 deletions(-)
 create mode 100644 target/linux/kirkwood/profiles/000-default.mk
 create mode 100644 target/linux/kirkwood/profiles/010-all.mk

diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile
index 7a762f4..a9db144 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -15,37 +15,47 @@ KERNEL_LOADADDR:=0x8000
 TARGET_DEVICES = linksys-audi linksys-viper
 
 define Device/Default
+  PROFILES := All $$(DEVICE_PROFILE)
   KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
   KERNEL := kernel-bin | append-dtb | uImage none
   KERNEL_NAME := zImage
 endef
 
 define Device/linksys-audi
+  # Generic AUDI
   DEVICE_DTS := kirkwood-linksys-audi
   PAGESIZE := 512
   SUBPAGESIZE := 256
   BLOCKSIZE := 16KiB
   KERNEL_SIZE := 2624k
   FILESYSTEMS := squashfs
-  PROFILES := Generic AUDI
+  DEVICE_PROFILE := linksys-audi
   IMAGES := factory.bin sysupgrade.tar
   IMAGE/factory.bin := append-kernel $$$$(KERNEL_SIZE) | append-ubi
   IMAGE/sysupgrade.tar := sysupgrade-nand
 endef
 
 define Device/linksys-viper
+  # Generic VIPER
   DEVICE_DTS := kirkwood-linksys-viper
   PAGESIZE := 2048
   SUBPAGESIZE := 512
   BLOCKSIZE := 128KiB
   KERNEL_SIZE := 2688k
   FILESYSTEMS := squashfs
-  PROFILES := Generic VIPER
+  DEVICE_PROFILE := linksys-viper
   IMAGES := factory.bin sysupgrade.tar
   IMAGE/factory.bin := append-kernel $$$$(KERNEL_SIZE) | append-ubi
   IMAGE/sysupgrade.tar := sysupgrade-nand
 endef
 
+define DefineDevice
+  define Device/$(1)
+    DEVICE_PROFILE := $(1)
+  endef
+  TARGET_DEVICES += $(1)
+endef
+
 define Build/append-dtb
 	cat $(DTS_DIR)/$(DEVICE_DTS).dtb >> $@
 endef
@@ -143,42 +153,55 @@ define Image/Build/ubi
  endif
 endef
 
+$(eval $(call DefineDevice,Generic))
 Image/BuildKernel/Template/Generic=$(call Image/BuildKernel/Template,,$(1))
 Image/InstallKernel/Template/Generic=$(call Image/InstallKernel/Template)
 
+$(eval $(call DefineDevice,DOCKSTAR))
 Image/BuildKernel/Template/DOCKSTAR=$(call Image/BuildKernel/Template,dockstar,$(1))
 Image/InstallKernel/Template/DOCKSTAR=$(call Image/InstallKernel/Template,dockstar)
 
+$(eval $(call DefineDevice,GOFLEXHOME))
 Image/BuildKernel/Template/GOFLEXHOME=$(call Image/BuildKernel/Template,goflexhome,$(1))
 Image/InstallKernel/Template/GOFLEXHOME=$(call Image/InstallKernel/Template,goflexhome)
 
+$(eval $(call DefineDevice,GOFLEXNET))
 Image/BuildKernel/Template/GOFLEXNET=$(call Image/BuildKernel/Template,goflexnet,$(1))
 Image/InstallKernel/Template/GOFLEXNET=$(call Image/InstallKernel/Template,goflexnet)
 
+$(eval $(call DefineDevice,IB62X0))
 Image/BuildKernel/Template/IB62X0=$(call Image/BuildKernel/Template,ib62x0,$(1))
 Image/InstallKernel/Template/IB62X0=$(call Image/InstallKernel/Template,ib62x0)
 
+$(eval $(call DefineDevice,ICONNECT))
 Image/BuildKernel/Template/ICONNECT=$(call Image/BuildKernel/Template,iconnect,$(1))
 Image/InstallKernel/Template/ICONNECT=$(call Image/InstallKernel/Template,iconnect)
 
+$(eval $(call DefineDevice,IOMEGA_IX2_200))
 Image/BuildKernel/Template/IOMEGA_IX2_200=$(call Image/BuildKernel/Template,iomega_ix2_200,$(1))
 Image/InstallKernel/Template/IOMEGA_IX2_200=$(call Image/InstallKernel/Template,iomega_ix2_200)
 
+$(eval $(call DefineDevice,NSA310S))
 Image/BuildKernel/Template/NSA310S=$(call Image/BuildKernel/Template,nsa310s,$(1))
 Image/InstallKernel/Template/NSA310S=$(call Image/InstallKernel/Template,nsa310s)
 
+$(eval $(call DefineDevice,POGOE02))
 Image/BuildKernel/Template/POGOE02=$(call Image/BuildKernel/Template,pogo_e02,$(1))
 Image/InstallKernel/Template/POGOE02=$(call Image/InstallKernel/Template,pogo_e02)
 
+$(eval $(call DefineDevice,SHEEVAPLUG))
 Image/BuildKernel/Template/SHEEVAPLUG=$(call Image/BuildKernel/Template,sheevaplug,$(1))
 Image/InstallKernel/Template/SHEEVAPLUG=$(call Image/InstallKernel/Template,sheevaplug)
 
+$(eval $(call DefineDevice,SHEEVAPLUGSATA))
 Image/BuildKernel/Template/SHEEVAPLUGSATA=$(call Image/BuildKernel/Template,sheevaplug-esata,$(1))
 Image/InstallKernel/Template/SHEEVAPLUGSATA=$(call Image/InstallKernel/Template,sheevaplug-esata)
 
+$(eval $(call DefineDevice,GuruplugServerPlus))
 Image/BuildKernel/Template/GuruplugServerPlus=$(call Image/BuildKernel/Template,guruplug-server-plus,$(1))
 Image/InstallKernel/Template/GuruplugServerPlus=$(call Image/InstallKernel/Template,guruplug-server-plus)
 
+$(eval $(call DefineDevice,Topkick1281P2))
 Image/BuildKernel/Template/Topkick1281P2=$(call Image/BuildKernel/Template,topkick,$(1))
 Image/InstallKernel/Template/Topkick1281P2=$(call Image/InstallKernel/Template,topkick)
 
diff --git a/target/linux/kirkwood/profiles/000-default.mk b/target/linux/kirkwood/profiles/000-default.mk
new file mode 100644
index 0000000..52d7830
--- /dev/null
+++ b/target/linux/kirkwood/profiles/000-default.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2013 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-usb2 kmod-usb-storage
+  PROFILE_SKIP_DEFAULT:=1
+endef
+
+define Profile/Default/description
+ Package set compatible with most Marvell Kirkwood based boards.
+endef
+
+$(eval $(call Profile,Default))
diff --git a/target/linux/kirkwood/profiles/010-all.mk b/target/linux/kirkwood/profiles/010-all.mk
new file mode 100644
index 0000000..f445215
--- /dev/null
+++ b/target/linux/kirkwood/profiles/010-all.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/All
+  NAME:=All Profiles
+  PROFILE_SKIP_DEFAULT:=1
+endef
+
+define Profile/All/description
+	Build images for all profiles
+endef
+
+$(eval $(call Profile,All))
-- 
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