Copy files more generically

configs/*:
Copy all files that do not need a rename generically (not specifying a destination file name).
Do not rename vmlinuz-linux to vmlinuz or vmlinuz.efi (as this serves no purpose and makes the scripts more
complicated).
Do not rename microcode (i.e. {amd,intel}-ucode.img) when copying them and change all boot loader configuration files
that assume a renamed microcode image.
Add note and link to Arch Linux wiki to state why memtest.bin is renamed to memtest.
Copy license files for {amd,intel}-ucode and memtest more generically by placing them into subdirectories with the same
name as the package (to circumenvent overwriting one other).

Closes #33
This commit is contained in:
David Runge 2020-07-28 11:38:04 +02:00
parent ba6b44f80a
commit 47e11125e4
No known key found for this signature in database
GPG Key ID: 7258734B41C31549
7 changed files with 37 additions and 33 deletions

View File

@ -77,7 +77,7 @@ make_setup_mkinitcpio() {
make_boot() {
mkdir -p "${work_dir}/iso/${install_dir}/boot/${arch}"
cp "${work_dir}/airootfs/boot/archiso.img" "${work_dir}/iso/${install_dir}/boot/${arch}/archiso.img"
cp "${work_dir}/airootfs/boot/vmlinuz-linux" "${work_dir}/iso/${install_dir}/boot/${arch}/vmlinuz"
cp "${work_dir}/airootfs/boot/vmlinuz-linux" "${work_dir}/iso/${install_dir}/boot/${arch}/"
}
# Prepare /${install_dir}/boot/syslinux

View File

@ -7,6 +7,6 @@ TIMEOUT 30
LABEL arch
MENU LABEL Arch Linux
LINUX boot/%ARCH%/vmlinuz
LINUX boot/%ARCH%/vmlinuz-linux
INITRD boot/%ARCH%/archiso.img
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%

View File

@ -154,26 +154,30 @@ make_customize_airootfs() {
# Prepare kernel/initramfs ${install_dir}/boot/
make_boot() {
mkdir -p "${work_dir}/iso/${install_dir}/boot/x86_64"
cp "${work_dir}/x86_64/airootfs/boot/archiso.img" "${work_dir}/iso/${install_dir}/boot/x86_64/archiso.img"
cp "${work_dir}/x86_64/airootfs/boot/vmlinuz-linux" "${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz"
cp "${work_dir}/x86_64/airootfs/boot/archiso.img" "${work_dir}/iso/${install_dir}/boot/x86_64/"
cp "${work_dir}/x86_64/airootfs/boot/vmlinuz-linux" "${work_dir}/iso/${install_dir}/boot/x86_64/"
}
# Add other aditional/extra files to ${install_dir}/boot/
make_boot_extra() {
if [[ -e "${work_dir}/x86_64/airootfs/boot/memtest86+/memtest.bin" ]]; then
# rename for PXE: https://wiki.archlinux.org/index.php/Syslinux#Using_memtest
cp "${work_dir}/x86_64/airootfs/boot/memtest86+/memtest.bin" "${work_dir}/iso/${install_dir}/boot/memtest"
mkdir -p "${work_dir}/iso/${install_dir}/boot/licenses/memtest86+/"
cp "${work_dir}/x86_64/airootfs/usr/share/licenses/common/GPL2/license.txt" \
"${work_dir}/iso/${install_dir}/boot/memtest.COPYING"
"${work_dir}/iso/${install_dir}/boot/licenses/memtest86+/"
fi
if [[ -e "${work_dir}/x86_64/airootfs/boot/intel-ucode.img" ]]; then
cp "${work_dir}/x86_64/airootfs/boot/intel-ucode.img" "${work_dir}/iso/${install_dir}/boot/intel_ucode.img"
cp "${work_dir}/x86_64/airootfs/usr/share/licenses/intel-ucode/LICENSE" \
"${work_dir}/iso/${install_dir}/boot/intel_ucode.LICENSE"
cp "${work_dir}/x86_64/airootfs/boot/intel-ucode.img" "${work_dir}/iso/${install_dir}/boot/"
mkdir -p "${work_dir}/iso/${install_dir}/boot/licenses/intel-ucode/"
cp "${work_dir}/x86_64/airootfs/usr/share/licenses/intel-ucode/"* \
"${work_dir}/iso/${install_dir}/boot/licenses/intel-ucode/"
fi
if [[ -e "${work_dir}/x86_64/airootfs/boot/amd-ucode.img" ]]; then
cp "${work_dir}/x86_64/airootfs/boot/amd-ucode.img" "${work_dir}/iso/${install_dir}/boot/amd_ucode.img"
cp "${work_dir}/x86_64/airootfs/usr/share/licenses/amd-ucode/LICENSE" \
"${work_dir}/iso/${install_dir}/boot/amd_ucode.LICENSE"
cp "${work_dir}/x86_64/airootfs/boot/amd-ucode.img" "${work_dir}/iso/${install_dir}/boot/"
mkdir -p "${work_dir}/iso/${install_dir}/boot/licenses/amd-ucode/"
cp "${work_dir}/x86_64/airootfs/usr/share/licenses/amd-ucode/"* \
"${work_dir}/iso/${install_dir}/boot/licenses/amd-ucode/"
fi
}
@ -185,10 +189,10 @@ make_syslinux() {
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
s|%INSTALL_DIR%|${install_dir}|g" "${_cfg}" > "${work_dir}/iso/${install_dir}/boot/syslinux/${_cfg##*/}"
done
cp "${script_path}/syslinux/splash.png" "${work_dir}/iso/${install_dir}/boot/syslinux"
cp "${work_dir}/x86_64/airootfs/usr/lib/syslinux/bios/"*.c32 "${work_dir}/iso/${install_dir}/boot/syslinux"
cp "${work_dir}/x86_64/airootfs/usr/lib/syslinux/bios/lpxelinux.0" "${work_dir}/iso/${install_dir}/boot/syslinux"
cp "${work_dir}/x86_64/airootfs/usr/lib/syslinux/bios/memdisk" "${work_dir}/iso/${install_dir}/boot/syslinux"
cp "${script_path}/syslinux/splash.png" "${work_dir}/iso/${install_dir}/boot/syslinux/"
cp "${work_dir}/x86_64/airootfs/usr/lib/syslinux/bios/"*.c32 "${work_dir}/iso/${install_dir}/boot/syslinux/"
cp "${work_dir}/x86_64/airootfs/usr/lib/syslinux/bios/lpxelinux.0" "${work_dir}/iso/${install_dir}/boot/syslinux/"
cp "${work_dir}/x86_64/airootfs/usr/lib/syslinux/bios/memdisk" "${work_dir}/iso/${install_dir}/boot/syslinux/"
mkdir -p "${work_dir}/iso/${install_dir}/boot/syslinux/hdt"
gzip -c -9 "${work_dir}/x86_64/airootfs/usr/share/hwdata/pci.ids" > \
"${work_dir}/iso/${install_dir}/boot/syslinux/hdt/pciids.gz"
@ -235,11 +239,11 @@ make_efiboot() {
mount "${work_dir}/iso/EFI/archiso/efiboot.img" "${work_dir}/efiboot"
mkdir -p "${work_dir}/efiboot/EFI/archiso"
cp "${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz" "${work_dir}/efiboot/EFI/archiso/vmlinuz.efi"
cp "${work_dir}/iso/${install_dir}/boot/x86_64/archiso.img" "${work_dir}/efiboot/EFI/archiso/archiso.img"
cp "${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz-linux" "${work_dir}/efiboot/EFI/archiso/"
cp "${work_dir}/iso/${install_dir}/boot/x86_64/archiso.img" "${work_dir}/efiboot/EFI/archiso/"
cp "${work_dir}/iso/${install_dir}/boot/intel_ucode.img" "${work_dir}/efiboot/EFI/archiso/intel_ucode.img"
cp "${work_dir}/iso/${install_dir}/boot/amd_ucode.img" "${work_dir}/efiboot/EFI/archiso/amd_ucode.img"
cp "${work_dir}/iso/${install_dir}/boot/intel-ucode.img" "${work_dir}/efiboot/EFI/archiso/"
cp "${work_dir}/iso/${install_dir}/boot/amd-ucode.img" "${work_dir}/efiboot/EFI/archiso/"
mkdir -p "${work_dir}/efiboot/EFI/boot"
cp "${work_dir}/x86_64/airootfs/usr/lib/systemd/boot/efi/systemd-bootx64.efi" \

View File

@ -1,6 +1,6 @@
title Arch Linux install medium (x86_64, UEFI)
linux /EFI/archiso/vmlinuz.efi
initrd /EFI/archiso/intel_ucode.img
initrd /EFI/archiso/amd_ucode.img
linux /EFI/archiso/vmlinuz-linux
initrd /EFI/archiso/intel-ucode.img
initrd /EFI/archiso/amd-ucode.img
initrd /EFI/archiso/archiso.img
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%

View File

@ -1,6 +1,6 @@
title Arch Linux install medium (x86_64, UEFI)
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz
initrd /%INSTALL_DIR%/boot/intel_ucode.img
initrd /%INSTALL_DIR%/boot/amd_ucode.img
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux
initrd /%INSTALL_DIR%/boot/intel-ucode.img
initrd /%INSTALL_DIR%/boot/amd-ucode.img
initrd /%INSTALL_DIR%/boot/x86_64/archiso.img
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%

View File

@ -6,8 +6,8 @@ Boot the Arch Linux install medium using NBD.
It allows you to install Arch Linux or perform system maintenance.
ENDTEXT
MENU LABEL Arch Linux install medium (x86_64, NBD)
LINUX boot/x86_64/vmlinuz
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img
LINUX boot/x86_64/vmlinuz-linux
INITRD boot/intel-ucode.img,boot/amd-ucode.img,boot/x86_64/archiso.img
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% archiso_nbd_srv=${pxeserver}
SYSAPPEND 3
@ -17,8 +17,8 @@ Boot the Arch Linux live medium using NFS.
It allows you to install Arch Linux or perform system maintenance.
ENDTEXT
MENU LABEL Arch Linux install medium (x86_64, NFS)
LINUX boot/x86_64/vmlinuz
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img
LINUX boot/x86_64/vmlinuz-linux
INITRD boot/intel-ucode.img,boot/amd-ucode.img,boot/x86_64/archiso.img
APPEND archisobasedir=%INSTALL_DIR% archiso_nfs_srv=${pxeserver}:/run/archiso/bootmnt
SYSAPPEND 3
@ -28,8 +28,8 @@ Boot the Arch Linux live medium using HTTP.
It allows you to install Arch Linux or perform system maintenance.
ENDTEXT
MENU LABEL Arch Linux install medium (x86_64, HTTP)
LINUX boot/x86_64/vmlinuz
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img
LINUX boot/x86_64/vmlinuz-linux
INITRD boot/intel-ucode.img,boot/amd-ucode.img,boot/x86_64/archiso.img
APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/
SYSAPPEND 3

View File

@ -9,8 +9,8 @@ Boot the Arch Linux install medium on BIOS.
It allows you to install Arch Linux or perform system maintenance.
ENDTEXT
MENU LABEL Arch Linux install medium (x86_64, BIOS)
LINUX boot/x86_64/vmlinuz
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img
LINUX boot/x86_64/vmlinuz-linux
INITRD boot/intel-ucode.img,boot/amd-ucode.img,boot/x86_64/archiso.img
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
INCLUDE boot/syslinux/archiso_tail.cfg