Make use of firmware-misc-nonfree to more reliably install non-free firmware

This commit is contained in:
Fierelier 2023-08-23 10:48:16 +02:00
parent 7785bde220
commit fd4d06f803
3 changed files with 14 additions and 13 deletions

View File

@ -1,2 +1,3 @@
sources-proprietary
firmware-proprietary-prereq
firmware-proprietary

View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
set -e
apt-get -y install python3-apt

View File

@ -1,13 +1,10 @@
#!/bin/bash
set -e
function sfp {
packages=""
while read p; do
IFS=" " read -ra packageinfo <<< "$p"
if [[ "${packageinfo[0]}" == *firmware* ]]; then
packages="$packages ${packageinfo[0]}"
fi
done <<<$(apt-cache search "$1")
echo "$packages"
}
echo "WDVN_PACKAGES=\"\$WDVN_PACKAGES firmware-linux firmware-misc-nonfree amd64-microcode intel-microcode $(sfp wireless) $(sfp wifi) $(sfp net) $(sfp nic)\"" >"/chroot-out"
#!/usr/bin/env python3
import apt
cache = apt.Cache()
ofile = open("/chroot-out","w",encoding="utf-8")
ofile.write('WDVN_PACKAGES="$WDVN_PACKAGES')
for package in cache:
if package.candidate.origins[0].component == "non-free-firmware":
ofile.write(" " + package.name)
ofile.write('"')
ofile.close()