From 49c8d7ba4814e65601ad8cb6f4c79c66645c7932 Mon Sep 17 00:00:00 2001 From: Ali Mashtizadeh Date: Thu, 7 Aug 2014 17:22:58 -0700 Subject: [PATCH] Make disk image build optional --- SConstruct | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) 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')