[OpenWrt-Devel] [PATCH 11/13] adm5120: Translate existing all profiles profiles to new mult-select structure
openwrt at daniel.thecshore.com
openwrt at daniel.thecshore.com
Mon Jan 18 21:50:11 EST 2016
From: Daniel Dickinson <openwrt at daniel.thecshore.com>
For adm5120 the Generic profile was used to build images for all profiles; change
this to the All profile and integrate with multiple (but not all) profile build
mechanism.
Signed-off-by: Daniel Dickinson <openwrt at daniel.thecshore.com>
---
target/linux/adm5120/image/Makefile | 12 +-
target/linux/adm5120/image/rb1xx.mk | 8 +-
target/linux/adm5120/image/router_be.mk | 17 ++-
target/linux/adm5120/image/router_le.mk | 137 ++++++++++++++++++++-
target/linux/adm5120/rb1xx/profiles/000-default.mk | 19 +++
target/linux/adm5120/rb1xx/profiles/005-all.mk | 17 +++
.../adm5120/router_be/profiles/000-default.mk | 19 +++
target/linux/adm5120/router_be/profiles/005-all.mk | 17 +++
.../adm5120/router_le/profiles/000-default.mk | 19 +++
target/linux/adm5120/router_le/profiles/005-all.mk | 17 +++
.../adm5120/router_le/profiles/010-Generic.mk | 10 --
11 files changed, 277 insertions(+), 15 deletions(-)
create mode 100644 target/linux/adm5120/rb1xx/profiles/000-default.mk
create mode 100644 target/linux/adm5120/rb1xx/profiles/005-all.mk
create mode 100644 target/linux/adm5120/router_be/profiles/000-default.mk
create mode 100644 target/linux/adm5120/router_be/profiles/005-all.mk
create mode 100644 target/linux/adm5120/router_le/profiles/000-default.mk
create mode 100644 target/linux/adm5120/router_le/profiles/005-all.mk
diff --git a/target/linux/adm5120/image/Makefile b/target/linux/adm5120/image/Makefile
index c0864b7..9adbb96 100644
--- a/target/linux/adm5120/image/Makefile
+++ b/target/linux/adm5120/image/Makefile
@@ -22,10 +22,18 @@ fs_4k:=4k
fs_64k:=64k
fs_128k:=128k
+define Device/Default
+ PROFILES = All $$(DEVICE_PROFILE)
+endef
+
define Build/Clean
$(LOADER_MAKE) clean
endef
+define Device/Build/image
+
+endef
+
define Image/Prepare
cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
rm -f $(JFFS2BLOCK)
@@ -93,11 +101,11 @@ endef
include $(SUBTARGET).mk
define Image/Build
- $(call Image/Build/Profile/$(2),$(1))
+ $(call Image/Build/Profile/$(2),$(1),$(2))
endef
define Image/Build/Initramfs
- $(call Image/Build/Profile/$(2),Initramfs)
+ $(call Image/Build/Profile/$(1),Initramfs,$(1))
endef
define Image/BuildKernel
diff --git a/target/linux/adm5120/image/rb1xx.mk b/target/linux/adm5120/image/rb1xx.mk
index 3552958..1354a67 100644
--- a/target/linux/adm5120/image/rb1xx.mk
+++ b/target/linux/adm5120/image/rb1xx.mk
@@ -5,7 +5,6 @@
# See /LICENSE for more information.
#
-
define Image/cmdline/yaffs2
root=/dev/mtdblock3 rootfstype=yaffs2
endef
@@ -16,9 +15,16 @@ define Image/BuildKernel/RouterBoard
'$(strip $(call Image/cmdline/yaffs2))'
endef
+Image/BuildKernel/All=$(call Image/BuildKernel/RouterBoard)
+
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
define Image/BuildKernel
$(call Image/BuildKernel/RouterBoard)
endef
endif
+define Device/RouterBoard
+ DEVICE_PROFILE := RouterBoard
+endef
+
+TARGET_DEVICES = RouterBoard
diff --git a/target/linux/adm5120/image/router_be.mk b/target/linux/adm5120/image/router_be.mk
index 5a16672..61dd3e1 100644
--- a/target/linux/adm5120/image/router_be.mk
+++ b/target/linux/adm5120/image/router_be.mk
@@ -14,6 +14,7 @@ define Image/Build/ZyXEL
-o $(call imgname,$(1),$(2))-webui.bin
endef
+
define Image/Build/Template/ZyXEL
$(call Image/Build/ZyXEL,$(1),$(2))
endef
@@ -33,15 +34,29 @@ endef
#
# Profiles
#
+define Device/P334WT
+ DEVICE_PROFILE := P33WT
+ IMAGES := squashfs trx
+endef
+
+TARGET_DEVICES += P334WT
+
define Image/Build/Profile/P334WT
$(call Image/Build/Template/ZyXEL/$(1),p-334wt)
endef
+define Device/P335WT
+ DEVICE_PROFILE := P35WT
+ IMAGES := squashfs trx
+endef
+
+TARGET_DEVICES += P335WT
+
define Image/Build/Profile/P335WT
$(call Image/Build/Template/ZyXEL/$(1),p-335wt)
endef
-define Image/Build/Profile/Generic
+define Image/Build/Profile/All
$(call Image/Build/Profile/P334WT,$(1))
$(call Image/Build/Profile/P335WT,$(1))
endef
diff --git a/target/linux/adm5120/image/router_le.mk b/target/linux/adm5120/image/router_le.mk
index 1e3d7f7..9e2b646 100644
--- a/target/linux/adm5120/image/router_le.mk
+++ b/target/linux/adm5120/image/router_le.mk
@@ -242,22 +242,48 @@ endef
#
# Profiles
#
+
+define Device/CAS630
+ DEVICE_PROFILE := CAS630
+ IMAGES := trx xmodem.bin
+endef
+
define Image/Build/Profile/CAS630
$(call Image/Build/Template/Cellvision/$(1),cas-630,cas-630)
endef
+define Device/CAS630W
+ DEVICE_PROFILE := CAS630W
+ IMAGES := trx xmodem.bin
+endef
+
define Image/Build/Profile/CAS630W
$(call Image/Build/Template/Cellvision/$(1),cas-630w,cas-630)
endef
+define Device/CAS670
+ DEVICE_PROFILE := CAS670
+ IMAGES := trx xmodem.bin
+endef
+
define Image/Build/Profile/CAS670
$(call Image/Build/Template/Cellvision/$(1),cas-670,cas-670)
endef
+define Device/CAS630W
+ DEVICE_PROFILE := CAS630W
+ IMAGES := trx xmodem.bin
+endef
+
define Image/Build/Profile/CAS670W
$(call Image/Build/Template/Cellvision/$(1),cas-670w,cas-670)
endef
+define Device/NFS101U
+ DEVICE_PROFILE := NFS101U
+ IMAGES := trx xmodem.bin
+endef
+
define Image/Build/Profile/NFS101U
$(call Image/Build/Template/Cellvision/$(1),nfs-101u,nfs-101u)
$(call Image/Build/Template/Cellvision/$(1),dn-7013,nfs-101u)
@@ -267,47 +293,102 @@ define Image/Build/Profile/NFS101U
$(call Image/Build/Template/Cellvision/$(1),cg-nsadp,nfs-101u)
endef
+define Device/NFS101WU
+ DEVICE_PROFILE := NFS101WU
+ IMAGES := trx xmodem.bin
+endef
+
define Image/Build/Profile/NFS101WU
$(call Image/Build/Template/Cellvision/$(1),nfs-101wu,nfs-101u)
$(call Image/Build/Template/Cellvision/$(1),dns-g120,nfs-101u)
endef
+define Device/CAS700
+ DEVICE_PROFILE := CAS700
+ IMAGES := trx bin
+endef
+
define Image/Build/Profile/CAS700
$(call Image/Build/Template/Cellvision2/$(1),cas-700,cas-700)
endef
+define Device/CAS700W
+ DEVICE_PROFILE := CAS700W
+ IMAGES := trx bin
+endef
+
define Image/Build/Profile/CAS700W
$(call Image/Build/Template/Cellvision2/$(1),cas-700w,cas-700)
endef
+define Device/CAS771
+ DEVICE_PROFILE := CAS771
+ IMAGES := trx bin
+endef
+
define Image/Build/Profile/CAS771
$(call Image/Build/Template/Cellvision2/$(1),cas-771,cas-771)
endef
+define Device/CAS771W
+ DEVICE_PROFILE := CAS771W
+ IMAGES := trx bin
+endef
+
define Image/Build/Profile/CAS771W
$(call Image/Build/Template/Cellvision2/$(1),cas-771w,cas-771)
endef
+define Device/CAS790
+ DEVICE_PROFILE := CAS790
+ IMAGES := trx bin
+endef
+
define Image/Build/Profile/CAS790
$(call Image/Build/Template/Cellvision2/$(1),cas-790,cas-790)
endef
+define Device/CAS861
+ DEVICE_PROFILE := CAS861
+ IMAGES := trx bin
+endef
+
define Image/Build/Profile/CAS861
$(call Image/Build/Template/Cellvision2/$(1),cas-861,cas-861)
endef
+define Device/CAS861W
+ DEVICE_PROFILE := CAS861W
+ IMAGES := trx bin
+endef
+
define Image/Build/Profile/CAS861W
$(call Image/Build/Template/Cellvision2/$(1),cas-861w,cas-861)
endef
+define Device/NP27G
+ DEVICE_PROFILE := NP27G
+ IMAGES := trx
+endef
+
define Image/Build/Profile/NP27G
$(call Image/Build/Template/Compex/$(1),np27g)
endef
+define Device/NP28G
+ DEVICE_PROFILE := NP28G
+ IMAGES := trx
+endef
+
define Image/Build/Profile/NP28G
$(call Image/Build/Template/Compex/$(1),np28g)
endef
+define Device/WP54
+ DEVICE_PROFILE := WP54
+ IMAGES := trx
+endef
+
define Image/Build/Profile/WP54
$(call Image/Build/Template/Compex/$(1),wp54g)
$(call Image/Build/Template/Compex/$(1),wp54ag)
@@ -316,46 +397,97 @@ define Image/Build/Profile/WP54
$(call Image/Build/Template/WP54GWRT/$(1))
endef
+define Device/BR6104K
+ DEVICE_PROFILE := BR6104K
+ IMAGES := squashfs trx
+endef
+
define Image/Build/Profile/BR6104K
$(call Image/Build/Template/Edimax/$(1),br-6104k)
endef
+define Device/BR6104KP
+ DEVICE_PROFILE := BR6104KP
+ IMAGES := squashfs trx
+endef
+
define Image/Build/Profile/BR6104KP
$(call Image/Build/Template/Edimax/$(1),br-6104kp)
endef
+define Device/BR6104WP
+ DEVICE_PROFILE := BR6104WG
+ IMAGES := squashfs trx
+endef
+
define Image/Build/Profile/BR6104WG
$(call Image/Build/Template/Edimax/$(1),br-6104wg)
endef
+define Device/BR6114WP
+ DEVICE_PROFILE := BR6114WG
+ IMAGES := squashfs trx
+endef
+
define Image/Build/Profile/BR6114WG
$(call Image/Build/Template/Edimax/$(1),br-6114wg)
endef
+define Device/EASY83000
+ DEVICE_PROFILE := EASY83000
+ IMAGES := squashfs trx img
+endef
+
define Image/Build/Profile/EASY83000
$(call Image/Build/Template/Infineon/$(1),easy-83000)
endef
+define Device/EASY5120RT
+ DEVICE_PROFILE := EASY5120RT
+ IMAGES := squashfs trx img
+endef
+
define Image/Build/Profile/EASY5120RT
$(call Image/Build/Template/Infineon/$(1),easy-5120-rt)
endef
+define Device/EASY5120PATA
+ DEVICE_PROFILE := EASY5120PATA
+ IMAGES := squashfs trx img
+endef
+
define Image/Build/Profile/EASY5120PATA
$(call Image/Build/Template/Infineon/$(1),easy-5120p-ata)
endef
+define Device/PMUGW
+ DEVICE_PROFILE := PMUGW
+ IMAGES := squashfs trx img
+endef
+
define Image/Build/Profile/PMUGW
$(call Image/Build/Template/Infineon/$(1),powerline-mugw)
endef
+define Device/5GXI
+ DEVICE_PROFILE := 5GXI
+ IMAGES := squashfs trx
+endef
+
define Image/Build/Profile/5GXI
$(call Image/Build/Template/Osbridge/$(1),5gxi)
endef
+define Device/RouterBoard
+ DEVICE_PROFILE := RouterBoard
+endef
+
define Image/Build/Profile/RouterBoard
$(call Image/Build/Template/Mikrotik/$(1))
endef
+TARGET_DEVICES = RouterBoard
+
ifeq ($(CONFIG_BROKEN),y)
define Image/Build/Experimental
# Cellvison
@@ -373,10 +505,11 @@ ifeq ($(CONFIG_BROKEN),y)
$(call Image/Build/Profile/PMUGW,$(1))
# OSBRiDGE
$(call Image/Build/Profile/5GXI,$(1))
+ TARGET_DEVICES += CAS630 CAS630W CAS670 CAS670W CAS700 CAS700W CAS771 CAS771W CAS861 CAS861W PMUGW 5GXI
endef
endif
-define Image/Build/Profile/Generic
+define Image/Build/Profile/All
# Cellvision
$(call Image/Build/Profile/NFS101U,$(1))
$(call Image/Build/Profile/NFS101WU,$(1))
@@ -399,3 +532,5 @@ define Image/Build/Profile/Generic
$(call Image/Build/Experimental,$(1))
endef
+TARGET_DEVICES += NFS101U NFS101WU WP54 NP27G NP28G BR6104K BR6104KP BR6104WG BR6114WG EB-214A EASY83000 EASY5120RT EASY5120PATA
+
diff --git a/target/linux/adm5120/rb1xx/profiles/000-default.mk b/target/linux/adm5120/rb1xx/profiles/000-default.mk
new file mode 100644
index 0000000..ba86d14
--- /dev/null
+++ b/target/linux/adm5120/rb1xx/profiles/000-default.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2007 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:=
+ 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/adm5120/rb1xx/profiles/005-all.mk b/target/linux/adm5120/rb1xx/profiles/005-all.mk
new file mode 100644
index 0000000..4b59893
--- /dev/null
+++ b/target/linux/adm5120/rb1xx/profiles/005-all.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2007 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
+ Build images for all profiles
+endef
+
+$(eval $(call Profile,All))
+
diff --git a/target/linux/adm5120/router_be/profiles/000-default.mk b/target/linux/adm5120/router_be/profiles/000-default.mk
new file mode 100644
index 0000000..ba86d14
--- /dev/null
+++ b/target/linux/adm5120/router_be/profiles/000-default.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2007 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:=
+ 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/adm5120/router_be/profiles/005-all.mk b/target/linux/adm5120/router_be/profiles/005-all.mk
new file mode 100644
index 0000000..4b59893
--- /dev/null
+++ b/target/linux/adm5120/router_be/profiles/005-all.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2007 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
+ Build images for all profiles
+endef
+
+$(eval $(call Profile,All))
+
diff --git a/target/linux/adm5120/router_le/profiles/000-default.mk b/target/linux/adm5120/router_le/profiles/000-default.mk
new file mode 100644
index 0000000..ba86d14
--- /dev/null
+++ b/target/linux/adm5120/router_le/profiles/000-default.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2007 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:=
+ 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/adm5120/router_le/profiles/005-all.mk b/target/linux/adm5120/router_le/profiles/005-all.mk
new file mode 100644
index 0000000..4b59893
--- /dev/null
+++ b/target/linux/adm5120/router_le/profiles/005-all.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2007 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
+ Build images for all profiles
+endef
+
+$(eval $(call Profile,All))
+
diff --git a/target/linux/adm5120/router_le/profiles/010-Generic.mk b/target/linux/adm5120/router_le/profiles/010-Generic.mk
index 6c3e5f3..d7703e6 100644
--- a/target/linux/adm5120/router_le/profiles/010-Generic.mk
+++ b/target/linux/adm5120/router_le/profiles/010-Generic.mk
@@ -5,15 +5,6 @@
# See /LICENSE for more information.
#
-define Profile/Generic
- NAME:=Generic (default)
- PACKAGES:=
-endef
-
-define Profile/Generic/Description
- Generic package set compatible with most boards.
-endef
-
define Profile/EB-214A
NAME:=Generic EB-214A
PACKAGES:=-wpad-mini -admswconfig -kmod-usb-adm5120 -kmod-ledtrig-adm5120-switch -dnsmasq kmod-usb-uhci kmod-usb2
@@ -23,6 +14,5 @@ define Profile/EB-214A/Description
Package set optimized for generic EB-214A boards.
endef
-$(eval $(call Profile,Generic))
$(eval $(call Profile,EB-214A))
--
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