mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
rename aarch64 kernels to Image-*, remove /EFI directory from .iso it's included in efi.img
This commit is contained in:
parent
0dfbc8c12c
commit
c57037290e
3 changed files with 20 additions and 16 deletions
|
@ -47,17 +47,18 @@ _prepare_kernel_initramfs_files() {
|
|||
mkdir -p "${_ISODIR}/boot"
|
||||
|
||||
#shellcheck disable=SC2154
|
||||
mkinitcpio -c "${MKINITCPIO_CONFIG}" -k "${ALL_kver}" -g "${_ISODIR}/boot/initramfs-${_RUNNING_ARCH}.img" || exit 1
|
||||
mkinitcpio -c "${MKINITCPIO_CONFIG}" -k "${ALL_kver}" -g "${_ISODIR}/boot/initramfs-${_ARCH}.img" || exit 1
|
||||
# delete cachedir on archboot environment
|
||||
[[ "$(cat /etc/hostname)" == "archboot" ]] && rm -rf /var/cache/pacman/pkg
|
||||
install -m644 "${ALL_kver}" "${_ISODIR}/boot/vmlinuz-${_RUNNING_ARCH}"
|
||||
# needed to hash the kernel for secureboot enabled systems
|
||||
# all uppercase to avoid issues with firmware and hashing eg. DELL firmware is case sensitive!
|
||||
if [[ "${_RUNNING_ARCH}" == "aarch64" ]]; then
|
||||
install -m644 "${ALL_kver}" "${_ISODIR}/EFI/BOOT/VMLINUZ_AA64"
|
||||
if [[ "${_ARCH}" == "x86_64" || "${_ARCH}" == "riscv64" ]]; then
|
||||
install -m644 "${ALL_kver}" "${_ISODIR}/boot/vmlinuz-${_ARCH}"
|
||||
[[ "${_ARCH}" == "x86_64" ]] && install -m644 "${ALL_kver}" "${_ISODIR}/EFI/BOOT/VMLINUZ_X64"
|
||||
fi
|
||||
if [[ "${_RUNNING_ARCH}" == "x86_64" ]]; then
|
||||
install -m644 "${ALL_kver}" "${_ISODIR}/EFI/BOOT/VMLINUZ_X64"
|
||||
if [[ "${_ARCH}" == "aarch64" ]]; then
|
||||
install -m644 "${ALL_kver}" "${_ISODIR}/boot/Image-${_ARCH}.gz"
|
||||
install -m644 "${ALL_kver}" "${_ISODIR}/EFI/BOOT/IMAGE_AA64.GZ"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -76,8 +77,8 @@ _prepare_kernel_initramfs_files_RISCV64() {
|
|||
#shellcheck disable=SC1090
|
||||
source "${_PRESET}"
|
||||
mkdir -p "${_ISODIR}"/boot
|
||||
install -m644 "${ALL_kver}" "${_ISODIR}/boot/vmlinuz-${_RUNNING_ARCH}"
|
||||
mkinitcpio -c "${MKINITCPIO_CONFIG}" -k "${ALL_kver}" -g "${_ISODIR}/boot/initramfs-${_RUNNING_ARCH}.img" || exit 1
|
||||
install -m644 "${ALL_kver}" "${_ISODIR}/boot/vmlinuz-${_ARCH}"
|
||||
mkinitcpio -c "${MKINITCPIO_CONFIG}" -k "${ALL_kver}" -g "${_ISODIR}/boot/initramfs-${_ARCH}.img" || exit 1
|
||||
}
|
||||
|
||||
_prepare_ucode() {
|
||||
|
@ -174,6 +175,7 @@ _prepare_uefi_image() {
|
|||
mkfs.vfat --invariant -C "${VFAT_IMAGE}" "${IMGSZ}" >/dev/null
|
||||
## Copying all files to UEFI vfat image
|
||||
mcopy -m -i "${VFAT_IMAGE}" -s "${_ISODIR}"/EFI ::/
|
||||
rm -r "${_ISODIR}"/EFI
|
||||
}
|
||||
|
||||
_prepare_extlinux_conf() {
|
||||
|
|
|
@ -8,8 +8,13 @@ _INTEL_UCODE="boot/intel-ucode.img"
|
|||
_INITRAMFS="boot/initramfs-${_ARCH}.img"
|
||||
_INITRAMFS_LATEST="boot/initramfs-latest-${_ARCH}.img"
|
||||
_INITRAMFS_LOCAL="boot/initramfs-local-${_ARCH}.img"
|
||||
_KERNEL="boot/vmlinuz-${_ARCH}"
|
||||
_KERNEL_ARCHBOOT="boot/vmlinuz-archboot-${_ARCH}"
|
||||
if [[ "${_ARCH}" == "aarch64" ]]; then
|
||||
_KERNEL="boot/Image-${_ARCH}.gz"
|
||||
_KERNEL_ARCHBOOT="boot/Image-archboot-${_ARCH}.gz"
|
||||
else
|
||||
_KERNEL="boot/vmlinuz-${_ARCH}"
|
||||
_KERNEL_ARCHBOOT="boot/vmlinuz-archboot-${_ARCH}"
|
||||
fi
|
||||
_PRESET_LATEST="${_ARCH}-latest"
|
||||
_PRESET_LOCAL="${_ARCH}-local"
|
||||
_W_DIR="$(mktemp -u archboot-release.XXX)"
|
||||
|
@ -104,8 +109,8 @@ _create_iso() {
|
|||
_EFISTUB="usr/lib/systemd/boot/efi/linuxaa64.efi.stub"
|
||||
_UCODE="${_AMD_UCODE}"
|
||||
# replace aarch64 Image.gz with Image kernel for UKI, compressed image is not working at the moment
|
||||
cp "${_W_DIR}"/boot/Image boot/
|
||||
_KERNEL_ARCHBOOT=boot/Image
|
||||
cp "${_W_DIR}"/boot/Image boot/Image-archboot-${_ARCH}
|
||||
_KERNEL_ARCHBOOT=boot/Image-archboot-${_ARCH}
|
||||
fi
|
||||
rm -r "${_W_DIR:?}"/boot
|
||||
mv boot "${_W_DIR}"
|
||||
|
@ -128,9 +133,6 @@ _create_iso() {
|
|||
# fix permission and timestamp
|
||||
mv "${_W_DIR}"/boot ./
|
||||
rm "${_CMDLINE}"
|
||||
if [[ "${_ARCH}" == "aarch64" ]]; then
|
||||
rm "${_KERNEL_ARCHBOOT}"
|
||||
fi
|
||||
chmod 644 boot/*.efi
|
||||
touch boot/*.efi
|
||||
fi
|
||||
|
|
|
@ -84,7 +84,7 @@ if [ ${grub_platform} == "efi" ]; then
|
|||
set default="Archboot Arch Linux AA64"
|
||||
menuentry "Archboot Arch Linux AA64" {
|
||||
_menu_running
|
||||
linux /boot/vmlinuz-aarch64 rootfstype=ramfs nr_cpus=1 console=ttyAMA0,115200 console=tty0 loglevel=4 audit=0
|
||||
linux /boot/Image-aarch64.gz rootfstype=ramfs nr_cpus=1 console=ttyAMA0,115200 console=tty0 loglevel=4 audit=0
|
||||
initrd /boot/amd-ucode.img /boot/initramfs-aarch64.img
|
||||
}
|
||||
elif [ ${grub_cpu} == "i386" ]; then
|
||||
|
|
Loading…
Reference in a new issue