Integrate boot disk build

This commit is contained in:
Ali Mashtizadeh 2014-08-01 16:20:40 -07:00
parent 25eb5a0d4b
commit e6376a2a55

View File

@ -18,7 +18,8 @@ opts.AddVariables(
("NUMCPUS", "Number of CPUs to use for build (0 means auto).", "0"), ("NUMCPUS", "Number of CPUs to use for build (0 means auto).", "0"),
("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_SIZE", "Boot disk size", "128")
) )
env = Environment(options = opts, 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.Install('$PREFIX/','build/sys/castor')
env.Alias('install','$PREFIX') 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')