diff mbox series

[07/10] linux-firmware: delink some tegra firmware to avoid pulling in full nvidia firmware

Message ID 20260429164821.3425757-7-ross.burton@arm.com
State Under Review
Headers show
Series [01/10] bitbake add firmwaredir | expand

Commit Message

Ross Burton April 29, 2026, 4:48 p.m. UTC
Some Nvidia firmware is shared between products but the symlinks cross
product/driver boundaries, resulting in the -nvidia-tegra package
depending on the ~150MB -nvidia-gpu package for a few 10kb files.

If we replace the symlinks with the actual content of the files then this
dependency disappears.

linux-firmware/linux-firmware-nvidia-tegra: RDEPENDS: removed "linux-firmware-nvidia-gpu"

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .../linux-firmware/linux-firmware_20260410.bb             | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_20260410.bb b/meta/recipes-kernel/linux-firmware/linux-firmware_20260410.bb
index cdd16ba33db..6bb6034d6c7 100644
--- a/meta/recipes-kernel/linux-firmware/linux-firmware_20260410.bb
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware_20260410.bb
@@ -511,6 +511,14 @@  do_install() {
                         path_to_file=$(dirname $path_to_file)
                 done
         done
+
+        # Some Nvidia firmware is shared but the symlinks cross product/driver boundaries,
+        # resulting in the -nvidia-tegra package depending on the ~150MB -nvidia-gpu package
+        # for a single 10kb file.
+        # Replace these symlinks with duplicates of the files to avoid this.
+        for symlink in $(find ${D}${firmwaredir}/nvidia/g*b/gr/ -type l -name sw_\*_init.bin); do
+          cp --remove-destination "$(readlink -f $symlink)" $symlink
+        done
 }
 
 PACKAGES =+ "${PN}-amphion-vpu-license ${PN}-amphion-vpu \