]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
linux-firmware: delink some tegra firmware to avoid pulling in full nvidia firmware
authorRoss Burton <ross.burton@arm.com>
Wed, 29 Apr 2026 16:48:18 +0000 (17:48 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 6 May 2026 13:02:21 +0000 (14:02 +0100)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-kernel/linux-firmware/linux-firmware_20260410.bb

index cdd16ba33db3b007b7cc265992ea4104a4ff24d3..6bb6034d6c7132c3704e1440fc7eba3dd46d02cd 100644 (file)
@@ -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 \