Makefile.evbarm.inc revision 1.33       1 #	$NetBSD: Makefile.evbarm.inc,v 1.33 2015/08/24 14:04:24 uebayasi Exp $
      2 
      3 #
      4 # If this is a install kernel and the ramdisk image exists in the object
      5 # tree, insert it into the kernel *before* we make the u-boot images.
      6 #
      7 RAMDISKNAME?=	ramdisk
      8 .if ${KERNEL_BUILD:T:M*INSTALL*} != ""
      9 RAMDISKDIR!=	cd ${NETBSDSRCDIR}/distrib/${THISARM:T}/instkernel/${RAMDISKNAME} && ${PRINTOBJDIR}
     10 
     11 .if exists(${RAMDISKDIR}/${RAMDISKNAME}.fs)
     12 SYSTEM_DEP+=	${RAMDISKDIR}/${RAMDISKNAME}.fs
     13 SYSTEM_LD_TAIL_EXTRA+=; \
     14 	echo ${TOOL_MDSETIMAGE} -s $@ ${RAMDISKDIR}/${RAMDISKNAME}.fs; \
     15 	${TOOL_MDSETIMAGE} -s $@ ${RAMDISKDIR}/${RAMDISKNAME}.fs
     16 .endif
     17 .endif
     18 
     19 .if defined(BOARDMKFRAG)	# Must be a full pathname.
     20 .include "${BOARDMKFRAG}"
     21 .endif
     22 
     23 .if defined(KERNEL_BASE_PHYS) && defined(KERNEL_BASE_VIRT)
     24 . if ${KERNEL_BASE_PHYS} == ${KERNEL_BASE_VIRT}
     25 CPPFLAGS+=-DKERNEL_BASES_EQUAL -DKERNEL_BASE_VOFFSET=0
     26 . else
     27 CPPFLAGS+=-DKERNEL_BASE_VOFFSET="(${KERNEL_BASE_VIRT}-${KERNEL_BASE_PHYS})"
     28 . endif
     29 .endif
     30 
     31 EXTRA_CLEAN+=	${KERNELS:=.map}
     32 
     33 .if defined(KERNEL_BASE_PHYS)
     34 LINKTEXT=
     35 KERNLDSCRIPT=	ldscript
     36 
     37 EXTRA_CLEAN+=	${KERNLDSCRIPT} tmp
     38 
     39 # generate ldscript from common template
     40 ${KERNLDSCRIPT}: \
     41     ${THISARM}/conf/ldscript.evbarm \
     42     ${THISARM}/conf/Makefile.evbarm.inc \
     43     Makefile \
     44     ${BOARDMKFRAG}
     45 	echo ${KERNELS}
     46 	${TOOL_SED} -e 's/@KERNEL_BASE_PHYS@/${KERNEL_BASE_PHYS}/' \
     47 	    -e 's/@KERNEL_BASE_VIRT@/${KERNEL_BASE_VIRT}/' \
     48 	    ${THISARM}/conf/ldscript.evbarm > tmp && mv tmp $@
     49 
     50 .else
     51 LINKTEXT=	-Ttext ${LOADADDRESS}
     52 .endif	# KERNEL_BASE_PHYS
     53