forked from Mirror/pmbootstrap
pmb.install: Add pmbootstrap install --(no-)sparse option (!1862)
At the moment, sparse images are generated if the device sets deviceinfo_flash_sparse="true". But for testing purposes it can be useful to specifically enable or disable the default behavior. Add a --sparse and --no-sparse option that enables or disables sparse image generation.
This commit is contained in:
parent
4352096783
commit
c8737740b1
2 changed files with 12 additions and 1 deletions
|
@ -416,7 +416,11 @@ def install_system_image(args):
|
|||
pmb.chroot.shutdown(args, True)
|
||||
|
||||
# Convert rootfs to sparse using img2simg
|
||||
if args.deviceinfo["flash_sparse"] == "true" and not args.split and not args.sdcard:
|
||||
sparse = args.sparse
|
||||
if sparse is None:
|
||||
sparse = args.deviceinfo["flash_sparse"] == "true"
|
||||
|
||||
if sparse and not args.split and not args.sdcard:
|
||||
logging.info("(native) make sparse rootfs")
|
||||
pmb.chroot.apk.install(args, ["android-tools"])
|
||||
sys_image = args.device + ".img"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue