diff --git a/SConstruct b/SConstruct index 0cd9d45..22e365e 100644 --- a/SConstruct +++ b/SConstruct @@ -19,6 +19,7 @@ opts.AddVariables( ("WITH_GPROF", "Include gprof profiling (0 or 1).", "0"), ("PREFIX", "Installation target directory.", "#pxelinux"), ("ARCH", "Target Architecture", "amd64"), + ("BOOTDISK", "Build boot disk (0 or 1)", "0"), ("BOOTDISK_SIZE", "Boot disk size", "128") ) @@ -164,11 +165,13 @@ env.Install('$PREFIX/','build/sys/castor') env.Alias('install','$PREFIX') # Boot Disk Target -newfs = Builder(action = 'build/tools/newfs_o2fs/newfs_o2fs -s $BOOTDISK_SIZE -m $SOURCE $TARGET') -env.Append(BUILDERS = {'BuildImage' : newfs}) -bootdisk = env.BuildImage('#build/bootdisk.img', '#release/bootdisk.manifest') -Depends(bootdisk, "#build/tools/newfs_o2fs/newfs_o2fs") -Depends(bootdisk, "#build/sbin/init/init") -Depends(bootdisk, "#build/sys/castor") -env.Alias('bootdisk', '#build/bootdisk.img') +if env["BOOTDISK"] == "1": + newfs = Builder(action = 'build/tools/newfs_o2fs/newfs_o2fs -s $BOOTDISK_SIZE -m $SOURCE $TARGET') + env.Append(BUILDERS = {'BuildImage' : newfs}) + bootdisk = env.BuildImage('#build/bootdisk.img', '#release/bootdisk.manifest') + Depends(bootdisk, "#build/tools/newfs_o2fs/newfs_o2fs") + Depends(bootdisk, "#build/sbin/init/init") + Depends(bootdisk, "#build/sys/castor") + env.Alias('bootdisk', '#build/bootdisk.img') + env.Install('$PREFIX/','#build/bootdisk.img')