From owner-svn-src-head@FreeBSD.ORG Thu Jun 18 11:35:30 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 177511065670; Thu, 18 Jun 2009 11:35:30 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF95E8FC08; Thu, 18 Jun 2009 11:35:29 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5IBZTOn010335; Thu, 18 Jun 2009 11:35:29 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5IBZT5N010333; Thu, 18 Jun 2009 11:35:29 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200906181135.n5IBZT5N010333@svn.freebsd.org> From: Nick Hibma Date: Thu, 18 Jun 2009 11:35:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194437 - head/tools/tools/nanobsd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 11:35:30 -0000 Author: n_hibma Date: Thu Jun 18 11:35:29 2009 New Revision: 194437 URL: http://svn.freebsd.org/changeset/base/194437 Log: Reverse some stuff I accidentally committed in the previous commit: - creation of sparse files to speed up the build process. This was discussed with phk 2 years ago and he disagreed with this change. - handling of negative data partition sizes. Can I have the ... green pointy hat, please? Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Thu Jun 18 11:17:12 2009 (r194436) +++ head/tools/tools/nanobsd/nanobsd.sh Thu Jun 18 11:35:29 2009 (r194437) @@ -434,7 +434,7 @@ create_i386_diskimage ( ) ( else echo "Creating md backing file..." dd if=/dev/zero of=${IMG} bs=${NANO_SECTS}b \ - seek=`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}` count=0 + count=`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}` MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ -y ${NANO_HEADS}` fi @@ -451,7 +451,7 @@ create_i386_diskimage ( ) ( # Create first image newfs ${NANO_NEWFS} /dev/${MD}s1a - mount -o async /dev/${MD}s1a ${MNT} + mount /dev/${MD}s1a ${MNT} df -i ${MNT} echo "Copying worlddir..." ( cd ${NANO_WORLDDIR} && find . -print | cpio -dump ${MNT} ) @@ -464,7 +464,7 @@ create_i386_diskimage ( ) ( if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then # Duplicate to second image (if present) echo "Duplicating to second image..." - dd conv=sparse if=/dev/${MD}s1 of=/dev/${MD}s2 bs=64k + dd if=/dev/${MD}s1 of=/dev/${MD}s2 bs=64k mount /dev/${MD}s2a ${MNT} for f in ${MNT}/etc/fstab ${MNT}/conf/base/etc/fstab do @@ -478,7 +478,7 @@ create_i386_diskimage ( ) ( # XXX: fill from where ? # Create Data slice, if any. - if [ $NANO_DATASIZE -gt 0 ] ; then + if [ $NANO_DATASIZE -ne 0 ] ; then newfs ${NANO_NEWFS} /dev/${MD}s4 # XXX: fill from where ? fi @@ -489,7 +489,7 @@ create_i386_diskimage ( ) ( fi echo "Writing out _.disk.image..." - dd conv=sparse if=/dev/${MD}s1 of=${NANO_DISKIMGDIR}/_.disk.image bs=64k + dd if=/dev/${MD}s1 of=${NANO_DISKIMGDIR}/_.disk.image bs=64k mdconfig -d -u $MD ) > ${NANO_OBJ}/_.di 2>&1 )