#!/bin/sh # Download and zip up wifi firmware from an OS with internet access. # To be unpacked to /boot in Haiku and installed from the Terminal # by running install-wifi-firmwares.sh # # To be used for Haiku revisions post-Alpha4 # (i.e. with package management) DownloadFileTo() { local url="$1" local targetDir="$WIFI_DATA_TOP/$2/" if [ ! -d "$targetDir" ]; then mkdir -p "$targetDir" fi cd "$targetDir" wget "$url" cd "$SCRIPT_TOP_DIR" } # some variables SCRIPT_TOP_DIR=`pwd` WIFI_DATA_TOP=wifi-firmware HAIKU_TEMP=system/cache/tmp/package_me/boot/system/data/firmware baseURL=https://raw.githubusercontent.com/haiku/firmware/master/wifi haikuPortsURL=https://eu.hpkg.haiku-os.org/haikuports/master archiveName=haiku-wifi-firmware-data.zip # copy these to system/data/firmware/iprowifi2100/ dir=$HAIKU_TEMP/iprowifi2100 DownloadFileTo $baseURL/intel/ipw2100-fw-1.3.tgz $dir # copy these to system/data/firmware/iprowifi2200/ dir=$HAIKU_TEMP/iprowifi2200 DownloadFileTo $baseURL/intel/ipw2200-fw-3.1.tgz $dir # copy these to system/data/firmware/marvell88w8335 dir=$HAIKU_TEMP/marvell88w8335 DownloadFileTo $baseURL/marvell/malo-firmware-1.4.tgz $dir cd "$WIFI_DATA_TOP" zip -9ry ../$archiveName . cd .. echo "" echo "" echo "For Haiku revisions post-Alpha4 (i.e. with package management)" echo "" echo "Extract $archiveName to your Haiku's /boot" echo "Then run install-wifi-firmwares.sh"