Added new build tool create_image which is now used to create and/or clear a

raw image. This fixes the problem that an existing image couldn't be resized.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30133 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2009-04-12 09:18:18 +00:00
parent 25b3d00ba8
commit 526d707eb6
4 changed files with 159 additions and 10 deletions
+8 -10
View File
@@ -116,17 +116,15 @@ if [ $isImage ]; then
if [ ! $updateOnly ]; then
echo "Creating image ..."
ddFlags=
imageFlags="-i${imageSize}M"
if [ ! "$dontClearImage" ]; then
imageFlags="$imageFlags -c"
fi
if [ $isVMwareImage ]; then
vmdkImageFlags=
if [ ! "$dontClearImage" ]; then
vmdkImageFlags="-c"
fi
$vmdkimage -h 64k -i${imageSize}M $vmdkImageFlags "$imagePath" \
|| exit 1
elif [ ! -e "$imagePath" -o ! "$dontClearImage" ]; then
dd if=/dev/zero of="$imagePath" bs=1048576 count=$imageSize \
|| exit 1
$vmdkimage -h 64k $imageFlags "$imagePath" || exit 1
else
$createImage $imageFlags "$imagePath" || exit 1
fi
$bfsShell --initialize $imageOffsetFlags "$imagePath" \