public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Ryan Eatmon <reatmon@ti.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [OE-core][PATCH v3 2/3] linux-firmware: Remove unlicensed firmware
Date: Fri, 10 Oct 2025 11:08:41 -0500	[thread overview]
Message-ID: <20251010160842.28715-2-reatmon@ti.com> (raw)
In-Reply-To: <20251010160842.28715-1-reatmon@ti.com>

Create a new REMOVE_UNLICENSED variable and do_install() logic to
allow for marking certain firmware files as something to remove and not
package up.

This comes from the fact that the WHENCE file has a number of firmware
entries that have no license information or very questionable
declarations as to what the license is for the firmware.

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
---
v3: Split single patch into three patches.
v2: Fix dash vs bash error in new do_install() code.

.../linux-firmware/linux-firmware_20250917.bb | 66 +++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_20250917.bb b/meta/recipes-kernel/linux-firmware/linux-firmware_20250917.bb
index a2e505bd93..4efdc73a45 100644
--- a/meta/recipes-kernel/linux-firmware/linux-firmware_20250917.bb
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware_20250917.bb
@@ -5,6 +5,57 @@ that contains firmware binary blobs necessary for partial or full functionality
 of certain hardware devices."
 SECTION = "kernel"
 
+REMOVE_UNLICENSED = ""
+
+# For acenic - Alteon AceNIC Gigabit Ethernet card
+REMOVE_UNLICENSED += "acenic/tg1.bin acenic/tg2.bin"
+
+# For emi62 - EMI 6|2m USB Audio interface
+REMOVE_UNLICENSED += "emi62/bitstream.fw emi62/loader.fw emi62/midi.fw emi62/spdif.fw"
+
+# For snd-maestro3 - ESS Allegro Maestro3 audio device
+REMOVE_UNLICENSED += "ess/maestro3_assp_kernel.fw ess/maestro3_assp_minisrc.fw"
+
+# For s2255drv
+REMOVE_UNLICENSED += "f2255usb.bin"
+
+# For snd-korg1212 - Korg 1212 IO audio device
+REMOVE_UNLICENSED += "korg/k1212.dsp"
+
+# For lgs8gxx - Legend Silicon GB20600 demodulator driver
+REMOVE_UNLICENSED += "lgs8g75.fw"
+
+# For ti_usb_3410_5052 - Multi-Tech USB cell modems
+REMOVE_UNLICENSED += "mts_cdma.fw mts_gsm.fw mts_edge.fw mts_mt9234mu.fw mts_mt9234zba.fw"
+
+# For myri_sbus - MyriCOM Gigabit Ethernet
+REMOVE_UNLICENSED += "myricom/lanai.bin"
+
+# For qlogicpti - PTI Qlogic, ISP Driver
+REMOVE_UNLICENSED += "qlogic/isp1000.bin"
+
+# For cassini - Sun Cassini
+REMOVE_UNLICENSED += "sun/cassini.bin"
+
+# For dvb-ttusb-budget - Technotrend/Hauppauge Nova-USB devices
+REMOVE_UNLICENSED += "ttusb-budget/dspbootcode.bin"
+
+# For ueagle-atm - Driver for USB ADSL Modems based on Eagle I,II,III
+REMOVE_UNLICENSED += "ueagle-atm/930-fpga.bin ueagle-atm/CMVeiWO.bin ueagle-atm/CMVepFR10.bin ueagle-atm/DSP9p.bin ueagle-atm/eagleIII.fw ueagle-atm/adi930.fw ueagle-atm/CMVep.bin ueagle-atm/CMVepFR.bin ueagle-atm/DSPei.bin ueagle-atm/CMV9i.bin ueagle-atm/CMVepES03.bin ueagle-atm/CMVepIT.bin ueagle-atm/DSPep.bin ueagle-atm/CMV9p.bin ueagle-atm/CMVepES.bin ueagle-atm/CMVepWO.bin ueagle-atm/eagleI.fw ueagle-atm/CMVei.bin ueagle-atm/CMVepFR04.bin ueagle-atm/DSP9i.bin ueagle-atm/eagleII.fw"
+
+# For vicam - USB 3com HomeConnect (aka vicam)
+REMOVE_UNLICENSED += "vicam/firmware.fw"
+
+# For yam - YAM driver for AX.25
+REMOVE_UNLICENSED += "yam/1200.bin yam/9600.bin"
+
+# For snd-wavefront - ISA WaveFront sound card
+REMOVE_UNLICENSED += "yamaha/yss225_registers.bin"
+
+# For snd-ymfpci - Yamaha YMF724/740/744/754 audio devices
+REMOVE_UNLICENSED += "yamaha/ds1_ctrl.fw yamaha/ds1_dsp.fw yamaha/ds1e_ctrl.fw"
+
+
 LICENSE = "\
     Firmware-Abilis \
     & Firmware-adsp_sst \
@@ -429,6 +480,21 @@ do_install() {
         fi
         cp LICEN[CS]E.* WHENCE ${D}${nonarch_base_libdir}/firmware/
         cp wfx/LICEN[CS]E.* ${D}${nonarch_base_libdir}/firmware/wfx/
+
+        # Remove all unlicensed firmware
+        for file in ${REMOVE_UNLICENSED}; do
+                echo "Remove unlicensed firmware: $file"
+                rm ${D}${nonarch_base_libdir}/firmware/$file
+                path_to_file=$(dirname $file)
+                while [ "${path_to_file}" != "." ]; do
+                        num_files=$(ls -A1 ${D}${nonarch_base_libdir}/firmware/$path_to_file | wc -l)
+                        if [ "$num_files" = "0" ]; then
+                                echo "Remove empty dir: $path_to_file"
+                                rm -rf ${D}${nonarch_base_libdir}/firmware/$path_to_file
+                        fi
+                        path_to_file=$(dirname $path_to_file)
+                done
+        done
 }
 
 PACKAGES =+ "${PN}-amphion-vpu-license ${PN}-amphion-vpu \
-- 
2.17.1



  reply	other threads:[~2025-10-10 16:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-10 16:08 [OE-core][PATCH v3 1/3] linux-firmware: Move all firmware into sub-packages Ryan Eatmon
2025-10-10 16:08 ` Ryan Eatmon [this message]
2025-10-10 16:08 ` [OE-core][PATCH v3 3/3] linux-firmware: Set FILES to "" Ryan Eatmon
2025-10-10 18:55   ` Peter Kjellerstedt
2025-10-10 18:56     ` Ryan Eatmon
2025-10-16 16:11       ` Jose Quaresma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251010160842.28715-2-reatmon@ti.com \
    --to=reatmon@ti.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox