build system cleanup. move shared include files into $(TOPDIR)/include, move lzma...
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 21 Jun 2006 02:16:37 +0000 (02:16 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 21 Jun 2006 02:16:37 +0000 (02:16 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4032 3c298f89-4303-0410-b956-a3cf2f4a3e73

80 files changed:
include/image.mk [new file with mode: 0644]
include/kernel-build.mk [moved from target/linux/kernel.mk with 80% similarity]
include/kernel.mk [moved from target/linux/rules.mk with 77% similarity]
include/modules-2.4.mk [moved from target/linux/generic-2.4/modules.mk with 99% similarity]
include/modules-2.6.mk [moved from target/linux/generic-2.6/modules.mk with 99% similarity]
include/netfilter.mk [moved from target/linux/netfilter.mk with 100% similarity]
include/package.mk [moved from package/rules.mk with 100% similarity]
package/alsa/Makefile
package/base-files/Makefile
package/bridge/Makefile
package/broadcom-wl/Makefile
package/busybox/Makefile
package/diag/Makefile
package/dnsmasq/Makefile
package/dropbear/Makefile
package/ebtables/Makefile
package/fuse/Makefile
package/haserl/Makefile
package/hostap/Makefile
package/hostapd/Makefile
package/iproute2/Makefile
package/ipsec-tools/Makefile
package/ipset/Makefile
package/iptables/Makefile
package/kernel.mk [deleted file]
package/libpcap/Makefile
package/linux-atm/Makefile
package/madwifi/Makefile
package/mini_fo/Makefile
package/mtd/Makefile
package/nvram/Makefile
package/openssl/Makefile
package/openswan/Makefile
package/pcmcia-cs/Makefile
package/ppp/Makefile
package/pptp/Makefile
package/robocfg/Makefile
package/shfs/Makefile
package/spca5xx/Makefile
package/switch/Makefile
package/udev/Makefile
package/ueagle-atm/Makefile
package/util-linux/Makefile
package/wireless-tools/Makefile
package/wlcompat/Makefile
package/zd1211/Makefile
package/zlib/Makefile
target/Makefile
target/linux/Config.in
target/linux/Makefile
target/linux/ar531x-2.4/Makefile
target/linux/ar7-2.4/Makefile
target/linux/aruba-2.6/Makefile
target/linux/au1000-2.6/Makefile
target/linux/brcm-2.4/Makefile
target/linux/brcm-2.6/Makefile
target/linux/image/ar7/Makefile
target/linux/image/aruba/Makefile
target/linux/image/au1000/Makefile
target/linux/image/brcm/Makefile
target/linux/image/generic/Makefile
target/linux/image/image.mk [deleted file]
target/linux/image/jffs2.mk [deleted file]
target/linux/image/rb532/Makefile
target/linux/image/squashfs.mk [deleted file]
target/linux/image/tgz.mk [deleted file]
target/linux/image/x86/Makefile
target/linux/image/xscale/Makefile
target/linux/rb532-2.6/Makefile
target/linux/sibyte-2.6/Makefile
target/linux/x86-2.4/Makefile
target/linux/x86-2.6/Makefile
target/linux/xscale-2.6/Makefile
toolchain/Makefile
toolchain/jffs2/Makefile [moved from target/linux/image/jffs2/Makefile with 100% similarity]
toolchain/jffs2/patches/100-gcc4_fix.patch [moved from target/linux/image/jffs2/patches/gcc4-fix.patch with 100% similarity]
toolchain/lzma/Makefile [moved from target/lzma/Makefile with 96% similarity]
toolchain/lzma/patches/100-lzma_zlib.patch [moved from target/lzma/lzma-zlib.patch with 100% similarity]
toolchain/squashfs/Makefile [moved from target/linux/image/squashfs/Makefile with 100% similarity]
toolchain/squashfs/patches/100-lzma.patch [moved from target/linux/image/squashfs/patches/100-lzma.patch with 100% similarity]

diff --git a/include/image.mk b/include/image.mk
new file mode 100644 (file)
index 0000000..f30f099
--- /dev/null
@@ -0,0 +1,77 @@
+include $(TOPDIR)/rules.mk
+
+KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
+
+ifneq ($(CONFIG_BIG_ENDIAN),y)
+JFFS2OPTS     :=  --pad --little-endian --squash
+SQUASHFS_OPTS :=  -le
+else
+JFFS2OPTS     :=  --pad --big-endian --squash
+SQUASHFS_OPTS :=  -be
+endif
+
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
+  ifeq ($(CONFIG_TARGET_ROOTFS_JFFS2),y)
+    define Image/mkfs/jffs2
+               rm -rf $(BUILD_DIR)/root/jffs
+               
+               $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x10000 -o $(KDIR)/root.jffs2-64k -d $(BUILD_DIR)/root
+               $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x20000 -o $(KDIR)/root.jffs2-128k -d $(BUILD_DIR)/root
+       
+               $(call Image/Build,jffs2-64k)
+               $(call Image/Build,jffs2-128k)
+    endef
+  endif
+    
+  ifeq ($(CONFIG_TARGET_ROOTFS_SQUASHFS),y)
+    define Image/mkfs/squashfs
+               @mkdir -p $(BUILD_DIR)/root/jffs
+               $(STAGING_DIR)/bin/mksquashfs-lzma $(BUILD_DIR)/root $(KDIR)/root.squashfs -nopad -noappend -root-owned $(SQUASHFS_OPTS)
+               $(call Image/Build,squashfs)
+    endef
+  endif
+    
+  ifeq ($(CONFIG_TARGET_ROOTFS_TGZ),y)
+    define Image/mkfs/tgz
+               tar -zcf $(BIN_DIR)/openwrt-rootfs.tgz --owner=root --group=root -C $(BUILD_DIR)/root/ .
+    endef
+  endif
+endif
+
+define Image/mkfs/prepare/default
+       find $(BUILD_DIR)/root -type f -not -perm +0100 | xargs chmod 0644
+       find $(BUILD_DIR)/root -type f -perm +0100 | xargs chmod 0755
+       find $(BUILD_DIR)/root -type d | xargs chmod 0755
+       mkdir -p $(BUILD_DIR)/root/tmp
+       chmod 0777 $(BUILD_DIR)/root/tmp
+endef
+
+define Image/mkfs/prepare
+       $(call Image/mkfs/prepare/default)
+endef
+
+define BuildImage
+compile:
+       $(call Build/Compile)
+
+install:
+       $(call Image/Prepare)
+       $(call Image/mkfs/prepare)
+       $(call Image/BuildKernel)
+       $(call Image/mkfs/jffs2)
+       $(call Image/mkfs/squashfs)
+       $(call Image/mkfs/tgz)
+       
+clean:
+       $(call Build/Clean)
+endef
+
+compile-targets:
+install-targets:
+clean-targets:
+
+source:
+prepare:
+compile: compile-targets
+install: compile install-targets
+clean: clean-targets
similarity index 80%
rename from target/linux/kernel.mk
rename to include/kernel-build.mk
index cd74fccfb8aa44fd1ffbc00d9b68cc6c8c5d34b1..9fbbe4504c1ee2a2379a593e3219d776f537a3b7 100644 (file)
@@ -1,10 +1,14 @@
-LINUX_SOURCE:=$(LINUX_NAME).tar.bz2
+include $(TOPDIR)/include/modules-$(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)
 
-KERNEL_IDIR:=$(LINUX_BUILD_DIR)/kernel-ipkg
+KERNEL_IDIR:=$(KERNEL_BUILD_DIR)/kernel-ipkg
+KERNEL_IPKG:=$(KERNEL_BUILD_DIR)/kernel_$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)_$(ARCH).ipk
+INSTALL_TARGETS += $(KERNEL_IPKG)
 
 $(TARGETS): $(PACKAGE_DIR)
 
@@ -19,8 +23,8 @@ $(DL_DIR)/$(LINUX_SOURCE):
        $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINUX_SOURCE) $(LINUX_KERNEL_MD5SUM) $(LINUX_SITE)
 
 $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE)
-       -mkdir -p $(LINUX_BUILD_DIR)
-       bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(LINUX_BUILD_DIR) $(TAR_OPTIONS) -
+       -mkdir -p $(KERNEL_BUILD_DIR)
+       bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS) -
        touch $@
 
 ifeq ($(KERNEL),2.4)
@@ -65,14 +69,14 @@ $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux
        touch -c $(LINUX_KERNEL)
 
 $(LINUX_DIR)/.modules_done:
-       rm -rf $(LINUX_BUILD_DIR)/modules
+       rm -rf $(KERNEL_BUILD_DIR)/modules
        $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH="$(TARGET_PATH)" modules
-       $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" DEPMOD=true INSTALL_MOD_PATH=$(LINUX_BUILD_DIR)/modules modules_install
+       $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install
        touch $(LINUX_DIR)/.modules_done
 
 $(STAMP_DIR)/.linux-compile:
        @$(MAKE) $(LINUX_DIR)/.modules_done $(TARGETS) $(KERNEL_IPKG)
-       ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux
+       ln -sf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux
        touch $@
 
 $(KERNEL_IPKG):
@@ -82,11 +86,10 @@ $(KERNEL_IPKG):
        if [ -f ./config/$(BOARD).modules ]; then \
                cp ./config/$(BOARD).modules $(KERNEL_IDIR)/etc/modules; \
        fi
-       $(IPKG_BUILD) $(KERNEL_IDIR) $(LINUX_BUILD_DIR)
+       $(IPKG_BUILD) $(KERNEL_IDIR) $(KERNEL_BUILD_DIR)
 
-$(BUILD_DIR)/kernel.mk: $(LINUX_DIR) FORCE
+$(TOPDIR)/.kernel.mk:
        echo "BOARD:=$(BOARD)" > $@
-       echo "LINUX_NAME:=$(LINUX_NAME)" >> $@
        echo "LINUX_VERSION:=$(LINUX_VERSION)" >> $@
        echo "LINUX_RELEASE:=$(LINUX_RELEASE)" >> $@
 
@@ -94,7 +97,7 @@ pkg-install: FORCE
        @{ [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG) install $(INSTALL_TARGETS) || true; }
 
 source: $(DL_DIR)/$(LINUX_SOURCE)
-prepare: $(BUILD_DIR)/kernel.mk
+prepare:
        @mkdir -p $(STAMP_DIR) $(PACKAGE_DIR)
        @$(MAKE) $(LINUX_DIR)/.configured
 
@@ -104,9 +107,9 @@ install: compile $(LINUX_KERNEL)
 
 mostlyclean: FORCE
        rm -f $(STAMP_DIR)/.linux-compile
-       rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done
-       rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked
-       $(MAKE) -C $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) clean
+       rm -f $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done
+       rm -f $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked
+       $(MAKE) -C $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) clean
        rm -f $(LINUX_KERNEL)
 
 rebuild: FORCE
@@ -118,5 +121,5 @@ rebuild: FORCE
 
 clean: FORCE
        rm -f $(STAMP_DIR)/.linux-compile
-       rm -rf $(LINUX_BUILD_DIR)
+       rm -rf $(KERNEL_BUILD_DIR)
        rm -f $(TARGETS)
similarity index 77%
rename from target/linux/rules.mk
rename to include/kernel.mk
index 166bfe24b62a6a8a465ffcbf971fa6870d299c42..5c64ee4e12cb9f21ff4902737327ba1531eadbcb 100644 (file)
@@ -1,22 +1,16 @@
+ifneq ($(DUMP),1)
+include $(TOPDIR)/.kernel.mk
+
 KERNEL:=unknown
 ifneq (,$(findstring 2.4.,$(LINUX_VERSION)))
 KERNEL:=2.4
+LINUX_KMOD_SUFFIX=o
 endif
 ifneq (,$(findstring 2.6.,$(LINUX_VERSION)))
 KERNEL:=2.6
+LINUX_KMOD_SUFFIX=ko
 endif
 
-MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION)
-
-LINUX_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
-ifeq ($(LINUX_NAME),)
-LINUX_NAME:=linux-$(LINUX_VERSION)
-endif
-LINUX_DIR := $(LINUX_BUILD_DIR)/$(LINUX_NAME)
-LINUX_KERNEL:=$(LINUX_BUILD_DIR)/vmlinux
-
-LINUX_TARGET_DIR:=$(LINUX_BUILD_DIR)/root
-
 LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
        -e 's/mipsel/mips/' \
        -e 's/mipseb/mips/' \
@@ -25,16 +19,18 @@ LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
        -e 's/armeb/arm/' \
 )
 
-KMOD_BUILD_DIR := $(LINUX_BUILD_DIR)/linux-modules
-MODULES_DIR := $(LINUX_BUILD_DIR)/modules/$(MODULES_SUBDIR)
+KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
+LINUX_DIR := $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
+
+MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION)
+MODULES_DIR := $(KERNEL_BUILD_DIR)/modules/$(MODULES_SUBDIR)
 TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR)
+KMOD_BUILD_DIR := $(KERNEL_BUILD_DIR)/linux-modules
 
-ifeq ($(KERNEL),2.6)
-LINUX_KMOD_SUFFIX=ko
-else
-LINUX_KMOD_SUFFIX=o
+LINUX_KERNEL:=$(KERNEL_BUILD_DIR)/vmlinux
 endif
 
+# FIXME: remove this crap
 define KMOD_template
 ifeq ($$(strip $(4)),)
 KDEPEND_$(1):=m
@@ -79,7 +75,3 @@ endif
        $(IPKG_BUILD) $$(I_$(1)) $(PACKAGE_DIR)
 endef
 
-KERNEL_IPKG:=$(LINUX_BUILD_DIR)/kernel_$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)_$(ARCH).ipk
-INSTALL_TARGETS := $(KERNEL_IPKG)
-TARGETS := 
-
similarity index 99%
rename from target/linux/generic-2.4/modules.mk
rename to include/modules-2.4.mk
index 540ac715cc226de8e1f3c699189841bc3d63a5f1..71864ad8eb795383488a92bdaf6cea69e0e781c2 100644 (file)
@@ -1,4 +1,4 @@
-include ../netfilter.mk
+include $(TOPDIR)/include/netfilter.mk
 
 # Networking
 
similarity index 99%
rename from target/linux/generic-2.6/modules.mk
rename to include/modules-2.6.mk
index b582400bd63aac5a806ac41898bc7c519293c1d2..ec9f5da44f48466ff89d20153746bf6e5c39485d 100644 (file)
@@ -1,5 +1,5 @@
 NF_2_6:=1
-include ../netfilter.mk
+include $(TOPDIR)/include/netfilter.mk
 
 # Networking
 
similarity index 100%
rename from package/rules.mk
rename to include/package.mk
index b1b9997c1998794cfbaf10e6f5187b7ba1c86afa..5f6a3305b5a6be7400ddd2ef21f45da2b920fcc0 100644 (file)
@@ -1,7 +1,7 @@
 # $Id$
 
 include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
 
 PKG_NAME:=alsa-driver
 PKG_VERSION:=1.0.11
@@ -13,7 +13,7 @@ PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/driver/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_CAT:=bzcat
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 ifeq ($(LINUX_KARCH),i386)
 KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-i386/mach-generic -I$(LINUX_DIR)/include/asm-i386/mach-default
index ec3dc88923896a41bd4b7b633b209a5f0a848963..bb20894096017cbad1dc7c78177200431886f88a 100644 (file)
@@ -1,7 +1,7 @@
 # $Id$
 
 include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
 
 PKG_NAME:=base-files
 PKG_RELEASE:=8
@@ -12,7 +12,7 @@ ifeq ($(REV),)
 REV:=0
 endif
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 ifneq ($(DUMP),1)
 TARGET:=-$(BOARD)-$(KERNEL)
index 65fd8358e86b8b1caa8d809eee09d90b4eb8f08d..f2b178a6101d3195499668bca8e29f132af4286a 100644 (file)
@@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/bridge
 PKG_MD5SUM:=9b7dc52656f5cbec846a7ba3299f73bd
 PKG_CAT:=zcat
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/bridge
 SECTION:=base
index 227352b15687ce45dd43e9e54ee71043f1996e82..6fe22edb0f13babbe6af410e06be784aabe157a1 100644 (file)
@@ -1,7 +1,7 @@
 # $Id: Makefile 2480 2005-11-14 02:07:33Z nbd $
 
 include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
 
 PKG_NAME:=broadcom-wl
 PKG_VERSION:=4.80.9.2
@@ -14,7 +14,7 @@ PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
 PKG_MD5SUM:=7d9fab2c611369bbe075c3924ea77450
 PKG_CAT:=bzcat
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/kmod-brcm-wl
   SECTION:=drivers
index aac9d21e323aa292d3ada4396a7fafc24f7b056b..6b2e0c5be46bc1865e6043373c8b1c076ed957a4 100644 (file)
@@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://www.busybox.net/downloads
 PKG_MD5SUM:=19a0b475169335f17e421cf644616fe7
 PKG_CAT:=bzcat
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/busybox
 SECTION:=base
index 6fed3b51bfdfd4bae0c35df06374bf624d527818..ab28e7218e61fa82cc04b34059e65333b25d6241 100644 (file)
@@ -1,14 +1,14 @@
 # $Id$
 
 include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
 
 PKG_NAME:=kmod-diag
 PKG_RELEASE:=1
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/kmod-diag
 SECTION:=drivers
index 6efaf370a1e3a44e54155eebffa4b6a1fa0d50cf..a05ec0e22cbe8e1e7525076d1ede0c30979e2a08 100644 (file)
@@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
 PKG_MD5SUM:=489198ec87101087043adc98bbe062dc
 PKG_CAT:=zcat
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/dnsmasq
 SECTION:=base
index bda4d8fc9136531087a1fb0500399ae28372b623..0409e66dbf2800ec5cf2280b77bdc7c1bddcf073 100644 (file)
@@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://matt.ucc.asn.au/dropbear/releases/
 PKG_MD5SUM:=ca8e53a766faec831882831364568421
 PKG_CAT:=zcat
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/dropbear
 SECTION:=base
index f4359a6675d56e8f9c7482104fa5003d7f5cca6d..814ac68a223024a2071e7930a488f713b54bc162 100644 (file)
@@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/ebtables
 PKG_MD5SUM:=f07111fcc1966be669278433c35dcc28
 PKG_CAT:=zcat
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/ebtables
 SECTION:=base
index 91d4dd6074d1039f69bae96fc978b7dee24025dd..b7084236df840c9e782525eb2bcd09890ac61457 100644 (file)
@@ -1,7 +1,7 @@
 # $Id$
 
 include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
 
 PKG_NAME:=fuse
 PKG_VERSION:=2.5.3
@@ -15,7 +15,7 @@ PKG_CAT:=zcat
 
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/kmod-fuse
 SECTION:=drivers
index e6215c9547f8b6db4eebaf4c81018d7f368cc5c6..ec940ea43764a15be44dba2dea7cd3d8b8ceefc4 100644 (file)
@@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/haserl
 PKG_MD5SUM:=bd9195d086566f56634c0bcbbbcbebea
 PKG_CAT:=zcat
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/haserl
 SECTION:=base
index 80f820187bfa4579184f972c5646643c7e910ef9..21abfe256ba983883c1766256abd7e7558938b6c 100644 (file)
@@ -1,7 +1,7 @@
 # $Id$
 
 include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
 
 PKG_NAME:=hostap-driver
 PKG_VERSION:=0.4.9
@@ -15,7 +15,7 @@ PKG_CAT:=zcat
 
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/kmod-hostap
 SECTION:=drivers
index 4a1c3f926500ed03f57eb7b922e691b3dfa08fd8..867cda6922b367b2e7e5248a87b238678750e114 100644 (file)
@@ -14,7 +14,7 @@ PKG_CAT:=zcat
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/hostapd
 SECTION:=net
index 1fa638d39d7f2fb0c21637be323f706f98512243..9cf1eb9909e70ceceec1846907ce433b629dd7ab 100644 (file)
@@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://developer.osdl.org/dev/iproute2/download/
 PKG_MD5SUM:=04f57a6d366d36426d276178b600f5c5
 PKG_CAT:=zcat
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/ip
 SECTION:=base
index 58dccca62ad5ba09e44c98e443b7779434954c58..667884debea67ac2f4ff268cfd8ddfb00ce02d7e 100644 (file)
@@ -14,7 +14,7 @@ PKG_CAT:=bzcat
 
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/ipsec-tools
 SECTION:=base
index 456f8b6be4a6fdbf7855683fc0dce763da3a76f4..d245090a6896f268d6bb0f7bac84b7eefe701a2f 100644 (file)
@@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://ipset.netfilter.org
 PKG_MD5SUM:=1709424cc2cdb925d4fb6fd5fcaefc26
 PKG_CAT:=bzcat
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/ipset
 SECTION:=base
index 623a64ed84fa2f2c6f7b0f275e5972c5b51adde4..7490277440656b21e3ba66b4a815a25d956ff09b 100644 (file)
@@ -1,7 +1,7 @@
 # $Id$
 
 include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
 
 PKG_NAME:=iptables
 PKG_VERSION:=1.3.5
@@ -20,10 +20,10 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
 PKG_MENU:=IPv4 / IPv6 firewall administration
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 ifeq ($(DUMP),)
 include $(LINUX_DIR)/.config
-include $(TOPDIR)/target/linux/netfilter.mk
+include $(TOPDIR)/include/netfilter.mk
 endif
 
 define Package/iptables
diff --git a/package/kernel.mk b/package/kernel.mk
deleted file mode 100644 (file)
index 39f9cc0..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-ifneq ($(DUMP),1)
-include $(BUILD_DIR)/kernel.mk
-
-KERNEL:=unknown
-ifneq (,$(findstring 2.4.,$(LINUX_VERSION)))
-KERNEL:=2.4
-LINUX_KMOD_SUFFIX=o
-endif
-ifneq (,$(findstring 2.6.,$(LINUX_VERSION)))
-KERNEL:=2.6
-LINUX_KMOD_SUFFIX=ko
-endif
-
-LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
-       -e 's/mipsel/mips/' \
-       -e 's/mipseb/mips/' \
-       -e 's/powerpc/ppc/' \
-       -e 's/sh[234]/sh/' \
-       -e 's/armeb/arm/' \
-)
-
-KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
-ifeq ($(LINUX_NAME),)
-LINUX_NAME:=linux-$(LINUX_VERSION)
-endif
-LINUX_DIR := $(KERNEL_BUILD_DIR)/$(LINUX_NAME)
-
-KMOD_BUILD_DIR := $(KERNEL_BUILD_DIR)/linux-modules
-MODULES_DIR := $(KERNEL_BUILD_DIR)/modules/$(MODULES_SUBDIR)
-TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR)
-endif
index d4d7e2167266aee44759cbfc1a7a688d99279a1e..2d7aecf55149376ebb851cb517fd591e1af5fd71 100644 (file)
@@ -14,7 +14,7 @@ PKG_CAT:=zcat
 
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/libpcap
 SECTION:=base
index e37d5bdceb55d8ed7ca4494c6d83a7dbd71684dc..15b3f7d4daad10b69e7c0e2808ef7b31173c97fd 100644 (file)
@@ -14,7 +14,7 @@ PKG_CAT:=zcat
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/linux-atm
 SECTION:=libs
index c689054811ee2fd009443c0e42ac049254b30d2e..7bdb7ec11aa98fecbd42382b41d4c106b2438f44 100644 (file)
@@ -1,7 +1,7 @@
 # $Id$
 
 include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
 
 PKG_NAME:=madwifi
 PKG_VERSION:=0.9.0
@@ -54,7 +54,7 @@ MADWIFI_MAKEOPTS= -C $(PKG_BUILD_DIR) \
                LDOPTS="" \
                DOMULTI=1
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 ifeq ($(findstring AHB,$(BUS)),AHB)
 define Build/Compile/ahb
index f2c46c9ec3caefe758faafe04ca09900a07548f5..0180f81c319127888e5933d46cfc723e5d03fbb5 100644 (file)
@@ -1,7 +1,7 @@
 # $Id$
 
 include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
 
 PKG_NAME:=mini_fo
 PKG_VERSION:=0.6.2pre1
@@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://www.denx.de/twiki/pub/Know/MiniFOHome/
 PKG_SOURCE:=mini_fo-0-6-2-pre1.tar.bz2
 PKG_CAT:=bzcat
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/kmod-mini-fo
 SECTION:=drivers
index f6e94303af85f60a397143658509e3ea19791fac..01dfcd6b541f039e28b5501862ea3c0151a9ed7e 100644 (file)
@@ -7,7 +7,7 @@ PKG_RELEASE:=4
 
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/mtd
 SECTION:=base
index 019800a0c6ec40cd330f98bff22cf16c3fea6524..cf76c7c812219820924149729a2c18571d873dd9 100644 (file)
@@ -7,7 +7,7 @@ PKG_RELEASE:=1
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/nvram
 SECTION:=base
index 82f20d6b0ddfa9161c1020bb8dd2b711ced14337..39fe6b4c3d9779fd89bd8b2530e176a3379c8b61 100644 (file)
@@ -20,7 +20,7 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 OPENSSL_NO_CIPHERS:= no-idea no-md2 no-mdc2 no-rc5 no-sha0 no-rmd160 no-aes192
 OPENSSL_OPTIONS:= shared no-ec no-err no-fips no-hw no-krb5 no-threads zlib-dynamic no-engines
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/libopenssl
 SECTION:=base
index 4a1a42cc07de447351542934fad0b8bced789562..f81096547b9a13a76ad9854c6bbf7ce3450771dc 100644 (file)
@@ -1,7 +1,7 @@
 # $Id$
 
 include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
 
 PKG_NAME:=openswan
 PKG_VERSION:=2.4.5
@@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://www.openswan.org/download
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_CAT:=zcat
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/kmod-openswan
 SECTION:=drivers
index a389fd63e1947715e8db902fa706a70c6f4744df..2c7b229781ce24710492112832bde8e088d1d9dc 100644 (file)
@@ -14,7 +14,7 @@ PKG_CAT:=zcat
 
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/pcmcia-cs
 SECTION:=base
index 55986f95c05bff9b5506317e121f863ee07a0c91..edd9a5ea8660dcb00c0180b48716baf18e0d8c08 100644 (file)
@@ -15,7 +15,7 @@ PKG_CAT:=zcat
 
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/ppp
 SECTION:=net
index 08cb43a7c2968f3bfbb3248a7294a4421387c056..6d01ce19f344cc55fe72990937e3d0153609b524 100644 (file)
@@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/pptpclient
 PKG_MD5SUM:=9a706327fb9827541d7c86d48ceb9631
 PKG_CAT:=zcat
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/pptp
 SECTION:=base
index 49f6005699797d7545fe991158aa301be1b28a29..ca0f83d3ddb70e3722349770728a4e4902159674 100644 (file)
@@ -8,7 +8,7 @@ PKG_RELEASE:=1
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/robocfg
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/robocfg
 SECTION:=base
index 69f8d83a467ea6d8a2053d93cf786a55ec02f11f..057358b34d4b41c328b1763d2c7229901761df26 100644 (file)
@@ -1,7 +1,7 @@
 # $Id$
 
 include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
 
 PKG_NAME:=shfs
 PKG_VERSION:=0.35
@@ -15,7 +15,7 @@ PKG_CAT:=zcat
 
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/kmod-shfs
 SECTION:=drivers
index 93eea633cd1d6a8abd6466f52e87316fc8007d89..86233fc64a1dfcd02c41ffad1949c1f7aa5cded3 100644 (file)
@@ -1,7 +1,7 @@
 # $Id$
 
 include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
 
 PKG_NAME:=spca5xx
 PKG_VERSION:=20060301
@@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://mxhaard.free.fr/spca50x/Download/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_CAT:=zcat
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 #FIXME: add proper dependency handling on kmod-usb-core & kmod-videodev packages
 define Package/kmod-spca5xx
index e8aa6a02a484e0f5b7d1eb3f6cd0793ddd15008a..cb5f34674805d88bbace32a880e67899f0381be2 100644 (file)
@@ -1,14 +1,14 @@
 # $Id$
 
 include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
 
 PKG_NAME:=kmod-switch
 PKG_RELEASE:=1
 
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/kmod-switch
 SECTION:=drivers
index 54e06dcff6198780b2c58c1bfc05db99ee449f1a..5d397161b199c28ae9e839422798b2766a7aa865 100644 (file)
@@ -19,7 +19,7 @@ PKG_CAT:=bzcat
 
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/udev
 SECTION:=base
index 6f227a1bf492580124509ca7356ade88bf86aadf..6d003f6c0da14c73578bd4bd8f2c681636644d1d 100644 (file)
@@ -1,7 +1,7 @@
 # $Id: Makefile 2767 2005-12-25 02:10:14Z wbx $
 
 include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
 
 PKG_NAME:=ueagle-atm
 PKG_VERSION:=1.0d1
@@ -15,7 +15,7 @@ PKG_CAT:=zcat
 
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 #FIXME: add dependency on kmod-usb-core
 define Package/kmod-ueagle-atm
index ef28bdb69e934cf14b34aed736f0ebe459bd4c55..673ade433f805878b41920e37070faf8e2ff45e5 100644 (file)
@@ -16,7 +16,7 @@ PKG_CAT:=zcat
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/fdisk
 SECTION:=base
index ad4eddab8c9c9dc05d778acd66cc6aa8735fb3a4..368d3ebb015d722c41102bcf33d5dacd27124509 100644 (file)
@@ -14,7 +14,7 @@ PKG_CAT:=zcat
 
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/wireless-tools
 SECTION:=base
index af1f07593fda39b4d2dca9c3dbd468c0bc88e26d..d5feede6c952964e0f333c2030a36792676613f3 100644 (file)
@@ -1,14 +1,14 @@
 # $Id$
 
 include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
 
 PKG_NAME:=kmod-wlcompat
 PKG_RELEASE:=3
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/kmod-wlcompat
 SECTION:=drivers
index a71873b9f7f678ac37192b52ddb395cc7bc0d703..1c79922cfcaaa9ce735f4cf5ea671915525d6266 100644 (file)
@@ -1,7 +1,7 @@
 # $Id: Makefile 3297 2006-03-02 23:42:52Z florian $
 
 include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
 
 PKG_NAME:=zd1211
 PKG_VERSION:=r69
@@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://zd1211.ath.cx/download/
 PKG_SOURCE:=$(PKG_NAME)-driver-$(PKG_VERSION).tgz
 PKG_CAT:=zcat
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 #FIXME: add proper dependency handling on kmod-usb-core packages
 define Package/kmod-zd1211
index 02659bb9ac15e3e4eec257f58c826b5eb6d21e68..8e497c2f28c4ed26055b2f9e5943ad3806ae1c2a 100644 (file)
@@ -14,7 +14,7 @@ PKG_CAT:=bzcat
 
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
 
 define Package/zlib
 SECTION:=base
index d64053cbd400103e725176bc06f5015f49c319cb..9205f5b986767f86ab6726d03cd09ff950c5d95a 100644 (file)
@@ -5,9 +5,9 @@ all: install
 $(BIN_DIR):
        mkdir -p $(BIN_DIR)
 
-TARGETS:=linux utils lzma
+TARGETS:=linux utils
 
-linux-compile: utils-install lzma-install
+linux-compile: utils-install
 linux-install: $(BIN_DIR)
 
 download: $(patsubst %,%-source,$(TARGETS))
@@ -27,11 +27,6 @@ image_clean: FORCE
        $(MAKE) -C $(patsubst %-prepare,%,$@) prepare
 %-compile: %-prepare
        $(MAKE) -C $(patsubst %-compile,%,$@) compile
-%-rebuild: FORCE
-       $(MAKE) -C $(patsubst %-rebuild,%,$@) rebuild
 %-install: %-compile
        $(MAKE) -C $(patsubst %-install,%,$@) install
-linux-imagebuilder: FORCE
-       $(MAKE) -C linux imagebuilder
-
 
index 946ace320459af7e382fdd9246a6113b36e1b316..23c96b76df855a7747872b402ed75ac5d9e617de 100644 (file)
@@ -13,8 +13,8 @@ menu "Target Root Filesystem"
                help
                  Build a jffs2 root filesystem
 
-       config TARGET_ROOTFS_SQUASHFS_LZMA
-               bool "squashfs-lzma"
+       config TARGET_ROOTFS_SQUASHFS
+               bool "squashfs"
                default y
                depends !LINUX_2_6_ARUBA
                depends !LINUX_2_6_XSCALE
index 2caee31b3661042770517a02d4ad87a3b3894291..e1a314d1d8380ed7ba427d8e1cb41adc9e7de5bf 100644 (file)
@@ -30,6 +30,7 @@ source:
        $(MAKE) -C image/$(BOARD) source
 
 prepare:
+       rm -f $(TOPDIR)/.kernel.mk
        $(MAKE) -C $(BOARD)-$(KERNEL) prepare
 
 compile:
index 3abb30d48772b6f91912284b521d390454eee9c9..96a32848e7c6f4743dd45773ab1c662c61a35cf7 100644 (file)
@@ -4,10 +4,9 @@ LINUX_VERSION:=2.4.32
 LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c
 
-include ../rules.mk
 include ./config
-include ../generic-$(KERNEL)/modules.mk
-include ../kernel.mk
+include $(TOPDIR)/include/kernel.mk
+include $(TOPDIR)/include/kernel-build.mk
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
        [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches
index 20ad3523ac22f12b4b3b65caa818d866b01aa9dc..c8688da044e946f24bd2414b7bbe71e352a24547 100644 (file)
@@ -4,8 +4,8 @@ LINUX_VERSION:=2.4.32
 LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c
 
-include ../rules.mk
 include ./config
+include $(TOPDIR)/include/kernel.mk
 
 ATM_FIRMWARE_VERSION:=0.4
 ATM_FIRMWARE_DIR=sangam-atm-firmware-$(ATM_FIRMWARE_VERSION)
@@ -26,8 +26,7 @@ $(eval $(call KMOD_template,CPMAC,cpmac,\
        $(MODULES_DIR)/kernel/drivers/net/avalanche_cpmac/avalanche_cpmac.o \
 ,CONFIG_MIPS_AVALANCHE_CPMAC,,10,avalanche_cpmac))
 
-include ../generic-$(KERNEL)/modules.mk
-include ../kernel.mk
+include $(TOPDIR)/include/kernel-build.mk
 
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
index 1f68614254de6ecb6e29a298511272523bdd5c4f..652e4b91328750efb6ef7c48acb4f322010ebab5 100644 (file)
@@ -4,12 +4,9 @@ LINUX_VERSION:=2.6.17
 LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
 
-include ../rules.mk
 include ./config
-
-include ../generic-$(KERNEL)/modules.mk
-include ../kernel.mk
-
+include $(TOPDIR)/include/kernel.mk
+include $(TOPDIR)/include/kernel-build.mk
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
        [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE)
index 39d8d4c8b02378bba81ab371bf4300b8858afa62..b1ca0fee3447c5a77596e6ff289d7adf3c9391da 100644 (file)
@@ -4,12 +4,9 @@ LINUX_VERSION:=2.6.17
 LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
 
-include ../rules.mk
 include ./config
-
-include ../generic-$(KERNEL)/modules.mk
-include ../kernel.mk
-
+include $(TOPDIR)/include/kernel.mk
+include $(TOPDIR)/include/kernel-build.mk
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
        [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches
index 022f3352c5d5359fb6fe437cc2e1804b251f75fd..20a6210666a7ad91b477e50e29b2a4c2fd87af94 100644 (file)
@@ -4,8 +4,8 @@ LINUX_VERSION:=2.4.32
 LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c
 
-include ../rules.mk
 include ./config
+include $(TOPDIR)/include/kernel.mk
 
 # broadcom specific kmod packages
 $(eval $(call KMOD_template,LP,lp,\
@@ -15,8 +15,7 @@ $(eval $(call KMOD_template,LP,lp,\
        $(MODULES_DIR)/kernel/drivers/char/ppdev.o \
 ,CONFIG_PARPORT,,50,parport parport_splink lp))
 
-include ../generic-$(KERNEL)/modules.mk
-include ../kernel.mk
+include $(TOPDIR)/include/kernel-build.mk
 
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
index 1f68614254de6ecb6e29a298511272523bdd5c4f..a3b8177c203beff24aea9bbfdb60b84a7dca7883 100644 (file)
@@ -4,11 +4,9 @@ LINUX_VERSION:=2.6.17
 LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
 
-include ../rules.mk
 include ./config
-
-include ../generic-$(KERNEL)/modules.mk
-include ../kernel.mk
+include $(TOPDIR)/include/kernel.mk
+include $(TOPDIR)/include/kernel-build.mk
 
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
index 4ac6d3015ff8be4449503fe695c6c1effdf1b1df..4b22f90df26d015359e6ff88e0a7292885431d2a 100644 (file)
@@ -1,4 +1,4 @@
-include ../image.mk
+include $(TOPDIR)/include/image.mk
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/ar7loader
 
index c8dab056a00cd213a6b7bf27850dae05a8642577..5091d3f40cd3d06f20ef8026a5e7ab2e506f3627 100644 (file)
@@ -1,4 +1,4 @@
-include ../image.mk
+include $(TOPDIR)/include/image.mk
 
 LOADADDR = 0x81000000          # RAM start + 16M 
 KERNEL_ENTRY = 0x80100000
index 2607ed9eb3bce0bbe75d60d7ad1c2c5f21e1d455..682670a22c317af57c9d68151844f6f6b91ae58b 100644 (file)
@@ -1,4 +1,4 @@
-include ../image.mk
+include $(TOPDIR)/include/image.mk
 
 LOADADDR = 0x8108c8f4          # RAM start + 16M 
 KERNEL_ENTRY = 0x80100000      # Default kernel entry in arch/mips/Makefile
index df2a42ea5cc083372581b34ca3e6d592669fc569..d219dc354b35d59808485a619a4931ccd90c9824 100644 (file)
@@ -1,4 +1,4 @@
-include ../image.mk
+include $(TOPDIR)/include/image.mk
 
 define Build/Compile
        rm -f $(KDIR)/loader.gz
index f87fb116dd171eb7d7d6ea88a4c30aa6fdaefb17..b9efc95b9bea6fd97e7cdeb46177fa090cbea7e8 100644 (file)
@@ -1,4 +1,4 @@
-include ../image.mk
+include $(TOPDIR)/include/image.mk
 
 # use default targets for everything
 
diff --git a/target/linux/image/image.mk b/target/linux/image/image.mk
deleted file mode 100644 (file)
index 92143d6..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-include $(TOPDIR)/rules.mk
-
-KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
-
-ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
-ifeq ($(CONFIG_TARGET_ROOTFS_JFFS2),y)
-include $(TOPDIR)/target/linux/image/jffs2.mk
-endif
-
-ifeq ($(CONFIG_TARGET_ROOTFS_SQUASHFS_LZMA),y)
-include $(TOPDIR)/target/linux/image/squashfs.mk
-endif
-
-ifeq ($(CONFIG_TARGET_ROOTFS_TGZ),y)
-include $(TOPDIR)/target/linux/image/tgz.mk
-endif
-endif
-
-define Image/mkfs/prepare/default
-       find $(BUILD_DIR)/root -type f -not -perm +0100 | xargs chmod 0644
-       find $(BUILD_DIR)/root -type f -perm +0100 | xargs chmod 0755
-       find $(BUILD_DIR)/root -type d | xargs chmod 0755
-       mkdir -p $(BUILD_DIR)/root/tmp
-       chmod 0777 $(BUILD_DIR)/root/tmp
-endef
-
-define Image/mkfs/prepare
-       $(call Image/mkfs/prepare/default)
-endef
-
-define BuildImage
-compile:
-       $(call Build/Compile)
-
-install:
-       $(call Image/Prepare)
-       $(call Image/mkfs/prepare)
-       $(call Image/BuildKernel)
-       $(call Image/mkfs/jffs2)
-       $(call Image/mkfs/squashfs)
-       $(call Image/mkfs/tgz)
-       
-clean:
-       $(call Build/Clean)
-endef
-
-compile-targets:
-install-targets:
-clean-targets:
-
-source:
-prepare:
-compile: compile-targets
-install: compile install-targets
-clean: clean-targets
diff --git a/target/linux/image/jffs2.mk b/target/linux/image/jffs2.mk
deleted file mode 100644 (file)
index a0e14da..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-ifneq ($(CONFIG_BIG_ENDIAN),y)
-JFFS2OPTS :=  --pad --little-endian --squash
-else
-JFFS2OPTS :=  --pad --big-endian --squash
-endif
-
-define Image/mkfs/jffs2
-       rm -rf $(BUILD_DIR)/root/jffs
-       
-       $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x10000 -o $(KDIR)/root.jffs2-64k -d $(BUILD_DIR)/root
-       $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x20000 -o $(KDIR)/root.jffs2-128k -d $(BUILD_DIR)/root
-
-       $(call Image/Build,jffs2-64k)
-       $(call Image/Build,jffs2-128k)
-endef
-
-jffs2-source: FORCE
-       $(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 source
-
-$(STAGING_DIR)/bin/mkfs.jffs2:
-       $(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 compile
-
-jffs2-clean: FORCE
-       $(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 clean
-       rm -f $(KDIR)/root.jffs2*
-
-source: jffs2-source
-compile-targets: $(STAGING_DIR)/bin/mkfs.jffs2
-clean-targets: jffs2-clean
-
index ed419c8c6d05dbefb9c6b9590d91ac255cb02581..53adfc432f704d28dfc48712e00c0a300c7e0f1c 100644 (file)
@@ -1,4 +1,4 @@
-include ../image.mk
+include $(TOPDIR)/include/image.mk
 
 LOADADDR = 0x81000000          # RAM start + 16M 
 KERNEL_ENTRY = 0x80101000
diff --git a/target/linux/image/squashfs.mk b/target/linux/image/squashfs.mk
deleted file mode 100644 (file)
index e01766c..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-ifneq ($(CONFIG_BIG_ENDIAN),y)
-ENDIAN := le
-else
-ENDIAN := be
-endif
-
-squashfs-source: FORCE
-       $(MAKE) -C $(TOPDIR)/target/linux/image/squashfs source
-
-$(STAGING_DIR)/bin/mksquashfs-lzma:
-       $(MAKE) -C $(TOPDIR)/target/linux/image/squashfs compile
-       
-squashfs-clean: FORCE
-       $(MAKE) -C $(TOPDIR)/target/linux/image/squashfs clean
-       rm -f $(KDIR)/root.squashfs
-
-define Image/mkfs/squashfs
-       @mkdir -p $(BUILD_DIR)/root/jffs
-       $(STAGING_DIR)/bin/mksquashfs-lzma $(BUILD_DIR)/root $(KDIR)/root.squashfs -nopad -noappend -root-owned -$(ENDIAN)
-       $(call Image/Build,squashfs)
-endef
-
-FILESYSTEMS += squashfs
-compile-targets: $(STAGING_DIR)/bin/mksquashfs-lzma
-clean-targets: squashfs-clean
diff --git a/target/linux/image/tgz.mk b/target/linux/image/tgz.mk
deleted file mode 100644 (file)
index 39adb69..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-define Image/mkfs/tgz
-       tar -zcf $(BIN_DIR)/openwrt-rootfs.tgz --owner=root --group=root -C $(BUILD_DIR)/root/ .
-endef
index 69f9bf470e56cb50229296ffa2b59a7d6bc24b31..d76294f1504a5ec6fe3f1044f30af3cecef2d2be 100644 (file)
@@ -1,4 +1,4 @@
-include ../image.mk
+include $(TOPDIR)/include/image.mk
 
 define Image/Build
        cp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img
index 09616d409f6b438040eb4c5904f9975f0389132a..d94d7f07cabadadd0a55d395a4972cde33d0c006 100644 (file)
@@ -1,4 +1,4 @@
-include ../image.mk
+include $(TOPDIR)/include/image.mk
 
 define Image/Build
 ifneq ($(FS),jffs2-64k)
index 9bb7bba71c936e79adbbbd8bf32338a453f2d750..4b0901987fc547718e12f54366506fe3b9361d90 100644 (file)
@@ -4,11 +4,9 @@ LINUX_VERSION:=2.6.17
 LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
 
-include ../rules.mk
 include ./config
-
-include ../generic-$(KERNEL)/modules.mk
-include ../kernel.mk
+include $(TOPDIR)/include/kernel.mk
+include $(TOPDIR)/include/kernel-build.mk
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
        [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches
index 210c195adffd466c6cef1fe0ec6d3ff705e8173c..4b0901987fc547718e12f54366506fe3b9361d90 100644 (file)
@@ -4,12 +4,9 @@ LINUX_VERSION:=2.6.17
 LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
 
-include ../rules.mk
 include ./config
-
-include ../generic-$(KERNEL)/modules.mk
-include ../kernel.mk
-
+include $(TOPDIR)/include/kernel.mk
+include $(TOPDIR)/include/kernel-build.mk
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
        [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches
index bcc8bd05d286270338f537b592620b8a57e71226..a6208dbbbb5fc764c12e21dac34a39464e511faa 100644 (file)
@@ -4,17 +4,14 @@ LINUX_VERSION:=2.4.32
 LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c
 
-include ../rules.mk
 include ./config
+include $(TOPDIR)/include/kernel.mk
 
 $(eval $(call KMOD_template,WD1100,wd1100,\
        $(MODULES_DIR)/kernel/drivers/char/wd1100.o \
 ,CONFIG_WD1100))
 
-
-include ../generic-$(KERNEL)/modules.mk
-include ../kernel.mk
-
+include $(TOPDIR)/include/kernel-build.mk
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
        [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches
index 7b2f1b068d20b54d1bb9119338db6216e445fa77..ab88d58dfb03beb7544d5bd1c9812f5e009f96c2 100644 (file)
@@ -4,12 +4,9 @@ LINUX_VERSION:=2.6.17
 LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
 
-include ../rules.mk
 include ./config
-
-include ../generic-$(KERNEL)/modules.mk
-include ../kernel.mk
-
+include $(TOPDIR)/include/kernel.mk
+include $(TOPDIR)/include/kernel-build.mk
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
        [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches
index 608a49408bd30a81f3dfa307b00ea6ebcfdd2232..a4d93efc5fb818f84eeaabcb1231e4d6c1a83bb2 100644 (file)
@@ -4,12 +4,9 @@ LINUX_VERSION:=2.6.17
 LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
 
-include ../rules.mk
 include ./config
-
-include ../generic-$(KERNEL)/modules.mk
-include ../kernel.mk
-
+include $(TOPDIR)/include/kernel.mk
+include $(TOPDIR)/include/kernel-build.mk
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
        [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches
index fac04682852f0ec97a46a29b889952eadae496ad..f9fb3a54d6ef653119a9afa7d07fb2f092e55ff6 100644 (file)
@@ -1,6 +1,6 @@
 # Main makefile for the toolchain
 include $(TOPDIR)/rules.mk
-TARGETS-y:=sed kernel-headers utils binutils gcc uClibc ipkg-utils libnotimpl
+TARGETS-y:=sed kernel-headers utils binutils gcc uClibc ipkg-utils libnotimpl squashfs jffs2 lzma
 TARGETS-$(CONFIG_GDB) += gdb
 
 TARGETS_DOWNLOAD:=$(patsubst %,%-source,$(TARGETS-y))
@@ -17,6 +17,7 @@ binutils-prepare: uClibc-prepare
 gcc-prepare: binutils-install
 uClibc-compile: gcc-prepare
 gcc-compile: uClibc-install
+squashfs-compile: lzma-compile
 
 TOOLCHAIN_STAMP_DIR:=$(STAGING_DIR)/stampfiles
 
similarity index 96%
rename from target/lzma/Makefile
rename to toolchain/lzma/Makefile
index 214967a15de796e52b821e7611011b2eccf3bfb7..cace2a4e2b33d8fb9ab55ecbb337ce54b5166d61 100644 (file)
@@ -22,7 +22,7 @@ $(DL_DIR)/$(LZMA_SOURCE):
 $(LZMA_DIR)/.unpacked: $(DL_DIR)/$(LZMA_SOURCE) 
        @rm -rf $(LZMA_DIR) && mkdir -p $(LZMA_DIR)
        tar xjf $^ -C $(LZMA_DIR)
-       patch -d $(LZMA_DIR) -p1 < lzma-zlib.patch
+       $(PATCH) $(LZMA_DIR) ./patches
        touch $(LZMA_DIR)/.unpacked
        
 $(LZMA_ALONE_DIR)/lzma $(LZMA_LIB_DIR)/liblzma.a: $(LZMA_DIR)/.built