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 12e391ef90a885b9d4a662cae46548fdb24e318a..3e9f801a80ef0ac4221fa17d524b09a4ee7407b2 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 b52692517778fd16bb16af180922c50f1ed67418..c30adf70d6df3ed1f667f8204f522300f7a812f6 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))