1 |
|
---|
2 | #!/bin/sh
|
---|
3 |
|
---|
4 | # Download and zip up wifi firmware from an OS with internet access.
|
---|
5 | # To be unpacked to /boot in Haiku and installed from the Terminal
|
---|
6 | # by running install-wifi-firmwares.sh
|
---|
7 | #
|
---|
8 | # To be used for Haiku Alpha4
|
---|
9 | # (i.e. without package management)
|
---|
10 |
|
---|
11 | DownloadFileTo()
|
---|
12 | {
|
---|
13 | local url="$1"
|
---|
14 | local targetDir="$WIFI_DATA_TOP/$2/"
|
---|
15 | if [ ! -d "$targetDir" ]; then
|
---|
16 | mkdir -p "$targetDir"
|
---|
17 | fi
|
---|
18 | cd "$targetDir"
|
---|
19 | wget "$url"
|
---|
20 | cd "$SCRIPT_TOP_DIR"
|
---|
21 | }
|
---|
22 |
|
---|
23 |
|
---|
24 | # some variables
|
---|
25 | SCRIPT_TOP_DIR=`pwd`
|
---|
26 | WIFI_DATA_TOP=wifi-firmware
|
---|
27 | baseURL=http://cgit.haiku-os.org/haiku/tree/src/system/libroot/posix
|
---|
28 | archiveName=haiku-wifi-firmware-data.zip
|
---|
29 |
|
---|
30 | # copy these to system/data/firmware/broadcom43xx/b43-fwcutter/
|
---|
31 | dir=system/data/firmware/broadcom43xx/b43-fwcutter
|
---|
32 | DownloadFileTo http://bues.ch/b43/fwcutter/b43-fwcutter-019.tar.bz2 $dir
|
---|
33 | DownloadFileTo $baseURL/glibc/string/byteswap.h $dir
|
---|
34 |
|
---|
35 | # copy these to system/data/firmware/broadcom43xx/b43-fwcutter/bits
|
---|
36 | dir=system/data/firmware/broadcom43xx/b43-fwcutter/bits
|
---|
37 | DownloadFileTo $baseURL/glibc/include/arch/x86/bits/byteswap.h $dir
|
---|
38 |
|
---|
39 | # copy these to system/data/firmware/broadcom43xx/
|
---|
40 | dir=system/data/firmware/broadcom43xx
|
---|
41 | DownloadFileTo http://downloads.openwrt.org/sources/wl_apsta-3.130.20.0.o $dir
|
---|
42 |
|
---|
43 | # copy these to system/data/firmware/marvell88w8335
|
---|
44 | dir=system/data/firmware/marvell88w8335
|
---|
45 | DownloadFileTo http://www.nazgul.ch/malo/malo-firmware-1.4.tgz $dir
|
---|
46 |
|
---|
47 | cd "$WIFI_DATA_TOP"
|
---|
48 | zip -9ry ../$archiveName .
|
---|
49 | cd ..
|
---|
50 |
|
---|
51 | echo ""
|
---|
52 | echo ""
|
---|
53 | echo "For Haiku Alpha4 (i.e. without package management)"
|
---|
54 | echo ""
|
---|
55 | echo "Extract $archiveName to your Haiku's /boot"
|
---|
56 | echo "Then run install-wifi-firmwares.sh"
|
---|