mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-13 11:29:46 +03:00
export: drop support for initramfs flavor
Official mkinitfs flavors were dropped long ago. v23.12 already
released with "supported_mkinitfs_without_flavors=True". So there is
no need to keep this around anymore.
Follow-up from 527fc9359f
This commit is contained in:
parent
e69c3979b7
commit
a7885f519c
2 changed files with 5 additions and 12 deletions
|
@ -30,12 +30,11 @@ def frontend(args: PmbArgs) -> None: # FIXME: ARGS_REFACTOR
|
||||||
)
|
)
|
||||||
|
|
||||||
# Rebuild the initramfs, just to make sure (see #69)
|
# Rebuild the initramfs, just to make sure (see #69)
|
||||||
flavor = pmb.helpers.frontend._parse_flavor(config.device, args.autoinstall)
|
|
||||||
if args.autoinstall:
|
if args.autoinstall:
|
||||||
pmb.chroot.initfs.build(Chroot(ChrootType.ROOTFS, config.device))
|
pmb.chroot.initfs.build(Chroot(ChrootType.ROOTFS, config.device))
|
||||||
|
|
||||||
# Do the export, print all files
|
# Do the export, print all files
|
||||||
logging.info(f"Export symlinks to: {target}")
|
logging.info(f"Export symlinks to: {target}")
|
||||||
if args.odin_flashable_tar:
|
if args.odin_flashable_tar:
|
||||||
pmb.export.odin(config.device, flavor, target)
|
pmb.export.odin(config.device, target)
|
||||||
pmb.export.symlinks(target)
|
pmb.export.symlinks(target)
|
||||||
|
|
|
@ -11,7 +11,7 @@ import pmb.helpers.file
|
||||||
from pmb.core import Chroot, ChrootType
|
from pmb.core import Chroot, ChrootType
|
||||||
|
|
||||||
|
|
||||||
def odin(device: str, flavor: str, folder: Path) -> None:
|
def odin(device: str, folder: Path) -> None:
|
||||||
"""
|
"""
|
||||||
Create Odin flashable tar file with kernel and initramfs
|
Create Odin flashable tar file with kernel and initramfs
|
||||||
for devices configured with the flasher method 'heimdall-isorec'
|
for devices configured with the flasher method 'heimdall-isorec'
|
||||||
|
@ -21,12 +21,6 @@ def odin(device: str, flavor: str, folder: Path) -> None:
|
||||||
suffix = Chroot(ChrootType.ROOTFS, device)
|
suffix = Chroot(ChrootType.ROOTFS, device)
|
||||||
deviceinfo = pmb.parse.deviceinfo(device)
|
deviceinfo = pmb.parse.deviceinfo(device)
|
||||||
|
|
||||||
# Backwards compatibility with old mkinitfs (pma#660)
|
|
||||||
suffix_flavor = f"-{flavor}"
|
|
||||||
pmaports_cfg = pmb.config.pmaports.read_config()
|
|
||||||
if pmaports_cfg.get("supported_mkinitfs_without_flavors", False):
|
|
||||||
suffix_flavor = ""
|
|
||||||
|
|
||||||
# Validate method
|
# Validate method
|
||||||
method = deviceinfo.flash_method or ""
|
method = deviceinfo.flash_method or ""
|
||||||
if not method.startswith("heimdall-"):
|
if not method.startswith("heimdall-"):
|
||||||
|
@ -60,17 +54,17 @@ def odin(device: str, flavor: str, folder: Path) -> None:
|
||||||
if method == "heimdall-isorec":
|
if method == "heimdall-isorec":
|
||||||
handle.write(
|
handle.write(
|
||||||
# Kernel: copy and append md5
|
# Kernel: copy and append md5
|
||||||
f"cp /boot/vmlinuz{suffix_flavor} {odin_kernel_md5}\n"
|
f"cp /boot/vmlinuz {odin_kernel_md5}\n"
|
||||||
f"md5sum -t {odin_kernel_md5} >> {odin_kernel_md5}\n"
|
f"md5sum -t {odin_kernel_md5} >> {odin_kernel_md5}\n"
|
||||||
# Initramfs: recompress with lzop, append md5
|
# Initramfs: recompress with lzop, append md5
|
||||||
f"gunzip -c /boot/initramfs{suffix_flavor}"
|
f"gunzip -c /boot/initramfs"
|
||||||
f" | lzop > {odin_initfs_md5}\n"
|
f" | lzop > {odin_initfs_md5}\n"
|
||||||
f"md5sum -t {odin_initfs_md5} >> {odin_initfs_md5}\n"
|
f"md5sum -t {odin_initfs_md5} >> {odin_initfs_md5}\n"
|
||||||
)
|
)
|
||||||
elif method == "heimdall-bootimg":
|
elif method == "heimdall-bootimg":
|
||||||
handle.write(
|
handle.write(
|
||||||
# boot.img: copy and append md5
|
# boot.img: copy and append md5
|
||||||
f"cp /boot/boot.img{suffix_flavor} {odin_kernel_md5}\n"
|
f"cp /boot/boot.img {odin_kernel_md5}\n"
|
||||||
f"md5sum -t {odin_kernel_md5} >> {odin_kernel_md5}\n"
|
f"md5sum -t {odin_kernel_md5} >> {odin_kernel_md5}\n"
|
||||||
)
|
)
|
||||||
handle.write(
|
handle.write(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue