mirror of
https://github.com/archlinux/archiso.git
synced 2024-09-19 03:30:20 -06:00
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
This commit is contained in:
parent
34426df652
commit
969b91f700
2 changed files with 9 additions and 5 deletions
|
@ -17,6 +17,10 @@ Deprecated
|
|||
Fixed
|
||||
-----
|
||||
|
||||
- Look for microcode update files in the initramfs images when checking if external microcode images are needed. 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.
|
||||
|
||||
Removed
|
||||
-------
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue