From daf10ef34051db2f97ac3a116c86a6828fab9d66 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 4 Aug 2020 10:45:18 +0200 Subject: [PATCH] install-wifi-firlwares: stop using haiku-files.org - Move the firmwares to github - Move broadcom fwcutter to a package Fixes #11841 --- data/bin/install-wifi-firmwares.sh | 62 +----------------------------- 1 file changed, 2 insertions(+), 60 deletions(-) diff --git a/data/bin/install-wifi-firmwares.sh b/data/bin/install-wifi-firmwares.sh index 07ef26dc91..81cc30111b 100755 --- a/data/bin/install-wifi-firmwares.sh +++ b/data/bin/install-wifi-firmwares.sh @@ -31,7 +31,7 @@ VIEW='View licenses' ABORT='Abort installation' OK='I agree to the licenses. Install firmwares.' -baseURL='http://www.haiku-files.org/files/wifi-firmwares' +baseURL='https://raw.githubusercontent.com/haiku/firmware/master/wifi/' firmwareDir=`finddir B_SYSTEM_DATA_DIRECTORY`/firmware tempDir=`finddir B_SYSTEM_TEMP_DIRECTORY`/wifi-firmwares driversDir=`finddir B_SYSTEM_ADDONS_DIRECTORY`/kernel/drivers @@ -195,7 +195,7 @@ function InstallBroadcom43xx() driver='broadcom43xx' PreFirmwareInstallation - BuildBroadcomFWCutter + pkgman install -y cmd:b43_fwcutter returnCode=$? if [ $returnCode -gt 0 ] ; then echo "...failed. ${driver}'s firmware will not be installed." @@ -242,64 +242,6 @@ function InstallMarvell88w8335() } -function BuildBroadcomFWCutter() -{ - # Download & extract b43-fwcutter. - local file="b43-fwcutter-012.tar.bz2" - local dir="${tempFirmwareDir}/${driver}/b43-fwcutter" - local url="${baseURL}/b43/fwcutter/${file}" - DownloadFileIfNotCached $url $file $dir - if [ $result -gt 0 ]; then - return $result - fi - - # Extract archive. - cd "$tempDir" - tar xjf "$dir/$file" - - # Download additonal files for building b43-fwcutter. - cd b43-fwcutter-012 - local baseURL='https://git.haiku-os.org/haiku/plain/src/system/libroot/posix/glibc' - DownloadFileIfNotCached ${baseURL}/string/byteswap.h?id=c039c51d778367e9aa15db18d185e9d627706b46 byteswap.h $dir - if [ $result -gt 0 ]; then - return $result - fi - DownloadFileIfNotCached ${baseURL}/include/arch/x86/bits/byteswap.h?id=c039c51d778367e9aa15db18d185e9d627706b46 byteswap.h $dir/bits - if [ $result -gt 0 ]; then - return $result - fi - - # Copy those files to working directory. - mkdir -p bits - cp $dir/byteswap.h . - cp $dir/bits/byteswap.h bits/ - - # Build b43-fwcutter. - echo "Compiling b43-fwcutter for installing Broadcom's firmware ..." - make PREFIX=/boot/system CFLAGS="-I. -Wall" >/dev/null 2>&1 - result=$? - if [ $result -gt 0 ]; then - echo "... failed to compile b43-fwcutter." - else - echo "... successfully compiled b43-fwcutter." - fi - if [ ! -e b43-fwcutter ] ; then - return 1 - fi - mv b43-fwcutter "$tempDir" - - cd "${tempFirmwareDir}/${driver}/b43-fwcutter" - rm b43-fwcutter-012.tar.bz2 - rm byteswap.h - rm bits/byteswap.h - rmdir bits - cd .. - rmdir b43-fwcutter - - return 0 -} - - function CutAndInstallBroadcomFirmware() { # Download firmware.