Backport PR #1175 to reduce size of netinsts (#2009730, #2009731)

This commit is contained in:
Adam Williamson 2021-10-08 15:33:06 -07:00
parent 3f58dab4dd
commit 8af49866e4
4 changed files with 110 additions and 2 deletions

View File

@ -0,0 +1,29 @@
From a70fcd5ea015580f83e9470fa65d7e5a657243f4 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
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 <awilliam@redhat.com>
---
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

View File

@ -0,0 +1,28 @@
From 8f4a66bf53acc4beae9530361de96fdbb81b44f9 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
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 <awilliam@redhat.com>
---
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

View File

@ -0,0 +1,41 @@
From 8514ce1ceb9b31cc5b0ab7d00951b70e9c237609 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
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 <awilliam@redhat.com>
---
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

View File

@ -4,7 +4,7 @@
Name: lorax Name: lorax
Version: 35.7 Version: 35.7
Release: 1%{?dist} Release: 2%{?dist}
Summary: Tool for creating the anaconda install images Summary: Tool for creating the anaconda install images
License: GPLv2+ License: GPLv2+
@ -14,6 +14,13 @@ URL: https://github.com/weldr/lorax
# git checkout -b archive-branch lorax-%%{version}-%%{release} # git checkout -b archive-branch lorax-%%{version}-%%{release}
# tito build --tgz # tito build --tgz
Source0: %{name}-%{version}.tar.gz 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: python3-devel
BuildRequires: make 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 /usr/share/lorax/templates.d/99-generic
%prep %prep
%setup -q -n %{name}-%{version} %autosetup -p1 -n %{name}-%{version}
%build %build
@ -175,6 +182,9 @@ make DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} install
%{_datadir}/lorax/templates.d/* %{_datadir}/lorax/templates.d/*
%changelog %changelog
* Fri Oct 08 2021 Adam Williamson <awilliam@redhat.com> - 35.7-2
- Backport PR #1175 to reduce size of netinsts (#2009730, #2009731)
* Tue Sep 07 2021 Brian C. Lane <bcl@redhat.com> 35.7-1 * Tue Sep 07 2021 Brian C. Lane <bcl@redhat.com> 35.7-1
- templates: Remove memtest86+ (bcl@redhat.com) - templates: Remove memtest86+ (bcl@redhat.com)