pmbootstrap/pmb
Zhuowei Zhang 1efe288fe2
losetup: support building rootfs images with 4096 byte sector sizes (!1725)
Adds an optional deviceinfo variable, `deviceinfo_rootfs_image_sector_size`,
which specifies the logical sector size of the device's storage.

Some devices made after 2016 with UFS storage uses 4096 byte sectors
instead of the normal 512 bytes. The partition table in our rootfs
must match, otherwise the root filesystem won't mount on the device.

This change passes the sector size to `losetup` when creating the image
if the deviceinfo specifies it, so the image will have the correct
sector size.

If the deviceinfo doesn't specify the new option, the behaviour
is the same as previous versions of pmbootstrap.

Note that the sector size option only works on Linux 4.14 and above,
so pmbootstrap should be run on a >4.14 computer when installing to
devices with non-standard sector size.

To find if a device needs this parameter, run `fdisk -l` on the device.
If the output shows

`Note: sector size is 4096 (not 512)`

then add `deviceinfo_rootfs_image_sector_size="4096"` to the deviceinfo.

This is needed by the Pixel 3 XL (google-crosshatch) port.

See https://gitlab.com/postmarketOS/pmbootstrap/issues/1696.
2018-12-11 09:08:12 +01:00
..
aportgen aportgen gcc*: set arch to x86_64 only 2018-11-08 07:08:04 +01:00
build new action: 'pmbootstrap repo_missing' 2018-12-01 21:30:59 +00:00
chroot remove local postmarketOS mirror folder support (!1718) 2018-12-06 07:31:38 +01:00
config losetup: support building rootfs images with 4096 byte sector sizes (!1725) 2018-12-11 09:08:12 +01:00
data install apk keys and binfmt data with setup.py 2018-09-17 10:06:57 +00:00
export Export initramfs-extra (pmbootstrap export) 2018-11-19 06:06:35 +00:00
flasher s/system partition/rootfs: fix remaining mentions 2018-07-15 23:41:31 +02:00
helpers Make APKINDEX downloads returning 404 non-fatal (!1726) 2018-12-11 06:56:53 +00:00
install losetup: support building rootfs images with 4096 byte sector sizes (!1725) 2018-12-11 09:08:12 +01:00
parse allow specifying multiple postmarketOS mirrors (!1718) 2018-12-06 07:31:43 +01:00
qemu don't install qemu when using --host-qemu 2018-09-01 13:14:52 +02:00
__init__.py Move aports into own repository (pmaports) 2018-09-05 05:57:38 +00:00