diff --git a/SConstruct b/SConstruct index 6cce775..0cd9d45 100644 --- a/SConstruct +++ b/SConstruct @@ -18,7 +18,8 @@ opts.AddVariables( ("NUMCPUS", "Number of CPUs to use for build (0 means auto).", "0"), ("WITH_GPROF", "Include gprof profiling (0 or 1).", "0"), ("PREFIX", "Installation target directory.", "#pxelinux"), - ("ARCH", "Target Architecture", "amd64") + ("ARCH", "Target Architecture", "amd64"), + ("BOOTDISK_SIZE", "Boot disk size", "128") ) env = Environment(options = opts, @@ -162,3 +163,12 @@ SConscript('sbin/newfs_o2fs/SConscript', variant_dir='build/tools/newfs_o2fs') 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') +