summaryrefslogtreecommitdiff
path: root/ui/qt5
diff options
context:
space:
mode:
Diffstat (limited to 'ui/qt5')
-rw-r--r--ui/qt5/CMakeLists.txt5
-rw-r--r--ui/qt5/firmwarepage.cc54
-rw-r--r--ui/qt5/firmwarepage.hh30
-rw-r--r--ui/qt5/horizon.qrc1
-rw-r--r--ui/qt5/horizonwizard.cc6
-rw-r--r--ui/qt5/resources/firmware-help.txt49
6 files changed, 145 insertions, 0 deletions
diff --git a/ui/qt5/CMakeLists.txt b/ui/qt5/CMakeLists.txt
index 6279cc1..d33e74a 100644
--- a/ui/qt5/CMakeLists.txt
+++ b/ui/qt5/CMakeLists.txt
@@ -17,6 +17,11 @@ set(UI_SOURCES
hostnamepage.cc
horizon.qrc)
+
+IF(UNSUPPORTED_NONFREE_FIRMWARE)
+ LIST(APPEND UI_SOURCES firmwarepage.cc)
+ENDIF(UNSUPPORTED_NONFREE_FIRMWARE)
+
add_executable(horizon-qt5 ${UI_SOURCES})
target_link_libraries(horizon-qt5 Qt5::Network Qt5::Widgets)
diff --git a/ui/qt5/firmwarepage.cc b/ui/qt5/firmwarepage.cc
new file mode 100644
index 0000000..235d9af
--- /dev/null
+++ b/ui/qt5/firmwarepage.cc
@@ -0,0 +1,54 @@
+/*
+ * firmwarepage.cc - Implementation of the UI.Firmware page
+ * horizon-qt5, the Qt 5 user interface for
+ * Project Horizon
+ *
+ * Copyright (c) 2019 Adélie Linux and contributors. All rights reserved.
+ * This code is licensed under the AGPL 3.0 license, as noted in the
+ * LICENSE-code file in the root directory of this repository.
+ *
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+#include "firmwarepage.hh"
+
+#include <QLabel>
+#include <QVariant>
+#include <QVBoxLayout>
+
+FirmwarePage::FirmwarePage(QWidget *parent) : HorizonWizardPage(parent) {
+ setTitle(tr("Load Firmware"));
+ loadWatermark("intro");
+
+ QLabel *descLabel = new QLabel(tr(
+ "<p>Your computer may require the use of drivers which use proprietary, closed-source components (or <i>firmware</i>) in order to use certain hardware or functionality.</p>"
+ "<p>Most Wi-Fi network adaptors and 3D graphics cards require proprietary firmware.</p>"
+ "<p>Proprietary firmware cannot be audited for security or reliability issues due to its closed-source nature. Only install proprietary firmware if you require it.</p>"
+ "<p>If you intend to use this computer to perform security-sensitive tasks, we strongly recommend that you choose not to load firmware on this computer.</p>"
+ "<p>Do you want to load firmware on this computer?</p>"));
+ descLabel->setTextFormat(Qt::RichText);
+ descLabel->setWordWrap(true);
+
+ noButton = new QRadioButton(tr("&No, do not load firmware on this computer."));
+ noButton->setChecked(true);
+ yesButton = new QRadioButton(tr("&Yes, load firmware on this computer."));
+ firmwareChoice = new QButtonGroup;
+ firmwareChoice->addButton(noButton);
+ firmwareChoice->addButton(yesButton);
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(descLabel);
+ layout->addStretch();
+ layout->addWidget(noButton);
+ layout->addWidget(yesButton);
+ layout->addStretch();
+
+ setField("firmware", QVariant(false));
+ connect(firmwareChoice, static_cast<void (QButtonGroup:: *)(QAbstractButton *)>(&QButtonGroup::buttonClicked),
+ [=](QAbstractButton *button) {
+ if(button == yesButton) setField("firmware", QVariant(true));
+ else setField("firmware", QVariant(false));
+ });
+
+ setLayout(layout);
+}
diff --git a/ui/qt5/firmwarepage.hh b/ui/qt5/firmwarepage.hh
new file mode 100644
index 0000000..e283a25
--- /dev/null
+++ b/ui/qt5/firmwarepage.hh
@@ -0,0 +1,30 @@
+/*
+ * firmwarepage.hh - Definition of the UI.Firmware page
+ * horizon-qt5, the Qt 5 user interface for
+ * Project Horizon
+ *
+ * Copyright (c) 2019 Adélie Linux and contributors. All rights reserved.
+ * This code is licensed under the AGPL 3.0 license, as noted in the
+ * LICENSE-code file in the root directory of this repository.
+ *
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+#ifndef FIRMWAREPAGE_HH
+#define FIRMWAREPAGE_HH
+
+#include "horizonwizardpage.hh"
+
+#include <QButtonGroup>
+#include <QRadioButton>
+
+class FirmwarePage : public HorizonWizardPage {
+public:
+ FirmwarePage(QWidget *parent = nullptr);
+private:
+ QButtonGroup *firmwareChoice;
+ QRadioButton *yesButton;
+ QRadioButton *noButton;
+};
+
+#endif /* !FIRMWAREPAGE_HH */
diff --git a/ui/qt5/horizon.qrc b/ui/qt5/horizon.qrc
index 43e8475..9ef9255 100644
--- a/ui/qt5/horizon.qrc
+++ b/ui/qt5/horizon.qrc
@@ -17,6 +17,7 @@
<file>resources/intro-help.txt</file>
<file>resources/input-help.txt</file>
<file>resources/partition-help.txt</file>
+ <file>resources/firmware-help.txt</file>
<file>resources/network-start-help.txt</file>
<file>resources/network-iface-help.txt</file>
<file>resources/network-dhcp-help.txt</file>
diff --git a/ui/qt5/horizonwizard.cc b/ui/qt5/horizonwizard.cc
index 7a64d2a..ba4b487 100644
--- a/ui/qt5/horizonwizard.cc
+++ b/ui/qt5/horizonwizard.cc
@@ -31,6 +31,9 @@ extern "C" {
#include "intropage.hh"
#include "inputpage.hh"
+#ifdef NON_LIBRE_FIRMWARE
+#include "firmwarepage.hh"
+#endif /* NON_LIBRE_FIRMWARE */
#include "networkingpage.hh"
#include "networkifacepage.hh"
#include "netsimplewifipage.hh"
@@ -173,6 +176,9 @@ HorizonWizard::HorizonWizard(QWidget *parent) : QWizard(parent) {
setPage(Page_Intro, new IntroPage);
setPage(Page_Input, new InputPage);
+#ifdef NON_LIBRE_FIRMWARE
+ setPage(Page_Firmware, new FirmwarePage);
+#endif /* NON_LIBRE_FIRMWARE */
setPage(Page_Network, new NetworkingPage);
setPage(Page_Network_Iface, new NetworkIfacePage);
setPage(Page_Network_Wireless, new NetworkSimpleWirelessPage);
diff --git a/ui/qt5/resources/firmware-help.txt b/ui/qt5/resources/firmware-help.txt
new file mode 100644
index 0000000..6456dc1
--- /dev/null
+++ b/ui/qt5/resources/firmware-help.txt
@@ -0,0 +1,49 @@
+<h2>Firmware</h2>
+
+<p>This page allows you to decide whether or not to install proprietary
+firmware on this computer.</p>
+
+<h3>What is firmware?</h3>
+
+<p>"Firmware" is a component of a hardware driver. This component is uploaded
+to the hardware itself, which allows the hardware to perform operations or
+control itself.</p>
+
+<p>For example, network devices sometimes contain firmware that allows them to
+perform checksum offloading.</p>
+
+<h3>What is <i>proprietary</i> firmware?</h3>
+
+<p>Proprietary firmware is firmware that is released by the hardware
+manufacturer without source code. Usually, this proprietary firmware is
+provided without warranty by the hardware manufacturer. Since it is closed
+source and fully proprietary, it cannot be audited for security or reliability
+issues.</p>
+
+<p>This means that when you load proprietary firmware on to a computer, we
+can no longer provide any assurances to its security or reliability.</p>
+
+<h3>Why would I want to load proprietary firmware?</h3>
+
+<p>Most wireless networking cards, and virtually all 3D graphics cards, utilise
+proprietary firmware. You may be unable to connect to a wireless network, or
+use certain radio frequencies (such as the 5 GHz band), without proprietary
+firmware. You may also be unable to use the maximum resolution of your
+graphics card, or utilise the 3D acceleration capabilities of it (including
+OpenGL and Vulkan), without proprietary firmware.</p>
+
+<h3>What are the risks of using proprietary firmware?</h3>
+
+<p>Your system may be compromised by security issues in the firmware. Your
+system may also become unstable due to improper programming of the
+firmware.</p>
+
+<h3>Which option should I choose?</h3>
+
+<p>Adélie Linux allows you the freedom to choose whether or not you wish to
+install proprietary firmware on your computer.</p>
+
+<p>If you have an elevated threat profile, you should always choose No.</p>
+
+<p>If you want to utilise hardware that requires proprietary firmware despite
+the potential risk, you may choose Yes.</p>