Ticket #11998: download-wlan-firmware.bat

File download-wlan-firmware.bat, 1.5 KB (added by haiqu, 5 years ago)

Fix minor script error

Line 
1@echo off
2echo Download and zip up wifi firmware from Windows with internet access.
3echo To be unpacked to /boot in Haiku then installed from the Terminal
4echo by running install-wifi-firmwares.sh (which comes with Haiku OS)
5@echo .
6
7setlocal
8path="C:\Program Files\GnuWin32\bin";%path%
9
10rem Some useful variables
11set SCRIPT_TOP=%cd%
12set HAIKU_TEMP=system\cache\tmp\package_me\boot\system\data\firmware
13
14rem Check if this is an older build, if so we need different directories
15set /P a4=Is the target system post-Alpha-4 (y/n)?
16if /i {%a4%}=={y} goto :yes
17if /i {%a4%}=={yes} goto :yes
18set HAIKU_TEMP=system\data\firmware
19:yes
20set baseURL=http://svn.haiku-os.org/oldhaiku/haiku/trunk/src/system/libroot/posix
21
22rem Make the temp directories to store files
23mkdir wifi-firmware\%HAIKU_TEMP%\broadcom43xx\b43-fwcutter\bits
24mkdir wifi-firmware\%HAIKU_TEMP%\marvell88w8335
25
26cd wifi-firmware\%HAIKU_TEMP%\broadcom43xx
27wget http://downloads.openwrt.org/sources/wl_apsta-3.130.20.0
28cd b43-fwcutter
29wget http://bues.ch/b43/fwcutter/b43-fwcutter-019.tar.bz2
30wget %baseURL%/glibc/string/byteswap.h
31cd bits
32wget %baseURL%/glibc/include/arch/x86/bits/byteswap.h
33cd %SCRIPT_TOP%\wifi-firmware\%HAIKU_TEMP%\marvell88w8335
34wget http://weongyo.org/project/malo/malo-firmware-1.4.tar.gz
35
36cd %SCRIPT_TOP%\wifi-firmware
37
38rem Zip it all up
39zip -9r ../haiku-firmware-data.zip .
40cd ..
41
42rem Get rid of temp directories
43rmdir wifi-firmware /S /Q
44endlocal
45@echo .
46@echo Done!
47pause