diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-11-11 23:11:02 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-11-11 23:11:02 +0000 |
commit | cf4e7af392186e57f213053a898c62cd9400b692 (patch) | |
tree | 1f8a2d1023ef2469dbd0e2040599b3c69807cf92 /include/kernel-build.mk | |
parent | 312802199b7cc09dde5ed867745f4c1baa3c5204 (diff) | |
download | mtk-20170518-cf4e7af392186e57f213053a898c62cd9400b692.zip mtk-20170518-cf4e7af392186e57f213053a898c62cd9400b692.tar.gz mtk-20170518-cf4e7af392186e57f213053a898c62cd9400b692.tar.bz2 |
make target/linux/* directories self-contained, use the selected kernel version for the toolchain, autogenerate menuconfig and makefile code for target selection
SVN-Revision: 5498
Diffstat (limited to 'include/kernel-build.mk')
-rw-r--r-- | include/kernel-build.mk | 50 |
1 files changed, 30 insertions, 20 deletions
diff --git a/include/kernel-build.mk b/include/kernel-build.mk index 8420c83..e491e48 100644 --- a/include/kernel-build.mk +++ b/include/kernel-build.mk @@ -6,15 +6,16 @@ # KERNEL_BUILD:=1 +ifeq ($(DUMP),1) + all: dumpinfo +else + all: compile +endif +KERNEL:=2.$(word 2,$(subst ., ,$(strip $(LINUX_VERSION)))) + include $(INCLUDE_DIR)/host.mk include $(INCLUDE_DIR)/kernel.mk -LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2 -LINUX_SITE:=http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \ - http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \ - http://www.kernel.org/pub/linux/kernel/v$(KERNEL) \ - http://www.de.kernel.org/pub/linux/kernel/v$(KERNEL) - LINUX_CONFIG:=./config ifneq (,$(findstring uml,$(BOARD))) @@ -149,28 +150,37 @@ define BuildKernel endef endef +$(eval $(call shexport,Target/Description)) + +ifeq ($(DUMP),1) + dumpinfo: + @echo 'Target: $(BOARD)-$(KERNEL)' + @echo 'Target-Name: $(BOARDNAME) [$(KERNEL)]' + @echo 'Target-Path: $(subst $(TOPDIR)/,,$(PWD))' + @echo 'Target-Arch: $(ARCH)' + @echo 'Target-Features: $(FEATURES)' + @echo 'Linux-Version: $(LINUX_VERSION)' + @echo 'Linux-Release: $(LINUX_RELEASE)' + @echo 'Linux-Kernel-Arch: $(LINUX_KARCH)' + @echo 'Target-Description:' + @echo "$$$(call shvar,Target/Description)" + @echo '@@' +else + download: $(DL_DIR)/$(LINUX_SOURCE) + prepare: $(LINUX_DIR)/.configured $(TMP_DIR)/.kernel.mk + compile: $(LINUX_DIR)/.modules + install: $(LINUX_DIR)/.image -download: $(DL_DIR)/$(LINUX_SOURCE) -prepare: $(LINUX_DIR)/.configured $(TOPDIR)/.kernel.mk -compile: $(LINUX_DIR)/.modules -install: $(LINUX_DIR)/.image - -clean: FORCE + clean: FORCE rm -f $(STAMP_DIR)/.linux-compile rm -rf $(KERNEL_BUILD_DIR) -rebuild: FORCE + rebuild: FORCE @$(MAKE) mostlyclean @if [ -f $(LINUX_KERNEL) ]; then \ $(MAKE) clean; \ fi @$(MAKE) compile - -$(TOPDIR)/.kernel.mk: Makefile - echo "CONFIG_BOARD:=$(BOARD)" > $@ - echo "CONFIG_KERNEL:=$(KERNEL)" >> $@ - echo "CONFIG_LINUX_VERSION:=$(LINUX_VERSION)" >> $@ - echo "CONFIG_LINUX_RELEASE:=$(LINUX_RELEASE)" >> $@ - echo "CONFIG_LINUX_KARCH:=$(LINUX_KARCH)" >> $@ +endif |