+include $(INCLUDE_DIR)/kernel-version.mk
+include $(INCLUDE_DIR)/host.mk
+include $(INCLUDE_DIR)/kernel.mk
+include $(INCLUDE_DIR)/prereq.mk
+
+LINUX_CONFIG ?= ./config/default
+
+-include $(TOPDIR)/target/linux/generic-$(KERNEL)/config-template
+-include $(LINUX_CONFIG)
+
+ifneq ($(CONFIG_ATM),)
+ FEATURES += atm
+endif
+ifneq ($(CONFIG_PCI),)
+ FEATURES += pci
+endif
+ifneq ($(CONFIG_USB),)
+ FEATURES += usb
+endif
+ifneq ($(CONFIG_PCMCIA),)
+ FEATURES += pcmcia
+endif
+ifneq ($(CONFIG_VIDEO_DEV),)
+ FEATURES += video
+endif
+
+# remove duplicates
+FEATURES:=$(sort $(FEATURES))
+