[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Manually add firmware (or other) packages for installation?



Hi,

Ben Hutchings <ben@decadent.org.uk> wrote:
> Could this not be done in "discover"?  If it can match PCI devices with
> a specific class and vendor, that should be enough to decide that
> firmware-amd-graphics (AMD, ATI) or firmware-misc-nonfree (Intel,
> Nvidia) might be wanted.

As a more low-level implementation, I thought if adding a new dialog would
be good, to allow the user to give additional packages for install.
Could be used for such firmware packages, or for any other packages...

(When switching tasksel away from aptitude, there have been such requests
as well, to allow the addition of custom packages for installation.)

Would be most probably an expert-only function, with no automatic detection
of hardware etc.
But maybe it would be worth it anyway?

I have attached a patch for hw-detect, the dialog would run within the
'finish-install' step. I have tested it, it works fine.
(Maybe the wording of the template could be over-worked, and reviewed by
l10n-english as well.)


Comments?


Holger




-- 
Holger Wansing <hwansing@mailbox.org>
PGP-Fingerprint: 496A C6E8 1442 4B34 8508  3529 59F1 87CA 156E B076
>From 3f234beac016d19b27f102df5b8717bca788f484 Mon Sep 17 00:00:00 2001
From: Holger Wansing <hwansing@mailbox.org>
Date: Sun, 27 Dec 2020 13:29:24 +0100
Subject: [PATCH] Introduce a dialog (expert-only), to allow installation of
 user-given packages (like firmware packages, that were not detected as needed
 by installer)

---
 debian/changelog                       |  8 ++++++++
 debian/hw-detect.templates             | 23 +++++++++++++++++++++++
 hw-detect.finish-install.d/09hw-detect | 14 ++++++++++++++
 3 files changed, 45 insertions(+)
 create mode 100755 hw-detect.finish-install.d/09hw-detect

diff --git a/debian/changelog b/debian/changelog
index f8409b2a..dba1448e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+hw-detect (1.143) UNRELEASED; urgency=medium
+
+  * Introduce a dialog (expert-only) within finish-install, to allow 
+    installation of user-given packages (like firmware packages, that were not
+    detected as needed by installer).
+
+ -- Holger Wansing <hwansing@mailbox.org>  Sun, 27 Dec 2020 13:23:17 +0100
+
 hw-detect (1.142) unstable; urgency=medium
 
   * Team upload
diff --git a/debian/hw-detect.templates b/debian/hw-detect.templates
index c413e88e..a6eed874 100644
--- a/debian/hw-detect.templates
+++ b/debian/hw-detect.templates
@@ -96,6 +96,29 @@ Type: text
 # :sl1:
 _Description: Checking for firmware...
 
+Template: hw-detect/firmware_packages_to_install
+Type: string
+# :sl3:
+Description: Additional/firmware packages to be installed:
+ There is a chance that the installer was unable to load kernel modules for
+ some of your hardware, because they are not included in the installer
+ environment. As a consequence, the installer would also fail to notice that
+ firmware might be needed for that hardware devices. This is known to happen
+ frequently for graphics cards like those from AMD/ATI or NVIDIA. Missing
+ firmware for such devices might result in the graphical environment (X,
+ Wayland) failing to start on your newly installed system.
+ .
+ If you know you have such hardware in your system, you can enter the needed
+ firmware packages here for installation, so the installed system is able to
+ use it.
+ .
+ Please note, that you can also use this dialog for installation of any other
+ additional packages you want to have installed, not just firmware. Package
+ names need to be space-separated.
+ .
+ If you don't know what to enter, just leave it blank to not install any
+ additional packages.
+
 # Temporary template to force old behavior of loading IDE modules by default
 Template: hw-detect/load-ide
 Type: boolean
diff --git a/hw-detect.finish-install.d/09hw-detect b/hw-detect.finish-install.d/09hw-detect
new file mode 100755
index 00000000..cd6dd8a1
--- /dev/null
+++ b/hw-detect.finish-install.d/09hw-detect
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+. /usr/share/debconf/confmodule
+#set -x
+
+# install additional / firmware packages?
+# Ask user, which additional packages should be installed, if any.
+db_input low hw-detect/firmware_packages_to_install || true
+db_go || true
+
+if db_get hw-detect/firmware_packages_to_install && [ "$RET" ]; then
+	apt-install $RET
+fi
-- 
2.20.1


Reply to: