version 1.35, 2021/11/24 02:09:35 |
version 1.37, 2021/12/01 02:04:18 |
|
|
#!/bin/ksh |
#!/bin/ksh |
|
# $OpenBSD$ |
set -e |
set -e |
|
|
# Fake up some things from install.sub that we don't need to actually do |
# Fake up some things from install.sub that we don't need to actually do |
|
|
|
|
FWURL=http://firmware.openbsd.org/firmware/${HTTP_FWDIR} |
FWURL=http://firmware.openbsd.org/firmware/${HTTP_FWDIR} |
FWPUB_KEY=${DESTDIR}/etc/signify/openbsd-${VERSION}-fw.pub |
FWPUB_KEY=${DESTDIR}/etc/signify/openbsd-${VERSION}-fw.pub |
FWPATTERNS="file:${0%/*}/firmware_patterns" |
FWPATTERNS="${DESTDIR}/usr/share/misc/firmware_patterns" |
|
|
# TODO: support srclocal installation of firmware somehow |
# TODO: support srclocal installation of firmware somehow |
fw_install() { |
fw_install() { |
|
|
echo "Let's $MODE firmware!" |
echo "Let's $MODE firmware!" |
local _d _drivers=$( |
local _d _drivers=$( |
last='' |
last='' |
$_unpriv ftp -D "Detecting" -Vmo- $FWPATTERNS | |
|
while read _d _m; do |
while read _d _m; do |
grep=grep |
grep=grep |
[ "$last" = "$_d" ] && continue |
[ "$last" = "$_d" ] && continue |
|
|
$grep -q "$_m" /var/run/dmesg.boot || continue |
$grep -q "$_m" /var/run/dmesg.boot || continue |
echo $_d |
echo $_d |
last=$_d |
last=$_d |
done |
done < $FWPATTERNS |
) |
) |
|
|
if [ -z "$_drivers" ]; then |
if [ -z "$_drivers" ]; then |