summaryrefslogtreecommitdiff
path: root/configs/releng/build.sh
diff options
context:
space:
mode:
authorGerardo Exequiel Pozzi <vmlinuz386@gmail.com>2018-08-18 17:14:22 -0300
committerGerardo Exequiel Pozzi <vmlinuz386@gmail.com>2018-08-18 23:23:44 -0300
commit5a353529f750abff175bc6c037e08d422eef3aa6 (patch)
treef1dfe7e86f28ca063a7ad2bbad1246e28f7a3b5a /configs/releng/build.sh
parent69f637148a3c36ca470ced11e8cd50d448423533 (diff)
downloadarchiso32-5a353529f750abff175bc6c037e08d422eef3aa6.tar.xz
[configs/releng] Make and use amd_ucode.bin for initrd.
Requested at FS#59694
Diffstat (limited to 'configs/releng/build.sh')
-rwxr-xr-xconfigs/releng/build.sh14
1 files changed, 14 insertions, 0 deletions
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