Patchwork linux-firmware: split into bus specific packages.

login
register
mail settings
Submitter Filip Zyzniewski
Date Feb. 13, 2011, 2:08 p.m.
Message ID <1297606132-19861-1-git-send-email-filip.zyzniewski@gmail.com>
Download mbox | patch
Permalink /patch/567/
State Superseded
Headers show

Comments

Filip Zyzniewski - Feb. 13, 2011, 2:08 p.m.
The whole reposotiry is about 24MB in size and it's rarely needed
whole. It is now splitted into bus specific subpackages (and some
device-specific for devices on a bus like SPI or SBUS) all depended
on by the linux-firmware package.

Signed-off-by: Filip Zyzniewski <filip.zyzniewski@gmail.com>
---
 recipes/linux-firmware/linux-firmware_git.bb |  144 +++++++++++++++++++++++++-
 1 files changed, 142 insertions(+), 2 deletions(-)
Eric BENARD - Feb. 14, 2011, 4:17 p.m.
Hi,

On 14/02/2011 16:58, Otavio Salvador wrote:
> On Sun, Feb 13, 2011 at 14:08, Filip Zyzniewski
> <filip.zyzniewski@gmail.com>  wrote:
>> The whole reposotiry is about 24MB in size and it's rarely needed
>> whole. It is now splitted into bus specific subpackages (and some
>> device-specific for devices on a bus like SPI or SBUS) all depended
>> on by the linux-firmware package.
>
> I agree that this ought to be split but I think that it should be done
> by vendor:
> realtek, ralink and so on.
>
also there is an other version of this recipe in
recipes/firmwares/linux-firmware.inc
which is already splitted in small packages for some firmware such as :
firmware-atheros-ar9271.bb
firmware-marvell-sd8688_10.38.1-p25.bb

Eric
Filip Zyzniewski - Feb. 14, 2011, 5:08 p.m.
On 2/14/11, Otavio Salvador <otavio@ossystems.com.br> wrote:

> I agree that this ought to be split but I think that it should be done
> by vendor:
> realtek, ralink and so on.

What would be the point of such split?

I have split it by buses, because currently having full support for
PCMCIA devices on my Jornada 720, I have to install 13MB of PCI
firmwares and 8.5MB of USB firmwares, which I will never use (because
I have neither PCI nor USB bus on it) just to have available the 200kB
of PCMCIA firmwares.

Most of the firmwares in the repository are for removable devices - we
(as the OE/distrubution maintainers) are by definition not able to
know whose products will the user plug in.

bye,
Filip Zyzniewski
Filip Zyzniewski - Feb. 14, 2011, 5:22 p.m.
On 2/14/11, Otavio Salvador <otavio@ossystems.com.br> wrote:

> Right but usually we'll have drivers/modules for one, two or three
> vendors that are used or demanded to be supported and then those
> firmware needs to be supported as well.

Can you give an example?
If you are building a distro for a device with USB host - on what
basis do you choose whose products to support?

bye,
Filip Zyzniewski
Tom Rini - Feb. 14, 2011, 5:33 p.m.
On 02/14/2011 10:22 AM, Filip Zyzniewski wrote:
> On 2/14/11, Otavio Salvador<otavio@ossystems.com.br>  wrote:
>
>> Right but usually we'll have drivers/modules for one, two or three
>> vendors that are used or demanded to be supported and then those
>> firmware needs to be supported as well.
>
> Can you give an example?
> If you are building a distro for a device with USB host - on what
> basis do you choose whose products to support?

Honestly, I think we need bus and vendor in the split.  I do want the 
firmware for my ralink USB WiFi dongle but not all of the other vendors 
and I'd un-install what I could un-install.
Phil Blundell - Feb. 14, 2011, 5:40 p.m.
On Mon, 2011-02-14 at 10:33 -0700, Tom Rini wrote:
> Honestly, I think we need bus and vendor in the split.  I do want the 
> firmware for my ralink USB WiFi dongle but not all of the other vendors 
> and I'd un-install what I could un-install.

Yeah, agreed.  Or even a split down to individual devices/drivers since
each of the Ralink firmware binaries is quite large in itself.

p.
Filip Zyzniewski - Feb. 14, 2011, 6:10 p.m.
On 2/14/11, Phil Blundell <philb@gnu.org> wrote:
> Yeah, agreed.  Or even a split down to individual devices/drivers since
> each of the Ralink firmware binaries is quite large in itself.

Yeah, I agree it is a good idea, it just isn't needed for us.

So could this be done in two steps:
1) this patch (by me) - split into buses;
2) second patch (by whoever needs this) - furtherly split bus packages
by devices?

