[Zrouter-src] ZRouter.org: push to ZRouter Makefile
zrouter-src at zrouter.org
zrouter-src at zrouter.org
Thu Oct 2 12:55:51 UTC 2014
details: http://zrouter.org/hg/zrouter//rev/d9aa67fbc607
changeset: 511:d9aa67fbc607
user: Aleksandr Rybalko <ray at ddteam.net>
date: Thu Oct 02 15:54:27 2014 +0300
description:
Specify where to find FreeBSD kernel config, instead of patching FreeBSD tree.
Suggested by: loos
diffstat:
Makefile | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diffs (61 lines):
diff -r d6809f73abeb -r d9aa67fbc607 Makefile
--- a/Makefile Thu Oct 02 15:46:50 2014 +0300
+++ b/Makefile Thu Oct 02 15:54:27 2014 +0300
@@ -182,6 +182,8 @@
# Generate kernel config file
KERNEL_HINTS_FILE?=${KERNELCONFDIR}/${TARGET_VENDOR}_${TARGET_DEVICE}.hints
KERNEL_CONFIG_FILE?=${KERNELCONFDIR}/${TARGET_VENDOR}_${TARGET_DEVICE}
+KERNEL_CONFIG_FILENAME=${TARGET_VENDOR}_${TARGET_DEVICE}
+KERNCONFDIR=${KERNELCONFDIR}
kernelconfig: ${TARGET_SOCDIR}/${SOC_KERNCONF} ${KERNELCONFDIR}
echo "# Kernel config for ${SOC_CHIP} on ${TARGET_VENDOR} ${TARGET_DEVICE} board" > ${KERNEL_CONFIG_FILE}
@@ -232,7 +234,6 @@
.for hint in ${KERNEL_HINTS}
echo "${hint}" >> ${KERNEL_HINTS_FILE}
.endfor
-
# TODO: make dtd file for FDT
#
@@ -251,6 +252,7 @@
TARGET_CPUARCH=${TARGET_CPUARCH} \
ZROUTER_ROOT=${ZROUTER_ROOT} \
WITHOUT_RESCUE=yes \
+ KERNCONFDIR=${KERNCONFDIR} \
${CLANG_VARS} \
-DNO_CLEAN
@@ -266,9 +268,9 @@
kernel-build: kernelconfig kernelhints ${ZROUTER_FREEBSD_OBJDIR}/tmp/usr/bin/cc
.if defined(WITH_KERNFAST)
- MAKEOBJDIRPREFIX=${ZROUTER_OBJ}/tmp/ ${MAKE} ${_KERNEL_BUILD_ENV} -C ${FREEBSD_SRC_TREE} KERNFAST=${KERNEL_CONFIG_FILE} buildkernel
+ MAKEOBJDIRPREFIX=${ZROUTER_OBJ}/tmp/ ${MAKE} ${_KERNEL_BUILD_ENV} -C ${FREEBSD_SRC_TREE} KERNFAST=${KERNEL_CONFIG_FILENAME} buildkernel
.else
- MAKEOBJDIRPREFIX=${ZROUTER_OBJ}/tmp/ ${MAKE} ${_KERNEL_BUILD_ENV} -C ${FREEBSD_SRC_TREE} KERNCONF=${KERNEL_CONFIG_FILE} buildkernel
+ MAKEOBJDIRPREFIX=${ZROUTER_OBJ}/tmp/ ${MAKE} ${_KERNEL_BUILD_ENV} -C ${FREEBSD_SRC_TREE} KERNCONF=${KERNEL_CONFIG_FILENAME} buildkernel
.endif
#XXX_BEGIN Only for testing
@@ -613,16 +615,16 @@
${ROOTFS_DEPTEST}: world ports
@echo "++++++++++++++ Making $@ ++++++++++++++"
-${ZROUTER_FREEBSD_OBJDIR}/sys/${KERNEL_CONFIG_FILE}/kernel: kernel-build
+${ZROUTER_FREEBSD_OBJDIR}/sys/${KERNEL_CONFIG_FILENAME}/kernel: kernel-build
@echo "++++++++++++++ Making $@ ++++++++++++++"
- echo "XXXXXXXXXXXXX ${ZROUTER_FREEBSD_OBJDIR}/sys/${KERNEL_CONFIG_FILE}/kernel"
+ echo "XXXXXXXXXXXXX ${ZROUTER_FREEBSD_OBJDIR}/sys/${KERNEL_CONFIG_FILENAME}/kernel"
kernel-install: ${KERNELDESTDIR}/boot/kernel/kernel
-${KERNELDESTDIR}/boot/kernel/kernel: ${ZROUTER_FREEBSD_OBJDIR}/sys/${KERNEL_CONFIG_FILE}/kernel kernel-install-dir
+${KERNELDESTDIR}/boot/kernel/kernel: ${ZROUTER_FREEBSD_OBJDIR}/sys/${KERNEL_CONFIG_FILENAME}/kernel kernel-install-dir
@echo "++++++++++++++ Making $@ ++++++++++++++"
.if !empty(KERNELDESTDIR)
- MAKEOBJDIRPREFIX=${ZROUTER_OBJ}/tmp/ ${MAKE} ${_KERNEL_BUILD_ENV} -C ${FREEBSD_SRC_TREE} DESTDIR=${KERNELDESTDIR} KERNCONF=${KERNEL_CONFIG_FILE} installkernel
+ MAKEOBJDIRPREFIX=${ZROUTER_OBJ}/tmp/ ${MAKE} ${_KERNEL_BUILD_ENV} -C ${FREEBSD_SRC_TREE} DESTDIR=${KERNELDESTDIR} KERNCONF=${KERNEL_CONFIG_FILENAME} installkernel
.else
.error "KERNELDESTDIR must be set for kernel-install, since we always do cross-build"
.endif
More information about the Zrouter-src
mailing list