From: Stefano Stabellini Date: Wed, 8 Nov 2017 01:40:11 +0000 (-0800) Subject: Improve image build X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=59a09bf96ad268f78d2dddf60e27a24e45ce9418;p=people%2Fsstabellini%2Fmojo.git%2F.git Improve image build Signed-off-by: Stefano Stabellini --- diff --git a/build.sh b/build.sh index ca15cb6..abe6ba4 100644 --- a/build.sh +++ b/build.sh @@ -45,15 +45,17 @@ fi if ! test -f image then # 1GB image: make this customizable + allocate_disk image $((1024*1024*1024)) dd if=/dev/zero of=image count=262144 bs=4096 - losetup /dev/loop0 ./image - mkfs.ext3 /dev/loop0 - mount /dev/loop0 /mnt + loop=`create_loop image` + loop_p0=`create_one_partition image` + mkfs.ext3 $loop_p0 + mount $loop_p0 /mnt cd /mnt tar xvf $HOME_DIR/"$DOM0_LABEL".tar cd $HOME_DIR umount /mnt - losetup -d /dev/loop0 + losetup -d $loop_p0 $loop fi