Archived
1
0
Fork 0

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 @@
#:use-module (gnu packages tls) #:use-module (gnu packages tls)
#:use-module (gnu packages version-control) #:use-module (gnu packages version-control)
#:use-module (gnu packages web) #: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 (define-public ath9k-htc-firmware
(package (package
@ -418,7 +419,13 @@ executing in M-mode.")
;; Delete IASL-generated files. ;; Delete IASL-generated files.
(for-each delete-file (find-files "." "\\.hex$")))))) (for-each delete-file (find-files "." "\\.hex$"))))))
(build-system gnu-build-system) (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 (arguments
(list (list
#:tests? #f ;no tests #:tests? #f ;no tests
@ -440,7 +447,16 @@ executing in M-mode.")
(call-with-output-file ".version" (call-with-output-file ".version"
(lambda (port) (lambda (port)
(format port #$(package-version this-package)))) (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 (add-before 'build 'build-description-tables
(lambda _ (lambda _
;; Regenerate the ACPI description tables. ;; Regenerate the ACPI description tables.
@ -522,7 +538,6 @@ executing in M-mode.")
(description "SeaBIOS is an implementation of a 16bit x86 BIOS. 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 can run in an emulator or it can run natively on X86 hardware with the use of
coreboot.") coreboot.")
(supported-systems '("i686-linux" "x86_64-linux"))
;; Dual licensed. ;; Dual licensed.
(license (list license:gpl3+ license:lgpl3+ (license (list license:gpl3+ license:lgpl3+
;; src/fw/acpi-dsdt.dsl is lgpl2 ;; src/fw/acpi-dsdt.dsl is lgpl2