From c53113c8bc03b0ef2bd02a7e73d1092cb67f5fd2 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Fri, 12 May 2006 02:45:12 +0000 Subject: [PATCH] add support for makeoptions MFS_IMAGE="" in the config file which will automaticly populate the kernel w/ the mfs image... --- sys/conf/kern.post.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index 94132b5b515f..3acd43f539e3 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -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}