Date: Wed, 23 Sep 2015 18:04:31 +0200 From: Arrigo Marchiori <ardovm@yahoo.it> To: FreeBSD Embedded list <freebsd-embedded@freebsd.org> Subject: [NanoBSD] Double copy when using swap as backing? Message-ID: <20150923160431.GB37383@nuvolo>
index | next in thread | raw e-mail
Hello list,
I was looking at the nanobsd.sh script from 10-STABLE and I found
something that I could not understand.
In function create_diskimage(), lines 639-650 result in two
invocations of dd:
1- if NANO_IMAGE_MBRONLY is `yes':
dd if=/dev/${MD} of=${NANO_DISKIMGDIR}/_.disk.mbr bs=512 count=1
dd conv=sparse if=/dev/${MD} of=${IMG} bs=64k
2- otherwise:
dd if=/dev/${MD} of=${IMG} bs=64k
dd conv=sparse if=/dev/${MD} of=${IMG} bs=64k
Case 2 looks a duplicate to me; the first dd could be avoided. Or did
I miss anything?
I don't use swap-backed md's therefore I cannot experiment with that
part. I just wonder if it may help someone by speeding their builds
up.
Best regards,
--
rigo
http://rigo.altervista.org
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150923160431.GB37383>
