From: Nicolas Thill Date: Wed, 8 Jul 2009 14:12:10 +0000 (+0000) Subject: fix ImageBuilder X-Git-Tag: 8.09.2~88 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1c646b510ba476ba95caeb771700c19d207dd0f3;p=openwrt%2Fsvn-archive%2Fopenwrt.git fix ImageBuilder SVN-Revision: 16744 --- diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile index 12e391ef90..3e9f801a80 100644 --- a/target/imagebuilder/Makefile +++ b/target/imagebuilder/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -34,14 +34,17 @@ $(BIN_DIR)/$(IB_NAME).tar.bz2: clean $(CP) $(PACKAGE_DIR) $(PKG_BUILD_DIR)/packages $(CP) $(TOOLCHAIN_DIR)/bin $(PKG_BUILD_DIR)/staging_dir/host/ $(CP) $(STAGING_DIR_HOST)/bin/* $(PKG_BUILD_DIR)/staging_dir/host/bin/ - $(CP) $(TOPDIR)/target/linux $(PKG_BUILD_DIR)/target/ + mkdir -p $(PKG_BUILD_DIR)/target/linux + $(CP) $(TOPDIR)/target/linux/$(BOARD) $(PKG_BUILD_DIR)/target/linux/ rm -rf \ + $(PKG_BUILD_DIR)/target/linux/*/files \ $(PKG_BUILD_DIR)/target/linux/*/patches \ $(PKG_BUILD_DIR)/target/linux/*/*/patches -cp $(KERNEL_BUILD_DIR)/* $(IB_KDIR)/ # don't copy subdirectories here find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf - find $(PKG_BUILD_DIR) -name CVS | $(XARGS) rm -rf find $(PKG_BUILD_DIR) -name .git | $(XARGS) rm -rf + echo -e 'KERNEL:=$(KERNEL)\nLINUX_VERSION:=$(LINUX_VERSION)\nREVISION:=$(REVISION)' \ + >$(PKG_BUILD_DIR)/include/version.mk $(TAR) c -C $(BUILD_DIR) $(IB_NAME) | bzip2 -c > $@ download: diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile index b526925177..c30adf70d6 100644 --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile @@ -1,6 +1,6 @@ # Makefile for OpenWrt # -# Copyright (C) 2007-2008 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -23,6 +23,7 @@ endif include rules.mk include $(INCLUDE_DIR)/debug.mk include $(INCLUDE_DIR)/depends.mk +include $(INCLUDE_DIR)/version.mk define Helptext Available Commands: @@ -82,11 +83,7 @@ $(TOPDIR)/tmp/ipkg.conf: FORCE @echo 'src packages file:$(PACKAGE_DIR)' >> $@ BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $(PACKAGES) $($(PROFILE)_PACKAGES) kernel) -ifeq ($(KERNEL),2.4) -BUILD_PACKAGES:=$(patsubst base-files,base-files-$(BOARD)-$(KERNEL),$(BUILD_PACKAGES)) -else BUILD_PACKAGES:=$(patsubst base-files,base-files-$(BOARD),$(BUILD_PACKAGES)) -endif # "-pkgname" in the package list means remove "pkgname" from the package list BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES))