summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-10-22 00:06:20 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-10-22 00:06:20 +0000
commitd0f611787c94090697587c02e1b5c2f3d45b0b0a (patch)
treea92ac9dac91681e2551a6aab8ad6fa24b9d91611
parent6b4f28c3798f491b29518b802ef1fad87211930c (diff)
large build system cleanup. added some stuff to control the verbosity level, but not complete, yet.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2221 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--Config.in4
-rw-r--r--Makefile41
-rw-r--r--package/Config.in1
-rw-r--r--package/Makefile29
-rw-r--r--package/nvram/Config.in7
-rw-r--r--package/nvram/Makefile7
-rw-r--r--package/rules.mk2
-rw-r--r--rules.mk45
-rw-r--r--target/Makefile6
-rw-r--r--target/linux/Config.in45
-rw-r--r--target/linux/Makefile3
-rw-r--r--target/linux/image/Makefile5
-rw-r--r--target/linux/image/jffs2.mk4
-rw-r--r--target/linux/image/squashfs.mk3
-rw-r--r--target/linux/linux-2.4/Makefile9
-rw-r--r--target/linux/linux-2.6/Makefile13
-rw-r--r--target/linux/linux-2.6/broadcom.mk3
-rw-r--r--target/linux/package/Makefile4
-rw-r--r--toolchain/Makefile16
-rw-r--r--toolchain/kernel-headers/Makefile9
20 files changed, 135 insertions, 121 deletions
diff --git a/Config.in b/Config.in
index 6d636d1a7..3f5cb29c5 100644
--- a/Config.in
+++ b/Config.in
@@ -84,10 +84,6 @@ config BR2_TAR_VERBOSITY
bool
default n
-config BR2_STAGING_DIR
- string
- default "$(BASE_DIR)/staging_dir_$(ARCH)$(ARCH_FPU_SUFFIX)"
-
config BR2_JLEVEL
int
default "1"
diff --git a/Makefile b/Makefile
index d47822752..86367fefa 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Makefile for OpenWRT
+# Makefile for OpenWrt
#
# Copyright (C) 2005 by Felix Fietkau <openwrt@nbd.name>
# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
@@ -24,6 +24,7 @@
#--------------------------------------------------------------
TOPDIR=${shell pwd}
export TOPDIR
+
ifneq ($(DEVELOPER),)
CONFIG_CONFIG_IN = Config.in.devel
else
@@ -57,7 +58,8 @@ all: world
# In this section, we need .config
include .config.cmd
-world: $(DL_DIR) $(BUILD_DIR) configtest toolchain/install target/compile package/compile target/install package_index
+world: $(DL_DIR) $(BUILD_DIR) configtest
+ $(MAKE) toolchain/install target/compile package/compile root_clean package/install target/install package_index
.PHONY: all world clean dirclean distclean image_clean target_clean source configtest
@@ -66,9 +68,7 @@ configtest:
-scripts/configtest.pl
package_index:
- (cd $(PACKAGE_DIR); \
- $(STAGING_DIR)/usr/bin/ipkg-make-index . > Packages \
- )
+ (cd $(PACKAGE_DIR); $(STAGING_DIR)/usr/bin/ipkg-make-index . > Packages)
$(DL_DIR):
@mkdir -p $(DL_DIR)
@@ -76,16 +76,18 @@ $(DL_DIR):
$(BUILD_DIR):
@mkdir -p $(BUILD_DIR)
-source: $(TARGETS_SOURCE)
-
+source: toolchain/source package/source target/source
package/%:
+ @$(TRACE) $@
$(MAKE) -C package $(patsubst package/%,%,$@)
target/%:
+ @$(TRACE) $@
$(MAKE) -C target $(patsubst target/%,%,$@)
toolchain/%:
+ @$(TRACE) $@
$(MAKE) -C toolchain $(patsubst toolchain/%,%,$@)
#############################################################
@@ -93,31 +95,24 @@ toolchain/%:
# Cleanup and misc junk
#
#############################################################
-image_clean:
+root_clean:
+ rm -rf $(BUILD_DIR)/linux-*/root $(BUILD_DIR)/root
+
+target_clean: root_clean
rm -f $(STAMP_DIR)/.*-compile
rm -f $(STAMP_DIR)/.*-install
rm -rf $(BIN_DIR)
-
-target_clean: image_clean
- rm -rf $(BUILD_DIR)/linux-*/root
-clean: target_clean
- @$(MAKE) -C $(CONFIG) clean
+clean: dirclean
-dirclean: clean
+dirclean:
+ @$(MAKE) -C $(CONFIG) clean
rm -rf $(BUILD_DIR)
-distclean: clean
- rm -rf $(STAMP_DIR) $(DL_DIR) $(BUILD_DIR) $(TOOL_BUILD_DIR) $(STAGING_DIR)
+distclean: dirclean
+ rm -rf $(STAMP_DIR) $(DL_DIR) $(TOOL_BUILD_DIR) $(STAGING_DIR)
rm -f .config* .tmpconfig.h
-sourceball: distclean
- set -e; \
- cd ..; \
- rm -f buildroot.tar.bz2; \
- tar -cvf buildroot.tar buildroot; \
- bzip2 -9 buildroot.tar; \
-
else # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
all: menuconfig
diff --git a/package/Config.in b/package/Config.in
index b5a8e49eb..75955fbad 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -9,6 +9,7 @@ source "package/dnsmasq/Config.in"
source "package/ipkg/Config.in"
source "package/iptables/Config.in"
source "package/mtd/Config.in"
+source "package/nvram/Config.in"
comment "Applications"
source "package/deco/Config.in"
diff --git a/package/Makefile b/package/Makefile
index 55fb1e107..91307cd6c 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -2,7 +2,6 @@
include $(TOPDIR)/rules.mk
package-:=tcp_wrappers
-package-y:=nvram
package-$(BR2_PACKAGE_6TUNNEL) += 6tunnel
package-$(BR2_PACKAGE_AICCU) += aiccu
package-$(BR2_PACKAGE_AIRCRACK) += aircrack
@@ -125,6 +124,7 @@ package-$(BR2_PACKAGE_NFS_SERVER) += nfs-server
package-$(BR2_PACKAGE_NMAP) += nmap
package-$(BR2_PACKAGE_NOCATSPLASH) += nocatsplash
package-$(BR2_PACKAGE_NTPCLIENT) += ntpclient
+package-$(BR2_PACKAGE_NVRAM) += nvram
package-$(BR2_PACKAGE_OLSRD) += olsrd
package-$(BR2_PACKAGE_OPENCDK) += opencdk
package-$(BR2_PACKAGE_OPENLDAP) += openldap
@@ -206,7 +206,7 @@ package-$(BR2_PACKAGE_XINETD) += xinetd
package-$(BR2_PACKAGE_XSUPPLICANT) += xsupplicant
package-$(BR2_PACKAGE_ZLIB) += zlib
-DEV_LIBS:=tcp_wrappers glib ncurses openssl pcre popt zlib libnet libpcap mysql postgresql iptables matrixssl lzo gmp fuse portmap libelf uclibc++ speex libpng libgd wireless-tools nvram linux-atm
+DEV_LIBS:=tcp_wrappers glib ncurses openssl pcre popt zlib libnet libpcap mysql postgresql iptables matrixssl lzo gmp fuse portmap libelf uclibc++ speex libpng libgd wireless-tools nvram linux-atm libamsel libao libart libdaemon libdb libdnet libevent libffi-sable libgcrypt libgdbm libgpg-error libid3tag libmad libnet libnids libogg libosip2 libpcap libtasn1 libupnp libusb libvorbis libvorbisidec libxml2 libxslt
DEV_LIBS_COMPILE:=$(patsubst %,%-compile,$(DEV_LIBS))
SDK_DEFAULT_PACKAGES:=busybox dnsmasq iptables wireless-tools dropbear bridge ipkg ppp
SDK_DEFAULT_COMPILE:=$(patsubst %,%-compile,$(SDK_DEFAULT_PACKAGES))
@@ -437,27 +437,34 @@ sdk-compile: $(DEV_LIBS_COMPILE) $(SDK_DEFAULT_COMPILE)
$(STAMP_DIR):
mkdir -p $@
-%-prepare: $(STAMP_DIR)
- @[ -f $(STAMP_DIR)/.$@ ] || $(MAKE) -C $(patsubst %-prepare,%,$@) prepare
+$(TARGET_DIR):
+ mkdir -p $(TARGET_DIR)
+
+%-prepare: $(STAMP_DIR) $(TARGET_DIR)
+ @[ -f $(STAMP_DIR)/.$@ ] || { \
+ $(TRACE) package/$(patsubst %-prepare,%,$@)/prepare; \
+ $(MAKE) -C $(patsubst %-prepare,%,$@) prepare; \
+ }
@touch $(STAMP_DIR)/.$@
%-compile: %-prepare
- @[ -f $(STAMP_DIR)/.$@ ] || $(MAKE) -C $(patsubst %-compile,%,$@) compile
+ @[ -f $(STAMP_DIR)/.$@ ] || { \
+ $(TRACE) package/$(patsubst %-compile,%,$@)/compile; \
+ $(MAKE) -C $(patsubst %-compile,%,$@) compile; \
+ }
@touch $(STAMP_DIR)/.$@
%-install: %-compile
- @$(MAKE) -C $(patsubst %-install,%,$@) \
- TARGET_DIR="$(TARGET_DIR)" \
- IPKG_CONF="$(IPKG_CONF)" \
- BOARD="$(BOARD)" \
- KERNEL="$(KERNEL)" \
- install
+ @$(TRACE) package/$(patsubst %-install,%,$@)/install
+ @$(MAKE) -C $(patsubst %-install,%,$@) install
%-rebuild:
+ @$(TRACE) package/$(patsubst %-rebuild,%,$@)/rebuild
@rm -f $(STAMP_DIR)/.$(patsubst %-rebuild,%,$@)-*
$(MAKE) -C $(patsubst %-rebuild,%,$@) rebuild
%-clean:
+ @$(TRACE) package/$(patsubst %-clean,%,$@)/clean
@$(MAKE) -C $(patsubst %-clean,%,$@) clean
@rm -f $(STAMP_DIR)/.$(patsubst %-clean,%,$@)-*
diff --git a/package/nvram/Config.in b/package/nvram/Config.in
new file mode 100644
index 000000000..968a23fdb
--- /dev/null
+++ b/package/nvram/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_NVRAM
+ tristate "nvram - broadcom config utility"
+ default y
+ depends BR2_LINUX_2_4_BRCM
+ help
+ control utility for broadcom's 'nvram' config area
+
diff --git a/package/nvram/Makefile b/package/nvram/Makefile
index b1b87fd15..eea5a3aa0 100644
--- a/package/nvram/Makefile
+++ b/package/nvram/Makefile
@@ -9,13 +9,6 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
include $(TOPDIR)/package/rules.mk
-# does not depend on menuconfig
-ifneq ($(BOARD)-$(KERNEL),brcm-2.4)
-BR2_PACKAGE_NVRAM:=m
-else
-BR2_PACKAGE_NVRAM:=y
-endif
-
$(eval $(call PKG_template,NVRAM,nvram,$(PKG_RELEASE),$(ARCH)))
$(PKG_BUILD_DIR)/.prepared:
diff --git a/package/rules.mk b/package/rules.mk
index f7b81c62a..67fad9ae3 100644
--- a/package/rules.mk
+++ b/package/rules.mk
@@ -1,6 +1,4 @@
# invoke ipkg with configuration in $(STAGING_DIR)/etc/ipkg.conf
-IPKG := IPKG_INSTROOT=$(TARGET_DIR) IPKG_CONF_DIR=$(IPKG_CONF) $(SCRIPT_DIR)/ipkg -force-defaults -force-depends
-IPKG_STATE_DIR := $(TARGET_DIR)/usr/lib/ipkg
define PKG_template
IPKG_$(1):=$(PACKAGE_DIR)/$(2)_$(3)_$(4).ipk
diff --git a/rules.mk b/rules.mk
index 2759941e2..e6118bfb6 100644
--- a/rules.mk
+++ b/rules.mk
@@ -2,21 +2,41 @@ include $(TOPDIR)/.config
SHELL=/bin/bash
export SHELL
-MAKE1=make
-MAKEFLAGS=-j$(BR2_JLEVEL)
+ifeq ($(V),)
+V=99
+endif
+
+ifneq ($(V),0)
+TRACE:=echo "---> "
+else
+TRACE:=:
+endif
+
+ifeq (${shell [ "$(V)" -ge 5 ] && echo 1},)
+PKG_TRACE:=:
+else
+PKG_TRACE:=echo "------> "
+endif
+ifeq (${shell [ "$(V)" -ge 10 ] && echo 1},)
+EXTRA_MAKEFLAGS:=-s
+MAKE_TRACE:=>&/dev/null
+else
+MAKE_TRACE:=
+EXTRA_MAKEFLAGS:=
+TRACE:=:
+PKG_TRACE:=:
+endif
+
+MAKE1=make
+MAKEFLAGS=-j$(BR2_JLEVEL) V=$(V) $(EXTRA_MAKEFLAGS)
# Strip off the annoying quoting
ARCH:=$(strip $(subst ",, $(BR2_ARCH)))
-#"
WGET:=$(strip $(subst ",, $(BR2_WGET)))
-#"
-
GCC_VERSION:=$(strip $(subst ",, $(BR2_GCC_VERSION)))
-#"
GCC_USE_SJLJ_EXCEPTIONS:=$(strip $(subst ",, $(BR2_GCC_USE_SJLJ_EXCEPTIONS)))
-#"
TARGET_OPTIMIZATION:=$(strip $(subst ",, $(BR2_TARGET_OPTIMIZATION)))
-#""
+#"))"))"))"))")) # for vim's broken syntax highlighting :)
ifeq ($(BR2_SOFT_FLOAT),y)
@@ -51,15 +71,14 @@ HOSTCC:=gcc
BASE_DIR:=$(TOPDIR)
DL_DIR:=$(BASE_DIR)/dl
BUILD_DIR:=$(BASE_DIR)/build_$(ARCH)$(ARCH_FPU_SUFFIX)
+STAGING_DIR:=$(BASE_DIR)/staging_dir_$(ARCH)$(ARCH_FPU_SUFFIX)
SCRIPT_DIR:=$(BASE_DIR)/scripts
BIN_DIR:=$(BASE_DIR)/bin
STAMP_DIR:=$(BUILD_DIR)/stamp
PACKAGE_DIR:=$(BIN_DIR)/packages
STAMP_DIR:=$(BUILD_DIR)/stamp
+TARGET_DIR:=$(BUILD_DIR)/root
TOOL_BUILD_DIR=$(BASE_DIR)/toolchain_build_$(ARCH)$(ARCH_FPU_SUFFIX)
-# Strip off the annoying quoting
-STAGING_DIR:=$(strip $(subst ",, $(BR2_STAGING_DIR)))
-#"
TARGET_PATH=$(STAGING_DIR)/usr/bin:$(STAGING_DIR)/bin:/bin:/sbin:/usr/bin:/usr/sbin
IMAGE:=$(BUILD_DIR)/root_fs_$(ARCH)$(ARCH_FPU_SUFFIX)
REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux-uclibc
@@ -67,7 +86,6 @@ GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux
KERNEL_CROSS:=$(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-
TARGET_CROSS:=$(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-
TARGET_CC:=$(TARGET_CROSS)gcc
-#STRIP:=$(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note
STRIP:=$(STAGING_DIR)/bin/sstrip
PATCH=$(SCRIPT_DIR)/patch-kernel.sh
SED:=$(STAGING_DIR)/bin/sed -i -e
@@ -110,9 +128,10 @@ endif
# invoke ipkg-build with some default options
IPKG_BUILD := PATH="$(TARGET_PATH)" ipkg-build -c -o root -g root
-
# where to build (and put) .ipk packages
IPKG_TARGET_DIR := $(PACKAGE_DIR)
+IPKG:=IPKG_TMP=$(BUILD_DIR)/tmp IPKG_INSTROOT=$(TARGET_DIR) IPKG_CONF_DIR=$(STAGING_DIR)/etc $(SCRIPT_DIR)/ipkg -force-defaults -force-depends
+IPKG_STATE_DIR := $(TARGET_DIR)/usr/lib/ipkg
RSTRIP:=STRIP="$(STRIP)" $(SCRIPT_DIR)/rstrip.sh
RSTRIP_KMOD:=STRIP="$(TARGET_CROSS)strip --strip-unneeded --remove-section=.comment" $(SCRIPT_DIR)/rstrip.sh
diff --git a/target/Makefile b/target/Makefile
index e6156b48b..a14749fca 100644
--- a/target/Makefile
+++ b/target/Makefile
@@ -17,15 +17,21 @@ image_clean:
rm -f $(BIN_DIR)/openwrt-*
%-clean:
+ @$(TRACE) target/$(patsubst %-clean,%,$@)/clean
$(MAKE) -C $(patsubst %-clean,%,$@) clean
%-prepare:
+ @$(TRACE) target/$(patsubst %-prepare,%,$@)/prepare
$(MAKE) -C $(patsubst %-prepare,%,$@) prepare
%-compile: %-prepare
+ @$(TRACE) target/$(patsubst %-compile,%,$@)/compile
$(MAKE) -C $(patsubst %-compile,%,$@) compile
%-rebuild:
+ @$(TRACE) target/$(patsubst %-rebuild,%,$@)/rebuild
$(MAKE) -C $(patsubst %-rebuild,%,$@) rebuild
%-install: %-compile
+ @$(TRACE) target/$(patsubst %-install,%,$@)/install
$(MAKE) -C $(patsubst %-install,%,$@) install
linux-imagebuilder:
+ @$(TRACE) target/linux/imagebuilder
$(MAKE) -C linux imagebuilder
diff --git a/target/linux/Config.in b/target/linux/Config.in
index 69f96c48d..4c1b5ee1b 100644
--- a/target/linux/Config.in
+++ b/target/linux/Config.in
@@ -1,13 +1,10 @@
-
-config BR2_LINUX_2_4
- bool "Linux 2.4 (choose only one target board)"
- default y
-
+choice
+ prompt "Target system"
+
config BR2_LINUX_2_4_BRCM
- bool "Support for Broadcom based routers"
+ bool "Support for Broadcom based routers [2.4]"
default y
depends BR2_mipsel
- depends BR2_LINUX_2_4
help
Build firmware images for Broadcom based routers
(e.g. Linksys WRT54G(S), Asus WL-500g, Motorola WR850G)
@@ -17,48 +14,30 @@ config BR2_LINUX_2_4_BRCM
with TFTP client too.
config BR2_LINUX_2_4_AR7
- bool "Support for TI AR7 based devices"
+ bool "Support for TI AR7 based devices [2.4]"
default n
depends BR2_mipsel
- depends BR2_LINUX_2_4
help
Build firmware images for TI AR7 based routers (w.g. Linksys WAG54G v2)
config BR2_LINUX_2_4_SOEKRIS
- bool "Support for Soekris boards"
+ bool "Support for Soekris boards [2.4]"
default n
depends BR2_i386
- depends BR2_LINUX_2_4
help
Build firmware images for Soekris based boards
(e.g. net4521, net4801)
-
- config BR2_TARGET_NET4521
- default y
- depends BR2_LINUX_2_4_SOEKRIS
- bool "Soekris net4521"
-
- config BR2_TARGET_NET4801
- default y
- depends BR2_LINUX_2_4_SOEKRIS
- bool "Soekris net4801"
-
-config BR2_LINUX_2_6
- bool "Linux 2.6"
- default n
-
+
config BR2_LINUX_2_6_BRCM
- bool "Support for Broadcom based routers"
+ bool "Support for Broadcom based routers [2.6]"
default n
depends BR2_mipsel
- depends BR2_LINUX_2_6
- select BR2_PACKAGE_KMOD_B44
- select BR2_PACKAGE_KMOD_MADWIFI
- select BR2_PACKAGE_ROBOCFG
help
Build firmware images for Broadcom based routers
(e.g. Netgear WGT634u)
-
+
+endchoice
+
comment "Kernel Modules"
config BR2_PACKAGE_KMOD_SANGAM_ATM_A
@@ -103,6 +82,7 @@ config BR2_PACKAGE_KMOD_BRCM_ET
config BR2_PACKAGE_KMOD_B44
tristate "Broadcom 44XX, 47XX ethernet driver"
default m
+ default y if BR2_LINUX_2_6_BRCM
help
Free driver for Broadcom Ethernet chipsets (without switch support)
@@ -347,7 +327,6 @@ config BR2_PACKAGE_KMOD_PPPOATM
config BR2_PACKAGE_KMOD_ATM
tristate "ATM support"
- default m
default y if BR2_LINUX_2_4_AR7
help
ATM support
diff --git a/target/linux/Makefile b/target/linux/Makefile
index 6fec977d6..2362ad6dd 100644
--- a/target/linux/Makefile
+++ b/target/linux/Makefile
@@ -58,6 +58,7 @@ $(BIN_DIR)/$(IB_NAME).tar.bz2:
cp $(TOPDIR)/rules.mk $(IB_DIR)
cp -fpR ./image $(IB_DIR)/
cp $(TOPDIR)/.config $(IB_DIR)/
+ find $(IB_DIR) -name .svn | xargs rm -rf
find $(IB_DIR) -name CVS | xargs rm -rf
(cd $(BUILD_DIR); tar c $(IB_NAME) | bzip2 -c > $(BIN_DIR)/$(IB_NAME).tar.bz2)
@@ -66,8 +67,10 @@ install: $(BIN_DIR)/$(IB_NAME).tar.bz2
endif
prepare:
+ @$(TRACE) target/linux/image/prepare
$(MAKE) -C image prepare
compile:
+ @$(TRACE) target/linux/image/compile
$(MAKE) -C image compile
install:
rebuild:
diff --git a/target/linux/image/Makefile b/target/linux/image/Makefile
index 1e3e22f15..1dd48c752 100644
--- a/target/linux/image/Makefile
+++ b/target/linux/image/Makefile
@@ -17,10 +17,15 @@ endif
prepare:
compile:
install:
+
+$(BOARD)-compile:
+ @$(TRACE) target/linux/image/$(BOARD)/prepare
$(MAKE) -C $(BOARD) prepare
+ @$(TRACE) target/linux/image/$(BOARD)/compile
$(MAKE) -C $(BOARD) compile
install-ib:
+ @$(TRACE) target/linux/image/$(BOARD)/install-ib
-$(MAKE) -C $(BOARD) IB_DIR="$(IB_DIR)" install-ib
mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)
cp $(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)/kernel[-_]*.ipk $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/
diff --git a/target/linux/image/jffs2.mk b/target/linux/image/jffs2.mk
index 2a169ab32..ab8cfbef3 100644
--- a/target/linux/image/jffs2.mk
+++ b/target/linux/image/jffs2.mk
@@ -19,8 +19,10 @@ $(KDIR)/root.jffs2-8MB: install-prepare
@rm -rf $(KDIR)/root/jffs
$(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x20000 -o $@ -d $(KDIR)/root
-jffs2-install: $(KDIR)/root.jffs2-4MB $(KDIR)/root.jffs2-8MB
+jffs2-install: $(KDIR)/root.jffs2-4MB $(KDIR)/root.jffs2-8MB $(BOARD)-compile
+ $(TRACE) target/linux/image/$(BOARD)/install
$(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="jffs2-4MB"
+ $(TRACE) target/linux/image/$(BOARD)/install
$(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="jffs2-8MB"
jffs2-install-ib:
diff --git a/target/linux/image/squashfs.mk b/target/linux/image/squashfs.mk
index 3811567a0..00411c05e 100644
--- a/target/linux/image/squashfs.mk
+++ b/target/linux/image/squashfs.mk
@@ -12,7 +12,8 @@ $(KDIR)/root.squashfs: install-prepare
@mkdir -p $(KDIR)/root/jffs
$(STAGING_DIR)/bin/mksquashfs-lzma $(KDIR)/root $@ -nopad -noappend -root-owned -le
-squashfs-install: $(KDIR)/root.squashfs
+squashfs-install: $(KDIR)/root.squashfs $(BOARD)-compile
+ $(TRACE) target/linux/image/$(BOARD)/install
$(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="squashfs"
squashfs-install-ib:
diff --git a/target/linux/linux-2.4/Makefile b/target/linux/linux-2.4/Makefile
index ede1e7a98..2754c4230 100644
--- a/target/linux/linux-2.4/Makefile
+++ b/target/linux/linux-2.4/Makefile
@@ -16,7 +16,7 @@ LINUX_BINARY_DRIVER_SITE := http://openwrt.org/downloads/sources/
LINUX_SOURCE := linux-$(LINUX_VERSION).tar.bz2
LINUX_SOURCE_DIR := $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)
MODULES_DIR := $(LINUX_BUILD_DIR)/modules/$(MODULES_SUBDIR)
-TARGET_MODULES_DIR := $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)
+TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/lib/modules/$(LINUX_VERSION)
IPKG_KERNEL:=IPKG_TMP=$(BUILD_DIR)/tmp IPKG_INSTROOT=$(LINUX_TARGET_DIR) IPKG_CONF_DIR=$(LINUX_BUILD_DIR) $(SCRIPT_DIR)/ipkg -force-defaults -force-depends
PKG_BUILD_DIR := $(LINUX_BUILD_DIR)/linux-modules
@@ -250,6 +250,7 @@ $(STAMP_DIR)/.linux-compile: $(LINUX_DIR)/.modules_done
@mkdir -p $(STAMP_DIR)
@$(MAKE) $(TARGETS)
ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR)
+ @$(TRACE) target/linux/package
$(MAKE) -C $(TOPDIR)/target/linux/package \
$(KPKG_MAKEOPTS) \
compile
@@ -274,12 +275,8 @@ compile: $(STAMP_DIR)/.linux-compile
install: compile $(TARGET_MODULES_DIR) $(KERNEL_IPKG)
rm -rf $(LINUX_BUILD_DIR)/root*
+ cp -fpR $(BUILD_DIR)/root $(LINUX_BUILD_DIR)/
echo -e 'dest root /\noption offline_root $(LINUX_BUILD_DIR)/root' > $(LINUX_BUILD_DIR)/ipkg.conf
- $(MAKE) -C $(TOPDIR)/package \
- TARGET_DIR="$(LINUX_TARGET_DIR)" \
- IPKG_CONF="$(LINUX_BUILD_DIR)" \
- BOARD="$(BOARD)" \
- install
$(MAKE) -C $(TOPDIR)/target/linux/package \
$(KPKG_MAKEOPTS) \
install
diff --git a/target/linux/linux-2.6/Makefile b/target/linux/linux-2.6/Makefile
index 544b5c5c7..b61adf625 100644
--- a/target/linux/linux-2.6/Makefile
+++ b/target/linux/linux-2.6/Makefile
@@ -25,7 +25,7 @@ LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
LINUX_SOURCE := linux-$(LINUX_VERSION).tar.bz2
LINUX_SOURCE_DIR := $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)
MODULES_DIR := $(LINUX_BUILD_DIR)/modules/$(MODULES_SUBDIR)
-TARGET_MODULES_DIR := $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)
+TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/lib/modules/$(LINUX_VERSION)
IPKG_KERNEL:=IPKG_TMP=$(BUILD_DIR)/tmp IPKG_INSTROOT=$(LINUX_TARGET_DIR) IPKG_CONF_DIR=$(LINUX_BUILD_DIR) $(SCRIPT_DIR)/ipkg -force-defaults -force-depends
PKG_BUILD_DIR := $(LINUX_BUILD_DIR)/linux-modules
@@ -47,10 +47,6 @@ include $(LINUX_KCONFIG)
INSTALL_TARGETS := $(KERNEL_IPKG)
TARGETS :=
-ifeq ($(BOARD),brcm)
-include ./broadcom.mk
-endif
-
$(eval $(call KMOD_template,ATM,atm,\
$(MODULES_DIR)/kernel/net/atm/atm.ko \
$(MODULES_DIR)/kernel/net/atm/br2684.ko \
@@ -238,18 +234,15 @@ source: $(DL_DIR)/$(LINUX_SOURCE)
prepare: $(LINUX_DIR)/.configured
compile: $(LINUX_DIR)/.modules_done $(TARGETS)
ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR)
+ @$(TRACE) target/linux/package
$(MAKE) -C $(TOPDIR)/target/linux/package \
$(KPKG_MAKEOPTS) \
compile
install: compile $(TARGET_MODULES_DIR) $(KERNEL_IPKG)
rm -rf $(LINUX_BUILD_DIR)/root*
+ cp -fpR $(BUILD_DIR)/root $(LINUX_BUILD_DIR)/
echo -e 'dest root /\noption offline_root $(LINUX_BUILD_DIR)/root' > $(LINUX_BUILD_DIR)/ipkg.conf
- $(MAKE) -C $(TOPDIR)/package \
- TARGET_DIR="$(LINUX_TARGET_DIR)" \
- IPKG_CONF="$(LINUX_BUILD_DIR)" \
- BOARD="$(BOARD)" \
- install
$(MAKE) -C $(TOPDIR)/target/linux/package \
$(KPKG_MAKEOPTS) \
install
diff --git a/target/linux/linux-2.6/broadcom.mk b/target/linux/linux-2.6/broadcom.mk
deleted file mode 100644
index f34fe6ac6..000000000
--- a/target/linux/linux-2.6/broadcom.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-# $Id$
-#
-# broadcom specific kmod packages
diff --git a/target/linux/package/Makefile b/target/linux/package/Makefile
index 7e8588d99..6b7a85816 100644
--- a/target/linux/package/Makefile
+++ b/target/linux/package/Makefile
@@ -34,20 +34,24 @@ MAKEOPTS:= BOARD="$(BOARD)" \
%-prepare:
+ @$(TRACE) target/linux/package/$(patsubst %-prepare,%,$@)-prepare
$(MAKE) -C $(patsubst %-prepare,%,$@) \
$(MAKEOPTS) \
prepare
%-compile: %-prepare
+ @$(TRACE) target/linux/package/$(patsubst %-compile,%,$@)-compile
$(MAKE) -C $(patsubst %-compile,%,$@) \
$(MAKEOPTS) \
compile
%-install: %-compile
+ @$(TRACE) target/linux/package/$(patsubst %-install,%,$@)-install
$(MAKE) -C $(patsubst %-install,%,$@) \
$(MAKEOPTS) \
install
%-clean:
+ @$(TRACE) target/linux/package/$(patsubst %-clean,%,$@)-clean
@$(MAKE) -C $(patsubst %-clean,%,$@) clean
diff --git a/toolchain/Makefile b/toolchain/Makefile
index 361f7be5b..9cc24d536 100644
--- a/toolchain/Makefile
+++ b/toolchain/Makefile
@@ -30,18 +30,28 @@ $(TOOL_BUILD_DIR):
@mkdir -p $(TOOL_BUILD_DIR)
%-prepare: $(TOOLCHAIN_STAMP_DIR) $(STAGING_DIR) $(TOOL_BUILD_DIR)
- @[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || $(MAKE) -C $(patsubst %-prepare,%,$@) prepare
+ @[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \
+ $(TRACE) toolchain/$(patsubst %-prepare,%,$@)/prepare; \
+ $(MAKE) -C $(patsubst %-prepare,%,$@) prepare; \
+ }
@touch $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@
%-compile: %-prepare
- @[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || $(MAKE) -C $(patsubst %-compile,%,$@) compile
+ @[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \
+ $(TRACE) toolchain/$(patsubst %-compile,%,$@)/compile; \
+ $(MAKE) -C $(patsubst %-compile,%,$@) compile; \
+ }
@touch $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@
%-install: %-compile
- @[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || $(MAKE) -C $(patsubst %-install,%,$@) install
+ @[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \
+ $(TRACE) toolchain/$(patsubst %-install,%,$@)/install; \
+ $(MAKE) -C $(patsubst %-install,%,$@) install; \
+ }
@touch $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@
%-clean:
+ $(TRACE) toolchain/$(patsubst %-clean,%,$@)/clean
@$(MAKE) -C $(patsubst %-clean,%,$@) clean
@rm -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$(patsubst %-clean,%,$@)-*
diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile
index 49e8b2a03..c567292fa 100644
--- a/toolchain/kernel-headers/Makefile
+++ b/toolchain/kernel-headers/Makefile
@@ -4,10 +4,11 @@ include $(TOPDIR)/rules.mk
LINUX_HEADERS_VERSION=2.4.30
LINUX_KERNEL_MD5SUM:=75d8ce40a3668603017cd186909efe8d
-LINUX_HEADERS_SITE=http://www.fi.kernel.org/pub/linux/kernel/v2.4 \
- http://www.fr.kernel.org/pub/linux/kernel/v2.4 \
- http://www.kernel.org/pub/linux/kernel/v2.4 \
- http://www.de.kernel.org/pub/linux/kernel/v2.4
+LINUX_HEADERS_SITE= \
+ http://www.de.kernel.org/pub/linux/kernel/v2.4 \
+ http://www.fi.kernel.org/pub/linux/kernel/v2.4 \
+ http://www.fr.kernel.org/pub/linux/kernel/v2.4 \
+ http://www.kernel.org/pub/linux/kernel/v2.4 \
LINUX_HEADERS_SOURCE=linux-$(LINUX_HEADERS_VERSION).tar.bz2
LINUX_HEADERS_ARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \