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.
This commit is contained in:
Efraim Flashner 2022-12-21 17:20:41 +02:00
parent 7833acab0d
commit 228db28165
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -72,7 +72,8 @@ (define-module (gnu packages firmware)
#: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 @@ (define-public seabios
;; 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 @@ (define-public seabios
(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 @@ (define-public seabios
(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