diff options
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/linux-2.4/Makefile | 22 | ||||
-rw-r--r-- | target/linux/rules.mk | 9 |
2 files changed, 21 insertions, 10 deletions
diff --git a/target/linux/linux-2.4/Makefile b/target/linux/linux-2.4/Makefile index 0fcf441a8..36e18e705 100644 --- a/target/linux/linux-2.4/Makefile +++ b/target/linux/linux-2.4/Makefile @@ -19,11 +19,6 @@ LINUX_KCONFIG:=./config/$(BOARD) LINUX_BUILD_DIR:=$(BUILD_DIR)/linux-2.4-$(BOARD) LINUX_TARGET_DIR:=$(LINUX_BUILD_DIR)/root LINUX_KERNEL:=$(LINUX_BUILD_DIR)/vmlinux -LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ - -e 's/mipsel/mips/' \ - -e 's/powerpc/ppc/' \ - -e 's/sh[234]/sh/' \ - ) LINUX_BINARY_DRIVER_SITE := http://openwrt.org/downloads/sources/ LINUX_SOURCE := linux-$(LINUX_VERSION).tar.bz2 @@ -226,6 +221,15 @@ $(STAGING_DIR)/include/linux/version.h: $(LINUX_DIR)/.configured tar -ch -C $(LINUX_DIR)/include -f - linux | tar -xf - -C $(STAGING_DIR)/include/ tar -ch -C $(LINUX_DIR)/include -f - asm | tar -xf - -C $(STAGING_DIR)/include/ +$(STAMP_DIR)/.linux-compile: $(LINUX_DIR)/.modules_done + @mkdir -p $(STAMP_DIR) + @$(MAKE) $(TARGETS) + ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR) + $(MAKE) -C $(TOPDIR)/target/linux/package \ + $(KPKG_MAKEOPTS) \ + compile + touch $@ + $(TARGET_MODULES_DIR): -mkdir -p $(TARGET_MODULES_DIR) @@ -241,11 +245,7 @@ $(KERNEL_IPKG): 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) - $(MAKE) -C $(TOPDIR)/target/linux/package \ - $(KPKG_MAKEOPTS) \ - compile +compile: $(STAMP_DIR)/.linux-compile install: compile $(TARGET_MODULES_DIR) $(KERNEL_IPKG) rm -rf $(LINUX_BUILD_DIR)/root* @@ -261,6 +261,7 @@ install: compile $(TARGET_MODULES_DIR) $(KERNEL_IPKG) [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG_KERNEL) install $(INSTALL_TARGETS) || true mostlyclean: + 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 @@ -274,5 +275,6 @@ rebuild: $(MAKE) compile clean: + rm -f $(STAMP_DIR)/.linux-compile rm -rf $(LINUX_BUILD_DIR) rm -f $(TARGETS) diff --git a/target/linux/rules.mk b/target/linux/rules.mk index 39afadb34..606efb6d9 100644 --- a/target/linux/rules.mk +++ b/target/linux/rules.mk @@ -1,3 +1,10 @@ +LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ + -e 's/mipsel/mips/' \ + -e 's/powerpc/ppc/' \ + -e 's/sh[234]/sh/' \ +) + + define KMOD_template ifeq ($$(strip $(4)),) KDEPEND_$(1):=m @@ -39,3 +46,5 @@ endif $(IPKG_BUILD) $$(I_$(1)) $(PACKAGE_DIR) endef + + |