gnu: ipxe-qemu: Cross-compile on non x86_64.
* gnu/packages/bootloaders.scm (ipxe-qemu)[native-inputs]: When not targeting x86_64, add CROSS-GCC and CROSS-BINUTILS. [arguments]: Set CROSS_COMPILE in that case.
This commit is contained in:
parent
ffc0037458
commit
a5dbe84a61
1 changed files with 14 additions and 5 deletions
|
@ -1535,8 +1535,14 @@ the features of iPXE without the hassle of reflashing.")
|
||||||
(package/inherit ipxe
|
(package/inherit ipxe
|
||||||
(name "ipxe-qemu")
|
(name "ipxe-qemu")
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(modify-inputs (package-native-inputs ipxe)
|
;; QEMU uses a 64-bit UEFI firmware.
|
||||||
(prepend edk2-tools)))
|
(if (target-x86-64?)
|
||||||
|
(modify-inputs (package-native-inputs ipxe)
|
||||||
|
(prepend edk2-tools))
|
||||||
|
(modify-inputs (package-native-inputs ipxe)
|
||||||
|
(prepend edk2-tools
|
||||||
|
(cross-gcc "x86_64-linux-gnu")
|
||||||
|
(cross-binutils "x86_64-linux-gnu")))))
|
||||||
(arguments
|
(arguments
|
||||||
(let ((roms
|
(let ((roms
|
||||||
;; Alist of ROM -> (VID . DID) entries. This list and below
|
;; Alist of ROM -> (VID . DID) entries. This list and below
|
||||||
|
@ -1554,14 +1560,17 @@ the features of iPXE without the hassle of reflashing.")
|
||||||
`((ice-9 match) ,@modules))
|
`((ice-9 match) ,@modules))
|
||||||
((#:make-flags flags)
|
((#:make-flags flags)
|
||||||
#~(append (delete "everything" #$flags)
|
#~(append (delete "everything" #$flags)
|
||||||
'("CONFIG=qemu")
|
'("CONFIG=qemu"
|
||||||
|
#$@(if (target-x86-64?)
|
||||||
|
'()
|
||||||
|
'("CROSS_COMPILE=x86_64-linux-gnu-")))
|
||||||
(map (match-lambda
|
(map (match-lambda
|
||||||
((_ . (vid . did))
|
((_ . (vid . did))
|
||||||
(string-append "bin/" vid did ".rom")))
|
(string-append "bin/" vid did ".rom")))
|
||||||
'#$roms)
|
'#$roms)
|
||||||
(map (match-lambda
|
(map (match-lambda
|
||||||
((_ . (vid . did))
|
((_ . (vid . did))
|
||||||
(string-append "bin-efi/"
|
(string-append "bin-x86_64-efi/"
|
||||||
vid did ".efidrv")))
|
vid did ".efidrv")))
|
||||||
'#$roms)))
|
'#$roms)))
|
||||||
((#:phases phases)
|
((#:phases phases)
|
||||||
|
@ -1582,7 +1591,7 @@ the features of iPXE without the hassle of reflashing.")
|
||||||
"-l" "0x02"
|
"-l" "0x02"
|
||||||
"-f" (string-append "0x" vid)
|
"-f" (string-append "0x" vid)
|
||||||
"-i" (string-append "0x" did)
|
"-i" (string-append "0x" did)
|
||||||
"-ec" (string-append "bin-efi/"
|
"-ec" (string-append "bin-x86_64-efi/"
|
||||||
vid did ".efidrv")
|
vid did ".efidrv")
|
||||||
"-o" (string-append firmware
|
"-o" (string-append firmware
|
||||||
"/efi-" name ".rom")))))
|
"/efi-" name ".rom")))))
|
||||||
|
|
Reference in a new issue