[pve-devel] [PATCH] exclude firmware files distributed by Debian

Derek W. Poon derekp+pve at ece.ubc.ca
Fri Dec 9 23:15:01 CET 2011


To allow coexistence with Debian packages, exclude firmware files
already distributed by Debian when building pve-firmware.  Otherwise,
proxmox-ve could fail to install on top of an existing Debian system.
---
 Makefile             |    2 +-
 assemble-firmware.pl |  210 +++++++++++++++++++++++++++++++++++++++++++++++---
 changelog.firmware   |    6 ++
 control.firmware     |    3 +-
 4 files changed, 208 insertions(+), 13 deletions(-)

diff --git a/Makefile b/Makefile
index cc6d6f2..e1a1a72 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,7 @@ KERNEL_CFG=config-${KERNEL_VER}
 KERNEL_CFG_ORG=config-${KERNEL_VER}-${OVZVER}.x86_64
 
 FW_VER=1.0
-FW_REL=13
+FW_REL=14
 FW_DEB=pve-firmware_${FW_VER}-${FW_REL}_all.deb
 
 AOEDIR=aoe6-77
diff --git a/assemble-firmware.pl b/assemble-firmware.pl
index 1a507b8..02a81a8 100755
--- a/assemble-firmware.pl
+++ b/assemble-firmware.pl
@@ -15,15 +15,14 @@ die "no firmware list specified" if !$fwlist || ! -f $fwlist;
 my $target = shift;
 die "no target directory" if !$target || ! -d $target;
 
-my $force_skip = {
+my $force_skip = { map { $_ => 1 } (
 
     # not needed, the HBA has burned-in firmware
-    'ql8100_fw.bin' => 1,
-};
+    'ql8100_fw.bin',
+)};
 
-my $skip = {};
 # debian squeeze also misses those files
