Remove netronome and amdgpu firmware by default

Allow customizing which firmware to remove this way.

Change-Id: I714c0771c565814714881b979daaa4c83a15db1d
This commit is contained in:
Dmitry Tantsur 2020-11-26 14:37:08 +01:00
parent d1d3a7e555
commit 2c7f7a55e6
4 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1 @@
export IPA_REMOVE_FIRMWARE=${IPA_REMOVE_FIRMWARE:-amdgpu,netronome}

View File

@ -8,6 +8,10 @@ set -o pipefail
rm -rf /tmp/ironic-python-agent
for item in ${IPA_REMOVE_FIRMWARE//,/ }; do
rm -rf /usr/lib/firmware/$item
done
# TODO(dtantsur): implement the same for debian-based systems
case "$DISTRO_NAME" in
fedora|centos|centos7|rhel|rhel7)

View File

@ -158,6 +158,15 @@ required for instance image or deploy image.
.. _dynamic-login: https://docs.openstack.org/diskimage-builder/latest/elements/dynamic-login/README.html
.. _devuser: https://docs.openstack.org/diskimage-builder/latest/elements/devuser/README.html
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``.
Set it to an empty string to disable firmware removal.
Available Elements
------------------

View File

@ -0,0 +1,5 @@
---
features:
- |
Firmware for netronome and amdgpu is now removed by default. Set
``IPA_REMOVE_FIRMWARE`` to override.