diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2022-12-21 17:20:41 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2022-12-21 17:33:22 +0200 |
commit | 228db28165dcde2a11d3f98c96935b65098eecc6 (patch) | |
tree | 5e9fe00bbcece01a88bf32985ac7803c932d5a4d /gnu/packages/firmware.scm | |
parent | 7833acab0da02335941974608510c02e2d1d8069 (diff) | |
download | guix-228db28165dcde2a11d3f98c96935b65098eecc6.tar guix-228db28165dcde2a11d3f98c96935b65098eecc6.tar.gz |
gnu: seabios: Enable for all architectures.
* gnu/packages/firmware.scm (seabios)[native-inputs]: When not building
from an i686-linux or x86_64-linux machine add cross-gcc and
cross-binutils for i686-linux-gnu.
[arguments]: When not building from an i686-linux or x86_64-linux
machine adjust the Makefile to find the cross build tools needed.
[supported-architectures]: Remove field.
Diffstat (limited to 'gnu/packages/firmware.scm')
-rw-r--r-- | gnu/packages/firmware.scm | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 2e2b48162f..66e4b63d40 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -72,7 +72,8 @@ #:use-module (gnu packages tls) #:use-module (gnu packages version-control) #:use-module (gnu packages web) - #:use-module (gnu packages xml)) + #:use-module (gnu packages xml) + #:use-module (ice-9 match)) (define-public ath9k-htc-firmware (package @@ -418,7 +419,13 @@ executing in M-mode.") ;; Delete IASL-generated files. (for-each delete-file (find-files "." "\\.hex$")))))) (build-system gnu-build-system) - (native-inputs (list acpica python-wrapper)) + (native-inputs + (append + (list acpica python-wrapper) + (if (member (%current-system) '("i686-linux" "x86_64-linux")) + '() + (list (cross-gcc "i686-linux-gnu") + (cross-binutils "i686-linux-gnu"))))) (arguments (list #:tests? #f ;no tests @@ -440,7 +447,16 @@ executing in M-mode.") (call-with-output-file ".version" (lambda (port) (format port #$(package-version this-package)))) - (setenv "CC" "gcc"))) + ;; If we use (cc-for-target) then we have the system prefix + ;; twice or we might have the wrong prefix. + (setenv "CC" "gcc") + #$@(match (%current-system) + ((or "i686-linux" "x86_64-linux") + #~()) + (_ + #~((substitute* "Makefile" + (("CROSS_PREFIX=") + "CROSS_PREFIX=i686-linux-gnu-"))))))) (add-before 'build 'build-description-tables (lambda _ ;; Regenerate the ACPI description tables. @@ -522,7 +538,6 @@ executing in M-mode.") (description "SeaBIOS is an implementation of a 16bit x86 BIOS. SeaBIOS can run in an emulator or it can run natively on X86 hardware with the use of coreboot.") - (supported-systems '("i686-linux" "x86_64-linux")) ;; Dual licensed. (license (list license:gpl3+ license:lgpl3+ ;; src/fw/acpi-dsdt.dsl is lgpl2 |