diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-03-16 08:36:00 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-03-16 08:36:00 +0100 |
commit | 59d0295c6db8f9105e08cd2fb013b5fa1a2df382 (patch) | |
tree | 5876be2264a332d141bb250d087ab0e9a709c819 /mk | |
parent | 2ecd16cdc29599a1b4d62ee0b0aa4c88aa146de4 (diff) | |
parent | 763690735d55dd834da3cc35802aabc79d4b04ae (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'mk')
-rw-r--r-- | mk/kernel-build.mk | 11 | ||||
-rw-r--r-- | mk/kernel-vars.mk | 31 |
2 files changed, 14 insertions, 28 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) diff --git a/mk/kernel-vars.mk b/mk/kernel-vars.mk index 3285e891d..7d8de54e3 100644 --- a/mk/kernel-vars.mk +++ b/mk/kernel-vars.mk @@ -1,27 +1,18 @@ # This file is part of the OpenADK project. OpenADK is copyrighted # material, please see the LICENCE file in the top-level directory. -KERNEL_MAKE_OPTS:= -C "${LINUX_DIR}" V=1 \ - CROSS_COMPILE="$(TARGET_CROSS)" ARCH=$(ARCH) \ - CC="$(TARGET_CC)" HOSTCC="${CC_FOR_BUILD}" \ - HOSTCFLAGS='${CFLAGS_FOR_BUILD}' \ +KERNEL_MAKE_OPTS:= V=1 \ + ARCH=$(ARCH) \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + CC="$(TARGET_CC)" \ + HOSTCC="${CC_FOR_BUILD}" \ CONFIG_SHELL='${SHELL}' -ifeq (${ADK_TARGET_BROADCOM_MODEL_LINKSYS_WRT54G},y) -ADK_KCPPFLAGS+= -DBCM47XX_OVERRIDE_FLASHSIZE=0x400000 \ - -DBCM47XX_OVERRIDE_NVRAMSIZE=0x10000 \ - -DBCM47XX_OVERRIDE_CFESIZE=0x40000 -endif -ifeq (${ADK_TARGET_BROADCOM_MODEL_LINKSYS_WRT54GS},y) -ADK_KCPPFLAGS+= -DBCM47XX_OVERRIDE_FLASHSIZE=0x800000 \ - -DBCM47XX_OVERRIDE_NVRAMSIZE=0x20000 \ - -DBCM47XX_OVERRIDE_CFESIZE=0x40000 -endif -ifeq (${ADK_TARGET_BROADCOM_MODEL_ASUS_WL500GP},y) -ADK_KCPPFLAGS+= -DBCM47XX_OVERRIDE_FLASHSIZE=0x800000 \ - -DBCM47XX_OVERRIDE_NVRAMSIZE=0x20000 \ - -DBCM47XX_OVERRIDE_CFESIZE=0x40000 +# regex for relocs needs pcre on Darwin +ifeq ($(ADK_HOST_DARWIN),y) +KERNEL_MAKE_OPTS+= HOSTCFLAGS='$(CPPFLAGS_FOR_BUILD) ${CFLAGS_FOR_BUILD}' HOSTLDFLAGS='-lpcreposix' +else +KERNEL_MAKE_OPTS+= HOSTCFLAGS='${CFLAGS_FOR_BUILD}' endif -KERNEL_MAKE_ENV+= KCPPFLAGS='${ADK_KCPPFLAGS}' \ - PATH="${STAGING_HOST_DIR}/usr/bin:$$PATH" +KERNEL_MAKE_ENV+= PATH="${STAGING_HOST_DIR}/usr/bin:$$PATH" |