bye,
Filip Zyzniewski
Tom Rini - Feb. 14, 2011, 6:18 p.m.
On 02/13/2011 07:08 AM, Filip Zyzniewski wrote:
> The whole reposotiry is about 24MB in size and it's rarely needed
> whole. It is now splitted into bus specific subpackages (and some
> device-specific for devices on a bus like SPI or SBUS) all depended
> on by the linux-firmware package.
[snip]
> +RDEPENDS += "${SUBPACKAGES}"

Given the previous threads, I think we still have a problem, which is 
that this should be
RDEPENDS_${PN} += "${SUBPACKAGES}"
so that there's a valid upgrade path.
Tom Rini - Feb. 14, 2011, 6:19 p.m.
On 02/14/2011 11:10 AM, Filip Zyzniewski wrote:
> On 2/14/11, Phil Blundell<philb@gnu.org>  wrote:
>> Yeah, agreed.  Or even a split down to individual devices/drivers since
>> each of the Ralink firmware binaries is quite large in itself.
>
> Yeah, I agree it is a good idea, it just isn't needed for us.
>
> So could this be done in two steps:
> 1) this patch (by me) - split into buses;
> 2) second patch (by whoever needs this) - furtherly split bus packages
> by devices?

I think that's fine. See my other email just now and we'll push v2, 
assuming I'm remembering how upgrades work, right :)

Patch

diff --git a/recipes/linux-firmware/linux-firmware_git.bb b/recipes/linux-firmware/linux-firmware_git.bb
index 7bff379..1b22c79 100644
--- a/recipes/linux-firmware/linux-firmware_git.bb
+++ b/recipes/linux-firmware/linux-firmware_git.bb
@@ -1,7 +1,8 @@ 
 DESCRIPTION = "Firmware files for use with Linux kernel"
 
+PR = "r1"
 PR_append = "+gitr${SRCREV}"
-SRCREV = "80a203275fc368db0a5f166c42dd35a4a22f2453"
+SRCREV = "2fab48391fda8a914b55c8ac265eb3b6ee10ace8"
 
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/dwmw2/linux-firmware.git;protocol=git"
 
@@ -16,7 +17,146 @@  do_install() {
 	cp -RpP * ${D}/lib/firmware/
 }
 
-FILES_${PN} += "/lib/firmware/*"
+SUBPACKAGES = "${PN}-i2c \
+	${PN}-isa \
+	${PN}-pci \
+	${PN}-pcmcia \
+	${PN}-sdio \
+	${PN}-usb \
+	${PN}-agere \
+	${PN}-dsp56k \
+	${PN}-gspi8682 \
+	${PN}-gspi8686 \
+	${PN}-gspi8688 \
+	${PN}-myri-sbus \
+	${PN}-qlogicpti \
+	${PN}-wl12xx \
+	${PN}-yam"
+
+RDEPENDS += "${SUBPACKAGES}"
+PACKAGES += "${SUBPACKAGES}"
+
 PACKAGE_ARCH = "all"
 
+RDEPENDS_${PN}-pci += "${PN}-agere ${PN}-i2c"
+RDEPENDS_${PN}-pcmcia += "${PN}-agere"
+RDEPENDS_${PN}-sdio += "${PN}-gspi8686 ${PN}-wl12xx"
+RDEPENDS_${PN}-usb += "${PN}-agere ${PN}-i2c"
+
+
+FILES_${PN}-i2c = "/lib/firmware/dvb-fe-xc5000-1.6.114.fw \
+	/lib/firmware/lgs8g75.fw"
+
+FILES_${PN}-isa = "/lib/firmware/sb16 \
+	/lib/firmware/tr_smctr.bin \
+	/lib/firmware/yamaha/yss225_registers.bin"
+
+FILES_${PN}-pci = "/lib/firmware/3com \
+	/lib/firmware/RTL8192E \
+	/lib/firmware/acenic \
+	/lib/firmware/adaptec \
+	/lib/firmware/advansys \
+	/lib/firmware/atmsar11.fw \
+	/lib/firmware/av7110 \
+	/lib/firmware/bnx2 \
+	/lib/firmware/bnx2x*.fw \
+	/lib/firmware/brcm/bcm43xx*.fw \
+	/lib/firmware/cxgb3 \
+	/lib/firmware/e100 \
+	/lib/firmware/ess/maestro3_*.fw \
+	/lib/firmware/intelliport2.bin \
+	/lib/firmware/iwlwifi-*.ucode \
+	/lib/firmware/korg/k1212.dsp \
+	/lib/firmware/matrox \
+	/lib/firmware/mwl8335_duplex.fw \
+	/lib/firmware/mwl8k \
+	/lib/firmware/phanfw.bin \
+	/lib/firmware/ql2*_fw.bin \
+	/lib/firmware/qlogic/1040.bin \
+	/lib/firmware/qlogic/12160.bin \
+	/lib/firmware/qlogic/1280.bin \
+	/lib/firmware/qlogic/sd7220.fw \
+	/lib/firmware/r128 \
+	/lib/firmware/radeon \
+	/lib/firmware/rt2561.bin \
+	/lib/firmware/rt2561s.bin \
+	/lib/firmware/rt2661.bin \
+	/lib/firmware/rt2860.bin \
+	/lib/firmware/rt3090.bin \
+	/lib/firmware/rtl_nic/rtl8168d-*.fw \
+	/lib/firmware/rtlwifi/rtl8192defw.bin \
+	/lib/firmware/rtlwifi/rtl8192sefw.bin \
+	/lib/firmware/slicoss \
+	/lib/firmware/sun/cassini.bin \
+	/lib/firmware/sxg \
+	/lib/firmware/tehuti \
+	/lib/firmware/tigon/tg3*.bin \
+	/lib/firmware/tlg2300_firmware.bin \
+	/lib/firmware/v4l-cx23418-*.fw \
+	/lib/firmware/v4l-cx23885-*.fw \
+	/lib/firmware/v4l-cx25840.fw \
+	/lib/firmware/vxge/X3fw*.ncf \
+	/lib/firmware/yamaha/ds1*.fw"
+
+FILES_${PN}-pcmcia = "/lib/firmware/cis \
+	/lib/firmware/libertas/cf8385*.bin \
+	/lib/firmware/ositech/Xilinx7OD.bin"
+
+FILES_${PN}-sdio = "/lib/firmware/brcm/bcm4329-fullmac-4-218-248-5.bin \
+	/lib/firmware/libertas/sd*.bin"
+
+FILES_${PN}-usb ="/lib/firmware/ar7010.fw \
+	/lib/firmware/ar7010_1_1.fw \
+	/lib/firmware/ar9170-*.fw \
+	/lib/firmware/ar9271.fw \
+	/lib/firmware/ath3k-*.fw \
+	/lib/firmware/cpia2 \
+	/lib/firmware/dabusb \
+	/lib/firmware/dvb-usb-dib0700-1.20.fw \
+	/lib/firmware/edgeport \
+	/lib/firmware/emi26 \
+	/lib/firmware/emi62 \
+	/lib/firmware/f2255usb.bin \
+	/lib/firmware/i2400m-fw-usb-*.sbcf \
+	/lib/firmware/i6050-fw-usb-1.5.sbcf \
+	/lib/firmware/kaweth \
+	/lib/firmware/keyspan \
+	/lib/firmware/keyspan_pda \
+	/lib/firmware/libertas/usb*.bin \
+	/lib/firmware/mts_*.fw \
+	/lib/firmware/rt2870.bin \
+	/lib/firmware/rt3070.bin \
+	/lib/firmware/rt3071.bin \
+	/lib/firmware/rt73.bin \
+	/lib/firmware/rtlwifi/rtl8192cfw.bin \
+	/lib/firmware/rtlwifi/rtl8192cufw.bin \
+	/lib/firmware/rtlwifi/rtl8712u.bin \
+	/lib/firmware/s2250*.fw \
+	/lib/firmware/ti_3410.fw \
+	/lib/firmware/ti_5052.fw \
+	/lib/firmware/ttusb-budget \	
+	/lib/firmware/ueagle-atm \
+	/lib/firmware/usbdux_firmware.bin \
+	/lib/firmware/usbduxfast_firmware.bin \
+	/lib/firmware/v4l-cx231xx-avcore-01.fw \
+	/lib/firmware/vicam/firmware.fw \
+	/lib/firmware/vntwusb.fw \
+	/lib/firmware/whiteheat*.fw"
+
+FILES_${PN}-agere = "/lib/firmware/agere_*_fw.bin"
+
+FILES_${PN}-dsp56k = "/lib/firmware/dsp56k/bootstrap.bin"
+
+FILES_${PN}-gspi8682 = "/lib/firmware/libertas/gspi8682*.bin"
+
+FILES_${PN}-gspi8686 = "/lib/firmware/libertas/gspi8686*.bin"
+
+FILES_${PN}-gspi8688 = "/lib/firmware/libertas/gspi8688*.bin" 
+
+FILES_${PN}-myri-sbus = "/lib/firmware/myricom/lanai.bin"
+
+FILES_${PN}-qlogicpti = "/lib/firmware/qlogic/isp1000.bin"
+
+FILES_${PN}-wl12xx = "/lib/firmware/ti-connectivity/wl1271-*.bin"
 
+FILES_${PN}-yam = "/lib/firmware/yam"