Last active
December 2, 2024 01:31
-
-
Save carlosrogue/8fdf3cac49edb56a699f5c200103afb5 to your computer and use it in GitHub Desktop.
How to download missing the firmware files when running the update-initramfs command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: ./firmware.sh "W: Possible missing firmware /lib/firmware/amdgpu/sienna_cichlid_dmcub.bin for module amdgpu" | |
# or, save all firmware errors in a file: | |
# cat missing-firmware.txt | xargs -I % ./firmware.sh % | |
download() { | |
firmware=$(echo $1 | awk '{ print $5}') | |
module=$(echo $firmware | awk -F/ '{ print $4 }') | |
bin=$(echo $firmware | awk -F/ '{ print $5 }') | |
#https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/amdgpu/arcturus_asd.bin | |
url=https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/$module/$bin | |
sudo mkdir -p /lib/firmware/$module | |
name=$(echo $1 | awk '{ print $(NF) }') | |
echo "Downloading missing firmware $bin for module $name" | |
sudo curl -sL --output /lib/firmware/$module/$bin $url | |
} | |
if [[ -n $1 ]] | |
then | |
download $1 | |
fi |
Author
carlosrogue
commented
Nov 25, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment