MFS_IMAGE with a DEBUG kernel
Neelkanth Natu
neelnatu at yahoo.com
Tue Dec 12 15:41:13 PST 2006
Hi,
Trying to stuff in an MFS_IMAGE into a debug kernel does not work in -current. kern.post.mk tries
to put the MFS_IMAGE in ${KERNEL_KO} when building ${FULLKERNEL} - but ${KERNEL_KO} has not been
created at that point.
The error message I get is:
linking kernel.debug
text data bss dec hex filename
3540430 4532668 149800 8222898 7d78b2 kernel.debug
strings: 'kernel': No such file
rm: kernel: No such file or directory
*** Error code 1
The following patch against version 1.98 of kern.post.mk fixes the problem:
--- kern.post.mk.orig Tue Dec 12 13:55:38 2006
+++ kern.post.mk Tue Dec 12 15:28:15 2006
@@ -91,13 +91,13 @@
.endif
${SYSTEM_LD_TAIL}
.if defined(MFS_IMAGE)
- @dd if="${MFS_IMAGE}" ibs=8192 of="${KERNEL_KO}" \
- obs=`strings -at d "${KERNEL_KO}" | \
+ @dd if="${MFS_IMAGE}" ibs=8192 of="${FULLKERNEL}" \
+ obs=`strings -at d "${FULLKERNEL}" | \
grep "MFS Filesystem goes here" | awk '{print $$1}'` \
oseek=1 conv=notrunc 2>/dev/null && \
- strings ${KERNEL_KO} | \
+ strings ${FULLKERNEL} | \
grep 'MFS Filesystem had better STOP here' > /dev/null || \
- (rm ${KERNEL_KO} && echo 'MFS image too large' && false)
+ (rm ${FULLKERNEL} && echo 'MFS image too large' && false)
.endif
.if !exists(${.OBJDIR}/.depend)
best
Neel
____________________________________________________________________________________
Need a quick answer? Get one in minutes from people who know.
Ask your question on www.Answers.yahoo.com
More information about the freebsd-hackers
mailing list