Home | History | Annotate | Line # | Download | only in conf
Makefile.evbarm.inc revision 1.23
      1 #	$NetBSD: Makefile.evbarm.inc,v 1.23 2013/03/19 22:16:54 garbled 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 .if ${KERNEL_BUILD:T:MRPI_INSTALL} != ""
      8 RAMDISKDIR!=	cd ${NETBSDSRCDIR}/distrib/${THISARM:T}/instkernel/sshramdisk && ${PRINTOBJDIR}
      9 
     10 .if exists(${RAMDISKDIR}/sshramdisk.fs)
     11 SYSTEM_LD_TAIL_EXTRA+=; \
     12 	echo ${TOOL_MDSETIMAGE} -s $@ ${RAMDISKDIR}/sshramdisk.fs; \
     13 	${TOOL_MDSETIMAGE} -s $@ ${RAMDISKDIR}/sshramdisk.fs
     14 .endif
     15 .elif ${KERNEL_BUILD:T:M*INSTALL} != ""
     16 RAMDISKDIR!=	cd ${NETBSDSRCDIR}/distrib/${THISARM:T}/instkernel/ramdisk && ${PRINTOBJDIR}
     17 
     18 .if exists(${RAMDISKDIR}/ramdisk.fs)
     19 SYSTEM_LD_TAIL_EXTRA+=; \
     20 	echo ${TOOL_MDSETIMAGE} -s $@ ${RAMDISKDIR}/ramdisk.fs; \
     21 	${TOOL_MDSETIMAGE} -s $@ ${RAMDISKDIR}/ramdisk.fs
     22 .endif
     23 .endif
     24 
     25 .if defined(BOARDMKFRAG)	# Must be a full pathname.
     26 .include "${BOARDMKFRAG}"
     27 .endif
     28 
     29 EXTRA_CLEAN+= ldscript tmp ${KERNELS:=.map}
     30 
     31 .if defined(KERNEL_BASE_PHYS)
     32 
     33 LINKFLAGS=	-T ldscript
     34 
     35 netbsd: ldscript             # XXX
     36 
     37 # generate ldscript from common template
     38 ldscript: ${THISARM}/conf/ldscript.evbarm ${THISARM}/conf/Makefile.evbarm.inc Makefile ${BOARDMKFRAG}
     39 	echo ${KERNELS}
     40 	${TOOL_SED} -e 's/@KERNEL_BASE_PHYS@/${KERNEL_BASE_PHYS}/' \
     41 	    -e 's/@KERNEL_BASE_VIRT@/${KERNEL_BASE_VIRT}/' \
     42 	    ${THISARM}/conf/ldscript.evbarm > tmp && mv tmp $@
     43 
     44 .endif	# KERNEL_BASE_PHYS
     45