Commit 5a353529 authored by Gerardo Exequiel Pozzi's avatar Gerardo Exequiel Pozzi
Browse files

[configs/releng] Make and use amd_ucode.bin for initrd.

Requested at FS#59694
parent 69f63714
......@@ -107,6 +107,16 @@ make_customize_airootfs() {
rm ${work_dir}/x86_64/airootfs/root/customize_airootfs.sh
}
# Prepare amd_ucode
make_amd_ucode_img() {
mkdir -p ${work_dir}/amd-ucode/kernel/x86/microcode
cat ${work_dir}/x86_64/airootfs/lib/firmware/amd-ucode/microcode_amd*.bin > ${work_dir}/amd-ucode/kernel/x86/microcode/AuthenticAMD.bin
pushd ${work_dir}/amd-ucode > /dev/null
echo kernel/x86/microcode/AuthenticAMD.bin | bsdcpio -o -H newc -R 0:0 > amd-ucode.img
popd > /dev/null
cp ${work_dir}/amd-ucode/amd-ucode.img ${work_dir}/x86_64/airootfs/boot/amd-ucode.img
}
# Prepare kernel/initramfs ${install_dir}/boot/
make_boot() {
mkdir -p ${work_dir}/iso/${install_dir}/boot/x86_64
......@@ -120,6 +130,8 @@ make_boot_extra() {
cp ${work_dir}/x86_64/airootfs/usr/share/licenses/common/GPL2/license.txt ${work_dir}/iso/${install_dir}/boot/memtest.COPYING
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/amd-ucode.img ${work_dir}/iso/${install_dir}/boot/amd_ucode.img
cp ${work_dir}/x86_64/airootfs/usr/share/licenses/linux-firmware/LICENSE.amd-ucode ${work_dir}/iso/${install_dir}/boot/amd_ucode.LICENSE
}
# Prepare /${install_dir}/boot/syslinux
......@@ -185,6 +197,7 @@ make_efiboot() {
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/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
mkdir -p ${work_dir}/efiboot/EFI/boot
cp ${work_dir}/x86_64/airootfs/usr/share/efitools/efi/PreLoader.efi ${work_dir}/efiboot/EFI/boot/bootx64.efi
......@@ -253,6 +266,7 @@ run_once make_basefs
run_once make_packages
run_once make_setup_mkinitcpio
run_once make_customize_airootfs
run_once make_amd_ucode_img
run_once make_boot
run_once make_boot_extra
run_once make_syslinux
......
title Arch Linux archiso x86_64 UEFI CD
linux /EFI/archiso/vmlinuz.efi
initrd /EFI/archiso/intel_ucode.img
initrd /EFI/archiso/amd_ucode.img
initrd /EFI/archiso/archiso.img
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
title Arch Linux archiso x86_64 UEFI USB
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz
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%
......@@ -7,7 +7,7 @@ It allows you to install Arch Linux or perform system maintenance.
ENDTEXT
MENU LABEL Boot Arch Linux (x86_64) (NBD)
LINUX boot/x86_64/vmlinuz
INITRD boot/intel_ucode.img,boot/x86_64/archiso.img
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
......@@ -18,7 +18,7 @@ It allows you to install Arch Linux or perform system maintenance.
ENDTEXT
MENU LABEL Boot Arch Linux (x86_64) (NFS)
LINUX boot/x86_64/vmlinuz
INITRD boot/intel_ucode.img,boot/x86_64/archiso.img
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
......@@ -29,7 +29,7 @@ It allows you to install Arch Linux or perform system maintenance.
ENDTEXT
MENU LABEL Boot Arch Linux (x86_64) (HTTP)
LINUX boot/x86_64/vmlinuz
INITRD boot/intel_ucode.img,boot/x86_64/archiso.img
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
......
......@@ -7,7 +7,7 @@ It allows you to install Arch Linux or perform system maintenance.
ENDTEXT
MENU LABEL Boot Arch Linux (x86_64)
LINUX boot/x86_64/vmlinuz
INITRD boot/intel_ucode.img,boot/x86_64/archiso.img
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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment