Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archiso/mkarchiso
diff options
context:
space:
mode:
authornl6720 <nl6720@gmail.com>2024-05-04 09:34:31 +0300
committernl6720 <nl6720@gmail.com>2024-05-04 15:24:12 +0300
commit969b91f700fab2f8b9c80fbf31cce0f8a1b248e5 (patch)
treec18be12cf80b2b48c89bd044108ff32d5f3753eb /archiso/mkarchiso
parent34426df6522868aba1c911265318420285e5755a (diff)
mkarchiso: fix check for microcode update files in initramfs images
The existence of a ``early_cpio`` file is not enough since mkinitcpio can and will place other files in the early uncompressed CPIO even when the microcode hook is not used. Fixes https://gitlab.archlinux.org/archlinux/archiso/-/issues/231
Diffstat (limited to 'archiso/mkarchiso')
-rwxr-xr-xarchiso/mkarchiso10
1 files changed, 5 insertions, 5 deletions
diff --git a/archiso/mkarchiso b/archiso/mkarchiso
index 2a8c02f..98bc248 100755
--- a/archiso/mkarchiso
+++ b/archiso/mkarchiso
@@ -555,14 +555,14 @@ _make_efibootimg() {
mmd -i "${efibootimg}" ::/EFI ::/EFI/BOOT
}
-# Check if initramfs files contain early_cpio
-_check_if_initramfs_has_early_cpio() {
+# Check if initramfs files contain microcode update files
+_check_if_initramfs_has_ucode() {
local initrd
for initrd in $(compgen -G "${pacstrap_dir}"'/boot/initramfs-*.img'); do
- if ! bsdtar -tf "$initrd" early_cpio &>/dev/null; then
+ if ! bsdtar -tf "$initrd" 'early_cpio' 'kernel/x86/microcode/*.bin' &>/dev/null; then
need_external_ucodes=1
- _msg_info "Initramfs file does not contain 'early_cpio'. External microcode initramfs images will be copied."
+ _msg_info "Initramfs file does not contain microcode update files. External microcode initramfs images will be copied."
return
fi
done
@@ -2004,7 +2004,7 @@ _build_iso_base() {
_run_once _make_version
_run_once _make_customize_airootfs
_run_once _make_pkglist
- _run_once _check_if_initramfs_has_early_cpio
+ _run_once _check_if_initramfs_has_ucode
if [[ "${buildmode}" == 'netboot' ]]; then
_run_once _make_boot_on_iso9660
else