diff --git a/pmb/config/__init__.py b/pmb/config/__init__.py index 91cf265f..4129783b 100644 --- a/pmb/config/__init__.py +++ b/pmb/config/__init__.py @@ -262,6 +262,7 @@ deviceinfo_attributes = [ "flash_fastboot_max_size", "flash_fastboot_vendor_id", "flash_sparse", + "rootfs_image_sector_size", # weston "weston_pixman_type", diff --git a/pmb/install/losetup.py b/pmb/install/losetup.py index df3dbd27..15d78f0a 100644 --- a/pmb/install/losetup.py +++ b/pmb/install/losetup.py @@ -52,7 +52,13 @@ def mount(args, img_path): # Mount and return on success init(args) - pmb.chroot.root(args, ["losetup", "-f", img_path], check=False) + + losetup_cmd = ["losetup", "-f", img_path] + sector_size = args.deviceinfo["rootfs_image_sector_size"] + if sector_size: + losetup_cmd += ["-b", str(int(sector_size))] + + pmb.chroot.root(args, losetup_cmd, check=False) if device_by_back_file(args, img_path): return