mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-02-07 11:29:59 +01:00
gnu: ath9k-htc-firmware: Split package.
* gnu/local.mk (dist_patch_DATA): Remove ath9k-htc-firmware-objcopy.patch. * gnu/packages/firmware.scm (ath9k-htc-firmware): Remove. (ath9k-htc-ar7010-firmware, ath9k-htc-ar9271-firmware): New variables. * gnu/packages/patches/ath9k-htc-firmware-objcopy.patch: Delete file. * gnu/system.scm (%base-firmware): Use new ath9k packages. Change-Id: I86259e398427abd139c1f310a95bb15e2c03cee3 Co-authored-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
4c88ffdb65
commit
9f8e92cc7d
4 changed files with 43 additions and 58 deletions
|
@ -954,7 +954,6 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/ath9k-htc-firmware-binutils.patch \
|
%D%/packages/patches/ath9k-htc-firmware-binutils.patch \
|
||||||
%D%/packages/patches/ath9k-htc-firmware-gcc.patch \
|
%D%/packages/patches/ath9k-htc-firmware-gcc.patch \
|
||||||
%D%/packages/patches/ath9k-htc-firmware-gcc-compat.patch \
|
%D%/packages/patches/ath9k-htc-firmware-gcc-compat.patch \
|
||||||
%D%/packages/patches/ath9k-htc-firmware-objcopy.patch \
|
|
||||||
%D%/packages/patches/atlas-gfortran-compat.patch \
|
%D%/packages/patches/atlas-gfortran-compat.patch \
|
||||||
%D%/packages/patches/audacity-ffmpeg-fallback.patch \
|
%D%/packages/patches/audacity-ffmpeg-fallback.patch \
|
||||||
%D%/packages/patches/audiofile-fix-datatypes-in-tests.patch \
|
%D%/packages/patches/audiofile-fix-datatypes-in-tests.patch \
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module (guix build-system copy)
|
#:use-module (guix build-system copy)
|
||||||
|
#:use-module (guix build-system cmake)
|
||||||
#:use-module (guix build-system gnu)
|
#:use-module (guix build-system gnu)
|
||||||
#:use-module (guix build-system meson)
|
#:use-module (guix build-system meson)
|
||||||
#:use-module (guix build-system python)
|
#:use-module (guix build-system python)
|
||||||
|
@ -90,9 +91,9 @@
|
||||||
#:export (make-ergodox-firmware
|
#:export (make-ergodox-firmware
|
||||||
make-qmk-firmware))
|
make-qmk-firmware))
|
||||||
|
|
||||||
(define-public ath9k-htc-firmware
|
(define-public ath9k-htc-ar7010-firmware
|
||||||
(package
|
(package
|
||||||
(name "ath9k-htc-firmware")
|
(name "ath9k-htc-ar7010-firmware")
|
||||||
(version "1.4.0")
|
(version "1.4.0")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
|
@ -106,51 +107,49 @@
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"16jbj8avg5jkgvq5lxm0hdxxn4c3zn7fx8b4nxllvr024apk9w23"))
|
"16jbj8avg5jkgvq5lxm0hdxxn4c3zn7fx8b4nxllvr024apk9w23"))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name "open-ath9k-htc-firmware" version))
|
||||||
(patches (search-patches "ath9k-htc-firmware-objcopy.patch"
|
(patches (search-patches "ath9k-htc-firmware-gcc-compat.patch"))))
|
||||||
"ath9k-htc-firmware-gcc-compat.patch"))))
|
(build-system cmake-build-system)
|
||||||
(build-system gnu-build-system)
|
|
||||||
(arguments
|
(arguments
|
||||||
'(#:target #f ; Package produces firmware.
|
(list #:target "xtensa-ath9k-elf"
|
||||||
#:phases
|
#:tests? #f
|
||||||
(modify-phases %standard-phases
|
#:configure-flags
|
||||||
(add-before 'configure 'pre-configure
|
#~'("-DCMAKE_SYSTEM_NAME=Generic" ;override default value
|
||||||
(lambda* (#:key inputs native-inputs #:allow-other-keys)
|
"-DTARGET_MAGPIE=ON")
|
||||||
(chdir "target_firmware")
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
;; 'configure' is a simple script that runs 'cmake' with
|
(add-before 'configure 'change-directory
|
||||||
;; the right flags.
|
(lambda _
|
||||||
(substitute* "configure"
|
(chdir "target_firmware")))
|
||||||
(("^TARGET.*$") "TARGET=xtensa-ath9k-elf\n")
|
(replace 'install
|
||||||
(("^TOOLCHAIN=.*$")
|
(lambda _
|
||||||
(string-append "TOOLCHAIN="
|
(let ((fw-dir (string-append #$output "/lib/firmware")))
|
||||||
(assoc-ref (or native-inputs inputs) "cross-gcc")
|
(for-each (lambda (file)
|
||||||
"\n")))
|
(install-file file fw-dir))
|
||||||
#t))
|
(find-files "." "\\.fw$"))))))))
|
||||||
(replace 'install
|
(native-inputs (list perl))
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
|
||||||
(fw-dir (string-append out "/lib/firmware")))
|
|
||||||
(for-each (lambda (file)
|
|
||||||
(install-file file fw-dir))
|
|
||||||
(find-files "." "\\.fw$"))
|
|
||||||
#t))))
|
|
||||||
#:tests? #f))
|
|
||||||
|
|
||||||
;; The firmware is cross-compiled using a "bare bones" compiler (no libc.)
|
|
||||||
;; Use our own tool chain for that.
|
|
||||||
(native-inputs `(("cross-gcc" ,(cross-gcc "xtensa-ath9k-elf"))
|
|
||||||
("cross-binutils" ,(cross-binutils "xtensa-ath9k-elf"))
|
|
||||||
("cmake" ,cmake-minimal)
|
|
||||||
("perl" ,perl)))
|
|
||||||
(home-page "https://wireless.wiki.kernel.org/en/users/Drivers/ath9k_htc")
|
(home-page "https://wireless.wiki.kernel.org/en/users/Drivers/ath9k_htc")
|
||||||
(synopsis "Firmware for the Atheros AR7010 and AR9271 USB 802.11n NICs")
|
(synopsis "Firmware for the Atheros AR7010 USB 802.11n NICs")
|
||||||
(description
|
(description
|
||||||
"This is the firmware for the Qualcomm Atheros AR7010 and AR9271 USB
|
"This is the firmware for the Qualcomm Atheros AR7010 802.11n USB NICs
|
||||||
802.11n NICs (aka Wi-Fi USB dongles). It is used by the ath9k driver of
|
(aka Wi-Fi USB dongle). It is used by the ath9k driver of Linux-libre.")
|
||||||
Linux-libre.")
|
|
||||||
(license (license:non-copyleft "http://directory.fsf.org/wiki/License:ClearBSD"))))
|
(license (license:non-copyleft "http://directory.fsf.org/wiki/License:ClearBSD"))))
|
||||||
|
|
||||||
|
(define-public ath9k-htc-ar9271-firmware
|
||||||
|
(package
|
||||||
|
(inherit ath9k-htc-ar7010-firmware)
|
||||||
|
(name "ath9k-htc-ar9271-firmware")
|
||||||
|
(arguments
|
||||||
|
(substitute-keyword-arguments
|
||||||
|
(package-arguments ath9k-htc-ar7010-firmware)
|
||||||
|
((#:configure-flags flags)
|
||||||
|
#~'("-DCMAKE_SYSTEM_NAME=Generic" ;override default value
|
||||||
|
"-DTARGET_K2=ON"))))
|
||||||
|
(synopsis "Firmware for the Atheros AR9271 USB 802.11n NICs")
|
||||||
|
(description
|
||||||
|
"This is the firmware for the Qualcomm Atheros AR9271 802.11n USB NICs
|
||||||
|
(aka Wi-Fi USB dongle). It is used by the ath9k driver of Linux-libre.")))
|
||||||
|
|
||||||
(define-public b43-tools
|
(define-public b43-tools
|
||||||
(let ((commit "27892ef741e7f1d08cb939744f8b8f5dac7b04ae")
|
(let ((commit "27892ef741e7f1d08cb939744f8b8f5dac7b04ae")
|
||||||
(revision "1"))
|
(revision "1"))
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
The firmware is cross-compiled, but the build system ends up using
|
|
||||||
'objcopy' instead of '$TARGET-objcopy' by default. Force it to
|
|
||||||
use the right one.
|
|
||||||
|
|
||||||
--- source/target_firmware/configure 2014-10-28 20:57:26.834436561 +0100
|
|
||||||
+++ source/target_firmware/configure 2014-10-28 20:57:29.666436530 +0100
|
|
||||||
@@ -11,6 +11,7 @@ mkdir -p build
|
|
||||||
cat > "$TOOLCHAIN_FILE" <<EOF
|
|
||||||
INCLUDE(CMakeForceCompiler)
|
|
||||||
|
|
||||||
+SET(CMAKE_OBJCOPY ${TARGET}-objcopy)
|
|
||||||
SET(CMAKE_SYSTEM_PROCESSOR xtensa)
|
|
||||||
SET(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN}/$TARGET)
|
|
||||||
SET(CMAKE_STRIP :)
|
|
|
@ -877,7 +877,8 @@ of PROVENANCE-SERVICE-TYPE to its services."
|
||||||
|
|
||||||
(define %base-firmware
|
(define %base-firmware
|
||||||
;; Firmware usable by default.
|
;; Firmware usable by default.
|
||||||
(list ath9k-htc-firmware
|
(list ath9k-htc-ar7010-firmware
|
||||||
|
ath9k-htc-ar9271-firmware
|
||||||
openfwwf-firmware))
|
openfwwf-firmware))
|
||||||
|
|
||||||
(define %base-packages-artwork
|
(define %base-packages-artwork
|
||||||
|
|
Loading…
Add table
Reference in a new issue