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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user