diff options
-rw-r--r-- | include/kernel-build.mk | 15 | ||||
-rw-r--r-- | package/madwifi/Makefile | 1 | ||||
-rw-r--r-- | target/image/generic/lzma-loader/Makefile | 4 |
3 files changed, 9 insertions, 11 deletions
diff --git a/include/kernel-build.mk b/include/kernel-build.mk index e3f2d5dae..0f29a306b 100644 --- a/include/kernel-build.mk +++ b/include/kernel-build.mk @@ -33,11 +33,8 @@ $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE) ifeq ($(KERNEL),2.4) $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched - $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" \ - $(LINUX_DIR)/Makefile \ - $(LINUX_DIR)/arch/*/Makefile $(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile - $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) oldconfig include/linux/compile.h include/linux/version.h + PATH="$(TARGET_PATH)" $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) oldconfig include/linux/compile.h include/linux/version.h touch $@ $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured @@ -47,7 +44,7 @@ $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured $(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.depend_done else $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched - $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) oldconfig prepare scripts + PATH="$(TARGET_PATH)" $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) oldconfig prepare scripts touch $@ endif @@ -66,16 +63,16 @@ else endif $(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.linux-compile pkg-install ramdisk-config - $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH="$(TARGET_PATH)" + PATH="$(TARGET_PATH)" $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux - $(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ + PATH="$(TARGET_PATH)" $(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ touch -c $(LINUX_KERNEL) $(LINUX_DIR)/.modules_done: 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)" ARCH=$(LINUX_KARCH) PATH="$(TARGET_PATH)" DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install + PATH="$(TARGET_PATH)" $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) modules + PATH="$(TARGET_PATH)" $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install touch $(LINUX_DIR)/.modules_done modules: $(LINUX_DIR)/.modules_done diff --git a/package/madwifi/Makefile b/package/madwifi/Makefile index 07e2c4539..96ca1baf3 100644 --- a/package/madwifi/Makefile +++ b/package/madwifi/Makefile @@ -53,6 +53,7 @@ MADWIFI_MAKEOPTS= -C $(PKG_BUILD_DIR) \ PATH="$(TARGET_PATH)" \ ARCH="$(LINUX_KARCH)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ + CC="$(TARGET_CC)" \ TARGET="$(HAL_TARGET)" \ TOOLPREFIX="$(KERNEL_CROSS)" \ TOOLPATH="$(KERNEL_CROSS)" \ diff --git a/target/image/generic/lzma-loader/Makefile b/target/image/generic/lzma-loader/Makefile index f9beef4b8..5bd01eefb 100644 --- a/target/image/generic/lzma-loader/Makefile +++ b/target/image/generic/lzma-loader/Makefile @@ -19,8 +19,8 @@ $(PKG_BUILD_DIR)/.prepared: touch $@ $(PKG_BUILD_DIR)/lzma.elf: $(PKG_BUILD_DIR)/.prepared $(PKG_BUILD_DIR)/vmlinux.lzma - $(MAKE) -C $(PKG_BUILD_DIR) CC="$(TARGET_CC)" \ - LD="$(TARGET_CROSS)ld" CROSS_COMPILE="$(TARGET_CROSS)" \ + PATH="$(TARGET_PATH)" $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" CROSS_COMPILE="$(TARGET_CROSS)" \ RAMSIZE=$(RAMSIZE) \ LOADADDR=$(LOADADDR) \ KERNEL_ENTRY=$(KERNEL_ENTRY) \ |