mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-20 02:55:07 +03:00
initfs: fix ls and init chroot
We don't always have an initramfs-extra anymore, implement the deviceinfo check for this. Also ensure we init the chroot before trying to use it. Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
This commit is contained in:
parent
9dc294dbbf
commit
49a86cc303
2 changed files with 5 additions and 2 deletions
|
@ -90,6 +90,7 @@ def frontend(args: PmbArgs) -> None:
|
||||||
# Find the appropriate kernel flavor
|
# Find the appropriate kernel flavor
|
||||||
context = get_context()
|
context = get_context()
|
||||||
chroot = Chroot.rootfs(context.config.device)
|
chroot = Chroot.rootfs(context.config.device)
|
||||||
|
pmb.chroot.init(chroot)
|
||||||
flavor = pmb.chroot.other.kernel_flavor_installed(chroot)
|
flavor = pmb.chroot.other.kernel_flavor_installed(chroot)
|
||||||
|
|
||||||
# Handle initfs actions
|
# Handle initfs actions
|
||||||
|
@ -104,6 +105,7 @@ def frontend(args: PmbArgs) -> None:
|
||||||
elif action == "ls":
|
elif action == "ls":
|
||||||
logging.info("*** initramfs ***")
|
logging.info("*** initramfs ***")
|
||||||
ls(flavor, chroot)
|
ls(flavor, chroot)
|
||||||
|
if pmb.parse.deviceinfo().create_initfs_extra:
|
||||||
logging.info("*** initramfs-extra ***")
|
logging.info("*** initramfs-extra ***")
|
||||||
ls(flavor, chroot, True)
|
ls(flavor, chroot, True)
|
||||||
|
|
||||||
|
|
|
@ -114,6 +114,7 @@ class Deviceinfo:
|
||||||
dev_touchscreen: str | None = ""
|
dev_touchscreen: str | None = ""
|
||||||
dev_touchscreen_calibration: str | None = ""
|
dev_touchscreen_calibration: str | None = ""
|
||||||
append_dtb: str | None = ""
|
append_dtb: str | None = ""
|
||||||
|
create_initfs_extra: str | None
|
||||||
|
|
||||||
# bootloader
|
# bootloader
|
||||||
flash_method: str = ""
|
flash_method: str = ""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue