add support for makeoptions MFS_IMAGE="<file>" in the config file which

will automaticly populate the kernel w/ the mfs image...
This commit is contained in:
John-Mark Gurney 2006-05-12 02:45:12 +00:00
parent 26ab616fdc
commit c53113c8bc

View File

@ -68,6 +68,15 @@ ${KERNEL_KO}: ${FULLKERNEL} ${KERNEL_KO}.symbols
${FULLKERNEL} ${.TARGET}
${KERNEL_KO}.symbols: ${FULLKERNEL}
${OBJCOPY} --only-keep-debug ${FULLKERNEL} ${.TARGET}
.if defined(MFS_IMAGE)
@dd if="${MFS_IMAGE}" ibs=8192 of="${KERNEL_KO}" \
obs=`strings -at d "${KERNEL_KO}" | \
grep "MFS Filesystem goes here" | awk '{print $$1}'` \
oseek=1 conv=notrunc 2>/dev/null && \
strings ${KERNEL_KO} | \
grep 'MFS Filesystem had better STOP here' > /dev/null || \
(rm ${KERNEL_KO} && echo 'MFS image too large' && false)
.endif
install.debug reinstall.debug: gdbinit
cd ${.CURDIR}; ${MAKE} ${.TARGET:R}