Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc/etc.sgimips Better size estimation (the previous code co...
details: https://anonhg.NetBSD.org/src/rev/8261ff42989e
branches: trunk
changeset: 584866:8261ff42989e
user: martin <martin%NetBSD.org@localhost>
date: Tue Oct 04 16:11:15 2005 +0000
description:
Better size estimation (the previous code counted the compressed kernels,
but we only need the constant size volume header)
diffstat:
etc/etc.sgimips/Makefile.inc | 26 ++++++++++++--------------
1 files changed, 12 insertions(+), 14 deletions(-)
diffs (42 lines):
diff -r 0c3a99ed6505 -r 8261ff42989e etc/etc.sgimips/Makefile.inc
--- a/etc/etc.sgimips/Makefile.inc Tue Oct 04 14:47:50 2005 +0000
+++ b/etc/etc.sgimips/Makefile.inc Tue Oct 04 16:11:15 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.13 2005/05/10 21:58:03 martin Exp $
+# $NetBSD: Makefile.inc,v 1.14 2005/10/04 16:11:15 martin Exp $
#
# etc.sgimips/Makefile.inc -- sgimips-specific etc Makefile targets
#
@@ -22,21 +22,19 @@
SGI.image= ${RELEASEDIR}/${MACHINE}/installation/cdrom/netbsd-sgimips.img
iso-image-md-post:
- EST=`ls -l ${CDROM.image} ${DESTDIR}/usr/mdec/aoutboot \
- ${DESTDIR}/usr/mdec/ip2xboot ${DESTDIR}/usr/mdec/ip3xboot \
- | awk '{ s += $$5} END { print int(s/1024/1024/32+1)*32 }'` ; \
- echo "Estimated image size: $${EST} MB"; \
- dd if=/dev/zero of=${SGI.image} bs=1024k count=$${EST}
- ${TOOLDIR}/bin/nbsgivol -f -i ${SGI.image}
+ @SEEK=`awk '/SGI_BOOT_BLOCK_SIZE_VOLHDR/{print $$3}' \
+ ${DESTDIR}/usr/include/sys/bootblock.h` ; \
+ EST=`ls -l ${CDROM.image} \
+ | awk '{ s += $$5} END { print int(('$${SEEK}'*512+s)/1024/1024/32+1)*32 }'` ; \
+ echo "Estimated image size: $${EST} MB"; \
+ dd if=/dev/zero of=${SGI.image} bs=1024k count=$${EST}; \
+ ${TOOLDIR}/bin/nbsgivol -f -i ${SGI.image}; \
${TOOLDIR}/bin/nbsgivol -f -w aoutboot ${DESTDIR}/usr/mdec/aoutboot \
- ${SGI.image}
+ ${SGI.image}; \
${TOOLDIR}/bin/nbsgivol -f -w ip2xboot ${DESTDIR}/usr/mdec/ip2xboot \
- ${SGI.image}
+ ${SGI.image}; \
${TOOLDIR}/bin/nbsgivol -f -w ip3xboot ${DESTDIR}/usr/mdec/ip3xboot \
- ${SGI.image}
-# Don't hardcode this. Pick it up from bootblock.h
- SEEK=`awk '/SGI_BOOT_BLOCK_SIZE_VOLHDR/{print $$3}' \
- ${DESTDIR}/usr/include/sys/bootblock.h` ; \
- dd if=${CDROM.image} of=${SGI.image} bs=512 seek=$${SEEK}
+ ${SGI.image}; \
+ dd if=${CDROM.image} of=${SGI.image} bs=512 seek=$${SEEK}
mv ${SGI.image} ${CDROM.image}
rm -f ${RELEASEDIR}/ip2x ${RELEASEDIR}/ip3x
Home |
Main Index |
Thread Index |
Old Index