From 5a353529f750abff175bc6c037e08d422eef3aa6 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Sat, 18 Aug 2018 17:14:22 -0300 Subject: [configs/releng] Make and use amd_ucode.bin for initrd. Requested at FS#59694 --- configs/releng/build.sh | 14 ++++++++++++++ .../releng/efiboot/loader/entries/archiso-x86_64-cd.conf | 1 + .../releng/efiboot/loader/entries/archiso-x86_64-usb.conf | 1 + configs/releng/syslinux/archiso_pxe.cfg | 6 +++--- configs/releng/syslinux/archiso_sys.cfg | 2 +- 5 files changed, 20 insertions(+), 4 deletions(-) (limited to 'configs/releng') diff --git a/configs/releng/build.sh b/configs/releng/build.sh index f5524e8..3272cd8 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -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 diff --git a/configs/releng/efiboot/loader/entries/archiso-x86_64-cd.conf b/configs/releng/efiboot/loader/entries/archiso-x86_64-cd.conf index d503f11..b77ed98 100644 --- a/configs/releng/efiboot/loader/entries/archiso-x86_64-cd.conf +++ b/configs/releng/efiboot/loader/entries/archiso-x86_64-cd.conf @@ -1,5 +1,6 @@ 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% diff --git a/configs/releng/efiboot/loader/entries/archiso-x86_64-usb.conf b/configs/releng/efiboot/loader/entries/archiso-x86_64-usb.conf index 14f3d02..09adca4 100644 --- a/configs/releng/efiboot/loader/entries/archiso-x86_64-usb.conf +++ b/configs/releng/efiboot/loader/entries/archiso-x86_64-usb.conf @@ -1,5 +1,6 @@ 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% diff --git a/configs/releng/syslinux/archiso_pxe.cfg b/configs/releng/syslinux/archiso_pxe.cfg index 481371a..92af749 100644 --- a/configs/releng/syslinux/archiso_pxe.cfg +++ b/configs/releng/syslinux/archiso_pxe.cfg @@ -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 diff --git a/configs/releng/syslinux/archiso_sys.cfg b/configs/releng/syslinux/archiso_sys.cfg index 0c82573..a35a1ea 100644 --- a/configs/releng/syslinux/archiso_sys.cfg +++ b/configs/releng/syslinux/archiso_sys.cfg @@ -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 -- cgit v1.2.3-70-g09d2 From f9308678eea7cbfd7b8de3fb27014e061fb19152 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 24 Aug 2018 09:29:47 +0200 Subject: use package amd-ucode for amd microcode The package linux-firmware has a new split package amd-ucode. Do not build the image manually but use the package. Signed-off-by: Christian Hesse --- configs/releng/build.sh | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'configs/releng') diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 3272cd8..d405ece 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -61,7 +61,7 @@ make_pacman_conf() { # Base installation, plus needed packages (airootfs) make_basefs() { mkarchiso ${verbose} -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" init - mkarchiso ${verbose} -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" -p "haveged intel-ucode memtest86+ mkinitcpio-nfs-utils nbd zsh efitools" install + mkarchiso ${verbose} -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" -p "haveged intel-ucode amd-ucode memtest86+ mkinitcpio-nfs-utils nbd zsh efitools" install } # Additional packages (airootfs) @@ -107,16 +107,6 @@ 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 @@ -266,7 +256,6 @@ 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 -- cgit v1.2.3-70-g09d2 From e23dbb4516ffff7e022daf05e8adae4e793cac7f Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Sat, 25 Aug 2018 13:45:05 -0300 Subject: [configs/releng] Update amd-ucode license path Signed-off-by: Gerardo Exequiel Pozzi --- configs/releng/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configs/releng') diff --git a/configs/releng/build.sh b/configs/releng/build.sh index d405ece..7eb2d1e 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -121,7 +121,7 @@ make_boot_extra() { 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 + cp ${work_dir}/x86_64/airootfs/usr/share/licenses/amd-ucode/LICENSE ${work_dir}/iso/${install_dir}/boot/amd_ucode.LICENSE } # Prepare /${install_dir}/boot/syslinux -- cgit v1.2.3-70-g09d2