X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=include%2Fkernel-build.mk;h=4967dfb67e1f045ae1f0bd6a841ebd020dd2f1fc;hb=e315951ed9aaaa9d7e90dfb1eadc296148e15e0d;hp=8420c8398171ed11373ed43506a6f114844b48f2;hpb=a63ca0688a7306e15567a5c70bf995b1415babee;p=openwrt%2Fsvn-archive%2Farchive.git diff --git a/include/kernel-build.mk b/include/kernel-build.mk index 8420c83981..4967dfb67e 100644 --- a/include/kernel-build.mk +++ b/include/kernel-build.mk @@ -6,15 +6,21 @@ # KERNEL_BUILD:=1 +include $(INCLUDE_DIR)/prereq.mk + +# For target profile selection - the default set +DEFAULT_PACKAGES:=base-files libgcc uclibc bridge busybox dnsmasq dropbear iptables mtd ppp ppp-mod-pppoe mtd + +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))) @@ -145,13 +151,47 @@ define BuildKernel mostlyclean: FORCE $(call Kernel/Clean) + 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:' + @getvar $(call shvar,Target/Description) + @echo '@@' + @echo 'Default-Packages: $(DEFAULT_PACKAGES)' + ifneq ($(DUMPINFO),) + @$(DUMPINFO) + endif + endif + define BuildKernel endef endef +define Profile/Default + NAME:= + PACKAGES:= +endef + +define Profile + $(eval $(call Profile/Default)) + $(eval $(call Profile/$(1))) + DUMPINFO += \ + echo "Target-Profile: $(1)"; \ + echo "Target-Profile-Name: $(NAME)"; \ + echo "Target-Profile-Packages: $(PACKAGES)"; +endef + +$(eval $(call shexport,Target/Description)) download: $(DL_DIR)/$(LINUX_SOURCE) -prepare: $(LINUX_DIR)/.configured $(TOPDIR)/.kernel.mk +prepare: $(LINUX_DIR)/.configured $(TMP_DIR)/.kernel.mk compile: $(LINUX_DIR)/.modules install: $(LINUX_DIR)/.image @@ -166,11 +206,4 @@ rebuild: FORCE 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)" >> $@ -