Added build variable HAIKU_DONT_CLEAR_IMAGE. When set and the image does

already exist, it won't be zeroed out. The image will still be
initialized with BFS, though. Handy for installing Haiku on a partition.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22397 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2007-10-01 17:27:13 +00:00
parent a977fc17e3
commit f515ed5f77
3 changed files with 10 additions and 1 deletions

View File

@ -467,6 +467,7 @@ AddVariableToScript $(script) : installDir : $(HAIKU_INSTALL_DIR) ;
AddVariableToScript $(script) : imageSize : $(HAIKU_IMAGE_SIZE) ;
AddVariableToScript $(script) : addBuildCompatibilityLibDir
: $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) ;
AddVariableToScript $(script) : dontClearImage : $(HAIKU_DONT_CLEAR_IMAGE) ;
AddVariableToScript $(script) : updateOnly : [ IsUpdateHaikuImageOnly ] ;
AddTargetVariableToScript $(script) : <build>bfs_shell : bfsShell ;
AddTargetVariableToScript $(script) : <build>fs_shell_command : fsShellCommand ;

View File

@ -35,6 +35,11 @@ HAIKU_VMWARE_IMAGE_NAME = walter.vmdk ;
# Install Haiku in directory /Haiku.
HAIKU_INSTALL_DIR = /Haiku ;
# If the image does already exist it won't be zeroed out. It will nevertheless
# freshly be initialized with BFS. Useful when installing Haiku on a partition.
HAIKU_DONT_CLEAR_IMAGE = 1 ;
# Affects the haiku-image, haiku-vmware-image, and install-haiku targets. Only
# targets on which the HAIKU_INCLUDE_IN_IMAGE variable has been set will be
# updated in the image file/installation directory.

View File

@ -11,6 +11,7 @@
# addBuildCompatibilityLibDir
# sourceDirsToCopy
# updateOnly
# dontClearImage
#
# bfsShell
# copyattr
@ -83,7 +84,9 @@ if [ $isImage ]; then
echo
if [ ! $updateOnly ]; then
echo "Creating image ..."
if [ ! -f $imagePath -o ! "$dontClearImage" ]; then
dd if=/dev/zero of=$imagePath bs=1048576 count=$imageSize
fi
$bfsShell --initialize $imagePath Haiku
$makebootable $imagePath
fi