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