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