alpine: 无需手动安装 firmware

setup-disk 会自动安装合适的 firmware
This commit is contained in:
bin456789 2024-12-01 00:08:30 +08:00
parent c03a9a96b2
commit b00b4cded0
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -1256,7 +1256,8 @@ install_alpine() {
# ERROR: grub-2.12-r5.trigger: script exited with error 1 # ERROR: grub-2.12-r5.trigger: script exited with error 1
mount_pseudo_fs /os mount_pseudo_fs /os
# 安装固件微码 # setup-disk 会自动选择固件,但不包括微码?
# https://github.com/alpinelinux/alpine-conf/blob/e18384a85e93c9cad30437a0a06802a3f385e550/setup-disk.in#L421
# shellcheck disable=SC2046 # shellcheck disable=SC2046
if is_need_ucode_firmware; then if is_need_ucode_firmware; then
chroot /os apk add $(get_ucode_firmware_pkgs) chroot /os apk add $(get_ucode_firmware_pkgs)
@ -2489,9 +2490,11 @@ get_ucode_firmware_pkgs() {
esac esac
case "$os-$(get_cpu_vendor)" in case "$os-$(get_cpu_vendor)" in
alpine-intel) echo linux-firmware linux-firmware-intel intel-ucode ;; # setup-alpine 会自动选择 firmware
alpine-amd) echo linux-firmware linux-firmware-amd linux-firmware-amd-ucode amd-ucode ;; # https://github.com/alpinelinux/alpine-conf/blob/e18384a85e93c9cad30437a0a06802a3f385e550/setup-disk.in#L421
alpine-*) echo linux-firmware ;; alpine-intel) echo intel-ucode ;;
alpine-amd) echo amd-ucode ;;
alpine-*) ;;
debian-intel) echo firmware-linux intel-microcode ;; debian-intel) echo firmware-linux intel-microcode ;;
debian-amd) echo firmware-linux amd64-microcode ;; debian-amd) echo firmware-linux amd64-microcode ;;