Make disk image build optional
This commit is contained in:
parent
e6376a2a55
commit
49c8d7ba48
17
SConstruct
17
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')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user