[PATCH 0/9] Firmware: support compressing firmware files

Sascha Hauer s.hauer at pengutronix.de
Mon Mar 16 10:21:13 PDT 2026


TF-A and OP-TEE can reach significant sizes nowadays and are currently
uncompressed in the PBL. This series supports including them in compressed
form in the PBL. To accomplish this we introduce a new macro
get_builtin_firmware_compressed() which returns the compressed firmware
image. This can be decompressed afterwards with fwobj_uncompress().
There are always both the compressed and uncompressed images generated,
so the code can decide which one to use. This series switches over the
Rockchip TF-A and OP-TEE binaries to use the compressed variants.

Also included in this series are some unrelated patches I stumbled upon
while creating this series.

Sascha

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
Sascha Hauer (9):
      ARM: socfpga: Drop unnecessary select USE_COMPRESSED_DTB
      ARM: radxa-rock5: Use compressed DTB
      ARM: Rockchip: Simplify retrieval of SoC specific addresses
      firmware: Move firmware assembly generation to scripts/gen-fw-s
      firmware: Use struct fwobj for get_builtin_firmware APIs
      firmware: Add compressed firmware symbols for PBL
      firmware: Add fwobj_uncompress() for decompressing firmware in PBL
      ARM: Rockchip: Use compressed OP-TEE binary
      ARM: Rockchip: Use compressed TF-A binary

 arch/arm/boards/radxa-rock5/lowlevel.c   |   8 +--
 arch/arm/boards/tqma6ulx/lowlevel.c      |   7 +--
 arch/arm/boards/webasto-ccbv2/lowlevel.c |   7 +--
 arch/arm/mach-imx/atf.c                  |  84 +++++++++++--------------
 arch/arm/mach-imx/ele.c                  |  12 ++--
 arch/arm/mach-imx/esdctl.c               |   7 +--
 arch/arm/mach-layerscape/tfa.c           |   7 +--
 arch/arm/mach-rockchip/atf.c             | 103 ++++++++++++++++++++-----------
 arch/arm/mach-socfpga/Kconfig            |   2 -
 arch/arm/mach-socfpga/atf.c              |   7 +--
 drivers/ddr/imx/ddrphy_train.c           |  97 ++++++++++-------------------
 drivers/mci/imx-esdhc-pbl.c              |   7 +--
 drivers/net/fsl-fman.c                   |  11 ++--
 firmware/Makefile                        |  65 ++++++-------------
 include/firmware.h                       |  37 ++++++++---
 pbl/decomp.c                             |   7 +++
 scripts/gen-fw-s                         |  87 ++++++++++++++++++++++++++
 17 files changed, 311 insertions(+), 244 deletions(-)
---
base-commit: 52bb6e0cada8a82cf665668cfbdfcd4e4854a027
change-id: 20260316-compressed-firmware-efa51a7bda9d

Best regards,
-- 
Sascha Hauer <s.hauer at pengutronix.de>




More information about the barebox mailing list