summaryrefslogtreecommitdiff
path: root/mk/kernel-build.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/kernel-build.mk')
-rw-r--r--mk/kernel-build.mk11
1 files changed, 3 insertions, 8 deletions
diff --git a/mk/kernel-build.mk b/mk/kernel-build.mk
index f95796950..ffb612334 100644
--- a/mk/kernel-build.mk
+++ b/mk/kernel-build.mk
@@ -37,24 +37,19 @@ $(LINUX_DIR)/.prepared: $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PK
$(LINUX_DIR)/.config: $(LINUX_DIR)/.prepared $(BUILD_DIR)/.kernelconfig $(TOPDIR)/mk/modules.mk
$(TRACE) target/$(ADK_TARGET_ARCH)-kernel-configure
-for f in $(TARGETS);do if [ -f $$f ];then rm $$f;fi;done
-ifeq ($(ADK_USE_KERNEL_MINICONFIG),y)
$(CP) $(BUILD_DIR)/.kernelconfig $(LINUX_DIR)/mini.config
- ${KERNEL_MAKE_ENV} $(MAKE) ${KERNEL_MAKE_OPTS} KCONFIG_ALLCONFIG=mini.config allnoconfig $(MAKE_TRACE)
-else
- $(CP) $(BUILD_DIR)/.kernelconfig $(LINUX_DIR)/.config
- echo N | ${KERNEL_MAKE_ENV} $(MAKE) ${KERNEL_MAKE_OPTS} oldconfig $(MAKE_TRACE)
-endif
+ ${KERNEL_MAKE_ENV} $(MAKE) -C "${LINUX_DIR}" ${KERNEL_MAKE_OPTS} KCONFIG_ALLCONFIG=mini.config allnoconfig $(MAKE_TRACE)
touch -c $(LINUX_DIR)/.config
$(LINUX_DIR)/$(KERNEL_FILE): $(LINUX_DIR)/.config
$(TRACE) target/$(ADK_TARGET_ARCH)-kernel-compile
- ${KERNEL_MAKE_ENV} $(MAKE) ${KERNEL_MAKE_OPTS} -j${ADK_MAKE_JOBS} LOCALVERSION="" $(KERNEL_TARGET) modules $(MAKE_TRACE)
+ ${KERNEL_MAKE_ENV} $(MAKE) -C "${LINUX_DIR}" ${KERNEL_MAKE_OPTS} -j${ADK_MAKE_JOBS} LOCALVERSION="" $(KERNEL_TARGET) modules $(MAKE_TRACE)
touch -c $(LINUX_DIR)/$(KERNEL_FILE)
$(LINUX_BUILD_DIR)/modules: $(LINUX_DIR)/$(KERNEL_FILE)
$(TRACE) target/$(ADK_TARGET_ARCH)-kernel-modules-install
rm -rf $(LINUX_BUILD_DIR)/modules
- ${KERNEL_MAKE_ENV} $(MAKE) ${KERNEL_MAKE_OPTS} DEPMOD=true \
+ ${KERNEL_MAKE_ENV} $(MAKE) -C "${LINUX_DIR}" ${KERNEL_MAKE_OPTS} DEPMOD=true \
INSTALL_MOD_PATH=$(LINUX_BUILD_DIR)/modules \
LOCALVERSION="" \
modules_install $(MAKE_TRACE)