umorpha-boxes/modules/base-uki.sh

32 lines
995 B
Bash
Raw Normal View History

2023-11-13 04:52:10 +00:00
#!/hint/bash -euE
2024-03-07 17:49:23 +00:00
# Copyright (C) 2023-2024 Umorpha Systems
2023-11-13 04:52:10 +00:00
# SPDX-License-Identifier: AGPL-3.0-or-later
packages+=('mkinitcpio>=38')
2023-11-13 04:52:10 +00:00
post_install+=(20:base-uki:post_install)
base-uki:post_install() {
local arg_mountpoint=$1
cat >"$arg_mountpoint/usr/share/mkinitcpio/hook.preset" <<-'EOF'
#!/hint/bash
# mkinitcpio preset file for the '%PKGBASE%' package
#ALL_config="/etc/mkinitcpio.conf"
ALL_kver=$(grep -Fxl '%PKGBASE%' /usr/lib/modules/*/pkgbase|sed 's,pkgbase$,vmlinuz,')
ALL_microcode=(/boot/*-ucode.img)
PRESETS=('default' 'fallback')
#default_config="/etc/mkinitcpio.conf"
#default_image="/boot/initramfs-%PKGBASE%.img"
default_uki="/boot/EFI/Linux/parabola-%PKGBASE%.efi"
#default_options="--splash /usr/share/systemd/bootctl/splash-parabola.bmp"
#fallback_config="/etc/mkinitcpio.conf"
#fallback_image="/boot/initramfs-%PKGBASE%-fallback.img"
fallback_uki="/boot/EFI/Linux/parabola-%PKGBASE%-fallback.efi"
fallback_options="-S autodetect"
EOF
}