help='Setup tmpdir as tmpfs to accelerate, experimental'
' feature, use it if you have more than 4G memory')
optparser.add_option('', '--bmap', action='store_true', help='generate .bmap')
+ optparser.add_option('', '--no-fstab-update', action='store_true',
+ help='Do not change fstab file.')
return optparser
def postoptparse(self, options):
def wic_create(wks_file, rootfs_dir, bootimg_dir, kernel_dir,
native_sysroot, scripts_path, image_output_dir,
- compressor, bmap, debug):
+ compressor, bmap, no_fstab_update, debug):
"""Create image
wks_file - user-defined OE kickstart file
image_output_dir - dirname to create for image
compressor - compressor utility to compress the image
bmap - enable generation of .bmap
+ no_fstab_update - Do not change fstab file.
Normally, the values for the build artifacts values are determined
by 'wic -e' from the output of the 'bitbake -e' command given an
if bmap:
cmdline.append('--bmap')
+ if no_fstab_update:
+ cmdline.append('--no-fstab-update')
+
crobj.main(cmdline)
print("\nThe image(s) were created using OE kickstart file:\n %s" % wks_file)
def __init__(self, oe_builddir, image_output_dir, rootfs_dir, bootimg_dir,
kernel_dir, native_sysroot, compressor, creatoropts=None,
- bmap=False):
+ bmap=False, no_fstab_update=False):
"""
Initialize a DirectImageCreator instance.
self.native_sysroot = native_sysroot
self.compressor = compressor
self.bmap = bmap
+ self.no_fstab_update = no_fstab_update
def __get_part_num(self, num, parts):
"""calculate the real partition number, accounting for partitions not
disk_id = disk_ids[part.disk]
part.uuid = '%0x-%02d' % (disk_id, self.__get_part_num(num, parts))
- fstab_path = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
+ if self.no_fstab_update:
+ fstab_path = None
+ else:
+ fstab_path = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
shutil.rmtree(self.workdir)
os.mkdir(self.workdir)
self.__image.cleanup()
except ImageError as err:
msger.warning("%s" % err)
-
native_sysroot,
compressor,
creatoropts,
- opts.bmap)
+ opts.bmap,
+ opts.no_fstab_update)
try:
creator.create()
dest='compressor',
help="compress image with specified compressor")
parser.add_option("-m", "--bmap", action="store_true", help="generate .bmap")
+ parser.add_option("", "--no-fstab-update" ,action="store_true",
+ help="Do not change fstab file.")
parser.add_option("-v", "--vars", dest='vars_dir',
help="directory with <image>.env files that store "
"bitbake variables")
print("Creating image(s)...\n")
engine.wic_create(wks_file, rootfs_dir, bootimg_dir, kernel_dir,
native_sysroot, scripts_path, image_output_dir,
- options.compressor, options.bmap, options.debug)
+ options.compressor, options.bmap, options.no_fstab_update,
+ options.debug)
def wic_list_subcommand(args, usage_str):