-foreach my $fw (qw(
+my $skip = { map { $_ => 1 } (qw(
 libertas/gspi8385.bin libertas/gspi8385_hlp.bin
 cbfw.bin ctfw.bin
 tehuti/firmware.bin
@@ -61,7 +60,6 @@ symbol_sp24t_sec_fw
 symbol_sp24t_prim_fw
 prism_ap_fw.bin
 prism_sta_fw.bin
-ar9170.fw
 iwmc3200wifi-lmac-sdio.bin
 iwmc3200wifi-calib-sdio.bin
 iwmc3200wifi-umac-sdio.bin
@@ -115,10 +113,200 @@ mwl8k/helper_8363.fw
 iwlwifi-6000g2a-4.ucode
 iwlwifi-130-5.ucode
 cxgb4/t4fw.bin
-
-)) {
-    $skip->{$fw} = 1;
-}
+))};
+
+# These firmwares are included in packages generated from Debian source
+# package firmware-nonfree-0.28+squeeze1.  They should be excluded from
+# pve-firmware so as not to conflict with Debian; otherwise, some package
+# will fail to install.
+#
+# This list was generated by building firmware-nonfree, then running
+#   find debian/firmware-*/lib/firmware -type f | \
+#       sed -e 's,^debian/firmware-.*/lib/firmware/,,'
+# ... and finally appending the filelist of the firmware-linux-free package.
+my $debian_fw = { map { $_ => 1 } (qw(
+ar7010_1_1.fw
+ar9170.fw
+ar9271.fw
+ar7010.fw
+ath3k-1.fw
+bnx2-09-4.0.5.fw
+bnx2-06-4.0.5.fw
+bnx2/bnx2-rv2p-09ax-6.0.17.fw
+bnx2/bnx2-rv2p-09-6.0.17.fw
+bnx2/bnx2-rv2p-06-6.0.15.fw
+bnx2/bnx2-mips-06-6.0.15.fw
+bnx2/bnx2-rv2p-06-5.0.0.j3.fw
+bnx2/bnx2-mips-09-6.0.17.fw
+bnx2/bnx2-rv2p-09ax-5.0.0.j3.fw
+bnx2/bnx2-mips-06-5.0.0.j3.fw
+bnx2/bnx2-rv2p-09-5.0.0.j3.fw
+bnx2/bnx2-mips-09-5.0.0.j3.fw
+bnx2x-e1-4.8.53.0.fw
+bnx2x/bnx2x-e1-6.0.34.0.fw
+bnx2x/bnx2x-e2-6.0.34.0.fw
+bnx2x/bnx2x-e1h-6.0.34.0.fw
+bnx2x-e1-5.0.21.0.fw
+bnx2x-e1h-4.8.53.0.fw
+bnx2x-e1h-5.0.21.0.fw
+brcm/bcm43xx_hdr-0.fw
+brcm/bcm43xx-0.fw
+i6050-fw-usb-1.5.sbcf
+i2400m-fw-usb-1.4.sbcf
+i2400m-fw-usb-1.5.sbcf
+ipw2200-sniffer.fw
+ipw2100-1.3.fw
+ipw2200-ibss.fw
+ipw2100-1.3-p.fw
+ipw2100-1.3-i.fw
+ipw2200-bss.fw
+v4l-cx2341x-dec.fw
+v4l-pvrusb2-24xxx-01.fw
+v4l-cx2341x-enc.fw
+v4l-pvrusb2-29xxx-01.fw
+v4l-cx25840.fw
+v4l-cx2341x-init.mpg
+iwlwifi-5150-2.ucode
+iwlwifi-6000-4.ucode
+iwlwifi-1000-3.ucode
+iwlwifi-5000-2.ucode
+iwlwifi-6050-4.ucode
+iwlwifi-6050-5.ucode
+iwlwifi-5000-1.ucode
+iwlwifi-3945-2.ucode
+iwlwifi-4965-1.ucode
+iwlwifi-4965-2.ucode
+iwlwifi-6000g2a-5.ucode
+iwlwifi-3945-1.ucode
+iwlwifi-6000g2b-5.ucode
+tehuti/bdx.bin
+mts_gsm.fw
+agere_ap_fw.bin
+e100/d101s_ucode.bin
+e100/d102e_ucode.bin
+e100/d101m_ucode.bin
+3com/typhoon.bin
+advansys/38C0800.bin
+advansys/38C1600.bin
+advansys/3550.bin
+advansys/mcode.bin
+vntwusb.fw
+radeon/R520_cp.bin
+radeon/REDWOOD_pfp.bin
+radeon/REDWOOD_rlc.bin
+radeon/RV710_pfp.bin
+radeon/RV630_me.bin
+radeon/CEDAR_pfp.bin
+radeon/CYPRESS_rlc.bin
+radeon/R420_cp.bin
+radeon/JUNIPER_pfp.bin
+radeon/CYPRESS_me.bin
+radeon/RS780_me.bin
+radeon/RV620_me.bin
+radeon/REDWOOD_me.bin
+radeon/RV610_pfp.bin
+radeon/R600_rlc.bin
+radeon/RV710_me.bin
+radeon/RV610_me.bin
+radeon/RV620_pfp.bin
+radeon/RS600_cp.bin
+radeon/R200_cp.bin
+radeon/RV635_me.bin
+radeon/JUNIPER_me.bin
+radeon/RV770_pfp.bin
+radeon/RV730_me.bin
+radeon/RV670_me.bin
+radeon/R300_cp.bin
+radeon/RV670_pfp.bin
+radeon/R600_me.bin
+radeon/RV635_pfp.bin
+radeon/RS690_cp.bin
+radeon/CEDAR_rlc.bin
+radeon/RV730_pfp.bin
+radeon/R700_rlc.bin
+radeon/RV770_me.bin
+radeon/R100_cp.bin
+radeon/CEDAR_me.bin
+radeon/CYPRESS_pfp.bin
+radeon/JUNIPER_rlc.bin
+radeon/R600_pfp.bin
+radeon/RS780_pfp.bin
+radeon/RV630_pfp.bin
+dvb-usb-dib0700-1.20.fw
+matrox/g200_warp.fw
+matrox/g400_warp.fw
+kaweth/trigger_code_fix.bin
+kaweth/trigger_code.bin
+kaweth/new_code_fix.bin
+kaweth/new_code.bin
+tigon/tg3_tso5.bin
+tigon/tg3_tso.bin
+tigon/tg3.bin
+agere_sta_fw.bin
+dvb-fe-xc5000-1.6.114.fw
+dabusb/firmware.fw
+dabusb/bitstream.bin
+mts_edge.fw
+r128/r128_cce.bin
+mts_cdma.fw
+cxgb3/ael2005_twx_edc.bin
+cxgb3/ael2005_opt_edc.bin
+cxgb3/t3c_psram-1.1.0.bin
+cxgb3/t3b_psram-1.1.0.bin
+cxgb3/ael2020_twx_edc.bin
+cxgb3/t3fw-7.4.0.bin
+phanfw.bin
+qlogic/1280.bin
+qlogic/sd7220.fw
+qlogic/1040.bin
+qlogic/12160.bin
+ql2400_fw.bin
+ql2100_fw.bin
+ql2500_fw.bin
+ql2300_fw.bin
+ql2200_fw.bin
+ql2322_fw.bin
+rt2561.bin
+rt2860.bin
+rt73.bin
+rt3090.bin
+rt2870.bin
+rt3071.bin
+rt2561s.bin
+rt3070.bin
+rt2661.bin
+rtl_nic/rtl8105e-1.fw
+rtl_nic/rtl8168e-2.fw
+rtl_nic/rtl8168d-2.fw
+rtl_nic/rtl8168e-1.fw
+rtl_nic/rtl8168e-3.fw
+rtl_nic/rtl8168d-1.fw
+RTL8192SU/rtl8192sfw.bin
+rtlwifi/rtl8712u.bin
+RTL8192E/boot.img
+RTL8192E/main.img
+RTL8192E/data.img
+
+av7110/bootcode.bin
+cis/3CCFEM556.cis
+cis/3CXEM556.cis
+cis/COMpad2.cis
+cis/COMpad4.cis
+cis/DP83903.cis
+cis/LA-PCM.cis
+cis/MT5634ZLX.cis
+cis/NE2K.cis
+cis/PCMLM28.cis
+cis/PE-200.cis
+cis/RS-COM-2P.cis
+cis/SW_555_SER.cis
+cis/SW_7xx_SER.cis
+cis/SW_8xx_SER.cis
+cis/tamarack.cis
+dsp56k/bootstrap.bin
+keyspan_pda/keyspan_pda.fw
+keyspan_pda/xircom_pgs.fw
+))};
 
 sub copy_fw {
     my ($src, $dstfw) = @_;
@@ -169,6 +357,8 @@ while(defined(my $line = <TMP>)) {
 	$fw = 'cis/PE520.cis';
     }
  
+    next if $debian_fw->{$fw};
+
     if (-f "$fwsrc0/$fw") {
 	copy_fw("$fwsrc0/$fw", $fwdest);
 	next;
diff --git a/changelog.firmware b/changelog.firmware
index 009d888..f92d096 100644
--- a/changelog.firmware
+++ b/changelog.firmware
@@ -1,3 +1,9 @@
+pve-firmware (1.0-13) unstable; urgency=low
+
+  * exclude firmware files distributed by Debian, to allow coexistence
+
+ -- Derek Poon <derekp+pve at ece.ubc.ca>  Fri, 9 Dec 2011 13:51:20 -0800
+
 pve-firmware (1.0-12) unstable; urgency=low
 
   * add Brocade firmware 
diff --git a/control.firmware b/control.firmware
index 00b949c..cf91e70 100644
--- a/control.firmware
+++ b/control.firmware
@@ -3,8 +3,7 @@ Version: @VERSION@
 Section: misc
 Priority: optional
 Architecture: all
-Suggests: linux-image
-Conflicts: firmware-linux-free, firmware-linux-nonfree 
+Suggests: linux-image, firmware-linux, firmware-linux-nonfree, firmware-atheros, firmware-bnx2, firmware-bnx2x, firmware-brcm80211, firmware-intelwimax, firmware-ipw2x00, firmware-ivtv, firmware-iwlwifi, firmware-netxen, firmware-qlogic, firmware-ralink, firmware-realtek
 Maintainer: Proxmox Support Team <support at proxmox.com>
 Description: Binary firmware code for the pve-kernel
  This package contains the binary firmware for various modules used in
-- 
1.7.2.5





More information about the pve-devel mailing list