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
This commit is contained in:
Julia Kreger 2020-12-15 06:48:20 -08:00
parent bf698221c3
commit 6c9c505ca9
4 changed files with 41 additions and 7 deletions

View File

@ -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

View File

@ -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

View File

@ -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
------------------

View File

@ -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.