summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorJean-Pierre De Jesus DIAZ <jean@foundationdevices.com>2024-02-29 16:20:50 +0100
committerLudovic Courtès <ludo@gnu.org>2024-04-17 12:13:02 +0200
commit9f8e92cc7d8cbcb2709dda5f3f0287215441d939 (patch)
treeac48955be13673e90535e50397790181be06f4fb /gnu
parent4c88ffdb6592a095f9ad47a19399acd9914a8022 (diff)
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>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/firmware.scm83
-rw-r--r--gnu/packages/patches/ath9k-htc-firmware-objcopy.patch14
-rw-r--r--gnu/system.scm3
4 files changed, 43 insertions, 58 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index ccff8648be5..2e0c6a5d3cb 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -954,7 +954,6 @@ dist_patch_DATA = \
954 %D%/packages/patches/ath9k-htc-firmware-binutils.patch \ 954 %D%/packages/patches/ath9k-htc-firmware-binutils.patch \
955 %D%/packages/patches/ath9k-htc-firmware-gcc.patch \ 955 %D%/packages/patches/ath9k-htc-firmware-gcc.patch \
956 %D%/packages/patches/ath9k-htc-firmware-gcc-compat.patch \ 956 %D%/packages/patches/ath9k-htc-firmware-gcc-compat.patch \
957 %D%/packages/patches/ath9k-htc-firmware-objcopy.patch \
958 %D%/packages/patches/atlas-gfortran-compat.patch \ 957 %D%/packages/patches/atlas-gfortran-compat.patch \
959 %D%/packages/patches/audacity-ffmpeg-fallback.patch \ 958 %D%/packages/patches/audacity-ffmpeg-fallback.patch \
960 %D%/packages/patches/audiofile-fix-datatypes-in-tests.patch \ 959 %D%/packages/patches/audiofile-fix-datatypes-in-tests.patch \
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 4664744ac69..6f0c2da8061 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -37,6 +37,7 @@
37 #:use-module (guix utils) 37 #:use-module (guix utils)
38 #:use-module (guix git-download) 38 #:use-module (guix git-download)
39 #:use-module (guix build-system copy) 39 #:use-module (guix build-system copy)
40 #:use-module (guix build-system cmake)
40 #:use-module (guix build-system gnu) 41 #:use-module (guix build-system gnu)
41 #:use-module (guix build-system meson) 42 #:use-module (guix build-system meson)
42 #:use-module (guix build-system python) 43 #:use-module (guix build-system python)
@@ -90,9 +91,9 @@
90 #:export (make-ergodox-firmware 91 #:export (make-ergodox-firmware
91 make-qmk-firmware)) 92 make-qmk-firmware))
92 93
93(define-public ath9k-htc-firmware 94(define-public ath9k-htc-ar7010-firmware
94 (package 95 (package
95 (name "ath9k-htc-firmware") 96 (name "ath9k-htc-ar7010-firmware")
96 (version "1.4.0") 97 (version "1.4.0")
97 (source (origin 98 (source (origin
98 (method git-fetch) 99 (method git-fetch)
@@ -106,51 +107,49 @@
106 (sha256 107 (sha256
107 (base32 108 (base32
108 "16jbj8avg5jkgvq5lxm0hdxxn4c3zn7fx8b4nxllvr024apk9w23")) 109 "16jbj8avg5jkgvq5lxm0hdxxn4c3zn7fx8b4nxllvr024apk9w23"))
109 (file-name (git-file-name name version)) 110 (file-name (git-file-name "open-ath9k-htc-firmware" version))
110 (patches (search-patches "ath9k-htc-firmware-objcopy.patch" 111 (patches (search-patches "ath9k-htc-firmware-gcc-compat.patch"))))
111 "ath9k-htc-firmware-gcc-compat.patch")))) 112 (build-system cmake-build-system)
112 (build-system gnu-build-system)
113 (arguments 113 (arguments
114 '(#:target #f ; Package produces firmware. 114 (list #:target "xtensa-ath9k-elf"
115 #:phases 115 #:tests? #f
116 (modify-phases %standard-phases 116 #:configure-flags
117 (add-before 'configure 'pre-configure 117 #~'("-DCMAKE_SYSTEM_NAME=Generic" ;override default value
118 (lambda* (#:key inputs native-inputs #:allow-other-keys) 118 "-DTARGET_MAGPIE=ON")
119 (chdir "target_firmware") 119 #:phases
120 120 #~(modify-phases %standard-phases
121 ;; 'configure' is a simple script that runs 'cmake' with 121 (add-before 'configure 'change-directory
122 ;; the right flags. 122 (lambda _
123 (substitute* "configure" 123 (chdir "target_firmware")))
124 (("^TARGET.*$") "TARGET=xtensa-ath9k-elf\n") 124 (replace 'install
125 (("^TOOLCHAIN=.*$") 125 (lambda _
126 (string-append "TOOLCHAIN=" 126 (let ((fw-dir (string-append #$output "/lib/firmware")))
127 (assoc-ref (or native-inputs inputs) "cross-gcc") 127 (for-each (lambda (file)
128 "\n"))) 128 (install-file file fw-dir))
129 #t)) 129 (find-files "." "\\.fw$"))))))))
130 (replace 'install 130 (native-inputs (list perl))
131 (lambda* (#:key outputs #:allow-other-keys)
132 (let* ((out (assoc-ref outputs "out"))
133 (fw-dir (string-append out "/lib/firmware")))
134 (for-each (lambda (file)
135 (install-file file fw-dir))
136 (find-files "." "\\.fw$"))
137 #t))))
138 #:tests? #f))
139
140 ;; The firmware is cross-compiled using a "bare bones" compiler (no libc.)
141 ;; Use our own tool chain for that.
142 (native-inputs `(("cross-gcc" ,(cross-gcc "xtensa-ath9k-elf"))
143 ("cross-binutils" ,(cross-binutils "xtensa-ath9k-elf"))
144 ("cmake" ,cmake-minimal)
145 ("perl" ,perl)))
146 (home-page "https://wireless.wiki.kernel.org/en/users/Drivers/ath9k_htc") 131 (home-page "https://wireless.wiki.kernel.org/en/users/Drivers/ath9k_htc")
147 (synopsis "Firmware for the Atheros AR7010 and AR9271 USB 802.11n NICs") 132 (synopsis "Firmware for the Atheros AR7010 USB 802.11n NICs")
148 (description 133 (description
149 "This is the firmware for the Qualcomm Atheros AR7010 and AR9271 USB 134 "This is the firmware for the Qualcomm Atheros AR7010 802.11n USB NICs
150802.11n NICs (aka Wi-Fi USB dongles). It is used by the ath9k driver of 135(aka Wi-Fi USB dongle). It is used by the ath9k driver of Linux-libre.")
151Linux-libre.")
152 (license (license:non-copyleft "http://directory.fsf.org/wiki/License:ClearBSD")))) 136 (license (license:non-copyleft "http://directory.fsf.org/wiki/License:ClearBSD"))))
153 137
138(define-public ath9k-htc-ar9271-firmware
139 (package
140 (inherit ath9k-htc-ar7010-firmware)
141 (name "ath9k-htc-ar9271-firmware")
142 (arguments
143 (substitute-keyword-arguments
144 (package-arguments ath9k-htc-ar7010-firmware)
145 ((#:configure-flags flags)
146 #~'("-DCMAKE_SYSTEM_NAME=Generic" ;override default value
147 "-DTARGET_K2=ON"))))
148 (synopsis "Firmware for the Atheros AR9271 USB 802.11n NICs")
149 (description
150 "This is the firmware for the Qualcomm Atheros AR9271 802.11n USB NICs
151(aka Wi-Fi USB dongle). It is used by the ath9k driver of Linux-libre.")))
152
154(define-public b43-tools 153(define-public b43-tools
155 (let ((commit "27892ef741e7f1d08cb939744f8b8f5dac7b04ae") 154 (let ((commit "27892ef741e7f1d08cb939744f8b8f5dac7b04ae")
156 (revision "1")) 155 (revision "1"))
diff --git a/gnu/packages/patches/ath9k-htc-firmware-objcopy.patch b/gnu/packages/patches/ath9k-htc-firmware-objcopy.patch
deleted file mode 100644
index 13c3ca14132..00000000000
--- a/gnu/packages/patches/ath9k-htc-firmware-objcopy.patch
+++ /dev/null
@@ -1,14 +0,0 @@
1The firmware is cross-compiled, but the build system ends up using
2'objcopy' instead of '$TARGET-objcopy' by default. Force it to
3use the right one.
4
5--- source/target_firmware/configure 2014-10-28 20:57:26.834436561 +0100
6+++ source/target_firmware/configure 2014-10-28 20:57:29.666436530 +0100
7@@ -11,6 +11,7 @@ mkdir -p build
8 cat > "$TOOLCHAIN_FILE" <<EOF
9 INCLUDE(CMakeForceCompiler)
10
11+SET(CMAKE_OBJCOPY ${TARGET}-objcopy)
12 SET(CMAKE_SYSTEM_PROCESSOR xtensa)
13 SET(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN}/$TARGET)
14 SET(CMAKE_STRIP :)
diff --git a/gnu/system.scm b/gnu/system.scm
index aef81d8ccfa..9b5c96d0ad2 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -877,7 +877,8 @@ of PROVENANCE-SERVICE-TYPE to its services."
877 877
878(define %base-firmware 878(define %base-firmware
879 ;; Firmware usable by default. 879 ;; Firmware usable by default.
880 (list ath9k-htc-firmware 880 (list ath9k-htc-ar7010-firmware
881 ath9k-htc-ar9271-firmware
881 openfwwf-firmware)) 882 openfwwf-firmware))
882 883
883(define %base-packages-artwork 884(define %base-packages-artwork