Make disk image build optional

This commit is contained in:
Ali Mashtizadeh 2014-08-07 17:22:58 -07:00
parent e6376a2a55
commit 49c8d7ba48

View File

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