1# $NetBSD: Makefile.ramdisk,v 1.16 2024/03/20 13:51:35 riastradh Exp $ 2 3NOSANITIZER= # defined 4 5.include <bsd.own.mk> 6.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" 7 8I386COMMON= ${.CURDIR}/../common 9 10.PATH: ${I386COMMON} 11 12WARNS= 1 13DBG= -Os 14 15CRUNCHBIN= ramdiskbin 16 17# Use ${.CURDIR}/list only if LISTS was not already defined by the caller. 18LISTS?= ${.CURDIR}/list 19LISTS+= ${I386COMMON}/list.ramdisk 20MTREECONF= ${DISTRIBDIR}/common/mtree.common 21IMAGEENDIAN= le 22IMAGEDEPENDS+= ${CRUNCHBIN} \ 23 dot.profile \ 24 ${DESTDIR}/usr/mdec/boot \ 25 ${DESTDIR}/usr/mdec/bootxx_ffsv1 \ 26 ${DESTDIR}/usr/mdec/mbr \ 27 ${DESTDIR}/usr/mdec/mbr_ext \ 28 ${DESTDIR}/usr/mdec/mbr_bootsel \ 29 ${DESTDIR}/usr/mdec/gptmbr.bin \ 30 ${NETBSDSRCDIR}/etc/group ${NETBSDSRCDIR}/etc/master.passwd \ 31 ${NETBSDSRCDIR}/etc/netconfig ${DISTRIBDIR}/common/protocols \ 32 ${DISTRIBDIR}/common/services 33PARSELISTENV+= BOOTMODEL=${BOOTMODEL:Q} 34 35# This propagates through to the link of ramdiskbin 36# The map file is useful when trying to prune the image 37LDFLAGS+= -Wl,-Map,${CRUNCHBIN}.map,--cref 38CRUNCHENV+= LDFLAGS=${LDFLAGS:Q} 39CLEANFILES+= ${CRUNCHBIN}.map 40 41.if defined(USE_SYSINST) 42.if ${USE_SYSINST} != yes 43LISTS+= ${DISTRIBDIR}/common/list.sysinst.${USE_SYSINST} 44.else 45LISTS+= ${DISTRIBDIR}/common/list.sysinst 46.endif 47MAKEFS_FLAGS+= -f 14 48.endif 49 50# Use stubs to eliminate some large stuff from libc 51HACKSRC= ${DISTRIBDIR}/utils/libhack 52.include "${HACKSRC}/Makefile.inc" 53${CRUNCHBIN}: libhack.o 54 55.include "${DISTRIBDIR}/common/Makefile.crunch" 56.include "${DISTRIBDIR}/common/Makefile.makedev" 57.include "${DISTRIBDIR}/common/Makefile.image" 58 59release: ${IMAGE} 60 ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${IMAGE} \ 61 ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/ramdisk/ 62 63.include <bsd.prog.mk> 64