axeld + bonefish:

Changed the way the VMware image is built. Instead of creating a normal
image first and then adding vmdk header and that image, we create the
VMware image in one go, now. Therefore "jam update-vmware-image ..."
does now actually update the VMware image directly, instead of updating
the normal image and recreating the VMware image.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23972 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-02-17 13:54:32 +00:00
parent a17d1cf43e
commit 2fcb695c2b
3 changed files with 39 additions and 19 deletions
+22 -5
View File
@@ -12,6 +12,7 @@
# sourceDirsToCopy
# updateOnly
# dontClearImage
# isVMwareImage
#
# bfsShell
# copyattr
@@ -20,6 +21,7 @@
# resattr
# rc
# unzip
# vmdkheader
#
if [ $# -gt 0 ]; then
. $1
@@ -93,15 +95,30 @@ unzipFile()
# create the image and mount it
if [ $isImage ]; then
echo
imageOffsetFlags=
if [ $isVMwareImage ]; then
imageOffsetFlags="--start-offset 65536"
fi
if [ ! $updateOnly ]; then
echo "Creating image ..."
if [ ! -e $imagePath -o ! "$dontClearImage" ]; then
dd if=/dev/zero of=$imagePath bs=1048576 count=$imageSize
ddFlags=
if [ $isVMwareImage ]; then
rm -f $imagePath
$vmdkheader -h 64k -i${imageSize}M $imagePath || exit 1
ddFlags="conv=notrunc oflag=append"
dontClearImage=
fi
$bfsShell --initialize $imagePath Haiku
$makebootable $imagePath
if [ ! -e $imagePath -o ! "$dontClearImage" ]; then
dd if=/dev/zero of=$imagePath bs=1048576 count=$imageSize $ddFlags
fi
$bfsShell --initialize $imageOffsetFlags $imagePath Haiku
$makebootable $imageOffsetFlags $imagePath
fi
$bfsShell -n $imagePath > /dev/null &
$bfsShell -n $imageOffsetFlags $imagePath > /dev/null &
sleep 1
fi