automatic subtarget enumaration

SVN-Revision: 27407
This commit is contained in:
John Crispin 2011-07-03 17:38:23 +00:00
parent 43771202d3
commit 058eca0b3b
2 changed files with 7 additions and 4 deletions

View File

@ -17,9 +17,6 @@ DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg hotplug2
DEFAULT_PACKAGES.router:=dnsmasq iptables ppp ppp-mod-pppoe kmod-ipt-nathelper firewall DEFAULT_PACKAGES.router:=dnsmasq iptables ppp ppp-mod-pppoe kmod-ipt-nathelper firewall
DEFAULT_PACKAGES.bootloader:= DEFAULT_PACKAGES.bootloader:=
# Add device specific packages
DEFAULT_PACKAGES += $(DEFAULT_PACKAGES.$(DEVICE_TYPE))
ifneq ($(DUMP),) ifneq ($(DUMP),)
all: dumpinfo all: dumpinfo
endif endif
@ -30,6 +27,9 @@ ifeq ($(DUMP),)
SUBTARGET:=$(strip $(foreach subdir,$(patsubst $(PLATFORM_DIR)/%/target.mk,%,$(wildcard $(PLATFORM_DIR)/*/target.mk)),$(if $(CONFIG_TARGET_$(call target_conf,$(BOARD)_$(subdir))),$(subdir)))) SUBTARGET:=$(strip $(foreach subdir,$(patsubst $(PLATFORM_DIR)/%/target.mk,%,$(wildcard $(PLATFORM_DIR)/*/target.mk)),$(if $(CONFIG_TARGET_$(call target_conf,$(BOARD)_$(subdir))),$(subdir))))
else else
PLATFORM_DIR:=${CURDIR} PLATFORM_DIR:=${CURDIR}
ifeq ($(SUBTARGETS),)
SUBTARGETS:=$(strip $(patsubst $(PLATFORM_DIR)/%/target.mk,%,$(wildcard $(PLATFORM_DIR)/*/target.mk)))
endif
endif endif
TARGETID:=$(BOARD)$(if $(SUBTARGET),/$(SUBTARGET)) TARGETID:=$(BOARD)$(if $(SUBTARGET),/$(SUBTARGET))
@ -48,6 +48,9 @@ else
endif endif
endif endif
# Add device specific packages (here below to allow device type set from subtarget)
DEFAULT_PACKAGES += $(DEFAULT_PACKAGES.$(DEVICE_TYPE))
define Profile/Default define Profile/Default
NAME:= NAME:=
PACKAGES:= PACKAGES:=

View File

@ -10,7 +10,7 @@ ARCH:=mips
BOARD:=lantiq BOARD:=lantiq
BOARDNAME:=Lantiq GPON/XWAY BOARDNAME:=Lantiq GPON/XWAY
FEATURES:=squashfs jffs2 FEATURES:=squashfs jffs2
SUBTARGETS:=xway falcon ase #SUBTARGETS:=xway falcon ase
LINUX_VERSION:=2.6.39.2 LINUX_VERSION:=2.6.39.2