From e6376a2a55554cde4f363bb9d698d96233e3bdba Mon Sep 17 00:00:00 2001 From: Ali Mashtizadeh Date: Fri, 1 Aug 2014 16:20:40 -0700 Subject: [PATCH] Integrate boot disk build --- SConstruct | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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') +