From e555e64e273f1ad3bafc6ea4ec125c55360f270c Mon Sep 17 00:00:00 2001 From: deraadt Date: Tue, 11 Jan 2022 00:58:32 +0000 Subject: [PATCH] If the install media contains non-free /*firmware*.tgz files, use fw_update to install them. This lets users usb-lift firmware on a preloaded install70.img image like this: # vnconfig install70.img vnd0 # (mount /dev/vnd0a /mnt && cd /mnt && fw_update -F iwm iwx iwn intel) # umount /mnt && vnconfig -u vnd0 The firmwares are installed after the sets, then all network drivers are re-configured in the hope that new firmwares have showed up. The install script continues to attempt a network firmware install, which might pull/update additional firmwares. work done with afresh1 --- distrib/miniroot/install.sub | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index e40e36423a0..76d0b68890a 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1188 2022/01/11 00:48:45 deraadt Exp $ +# $OpenBSD: install.sub,v 1.1189 2022/01/11 00:58:32 deraadt Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer @@ -2739,6 +2739,12 @@ install_sets() { # Preserve the selected install source selection. [[ -n $INSTALL_METHOD ]] && _d=$INSTALL_METHOD + if [ -x /mnt/usr/sbin/fw_update -a \ + "$(echo /mnt2/*firmware*tgz)" != "/mnt2/*firmware*tgz" ]; then + DESTDIR=/mnt /mnt/usr/sbin/fw_update /mnt2/*firmware*tgz + enable_ifs # try again with firmwares + fi + # Set default to 'done' to leave the while-loop. sane_install quiet || $AI && _d=done done -- 2.20.1