chroot: allow mounting the device rootfs (MR 2252)

Add a new flag --image which can be used to mount the rootfs generated
with "pmbootstrap install".

For now this is quite limited in scope. But it's enough to allow for
building a package, updating it in the QEMU image, and then booting it.

The major "gotcha" with this is that the QEMU uses the kernel and
initramfs from the device chroot unless you run it with --efi.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-06-14 07:25:49 +02:00 committed by Oliver Smith
parent d1a86fe702
commit f331b95824
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
8 changed files with 55 additions and 11 deletions

View file

@ -78,6 +78,7 @@ class PmbArgs(Namespace):
host: str
host_qemu: str
image_size: str
image: bool
install_base: str
install_blockdev: str
install_cgpt: str