haiku-website/static/files/alpha4_download-data-for-wl...

57 lines
1.6 KiB
Bash

#!/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 Alpha4
# (i.e. without 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
baseURL=http://cgit.haiku-os.org/haiku/plain/src/system/libroot/posix
archiveName=haiku-wifi-firmware-data.zip
# copy these to system/data/firmware/broadcom43xx/b43-fwcutter/
dir=system/data/firmware/broadcom43xx/b43-fwcutter
DownloadFileTo http://bues.ch/b43/fwcutter/b43-fwcutter-019.tar.bz2 $dir
DownloadFileTo $baseURL/glibc/string/byteswap.h $dir
# copy these to system/data/firmware/broadcom43xx/b43-fwcutter/bits
dir=system/data/firmware/broadcom43xx/b43-fwcutter/bits
DownloadFileTo $baseURL/glibc/include/arch/x86/bits/byteswap.h $dir
# copy these to system/data/firmware/broadcom43xx/
dir=system/data/firmware/broadcom43xx
DownloadFileTo http://downloads.openwrt.org/sources/wl_apsta-3.130.20.0.o $dir
# copy these to system/data/firmware/marvell88w8335
dir=system/data/firmware/marvell88w8335
DownloadFileTo http://www.nazgul.ch/malo/malo-firmware-1.4.tgz $dir
cd "$WIFI_DATA_TOP"
zip -9ry ../$archiveName .
cd ..
echo ""
echo ""
echo "For Haiku Alpha4 (i.e. without package management)"
echo ""
echo "Extract $archiveName to your Haiku's /boot"
echo "Then run install-wifi-firmwares.sh"