Skip to content

Instantly share code, notes, and snippets.

@cleanhands
Last active May 23, 2024 17:44
Show Gist options
  • Select an option

  • Save cleanhands/a7b136aa4eb776fb11d58714871b1051 to your computer and use it in GitHub Desktop.

Select an option

Save cleanhands/a7b136aa4eb776fb11d58714871b1051 to your computer and use it in GitHub Desktop.
Fix "Possibly missing firmware for module XXXX" by installing mkinitcpio-firmware and dependencies from AUR
#!/usr/bin/env bash
set -euo pipefail
t="$(mktemp -d)"
if [[ ! -e ${t} ]]; then
>&2 echo "Failed to create temp directory"
exit 1
fi
trap 'rm -rf "${t}"' EXIT
list=(
"aic94xx-firmware"
"ast-firmware"
"upd72020x-fw"
"wd719x-firmware"
"mkinitcpio-firmware"
)
sudo -v
for l in "${list[@]}"; do
d="${t}/${l}"
git clone "https://aur.archlinux.org/${l}.git" "${d}"
makepkg --noconfirm -s -D "${d}"
find "${d}" -name '*.zst' ! -name '*-debug-*' -exec sudo pacman --noconfirm -U {} +
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment