#
KERNEL_BUILD:=1
+include $(INCLUDE_DIR)/kernel-version.mk
+include $(INCLUDE_DIR)/host.mk
+include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/prereq.mk
--include ./config
+LINUX_CONFIG ?= ./config/default
+
+-include $(TOPDIR)/target/linux/generic-$(KERNEL)/config-template
+-include $(LINUX_CONFIG)
+
ifneq ($(CONFIG_ATM),)
FEATURES += atm
endif
all: compile
endif
-include $(INCLUDE_DIR)/kernel-version.mk
-include $(INCLUDE_DIR)/host.mk
-include $(INCLUDE_DIR)/kernel.mk
-
-LINUX_CONFIG:=./config
-
ifneq (,$(findstring uml,$(BOARD)))
LINUX_KARCH:=um
else
$(MAKE) $(KERNEL_MAKEOPTS) CC="$(KERNEL_CC)" oldconfig prepare scripts
endef
define Kernel/Configure/Default
- @$(CP) $(LINUX_CONFIG) $(LINUX_DIR)/.config
+ @if [ -f "./config/profile-$(PROFILE)" ]; then \
+ $(SCRIPT_DIR)/config.pl '+' $(GENERIC_PLATFORM_DIR)/config-template '+' $(LINUX_CONFIG) ./config/profile-$(PROFILE) > $(LINUX_DIR)/.config; \
+ else \
+ $(SCRIPT_DIR)/config.pl '+' $(GENERIC_PLATFORM_DIR)/config-template $(LINUX_CONFIG) > $(LINUX_DIR)/.config; \
+ fi
endef
define Kernel/Configure
$(call Kernel/Configure/Default)
PACKAGES:=
endef
+confname=$(subst .,_,$(subst -,_,$(1)))
define Profile
$(eval $(call Profile/Default))
$(eval $(call Profile/$(1)))
echo "Target-Profile: $(1)"; \
echo "Target-Profile-Name: $(NAME)"; \
echo "Target-Profile-Packages: $(PACKAGES)"; \
+ if [ -f ./config/profile-$(1) ]; then \
+ echo "Target-Profile-Kconfig: yes"; \
+ fi; \
echo "Target-Profile-Description:"; \
getvar "$(call shvar,Profile/$(1)/Description)"; \
echo "@@"; \
echo;
+ ifeq ($(CONFIG_LINUX_$(call confname,$(KERNEL)_$(1))),y)
+ PROFILE=$(1)
+ endif
endef
$(eval $(call shexport,Target/Description))
compile: $(LINUX_DIR)/.modules
menuconfig: $(LINUX_DIR)/.prepared FORCE
$(call Kernel/Configure)
+ $(SCRIPT_DIR)/config.pl '+' $(GENERIC_PLATFORM_DIR)/config-template $(LINUX_CONFIG) > $(LINUX_DIR)/.config
$(MAKE) -C $(LINUX_DIR) $(KERNEL_MAKEOPTS) menuconfig
- $(SCRIPT_DIR)/config.pl $(LINUX_DIR)/.config > $(PLATFORM_DIR)/config
-ifeq ($(KERNEL),2.6)
- $(SCRIPT_DIR)/config.pl '>' $(GENERIC_PLATFORM_DIR)/config-template $(LINUX_DIR)/.config > $(PLATFORM_DIR)/config-diff
-endif
+ $(SCRIPT_DIR)/config.pl '>' $(GENERIC_PLATFORM_DIR)/config-template $(LINUX_DIR)/.config > $(LINUX_CONFIG)
install: $(LINUX_DIR)/.image