diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2013-07-12 22:53:11 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2013-07-12 22:53:11 -0300 |
commit | e14736ca7ac051726b587d8fdb8368be502a9109 (patch) | |
tree | 6a40b3b2de9bf45e8f31ba5fd45ee8f2615bd4ae /libre-testing/ath9k-htc-firmware-git/PKGBUILD | |
parent | e6e169990bdfc35fb6151f148510bf3f0da1dc1e (diff) | |
parent | 360a407f262ac47087ff29718465fbfc7765cb73 (diff) | |
download | abslibre-e14736ca7ac051726b587d8fdb8368be502a9109.tar.gz abslibre-e14736ca7ac051726b587d8fdb8368be502a9109.tar.bz2 abslibre-e14736ca7ac051726b587d8fdb8368be502a9109.zip |
Merge branch 'master' of ssh://gparabola/srv/git/abslibre
Diffstat (limited to 'libre-testing/ath9k-htc-firmware-git/PKGBUILD')
-rw-r--r-- | libre-testing/ath9k-htc-firmware-git/PKGBUILD | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/libre-testing/ath9k-htc-firmware-git/PKGBUILD b/libre-testing/ath9k-htc-firmware-git/PKGBUILD new file mode 100644 index 000000000..d04643491 --- /dev/null +++ b/libre-testing/ath9k-htc-firmware-git/PKGBUILD @@ -0,0 +1,81 @@ +# Maintainer: André Silva <emulatorman@lavabit.com> +# Maintainer: Márcio Silva <coadde@lavabit.com> + +pkgname=ath9k-htc-firmware-git +pkgver=$(LC_ALL=C date -u +%Y%m%d) +pkgrel=1 +pkgdesc='Free firmware files for the Qualcomm Atheros AR7010 and AR9271 USB 802.11n NICs' +arch=('any') +url=('http://wireless.kernel.org/en/users/Drivers/ath9k_htc') +license=('BSD') +makedepends=('git' 'cmake' 'xtensa-unknown-elf-binutils' 'xtensa-unknown-elf-gcc') +conflicts=('ath9k-htc-firmware') +provides=('ath9k-htc-firmware') +source=("git://github.com/olerem/open-ath9k-htc-firmware" + #"git://github.com/qca/open-ath9k-htc-firmware" + 'LICENSE') +md5sums=('SKIP' + '5163b2711bc481c77045850610b7dd31') + +prepare() { + + cd $srcdir/open-ath9k-htc-firmware/target_firmware + mkdir -p build/{k2,magpie} + +} + +build() { + + cd $srcdir/open-ath9k-htc-firmware + + # use suspend_fix branch to fix "ath9k_htc: Target is unresponsive" + git checkout suspend_fix + + export CTARGET="xtensa-unknown-elf" + export CFLAGS="-mtext-section-literals -O2 -pipe --param=ssp-buffer-size=4" + export CXXFLAGS="${CFLAGS}" + + cat > target_firmware/build/toolchain.cmake <<EOF +INCLUDE(CMakeForceCompiler) + +SET(CMAKE_SYSTEM_PROCESSOR xtensa) +SET(COMPILER_PREFIX "xtensa-unknown-elf") +SET(CMAKE_FIND_ROOT_PATH /usr/xtensa-unknown-elf) + +CMAKE_FORCE_C_COMPILER(/usr/bin/xtensa-unknown-elf-gcc GNU) +EOF + + cd $srcdir/open-ath9k-htc-firmware/target_firmware/build/k2 + + cmake -DCMAKE_TOOLCHAIN_FILE=$srcdir/open-ath9k-htc-firmware/target_firmware/build/toolchain.cmake "$@" -DTARGET_K2=ON ../.. + cd - + + cd $srcdir/open-ath9k-htc-firmware/target_firmware/build/magpie + + cmake -DCMAKE_TOOLCHAIN_FILE=$srcdir/open-ath9k-htc-firmware/target_firmware/build/toolchain.cmake "$@" -DTARGET_MAGPIE=ON ../.. + cd - + + cd $srcdir/open-ath9k-htc-firmware/target_firmware + + make -C build/k2 + make -C build/magpie + +} + +package() { + + # create firmware folder to put the free firmware files there + install -d -m755 $pkgdir/usr/lib/firmware + + cd $srcdir/open-ath9k-htc-firmware/target_firmware + + # move firmware files to firmware folder + cp build/{k2,magpie}/htc_*.fw $pkgdir/usr/lib/firmware + + # create license folder to put the license file there + install -d -m755 $pkgdir/usr/share/licenses/$pkgname + + # put LICENSE to license folder + install -m644 $srcdir/LICENSE $pkgdir/usr/share/licenses/$pkgname + +} |