Home | History | Annotate | Line # | Download | only in conf
Makefile.evbarm.inc revision 1.27
      1 #	$NetBSD: Makefile.evbarm.inc,v 1.27 2013/08/09 04:24:19 matt 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 EXTRA_CLEAN+= ldscript tmp ${KERNELS:=.map}
     24 
     25 .if defined(KERNEL_BASE_PHYS)
     26 LINKTEXT=
     27 KERNLDSCRIPT=	ldscript
     28 EXTRA_LINKFLAGS+=	-T ldscript
     29 
     30 # generate ldscript from common template
     31 ldscript: ${THISARM}/conf/ldscript.evbarm ${THISARM}/conf/Makefile.evbarm.inc Makefile ${BOARDMKFRAG}
     32 	echo ${KERNELS}
     33 	${TOOL_SED} -e 's/@KERNEL_BASE_PHYS@/${KERNEL_BASE_PHYS}/' \
     34 	    -e 's/@KERNEL_BASE_VIRT@/${KERNEL_BASE_VIRT}/' \
     35 	    ${THISARM}/conf/ldscript.evbarm > tmp && mv tmp $@
     36 
     37 .else
     38 LINKTEXT=	-Ttext ${LOADADDRESS}
     39 .endif	# KERNEL_BASE_PHYS
     40