[8.09] fix ImageBuilder
authorNicolas Thill <nico@openwrt.org>
Wed, 8 Jul 2009 14:12:10 +0000 (14:12 +0000)
committerNicolas Thill <nico@openwrt.org>
Wed, 8 Jul 2009 14:12:10 +0000 (14:12 +0000)
SVN-Revision: 16744

target/imagebuilder/Makefile
target/imagebuilder/files/Makefile

index 12e391e..3e9f801 100644 (file)
@@ -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:
index b526925..c30adf7 100644 (file)
@@ -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))