From 8af49866e4824bd4b096044f44ff9e3d6618c3c6 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 8 Oct 2021 15:33:06 -0700 Subject: [PATCH] Backport PR #1175 to reduce size of netinsts (#2009730, #2009731) --- ...drop-some-Qualcomm-smartphone-firmwa.patch | 29 +++++++++++++ ...drop-Marvell-Prestera-firmware-files.patch | 28 +++++++++++++ ...exclude-liquidio-and-netronome-firmw.patch | 41 +++++++++++++++++++ lorax.spec | 14 ++++++- 4 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 0001-runtime-cleanup-drop-some-Qualcomm-smartphone-firmwa.patch create mode 100644 0002-runtime-cleanup-drop-Marvell-Prestera-firmware-files.patch create mode 100644 0003-runtime-install-exclude-liquidio-and-netronome-firmw.patch diff --git a/0001-runtime-cleanup-drop-some-Qualcomm-smartphone-firmwa.patch b/0001-runtime-cleanup-drop-some-Qualcomm-smartphone-firmwa.patch new file mode 100644 index 0000000..43052d6 --- /dev/null +++ b/0001-runtime-cleanup-drop-some-Qualcomm-smartphone-firmwa.patch @@ -0,0 +1,29 @@ +From a70fcd5ea015580f83e9470fa65d7e5a657243f4 Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Wed, 6 Oct 2021 14:19:47 -0700 +Subject: [PATCH 1/3] runtime-cleanup: drop some Qualcomm smartphone firmwares + +These firmwares are for Qualcomm smartphone chipsets (SM845 and +SM8250). Don't think they're any use in network install images. + +Signed-off-by: Adam Williamson +--- + share/templates.d/99-generic/runtime-cleanup.tmpl | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/share/templates.d/99-generic/runtime-cleanup.tmpl b/share/templates.d/99-generic/runtime-cleanup.tmpl +index 37c45338..5960c82b 100644 +--- a/share/templates.d/99-generic/runtime-cleanup.tmpl ++++ b/share/templates.d/99-generic/runtime-cleanup.tmpl +@@ -231,6 +231,8 @@ removefrom linux-firmware /usr/lib/firmware/intel/IntcSST2.bin + removefrom linux-firmware /usr/lib/firmware/intel/fw_sst* + removefrom linux-firmware /usr/lib/firmware/intel/dsp* + removefrom linux-firmware /usr/lib/firmware/as102* ++removefrom linux-firmware /usr/lib/firmware/qcom/sdm845/* ++removefrom linux-firmware /usr/lib/firmware/qcom/sm8250/* + removefrom linux-firmware /usr/lib/firmware/qcom/venus*/* + removefrom linux-firmware /usr/lib/firmware/meson/vdec/* + removefrom linux-firmware /usr/lib/firmware/mellanox/mlxsw_spectrum* +-- +2.32.0 + diff --git a/0002-runtime-cleanup-drop-Marvell-Prestera-firmware-files.patch b/0002-runtime-cleanup-drop-Marvell-Prestera-firmware-files.patch new file mode 100644 index 0000000..e0e27bf --- /dev/null +++ b/0002-runtime-cleanup-drop-Marvell-Prestera-firmware-files.patch @@ -0,0 +1,28 @@ +From 8f4a66bf53acc4beae9530361de96fdbb81b44f9 Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Wed, 6 Oct 2021 14:21:34 -0700 +Subject: [PATCH 2/3] runtime-cleanup: drop Marvell Prestera firmware files + +These add up to 26MB and they are for high-end switches, unlikely +targets for network installs. + +Signed-off-by: Adam Williamson +--- + share/templates.d/99-generic/runtime-cleanup.tmpl | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/share/templates.d/99-generic/runtime-cleanup.tmpl b/share/templates.d/99-generic/runtime-cleanup.tmpl +index 5960c82b..827465f0 100644 +--- a/share/templates.d/99-generic/runtime-cleanup.tmpl ++++ b/share/templates.d/99-generic/runtime-cleanup.tmpl +@@ -236,6 +236,7 @@ removefrom linux-firmware /usr/lib/firmware/qcom/sm8250/* + removefrom linux-firmware /usr/lib/firmware/qcom/venus*/* + removefrom linux-firmware /usr/lib/firmware/meson/vdec/* + removefrom linux-firmware /usr/lib/firmware/mellanox/mlxsw_spectrum* ++removefrom linux-firmware /usr/lib/firmware/mrvl/prestera/* + %if basearch != "aarch64": + removefrom linux-firmware /usr/lib/firmware/dpaa2/* + %endif +-- +2.32.0 + diff --git a/0003-runtime-install-exclude-liquidio-and-netronome-firmw.patch b/0003-runtime-install-exclude-liquidio-and-netronome-firmw.patch new file mode 100644 index 0000000..327cbd2 --- /dev/null +++ b/0003-runtime-install-exclude-liquidio-and-netronome-firmw.patch @@ -0,0 +1,41 @@ +From 8514ce1ceb9b31cc5b0ab7d00951b70e9c237609 Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Wed, 6 Oct 2021 14:43:21 -0700 +Subject: [PATCH 3/3] runtime-install: exclude liquidio and netronome firmwares + +As Peter Robinson explains here: +https://bugzilla.redhat.com/show_bug.cgi?id=2011615#c3 +these are not useful, as the devices they're for do not support +netinst-style deployment. + +Signed-off-by: Adam Williamson +--- + share/templates.d/99-generic/runtime-install.tmpl | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/share/templates.d/99-generic/runtime-install.tmpl b/share/templates.d/99-generic/runtime-install.tmpl +index 4aabe292..fddac051 100644 +--- a/share/templates.d/99-generic/runtime-install.tmpl ++++ b/share/templates.d/99-generic/runtime-install.tmpl +@@ -17,12 +17,16 @@ installpkg grubby + %if basearch != "s390x": + ## skip the firmware for sound, video, and scanners, none of which will + ## do much good for the installer. Also skip uhd-firmware which is not +- ## even a kernel firmware package. ++ ## even a kernel firmware package. liquidio and netronome firmwares are ++ ## for enterprise switch devices, netinst deployment does not work on ++ ## these so there is no point shipping them - see ++ ## https://bugzilla.redhat.com/show_bug.cgi?id=2011615 + installpkg --optional *-firmware --except alsa* --except midisport-firmware \ + --except crystalhd-firmware --except ivtv-firmware \ + --except cx18-firmware --except iscan-firmware \ + --except uhd-firmware --except lulzbot-marlin-firmware \ +- --except gnome-firmware --except sigrok-firmware ++ --except gnome-firmware --except sigrok-firmware \ ++ --except liquidio-firmware --except netronome-firmware + installpkg b43-openfwwf + %endif + +-- +2.32.0 + diff --git a/lorax.spec b/lorax.spec index 0d80600..60c4f10 100644 --- a/lorax.spec +++ b/lorax.spec @@ -4,7 +4,7 @@ Name: lorax Version: 35.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Tool for creating the anaconda install images License: GPLv2+ @@ -14,6 +14,13 @@ URL: https://github.com/weldr/lorax # git checkout -b archive-branch lorax-%%{version}-%%{release} # tito build --tgz Source0: %{name}-%{version}.tar.gz +# Trim some unneeded firmware files to reduce size of netinsts +# https://bugzilla.redhat.com/show_bug.cgi?id=2009730 +# https://bugzilla.redhat.com/show_bug.cgi?id=2009731 +# https://github.com/weldr/lorax/pull/1175 +Patch0: 0001-runtime-cleanup-drop-some-Qualcomm-smartphone-firmwa.patch +Patch1: 0002-runtime-cleanup-drop-Marvell-Prestera-firmware-files.patch +Patch2: 0003-runtime-install-exclude-liquidio-and-netronome-firmw.patch BuildRequires: python3-devel BuildRequires: make @@ -134,7 +141,7 @@ Lorax templates for creating the boot.iso and live isos are placed in /usr/share/lorax/templates.d/99-generic %prep -%setup -q -n %{name}-%{version} +%autosetup -p1 -n %{name}-%{version} %build @@ -175,6 +182,9 @@ make DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} install %{_datadir}/lorax/templates.d/* %changelog +* Fri Oct 08 2021 Adam Williamson - 35.7-2 +- Backport PR #1175 to reduce size of netinsts (#2009730, #2009731) + * Tue Sep 07 2021 Brian C. Lane 35.7-1 - templates: Remove memtest86+ (bcl@redhat.com)