wok-next annotate firmware/receipt @ rev 21724

busybox: update configs
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Sep 01 11:04:25 2020 +0000 (2020-09-01)
parents d5aab818505e
children
rev   line source
al@19741 1 # SliTaz package receipt v2.
slaxemulator@9153 2
slaxemulator@9153 3 PACKAGE="firmware"
al@19866 4 VERSION="20170906"
al@19866 5 COMMIT="a61ac5cf8374edbfe692d12f805a1b194f7fead2"
slaxemulator@9153 6 CATEGORY="meta"
al@19866 7 SHORT_DESC="Linux firmware"
al@19741 8 MAINTAINER="devel@slitaz.org"
pascal@15593 9 LICENSE="other"
al@19741 10 WEB_SITE="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
al@21057 11 HOST_ARCH="any"
al@19741 12
al@19741 13 TARBALL="linux-firmware-$COMMIT.tar.gz"
al@19741 14 WGET_URL="$WEB_SITE/snapshot/$TARBALL"
al@19741 15
al@19866 16 #BUILD_DEPENDS="b43-fwcutter"
al@19866 17
al@19866 18 # Package name matched to kernel module.
al@19866 19 # For example, firmware-b43 contains firmware for b43 kernel module.
al@19866 20 f='firmware'
al@21020 21 SPLIT="\
al@21020 22 $PACKAGE-acenic $PACKAGE-af9013 $PACKAGE-aic94xx \
al@21020 23 $PACKAGE-amdgpu $PACKAGE-ar5523 $PACKAGE-at76c50x-usb \
al@21020 24 $PACKAGE-ath10k_pci $PACKAGE-ath3k $PACKAGE-ath6kl_sdio \
al@21020 25 $PACKAGE-ath6kl_usb $PACKAGE-ath9k_htc $PACKAGE-atmel \
al@21020 26 $PACKAGE-b43 $PACKAGE-b43legacy $PACKAGE-bcm203x \
al@21020 27 $PACKAGE-bfusb $PACKAGE-bna $PACKAGE-bnx2 \
al@21020 28 $PACKAGE-bnx2x $PACKAGE-brcmfmac $PACKAGE-brcmsmac \
al@21020 29 $PACKAGE-bt3c_cs $PACKAGE-btintel $PACKAGE-btmrvl_sdio \
al@21020 30 $PACKAGE-carl9170 $PACKAGE-cassini $PACKAGE-cpia2 \
al@21020 31 $PACKAGE-cx18 $PACKAGE-cx231xx $PACKAGE-cx23885 \
al@21020 32 $PACKAGE-cx24117 $PACKAGE-cx25840 $PACKAGE-cxgb3 \
al@21020 33 $PACKAGE-cxgb4 $PACKAGE-daqboard2000 $PACKAGE-drx39xyj \
al@21020 34 $PACKAGE-ds3000 $PACKAGE-dvb-ttpci $PACKAGE-dvb-ttusb-budget \
al@21020 35 $PACKAGE-dvb-usb-af9015 $PACKAGE-dvb-usb-af9035 $PACKAGE-dvb-usb-az6007 \
al@21020 36 $PACKAGE-dvb-usb-dib0700 $PACKAGE-dvb-usb-dw2102 $PACKAGE-dvb-usb-ec168 \
al@21020 37 $PACKAGE-dvb-usb-lmedm04 $PACKAGE-e100 $PACKAGE-emi26 \
al@21020 38 $PACKAGE-emi62 $PACKAGE-go7007 $PACKAGE-go7007-loader \
al@21020 39 $PACKAGE-gspca_vicam $PACKAGE-i1480-dfu-usb $PACKAGE-i2400m-usb \
al@21020 40 $PACKAGE-i915 $PACKAGE-io_edgeport $PACKAGE-io_ti \
al@21020 41 $PACKAGE-ipw2100 $PACKAGE-ipw2200 $PACKAGE-isci \
al@21020 42 $PACKAGE-isight_firmware $PACKAGE-ivtv $PACKAGE-iwl3945 \
al@21020 43 $PACKAGE-iwl4965 $PACKAGE-iwlwifi $PACKAGE-jr3_pci \
al@21020 44 $PACKAGE-kaweth $PACKAGE-keyspan $PACKAGE-keyspan_pda \
al@21020 45 $PACKAGE-lgs8gxx $PACKAGE-libertas_cs $PACKAGE-libertas_sdio \
al@21020 46 $PACKAGE-libertas_tf_usb $PACKAGE-m88ds3103 $PACKAGE-me4000 \
al@21020 47 $PACKAGE-me_daq $PACKAGE-mga $PACKAGE-mn88472 \
al@21020 48 $PACKAGE-mn88473 $PACKAGE-mt7601u $PACKAGE-mwifiex_sdio \
al@21020 49 $PACKAGE-mwifiex_usb $PACKAGE-mwl8k $PACKAGE-myri10ge \
al@21020 50 $PACKAGE-netxen_nic $PACKAGE-ni_pcidio $PACKAGE-nouveau \
al@21020 51 $PACKAGE-orinoco $PACKAGE-orinoco_usb $PACKAGE-p54pci \
al@21020 52 $PACKAGE-p54usb $PACKAGE-pcnet_cs $PACKAGE-prism2_usb \
al@21020 53 $PACKAGE-pvrusb2 $PACKAGE-qat_dh895xcc $PACKAGE-qed \
al@21020 54 $PACKAGE-qlcnic $PACKAGE-r128 $PACKAGE-r8169 \
al@21020 55 $PACKAGE-r8192e_pci $PACKAGE-r8192u_usb $PACKAGE-r8712u \
al@21020 56 $PACKAGE-radeon $PACKAGE-rsi_sdio $PACKAGE-rsi_usb \
al@21020 57 $PACKAGE-rt2800pci $PACKAGE-rt2800usb $PACKAGE-rt61pci \
al@21020 58 $PACKAGE-rt73usb $PACKAGE-rtl8188ee $PACKAGE-rtl8192ce \
al@21020 59 $PACKAGE-rtl8192cu $PACKAGE-rtl8192de $PACKAGE-rtl8192ee \
al@21020 60 $PACKAGE-rtl8192se $PACKAGE-rtl8723ae $PACKAGE-rtl8723be \
al@21020 61 $PACKAGE-rtl8821ae $PACKAGE-rtl8xxxu $PACKAGE-s2255drv \
al@21020 62 $PACKAGE-saa7134-go7007 $PACKAGE-serial_cs $PACKAGE-si2157 \
al@21020 63 $PACKAGE-si2165 $PACKAGE-si2168 $PACKAGE-slicoss \
al@21020 64 $PACKAGE-smc91c92_cs $PACKAGE-smsmdtv $PACKAGE-snd-asihpi \
al@21020 65 $PACKAGE-snd-cs46xx $PACKAGE-snd-darla20 $PACKAGE-snd-darla24 \
al@21020 66 $PACKAGE-snd-echo3g $PACKAGE-snd-emu10k1 $PACKAGE-snd-gina20 \
al@21020 67 $PACKAGE-snd-gina24 $PACKAGE-snd-hda-codec-ca0132 $PACKAGE-snd-hdsp \
al@21020 68 $PACKAGE-snd-indigo $PACKAGE-snd-indigodj $PACKAGE-snd-indigodjx \
al@21020 69 $PACKAGE-snd-indigoio $PACKAGE-snd-indigoiox $PACKAGE-snd-korg1212 \
al@21020 70 $PACKAGE-snd-layla20 $PACKAGE-snd-layla24 $PACKAGE-snd-maestro3 \
al@21020 71 $PACKAGE-snd-mia $PACKAGE-snd-mixart $PACKAGE-snd-mona \
al@21020 72 $PACKAGE-snd-pcxhr $PACKAGE-snd-riptide $PACKAGE-snd-usb-6fire \
al@21020 73 $PACKAGE-snd-vx-lib $PACKAGE-snd-ymfpci $PACKAGE-speedfax \
al@21020 74 $PACKAGE-starfire $PACKAGE-tda10071 $PACKAGE-tehuti \
al@21020 75 $PACKAGE-tg3 $PACKAGE-ti_usb_3410_5052 $PACKAGE-tuner-xc2028 \
al@21020 76 $PACKAGE-typhoon $PACKAGE-ueagle-atm $PACKAGE-usb8xxx \
al@21020 77 $PACKAGE-usbdux $PACKAGE-usbduxfast $PACKAGE-usbduxsigma \
al@21020 78 $PACKAGE-wcn36xx $PACKAGE-wd719x $PACKAGE-whiteheat \
al@21020 79 $PACKAGE-wil6210 $PACKAGE-wl1251 $PACKAGE-wl12xx \
al@21020 80 $PACKAGE-wl18xx $PACKAGE-xc4000 $PACKAGE-xc5000 \
al@21020 81 $PACKAGE-zd1201 $PACKAGE-zd1211rw \
al@21020 82 \
al@21020 83 $PACKAGE-atheros $PACKAGE-rt2x00 $PACKAGE-rtlnic \
al@21020 84 $PACKAGE-rtlwifi"
slaxemulator@9153 85
al@21020 86 compile_rules() {
al@19866 87 # mainline linux kernel firmware
al@19741 88 make install
al@19741 89 mkdir -p $install/usr/share/licenses
al@19741 90 cp $src/LICENSE.* $src/LICENCE.* $install/usr/share/licenses
al@19741 91 mv $install/lib/firmware/GPL* $install/usr/share/licenses
al@19741 92 rm $install/lib/firmware/Makefile
al@19866 93
al@19866 94 # separate firmware from Debian repository
al@19866 95 while read deb; do
al@19866 96 pkg="$(basename $deb)"
al@19866 97 title "Additional firmware from ${pkg%_all.deb}"
al@19866 98 url="http://ftp.ch.debian.org/debian/pool/$deb"
al@19866 99 [ -f "$SRC/$pkg" ] || wget -O $SRC/$pkg $url
al@19866 100 dpkg-deb -X $SRC/$pkg $install | sed 's|^.| |'
al@19866 101 done <<EOT
al@19866 102 non-free/a/atmel-firmware/atmel-firmware_1.3-4_all.deb
al@19866 103 non-free/b/bluez-firmware/bluez-firmware_1.2-3_all.deb
al@19866 104 non-free/z/zd1211-firmware/firmware-zd1211_1.5-4_all.deb
al@19866 105 main/h/hdmi2usb-fx2-firmware/hdmi2usb-fx2-firmware_0.0.0~git20151225-1_all.deb
al@19866 106 EOT
al@19866 107
al@19866 108 # random firmware
al@19866 109 while read dir url; do
al@19866 110 [ -z "$dir" -o "$dir" == '#' ] && continue
al@19866 111 title "Additional firmware from $dir"
al@19866 112 tarball=$dir-$(basename $url)
al@19866 113 [ -f $SRC/$tarball ] || wget -O $SRC/$tarball $url
al@19866 114 mkdir -p $src/$dir
al@19866 115 case $tarball in
al@19866 116 *.tar.*) tar -C $src/$dir -xf $SRC/$tarball;;
al@19866 117 *) cp $SRC/$tarball $src/$dir;;
al@19866 118 esac
al@19866 119 cd $src/$dir
al@19866 120 [ $(ls . | wc -l) -eq 1 -a -d ./$(ls .) ] && cd ./$(ls .)
al@19866 121
al@19866 122 fdir="$install/lib/firmware"
al@19866 123 case $dir in
al@19866 124 dvb-firmware)
al@19866 125 ./install;;
al@19866 126 adaptec-firmware)
al@19866 127 rpm2cpio *.rpm | cpio -idm; cp -r lib/ $install;;
al@19866 128 ath10k-firmware)
al@19866 129 cp -r ath10k $fdir;;
al@19880 130 # prohibited
al@19866 131 # broadcom-firmware)
al@19866 132 # b43-fwcutter -w $fdir linux/wl_apsta.o
al@19866 133 # cp linux/wl_apsta.o $fdir
al@19866 134 # ;;
al@19866 135 # broadcom-legacy-firmware)
al@19866 136 # b43-fwcutter -w $fdir wl_apsta-3.130.20.0.o
al@19866 137 # cp *.o $fdir/wl_apsta-3.130.20.0.o
al@19866 138 # ;;
al@19866 139 bfusb)
al@19866 140 cp *.frm $fdir;;
al@19866 141 alsa-firmware)
al@21020 142 ./configure $CONFIGURE_ARGS &&
al@21020 143 make &&
al@21020 144 make install;;
al@19866 145 esac
al@19866 146
al@19866 147 done <<EOT
al@19866 148 # https://github.com/OpenELEC/dvb-firmware
al@19866 149 dvb-firmware https://github.com/OpenELEC/dvb-firmware/archive/3fef04a.tar.gz
al@19866 150
al@19866 151 # https://adaptec.com/en-us/speed/scsi/linux/aic94xx-seq-30-1_tar_gz.php
al@19866 152 adaptec-firmware http://download.adaptec.com/scsi/linux/aic94xx-seq-30-1.tar.gz
al@19866 153
al@19866 154 # https://wireless.wiki.kernel.org/en/users/Drivers/ath10k/firmware
al@19866 155 # https://github.com/sumdog/ath10k-firmware
al@19866 156 # https://github.com/kvalo/ath10k-firmware
al@19866 157 ath10k-firmware https://github.com/sumdog/ath10k-firmware/archive/5faf5bb.tar.gz
al@19866 158
al@19866 159 # https://wiki.debian.org/bcm43xx
al@19866 160 # broadcom-firmware http://mirror2.openwrt.org/sources/broadcom-wl-5.100.138.tar.bz2
al@19866 161 # broadcom-legacy-firmware http://mirror2.openwrt.org/sources/wl_apsta-3.130.20.0.o
al@19866 162
al@19866 163 # https://wiki.ubuntuusers.de/Archiv/Bluetooth/BlueFritz%21/
al@19866 164 bfusb ftp://ftp.in-berlin.de/pub/capi4linux/firmware/bluefusb/3-18-39/bfubase.frm
al@19866 165
al@19866 166 # http://alsa-project.org/main/index.php/Main_Page
al@19866 167 # http://git.alsa-project.org/?p=alsa-firmware.git;a=summary
al@19866 168 alsa-firmware ftp://ftp.alsa-project.org/pub/firmware/alsa-firmware-1.0.29.tar.bz2
al@19866 169 EOT
al@19866 170
al@19866 171 # fix permissions
al@19866 172 find $install -type f -exec chmod 644 '{}' \;
al@19866 173 find $install -type d -exec chmod 755 '{}' \;
slaxemulator@9153 174 }
slaxemulator@9153 175
al@19866 176 genpkg_rules() {
al@19866 177 module=${PACKAGE#*-}
al@19866 178 case $module in
al@19866 179 firmware)
al@19866 180 CAT="meta|all firmware"
al@19866 181 DEPENDS="$SPLIT"
al@19741 182 ;;
al@19741 183 misc)
al@20513 184 copy @std @rm
al@19866 185 CAT="kernel|misc firmware"
al@19866 186 ;;
al@19866 187 b43|b43legacy)
al@19866 188 path=$(find $WOK/linux/install -type f -name $module.ko.xz)
al@19866 189 desc=$(modinfo -Fdescription $path)
al@19866 190 CAT="kernel|$desc"
al@19866 191 DEPENDS="b43-fwcutter"
al@19866 192 COOKOPTS="empty-pkg"
al@19866 193 ;;
al@19880 194
al@19880 195 # Meta-packages for backward compatibility with previous release
al@19880 196 *-atheros)
al@19880 197 # Some files from old "firmware-atheros" package are not packaged
al@19880 198 # because they are not required by any of current kernel module.
al@19880 199 CAT="meta|atheros meta"
al@19880 200 DEPENDS="firmware-ar5523 firmware-ath3k"
al@19880 201 ;;
al@19880 202 *-rt2x00)
al@19880 203 # Some files are not packaged as well
al@19880 204 CAT="meta|rt2x00 meta"
al@19880 205 DEPENDS="firmware-rt61pci firmware-rt2800pci firmware-rt2800usb \
al@19880 206 firmware-rt73usb"
al@19880 207 ;;
al@19880 208 *-rtlnic)
al@19880 209 CAT="meta|Realtek ethernet meta"
al@19880 210 DEPENDS="firmware-r8169"
al@19880 211 ;;
al@19880 212 *-rtlwifi)
al@19880 213 # Some files are not packaged as well
al@19880 214 CAT="meta|rtlwifi meta"
al@19880 215 DEPENDS="firmware-rtl8188ee firmware-rtl8192ce firmware-rtl8192cu \
al@19880 216 firmware-rtl8192de firmware-rtl8192ee firmware-rtl8192se \
al@19880 217 firmware-r8712u firmware-rtl8xxxu firmware-rtl8723be \
al@19880 218 firmware-rtl8821ae"
al@19880 219 ;;
al@19880 220 # End meta-packages
al@19880 221
al@19866 222 *)
al@19866 223 path=$(find $WOK/linux/install -type f -name $module.ko.xz)
al@19866 224 fw=$(modinfo -Ffirmware $path | sort -u)
al@19866 225 copy $fw
al@19866 226 # check copied files
al@19866 227 for i in $fw; do
al@19866 228 if [ ! -f "$fs/lib/firmware/$i" ]; then
al@19866 229 echo " Error: $i missing!"
al@19866 230 mkdir -p $fs/lib/firmware/$(dirname $i)
al@19866 231 touch $fs/lib/firmware/$i.missing
al@19866 232 chmod 400 $fs/lib/firmware/$i.missing
al@19866 233 fi
al@19866 234 done
al@19866 235
al@19866 236 # TODO: copy licenses
al@19866 237 DEPENDS=" "
al@19866 238
al@20199 239 desc=$(modinfo -Fdescription $path | head -n1)
al@20199 240 CAT="kernel|${desc:-$module}"
al@19866 241
al@19866 242 # copy the whole folder
al@19866 243 case $module in
al@19866 244 acenic|amdgpu|b43|b43legacy|bnx2|bnx2x|cxgb3|cxgb4|e100|emi26|\
al@19866 245 emi62|vicam|i915|kaweth|keyspan|keyspan_pda|mwl8k|qed|r128|\
al@19866 246 slicoss)
al@19866 247 copy $module/;;
al@19866 248 zd1211rw) copy zd1211/;;
al@19866 249 mga) copy matrox/;;
al@19866 250 r8169) copy rtl_nic/;;
al@19866 251 r8192e_pci) copy RTL8192E/;;
al@19866 252 r8192u_usb) copy RTL8192U/;;
al@19866 253 esac
al@19866 254
al@19866 255 # follow version (not realized yet)
al@19866 256 case $module in
al@19866 257 at76c50x-usb|atmel)
al@19866 258 VERSION='1.3-4';;
al@19866 259 bcm203x)
al@19866 260 VERSION='1.2-3';;
al@19866 261 zd1211rw)
al@19866 262 VERSION='1.5-4';;
al@19866 263 esac
al@19741 264 ;;
al@19741 265 esac
slaxemulator@9153 266 }
al@19866 267
al@19866 268 post_install_firmware_b43() {
al@19866 269 drv=$(mktemp -d)
al@19866 270 [ -n "$quiet" ] || echo -e '\nDownloading firmware (12.9MiB)...'
al@19866 271 # download
al@19866 272 wget -P $drv http://www.lwfinger.com/b43-firmware/broadcom-wl-5.100.138.tar.bz2
al@19866 273 # extract tarball
al@19866 274 tar -C $drv -xf $drv/*.tar.bz2
al@19866 275 mkdir -p "$1/tmp" "$1/lib/firmware"
al@19866 276 # copy driver to chroot
al@19866 277 cp "$drv/broadcom-wl-5.100.138/linux/wl_apsta.o" "$1/tmp"
al@19866 278 # extract firmware in the chroot
al@19866 279 chroot "$1/" b43-fwcutter -w '/lib/firmware' '/tmp/wl_apsta.o'
al@19866 280 # clean
al@19866 281 rm -rf "$drv" "$1/tmp/wl_apsta.o"
al@19866 282 # permissions
al@19866 283 chmod 755 "$1/lib/firmware/b43"
al@19866 284 find "$1/lib/firmware/b43" -type f -exec chmod 644 '{}' \;
al@19866 285 }
al@19866 286 post_remove_firmware_b43() {
al@19866 287 rm -rf "$1/lib/firmware/b43"
al@19866 288 }
al@19866 289
al@19866 290 post_install_firmware_b43legacy() {
al@19866 291 drv=$(mktemp -d)
al@19866 292 [ -n "$quiet" ] || echo -e '\nDownloading firmware (0.6MiB)...'
al@19866 293 # download
al@19866 294 wget -P $drv http://downloads.openwrt.org/sources/wl_apsta-3.130.20.0.o
al@19866 295 mkdir -p "$1/tmp" "$1/lib/firmware"
al@19866 296 # copy driver to chroot
al@19866 297 cp "$drv/wl_apsta-3.130.20.0.o" "$1/tmp"
al@19866 298 # extract firmware in the chroot
al@19866 299 chroot "$1/" b43-fwcutter -w '/lib/firmware' '/tmp/wl_apsta-3.130.20.0.o'
al@19866 300 # clean
al@19866 301 rm -rf "$drv" "$1/tmp/wl_apsta-3.130.20.0.o"
al@19866 302 # permissions
al@19866 303 chmod 755 "$1/lib/firmware/b43legacy"
al@19866 304 find "$1/lib/firmware/b43legacy" -type f -exec chmod 644 '{}' \;
al@19866 305 }
al@19866 306 post_remove_firmware_b43legacy() {
al@19866 307 rm -rf "$1/lib/firmware/b43legacy"
al@19866 308 }