haiku-website/static/files/download-data-for-wlan-firm...

58 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 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=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=$HAIKU_TEMP/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=$HAIKU_TEMP/broadcom43xx/b43-fwcutter/bits
DownloadFileTo $baseURL/glibc/include/arch/x86/bits/byteswap.h $dir
# copy these to system/data/firmware/broadcom43xx/
dir=$HAIKU_TEMP/broadcom43xx
DownloadFileTo http://downloads.openwrt.org/sources/wl_apsta-3.130.20.0.o $dir
# copy these to system/data/firmware/marvell88w8335
dir=$HAIKU_TEMP/marvell88w8335
DownloadFileTo http://weongyo.org/project/malo/malo-firmware-1.4.tar.gz $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"