1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-13 03:19:47 +03:00

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

@ -812,6 +812,8 @@ def get_parser():
" 'stdout', 'interactive', 'tui' (default),"
" 'background'. Details: pmb/helpers/run_core.py",
default="tui")
chroot.add_argument("--image", help="Mount the rootfs image and treat"
" it like a normal chroot.", action="store_true")
chroot.add_argument("command", default=["sh", "-i"], help="command"
" to execute inside the chroot. default: sh",
nargs='*')