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, 9 insertions, 2 deletions
diff --git a/mk/kernel-build.mk b/mk/kernel-build.mk
index 8ee6d1ac3..68fe897a3 100644
--- a/mk/kernel-build.mk
+++ b/mk/kernel-build.mk
@@ -9,6 +9,12 @@ $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNE
$(TRACE) target/$(ADK_TARGET)-kernel-patch
$(PATCH) $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_VERSION) ../linux/patches/$(KERNEL_VERSION) *.patch $(MAKE_TRACE)
$(PATCH) $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_VERSION) ../$(ADK_TARGET)/patches *.patch $(MAKE_TRACE)
+ifeq ($(ADK_NATIVE),y)
+ if [ -f /etc/adktarget ];then \
+ target=$$(cat /etc/adktarget); \
+ $(PATCH) $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_VERSION) ../$$target/patches *.patch $(MAKE_TRACE); \
+ fi
+endif
touch $@
$(LINUX_DIR)/.prepared: $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_VERSION)/.patched
@@ -17,7 +23,7 @@ $(LINUX_DIR)/.prepared: $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PK
mkdir -p $(LINUX_BUILD_DIR)/kmod-control
touch $@
-$(LINUX_DIR)/.config: $(LINUX_DIR)/.prepared $(BUILD_DIR)/.kernelconfig
+$(LINUX_DIR)/.config: $(LINUX_DIR)/.prepared $(BUILD_DIR)/.kernelconfig $(TOPDIR)/mk/modules.mk
$(TRACE) target/$(ADK_TARGET)-kernel-configure
for f in $(TARGETS);do if [ -f $$f ];then rm $$f;fi;done $(MAKE_TRACE)
$(CP) $(BUILD_DIR)/.kernelconfig $(LINUX_DIR)/.config
@@ -27,11 +33,12 @@ $(LINUX_DIR)/.config: $(LINUX_DIR)/.prepared $(BUILD_DIR)/.kernelconfig
$(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.config
$(TRACE) target/$(ADK_TARGET)-kernel-compile
- $(MAKE) ${KERNEL_MAKE_OPTS} -j${ADK_MAKE_JOBS} $(MAKE_TRACE)
+ $(MAKE) LOCALVERSION="" ${KERNEL_MAKE_OPTS} -j${ADK_MAKE_JOBS} $(MAKE_TRACE)
$(TRACE) target/$(ADK_TARGET)-kernel-modules-install
rm -rf $(LINUX_BUILD_DIR)/modules
$(MAKE) ${KERNEL_MAKE_OPTS} DEPMOD=true \
INSTALL_MOD_PATH=$(LINUX_BUILD_DIR)/modules \
+ LOCALVERSION="" \
modules_install $(MAKE_TRACE)
$(TRACE) target/$(ADK_TARGET)-create-packages
ifneq ($(strip $(TARGETS)),)