+
+ ifneq ($(BOARD),)
+ TMP_CONFIG:=$(TMP_DIR)/.kconfig-$(call target_conf,$(TARGETID))
+ $(TMP_CONFIG): $(LINUX_KCONFIG_LIST)
+ $(LINUX_CONF_CMD) > $@ || rm -f $@
+ -include $(TMP_CONFIG)
+ .SILENT: $(TMP_CONFIG)
+ .PRECIOUS: $(TMP_CONFIG)
+
+ ifneq ($(CONFIG_OF),)
+ FEATURES += dt
+ endif
+ ifneq ($(CONFIG_GENERIC_GPIO)$(CONFIG_GPIOLIB),)
+ FEATURES += gpio
+ endif
+ ifneq ($(CONFIG_PCI),)
+ FEATURES += pci
+ endif
+ ifneq ($(CONFIG_PCIEPORTBUS),)
+ FEATURES += pcie
+ endif
+ ifneq ($(CONFIG_USB)$(CONFIG_USB_SUPPORT),)
+ ifneq ($(CONFIG_USB_ARCH_HAS_HCD)$(CONFIG_USB_EHCI_HCD),)
+ FEATURES += usb
+ endif
+ endif
+ ifneq ($(CONFIG_PCMCIA)$(CONFIG_PCCARD),)
+ FEATURES += pcmcia
+ endif
+ ifneq ($(CONFIG_VGA_CONSOLE)$(CONFIG_FB),)
+ FEATURES += display
+ endif
+ ifneq ($(CONFIG_RTC_CLASS),)
+ FEATURES += rtc
+ endif
+ ifneq ($(CONFIG_VIRTIO),)
+ FEATURES += virtio
+ endif
+ ifneq ($(CONFIG_CPU_MIPS32_R2),)
+ FEATURES += mips16
+ endif
+ FEATURES += $(foreach v,6 7,$(if $(CONFIG_CPU_V$(v)),arm_v$(v)))
+
+ # remove duplicates
+ FEATURES:=$(sort $(FEATURES))
+ endif
+endif
+
+CUR_SUBTARGET:=$(SUBTARGET)
+ifeq ($(SUBTARGETS),)
+ CUR_SUBTARGET := default