diff options
author | jmg <jmg@FreeBSD.org> | 2006-05-12 02:45:12 +0000 |
---|---|---|
committer | jmg <jmg@FreeBSD.org> | 2006-05-12 02:45:12 +0000 |
commit | 5a10f36ae8a609f966224fc76ad520dc88848805 (patch) | |
tree | 44519e675da46a45b6363157ed3bb24f73466f9f /sys/conf/kern.post.mk | |
parent | ed056cb6c7f4ae79404c66f2dd822e4687301e86 (diff) | |
download | FreeBSD-src-5a10f36ae8a609f966224fc76ad520dc88848805.zip FreeBSD-src-5a10f36ae8a609f966224fc76ad520dc88848805.tar.gz |
add support for makeoptions MFS_IMAGE="<file>" in the config file which
will automaticly populate the kernel w/ the mfs image...
Diffstat (limited to 'sys/conf/kern.post.mk')
-rw-r--r-- | sys/conf/kern.post.mk | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index 94132b5..3acd43f 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} |