-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadditional-firmware
More file actions
executable file
·42 lines (32 loc) · 1.57 KB
/
additional-firmware
File metadata and controls
executable file
·42 lines (32 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh
myname="${0##*/}"
TMPDIR="${TMPDIR:-/tmp}"
tmp_d="$TMPDIR/firmware_installer_$$"
firmware_dir=/lib/firmware/amdgpu/
die() {
[ -n "$1" ] && printf '%s\n' "$*" >&2;
exit 1
}
cleanup() {
rm -rf -- "$tmp_d"
}
trap cleanup EXIT INT TERM
[ -d "$tmp_d" ] || mkdir -p -- "$tmp_d" || die "could not create dir at ${tmp_d}"
echo " -- ${myname} -- "
echo "${myname}: downloading additional amd firmware files"
url="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/amdgpu/"
files="aldebaran_cap.bin gc_11_0_0_mes_2.bin gc_11_0_0_toc.bin gc_11_0_1_mes_2.bin gc_11_0_2_mes_2.bin gc_11_0_3_imu.bin gc_11_0_3_me.bin gc_11_0_3_mec.bin gc_11_0_3_mes1.bin gc_11_0_3_mes_2.bin gc_11_0_3_mes.bin gc_11_0_3_pfp.bin gc_11_0_3_rlc.bin gc_11_0_4_me.bin gc_11_0_4_mec.bin gc_11_0_4_mes1.bin gc_11_0_4_mes_2.bin gc_11_0_4_mes.bin gc_11_0_4_pfp.bin gc_11_0_4_rlc.bin ip_discovery.bin navi10_mes.bin navi12_cap.bin psp_13_0_10_sos.bin psp_13_0_10_ta.bin psp_13_0_11_ta.bin psp_13_0_11_toc.bin sdma_6_0_3.bin sienna_cichlid_cap.bin sienna_cichlid_mes1.bin sienna_cichlid_mes.bin smu_13_0_10.bin vega10_cap.bin"
cd "$tmp_d" || die "failed to cd into tmp dir"
for file in $files ; do
cmd="wget $url$file"
$cmd
done
echo "${myname}: installing additional amd firmware files"
for file in $files ; do
if [ -f "${firmware_dir}${file}" ]; then
printf '%s %25s %s\n' "firmware file" "${file}" "already exists"
else
printf '%s %25s %s\n' "firmware file" "${file}" "doesn't exist, copying it..."
cp "$file" "${firmware_dir}${file}"
fi
done