From 6c9c505ca900dc14b1637175d311c3dc49e85366 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Tue, 15 Dec 2020 06:48:20 -0800 Subject: [PATCH] Add additional firmware images to be excluded Removed additional firmware, largely Wi-Fi and embedded SoC firmware, from the ramdisk as these devices are unlikely to be needed in the process of the use of a deployment ramdisk. Change-Id: Ia63c4d5d6c00c7fa64e7c2d570645b8a16aaf0c3 --- .../environment.d/10-defaults.bash | 16 ++++++++++++- .../post-install.d/99-remove-extra-packages | 4 +++- doc/source/admin/dib.rst | 23 ++++++++++++++++--- .../notes/no-firmware-e2cb953037a3be8f.yaml | 5 ++-- 4 files changed, 41 insertions(+), 7 deletions(-) diff --git a/dib/ironic-python-agent-ramdisk/environment.d/10-defaults.bash b/dib/ironic-python-agent-ramdisk/environment.d/10-defaults.bash index 7c5f5ce..3833ea0 100644 --- a/dib/ironic-python-agent-ramdisk/environment.d/10-defaults.bash +++ b/dib/ironic-python-agent-ramdisk/environment.d/10-defaults.bash @@ -1 +1,15 @@ -export IPA_REMOVE_FIRMWARE=${IPA_REMOVE_FIRMWARE:-amdgpu,netronome} +export IPA_REMOVE_FIRMWARE=${IPA_REMOVE_FIRMWARE:-amdgpu,netronome,qcom,ti-communication,ti-keystone,ueagle-atm,rsi,mrvl,brcm,mediatek,ath10k,rtlwifi} + +# NOTE(TheJulia): List of what each item represents for future context +# amdgpu == AMD/ATI Radeon/Vega/Raven firmware for drivers +# netronome == Netronome Agilio Smartnics +# qcom = Qualcom SoC firmware +# ti-communication == Texas Instruments SoC firmware +# ti-keystone == Texas Instruments baseband firmware +# ueagle-atm == ADSL/ATM interface card firmware +# rsi == Redpine wifi chip firmware +# mrvl == Marvell wifi chip and prestera ethernet switch ASIC firmware +# brcm == Broadcom wifi firmware +# mediatek == Mediatek wifi and SoC (think chromebook) firmware +# ath10k == Qualcom Atheros 10k firmware +# rtlwifi == Realtek Wifi firmware diff --git a/dib/ironic-python-agent-ramdisk/post-install.d/99-remove-extra-packages b/dib/ironic-python-agent-ramdisk/post-install.d/99-remove-extra-packages index cacad75..072688d 100755 --- a/dib/ironic-python-agent-ramdisk/post-install.d/99-remove-extra-packages +++ b/dib/ironic-python-agent-ramdisk/post-install.d/99-remove-extra-packages @@ -9,7 +9,9 @@ set -o pipefail rm -rf /tmp/ironic-python-agent for item in ${IPA_REMOVE_FIRMWARE//,/ }; do - rm -rf /usr/lib/firmware/$item + # Attempt removal of item, but don't error + # if it is not present already. + rm -rf /usr/lib/firmware/$item || true done # TODO(dtantsur): implement the same for debian-based systems diff --git a/doc/source/admin/dib.rst b/doc/source/admin/dib.rst index 2a378c6..2d13205 100644 --- a/doc/source/admin/dib.rst +++ b/doc/source/admin/dib.rst @@ -162,11 +162,28 @@ Firmware Removal ~~~~~~~~~~~~~~~~ By default the element removes some firmware blobs to reduce the image size. -Specifically, firmware from ``netronome`` and ``amdgpu`` is removed. If you -want to override this, change the ``IPA_REMOVE_FIRMWARE`` environment variable -to a comma-separated list of directories or files under ``/usr/lib/firmware``. +The list can be found below this paragraph. The majority of these firmware +images are used by SoCs, WI-FI chips, some GPUs and Smartnics which are +unlikely to be encountered. If you want to override this, change the +``IPA_REMOVE_FIRMWARE`` environment variable to a comma-separated list +of directories or files under ``/usr/lib/firmware``. Set it to an empty string to disable firmware removal. +Fimrware removed: + +* ``amdgpu`` +* ``netronome`` +* ``qcom`` +* ``ti-communication`` +* ``ti-keystone`` +* ``ueagle-atm`` +* ``rsi`` +* ``mrvl`` +* ``brcm`` +* ``mediatek`` +* ``ath10k`` +* ``rtlwifi`` + Available Elements ------------------ diff --git a/releasenotes/notes/no-firmware-e2cb953037a3be8f.yaml b/releasenotes/notes/no-firmware-e2cb953037a3be8f.yaml index 96685ba..9c70e39 100644 --- a/releasenotes/notes/no-firmware-e2cb953037a3be8f.yaml +++ b/releasenotes/notes/no-firmware-e2cb953037a3be8f.yaml @@ -1,5 +1,6 @@ --- features: - | - Firmware for netronome and amdgpu is now removed by default. Set - ``IPA_REMOVE_FIRMWARE`` to override. + Firmware for netronome, amdgpu, qcom, ti-communication, ti-keystone, + ueagle-atm, rsi, mrvl, brcm, mediatek, ath10k, rtlwifi are now removed + by default. Set ``IPA_REMOVE_FIRMWARE`` to override.