Module Name: src
Committed By: matt
Date: Fri Apr 11 02:36:43 UTC 2014
Modified Files:
src/sys/arch/evbarm/conf: Makefile.evbarm.inc
Log Message:
Supply CPP define KERNEL_BASE_VOFFSET which is the physical to virtual
offset of the kernel.
To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/evbarm/conf/Makefile.evbarm.inc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/evbarm/conf/Makefile.evbarm.inc
diff -u src/sys/arch/evbarm/conf/Makefile.evbarm.inc:1.29 src/sys/arch/evbarm/conf/Makefile.evbarm.inc:1.30
--- src/sys/arch/evbarm/conf/Makefile.evbarm.inc:1.29 Sat Mar 29 14:04:31 2014
+++ src/sys/arch/evbarm/conf/Makefile.evbarm.inc Fri Apr 11 02:36:43 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.evbarm.inc,v 1.29 2014/03/29 14:04:31 matt Exp $
+# $NetBSD: Makefile.evbarm.inc,v 1.30 2014/04/11 02:36:43 matt Exp $
#
# If this is a install kernel and the ramdisk image exists in the object
@@ -20,9 +20,12 @@ SYSTEM_LD_TAIL_EXTRA+=; \
.include "${BOARDMKFRAG}"
.endif
-.if defined(KERNEL_BASE_PHYS) && defined(KERNEL_BASE_VIRT) \
- && ${KERNEL_BASE_PHYS} == ${KERNEL_BASE_VIRT}
-CPPFLAGS+=-DKERNEL_BASES_EQUAL
+.if defined(KERNEL_BASE_PHYS) && defined(KERNEL_BASE_VIRT)
+. if ${KERNEL_BASE_PHYS} == ${KERNEL_BASE_VIRT}
+CPPFLAGS+=-DKERNEL_BASES_EQUAL -DKERNEL_BASE_VOFFSET=0
+. else
+CPPFLAGS+=-DKERNEL_BASE_VOFFSET="(${KERNEL_BASE_VIRT}-${KERNEL_BASE_PHYS})"
+. endif
.endif
EXTRA_CLEAN+= ldscript tmp ${KERNELS:=.map}