Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mkinitcpio] Create UEFI executables #53

Merged
merged 12 commits into from
Jul 7, 2021

Commits on Apr 5, 2021

  1. [mkinitcpio] Create UEFI executables

    Implement UEFI executable generation in mkinitcpio by utilizing UEFI
    stubs provided by systemd/gummiboot.
    
    This allows us to create a unified boot image we can boot from UEFI
    with. These are practical for secure boot as we can sign initramfs,
    kernel cmdline and the kernel all at once. By utilizing the
    BOOT_LOADER_SPECIFICATION we can also drop new images into the correct
    patch and have systemd-boot/gummiboot pick up the images.
    
    The code does several things and does a fair amount of guessing to
    figure out all the inputs needed.
    
    We use `/etc/kernel/cmdline` to localize the kernel cmdline options we
    want for the image. This is inherited from the `kernel-install` hook
    system which might double as some form of standard.
    
    We also do a dance to get the correct kernel image. We do a lookup into
    /lib/modules and /boot for both versioned and unversioned kernels
    (mainly Arch Linux).
    
    There is an attempt to support both 32bit and 64bit lookup paths for the
    stub images, but only 64bit is tested.
    
    Gummiboot is also not tested.
    
    https://www.freedesktop.org/software/systemd/man/kernel-install.html
    
    https://systemd.io/BOOT_LOADER_SPECIFICATION/#type-2-efi-unified-kernel-images
    
    Signed-off-by: Morten Linderud <morten@linderud.pw>
    Foxboron committed Apr 5, 2021
    Configuration menu
    Copy the full SHA
    9cc3523 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2021

  1. fixup! [mkinitcpio] Create UEFI executables

    Signed-off-by: Morten Linderud <morten@linderud.pw>
    Foxboron committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    4d29a7e View commit details
    Browse the repository at this point in the history
  2. fixup! fixup! [mkinitcpio] Create UEFI executables

    Signed-off-by: Morten Linderud <morten@linderud.pw>
    Foxboron committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    9f73841 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2021

  1. fixup! fixup! fixup! [mkinitcpio] Create UEFI executables

    Signed-off-by: Morten Linderud <morten@linderud.pw>
    Foxboron committed Apr 9, 2021
    Configuration menu
    Copy the full SHA
    2acb0cb View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2021

  1. fixup! fixup! fixup! fixup! [mkinitcpio] Create UEFI executables

    Signed-off-by: Morten Linderud <morten@linderud.pw>
    Foxboron committed Apr 11, 2021
    Configuration menu
    Copy the full SHA
    0e6c8d3 View commit details
    Browse the repository at this point in the history
  2. fixup! fixup! fixup! fixup! fixup! [mkinitcpio] Create UEFI executables

    Signed-off-by: Morten Linderud <morten@linderud.pw>
    Foxboron committed Apr 11, 2021
    Configuration menu
    Copy the full SHA
    655f308 View commit details
    Browse the repository at this point in the history
  3. Added manpage

    Signed-off-by: Morten Linderud <morten@linderud.pw>
    Foxboron committed Apr 11, 2021
    Configuration menu
    Copy the full SHA
    70eb8a5 View commit details
    Browse the repository at this point in the history
  4. fixup! Added manpage

    Signed-off-by: Morten Linderud <morten@linderud.pw>
    Foxboron committed Apr 11, 2021
    Configuration menu
    Copy the full SHA
    4e9d263 View commit details
    Browse the repository at this point in the history
  5. man/mkinitcio.8: Added examples to the manpage

    Signed-off-by: Morten Linderud <morten@linderud.pw>
    Foxboron committed Apr 11, 2021
    Configuration menu
    Copy the full SHA
    34be8f7 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2021

  1. mkinitcpio: remove short options, restructure docs and help

    Signed-off-by: Morten Linderud <morten@linderud.pw>
    Foxboron committed Jul 5, 2021
    Configuration menu
    Copy the full SHA
    e14d024 View commit details
    Browse the repository at this point in the history
  2. mkinitcpio: Create tmp initramfs when -U is used

    Preferably we shouldn't need to have a dry run when `mkinitcpio -U` is
    invoked, instead create a temporary initramfs we use for the UEFI
    executable.
    
    Signed-off-by: Morten Linderud <morten@linderud.pw>
    Foxboron committed Jul 5, 2021
    Configuration menu
    Copy the full SHA
    4187cd0 View commit details
    Browse the repository at this point in the history
  3. mkinitcpio: fix _opt_short

    Signed-off-by: Morten Linderud <morten@linderud.pw>
    Foxboron committed Jul 5, 2021
    Configuration menu
    Copy the full SHA
    d9298e9 View commit details
    Browse the repository at this point in the history