From patchwork Thu Feb 29 15:20:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Pierre De Jesus DIAZ X-Patchwork-Id: 61243 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5F43627BBE2; Thu, 29 Feb 2024 15:23:09 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 70EE327BBE9 for ; Thu, 29 Feb 2024 15:23:07 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rfiF7-00072h-19; Thu, 29 Feb 2024 10:22:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rfiF4-0006yl-Do for guix-patches@gnu.org; Thu, 29 Feb 2024 10:22:38 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rfiF4-0004Wx-5x for guix-patches@gnu.org; Thu, 29 Feb 2024 10:22:38 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rfiFV-0004hh-BO; Thu, 29 Feb 2024 10:23:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69476] [PATCH 8/8] gnu: ath9k-htc-firmware: Split package. Resent-From: Jean-Pierre De Jesus DIAZ Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, vagrant@debian.org, guix-patches@gnu.org Resent-Date: Thu, 29 Feb 2024 15:23:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69476 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69476@debbugs.gnu.org Cc: Jean-Pierre De Jesus DIAZ , Efraim Flashner , Vagrant Cascadian X-Debbugs-Original-Xcc: Efraim Flashner , Vagrant Cascadian Received: via spool by 69476-submit@debbugs.gnu.org id=B69476.170922016717999 (code B ref 69476); Thu, 29 Feb 2024 15:23:05 +0000 Received: (at 69476) by debbugs.gnu.org; 29 Feb 2024 15:22:47 +0000 Received: from localhost ([127.0.0.1]:35037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfiFD-0004g9-7p for submit@debbugs.gnu.org; Thu, 29 Feb 2024 10:22:47 -0500 Received: from mail-lf1-f53.google.com ([209.85.167.53]:50393) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfiF5-0004ex-LW for 69476@debbugs.gnu.org; Thu, 29 Feb 2024 10:22:40 -0500 Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-512b700c8ebso1117931e87.0 for <69476@debbugs.gnu.org>; Thu, 29 Feb 2024 07:22:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundationdevices.com; s=google; t=1709220066; x=1709824866; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TcNQdfWCoE2Jx53NHNx5X2HYyZXzK6yKC/I8DyugVBA=; b=OgNRTDoFFS+aw9mFefCq/wO7oJXgckc7pBxFYI9IWY6FZbFcagnhtrTBqmmjuvX6m0 H4+7H/xvtPYwB+3SnIrQ9Lb08usDdLPEzu7CSffbwuhxkJcd0PXFN8XX4s369q4lV5h9 wz4Soh/41O3nv4xAi5D3WmeqNuRmSqk4VtM+YYCccgQ8ksIcYwLxgcJqr/jtvARAM2mD c408ijGj/RQN3O1/fNpXr50wO1rYs2G0MOFUW2ypkTidxq4QXdaNRyKDFjraT5p+mGrK iuc4XMVkBS1yikC2iF6J5R8mIqkO/745CBP0KhtWUXcEisI3Ug4Igo6w6xbAPZ7/bCp4 gw3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709220066; x=1709824866; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TcNQdfWCoE2Jx53NHNx5X2HYyZXzK6yKC/I8DyugVBA=; b=ABFYI8jznnC/rNc5q7+tHo7ZblSb9M2OkAEIzkQivj3okom3SjP7s405VsHeHrk4w9 ViuTohGYWrIbTiTWN38SbdrQPb4Otm8x+4mK6s8SAb4n6i+W7uByFzXtMU+3stdJMdwv BKSZs11Te89ISQHkCGDCheRXCa7RjDuE5+EDEce4+guibHywPodLn3rG6FnDl/fXwG0F yoycvOztdRXaR8ondGeCwmCmH+pCeV5oRsCYfTZbVrMjmac+YRZT/WvFuVqcUkbOu4Og R8vku7Gxx1k5fc+pIJqb/qr4uv/6HxUSInAaKvDVNeszSxweHTQ+P0lPdxg2WFLsx19Z Q0lg== X-Gm-Message-State: AOJu0YxjgQ9HGytqqwD2AX1GrdrbNXaRLe7Rao0WSqao+vQsTNzCyANE tauP/TpIsTt1xLmRsQiwNm+ZnuV3EWY6UvnzmH9PojXycDWEc4jSbA9Q9Iou1PkdXE/GMvTcLjD c+2Q= X-Google-Smtp-Source: AGHT+IHhxs/oFyHu/c95DyxDatLsWlHB3z5UwiYwux+JhgGr4xPfeyFIGetgpW0HM6p9ddKyyT7mMw== X-Received: by 2002:a05:6512:250f:b0:512:f679:665b with SMTP id be15-20020a056512250f00b00512f679665bmr2341936lfb.42.1709220066437; Thu, 29 Feb 2024 07:21:06 -0800 (PST) Received: from jeandudey.home ([89.131.29.87]) by smtp.gmail.com with ESMTPSA id n6-20020a05600c4f8600b0041273fc463csm5584786wmq.17.2024.02.29.07.21.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 07:21:06 -0800 (PST) Date: Thu, 29 Feb 2024 16:20:50 +0100 Message-ID: <92203e11d48f408c58b562151b09e5bb376ab62f.1709219325.git.jean@foundationdevices.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Jean-Pierre De Jesus DIAZ X-ACL-Warn: , Jean-Pierre De Jesus DIAZ via Guix-patches X-Patchwork-Original-From: Jean-Pierre De Jesus DIAZ via Guix-patches via From: Jean-Pierre De Jesus DIAZ Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/local.mk (dist_patch_DATA): Remove ath9k-htc-firmware-objcopy.patch. * gnu/packages/firmware.scm (ath9k-htc-firmware): Remove variable. * gnu/packages/firmware.scm (ath9k-htc-ar7010-firmware): New variable. * gnu/packages/firmware.scm (ath9k-htc-ar9271-firmware): New variable. * gnu/packages/patches/ath9k-htc-firmware-objcopy.patch: Delete file. * gnu/system.scm (%base-firmware): Use new ath9k packages. Change-Id: I86259e398427abd139c1f310a95bb15e2c03cee3 --- gnu/local.mk | 1 - gnu/packages/firmware.scm | 79 +++++++++---------- .../patches/ath9k-htc-firmware-objcopy.patch | 14 ---- gnu/system.scm | 3 +- 4 files changed, 39 insertions(+), 58 deletions(-) delete mode 100644 gnu/packages/patches/ath9k-htc-firmware-objcopy.patch diff --git a/gnu/local.mk b/gnu/local.mk index 725093fb09..70d2e99481 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -941,7 +941,6 @@ dist_patch_DATA = \ %D%/packages/patches/ath9k-htc-firmware-binutils.patch \ %D%/packages/patches/ath9k-htc-firmware-gcc.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/audacity-ffmpeg-fallback.patch \ %D%/packages/patches/audiofile-fix-datatypes-in-tests.patch \ diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index ad687d1de6..47d4c08b0d 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -37,6 +37,7 @@ (define-module (gnu packages firmware) #:use-module (guix utils) #:use-module (guix git-download) #:use-module (guix build-system copy) + #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system meson) #:use-module (guix build-system python) @@ -90,9 +91,9 @@ (define-module (gnu packages firmware) #:export (make-ergodox-firmware make-qmk-firmware)) -(define-public ath9k-htc-firmware +(define-public ath9k-htc-ar7010-firmware (package - (name "ath9k-htc-firmware") + (name "ath9k-htc-ar7010-firmware") (version "1.4.0") (source (origin (method git-fetch) @@ -106,51 +107,45 @@ (define-public ath9k-htc-firmware (sha256 (base32 "16jbj8avg5jkgvq5lxm0hdxxn4c3zn7fx8b4nxllvr024apk9w23")) - (file-name (git-file-name name version)) - (patches (search-patches "ath9k-htc-firmware-objcopy.patch" - "ath9k-htc-firmware-gcc-compat.patch")))) - (build-system gnu-build-system) + (file-name (git-file-name "open-ath9k-htc-firmware" version)) + (patches (search-patches "ath9k-htc-firmware-gcc-compat.patch")))) + (build-system cmake-build-system) (arguments - '(#:target #f ; Package produces firmware. - #:phases - (modify-phases %standard-phases - (add-before 'configure 'pre-configure - (lambda* (#:key inputs native-inputs #:allow-other-keys) - (chdir "target_firmware") - - ;; 'configure' is a simple script that runs 'cmake' with - ;; the right flags. - (substitute* "configure" - (("^TARGET.*$") "TARGET=xtensa-ath9k-elf\n") - (("^TOOLCHAIN=.*$") - (string-append "TOOLCHAIN=" - (assoc-ref (or native-inputs inputs) "cross-gcc") - "\n"))) - #t)) - (replace 'install - (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))) + (list #:target "xtensa-ath9k-elf" + #:tests? #f + #:configure-flags #~'("-DTARGET_MAGPIE=ON") + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'change-directory + (lambda _ + (chdir "target_firmware"))) + (replace 'install + (lambda _ + (let ((fw-dir (string-append #$output "/lib/firmware"))) + (for-each (lambda (file) + (install-file file fw-dir)) + (find-files "." "\\.fw$")))))))) + (native-inputs (list perl)) (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 - "This is the firmware for the Qualcomm Atheros AR7010 and AR9271 USB -802.11n NICs (aka Wi-Fi USB dongles). It is used by the ath9k driver of -Linux-libre.") + "This is the firmware for the Qualcomm Atheros AR7010 802.11n USB NICs +(aka Wi-Fi USB dongle). It is used by the ath9k driver of Linux-libre.") (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) #~'("-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 (let ((commit "27892ef741e7f1d08cb939744f8b8f5dac7b04ae") (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 13c3ca1413..0000000000 --- a/gnu/packages/patches/ath9k-htc-firmware-objcopy.patch +++ /dev/null @@ -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" <