* [PATCH 2/6] gnu: Add syslinux.
2017-02-10 14:58 [PATCH 1/6] gnu: Use 'license:' prefix in (gnu packages grub) David Craven
@ 2017-02-10 14:58 ` David Craven
2017-02-10 14:58 ` [PATCH 3/6] gnu: Move (gnu packages grub) and (gnu packages u-boot) ... to (gnu packages bootloaders) David Craven
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: David Craven @ 2017-02-10 14:58 UTC (permalink / raw)
To: guix-devel
* gnu/packages/grub.scm (syslinux): New variable.
---
gnu/packages/grub.scm | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/gnu/packages/grub.scm b/gnu/packages/grub.scm
index 292d35373..4d9dc819b 100644
--- a/gnu/packages/grub.scm
+++ b/gnu/packages/grub.scm
@@ -33,6 +33,8 @@
#:use-module (gnu packages gettext)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages perl)
+ #:use-module (gnu packages python)
#:use-module (gnu packages qemu)
#:use-module (gnu packages man)
#:use-module (gnu packages texinfo)
@@ -150,3 +152,64 @@ menu to select one of the installed operating systems.")
(string-append (assoc-ref inputs "efibootmgr")
"/sbin/efibootmgr")))
#t)))))))))
+
+(define-public syslinux
+ (let ((commit "bb41e935cc83c6242de24d2271e067d76af3585c"))
+ (package
+ (name "syslinux")
+ (version (git-version "6.04-pre" "1" commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/geneC/syslinux")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0k8dvafd6410kqxf3kyr4y8jzmpmrih6wbjqg6gklak7945yflrc"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("nasm" ,nasm)
+ ("perl" ,perl)
+ ("python-2" ,python-2)))
+ (inputs
+ `(("libuuid" ,util-linux)))
+ (arguments
+ `(#:parallel-build? #f
+ #:make-flags
+ (list (string-append "BINDIR=" %output "/bin")
+ (string-append "SBINDIR=" %output "/sbin")
+ (string-append "LIBDIR=" %output "/lib")
+ (string-append "INCDIR=" %output "/include")
+ (string-append "DATADIR=" %output "/share")
+ (string-append "MANDIR=" %output "/share/man")
+ "PERL=perl"
+ "bios")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-files
+ (lambda _
+ (substitute* (find-files "." "Makefile.*|ppmtolss16")
+ (("/bin/pwd") (which "pwd"))
+ (("/bin/echo") (which "echo"))
+ (("/usr/bin/perl") (which "perl")))
+ #t))
+ (delete 'configure)
+ (add-before 'build 'set-permissions
+ (lambda _
+ (zero? (system* "chmod" "a+w" "utils/isohybrid.in"))))
+ (replace 'check
+ (lambda _
+ (setenv "CC" "gcc")
+ (substitute* "tests/unittest/include/unittest/unittest.h"
+ ;; Don't look up headers under /usr.
+ (("/usr/include/") ""))
+ (zero? (system* "make" "unittest")))))))
+ (home-page "http://www.syslinux.org")
+ (synopsis "Lightweight Linux bootloader")
+ (description "Syslinux is a lightweight Linux bootloader.")
+ (license (list license:gpl2+
+ license:bsd-3 ; gnu-efi/*
+ license:bsd-4 ; gnu-efi/inc/* gnu-efi/lib/*
+ ;; Also contains:
+ license:expat license:isc license:zlib)))))
--
2.11.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/6] gnu: Move (gnu packages grub) and (gnu packages u-boot) ... to (gnu packages bootloaders).
2017-02-10 14:58 [PATCH 1/6] gnu: Use 'license:' prefix in (gnu packages grub) David Craven
2017-02-10 14:58 ` [PATCH 2/6] gnu: Add syslinux David Craven
@ 2017-02-10 14:58 ` David Craven
2017-02-10 14:58 ` [PATCH 4/6] gnu: Use 'license:' prefix in (gnu packages firmware) David Craven
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: David Craven @ 2017-02-10 14:58 UTC (permalink / raw)
To: guix-devel
* gnu/packages/grub.scm: Rename to bootloaders.scm.
* gnu/packages/u-boot.scm: Move to bootloaders.scm.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add bootloaders.scm,
remove grub.scm and u-boot.scm;
* gnu/system/grub.scm: Import (gnu packages bootloaders).
* gnu/system/install.scm: Import (gnu packages bootloaders).
* gnu/system/vm.scm: Import (gnu packages bootloaders).
---
gnu/local.mk | 3 +-
gnu/packages/{grub.scm => bootloaders.scm} | 137 +++++++++++++++++++++++++---
gnu/packages/u-boot.scm | 138 -----------------------------
gnu/system/grub.scm | 4 +-
gnu/system/install.scm | 2 +-
gnu/system/vm.scm | 2 +-
6 files changed, 132 insertions(+), 154 deletions(-)
rename gnu/packages/{grub.scm => bootloaders.scm} (64%)
delete mode 100644 gnu/packages/u-boot.scm
diff --git a/gnu/local.mk b/gnu/local.mk
index 1fc49bbd6..4d6e4b05d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -64,6 +64,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/bittorrent.scm \
%D%/packages/bison.scm \
%D%/packages/boost.scm \
+ %D%/packages/bootloaders.scm \
%D%/packages/bootstrap.scm \
%D%/packages/busybox.scm \
%D%/packages/c.scm \
@@ -170,7 +171,6 @@ GNU_SYSTEM_MODULES = \
%D%/packages/graphics.scm \
%D%/packages/graphviz.scm \
%D%/packages/groff.scm \
- %D%/packages/grub.scm \
%D%/packages/gsasl.scm \
%D%/packages/gstreamer.scm \
%D%/packages/gtk.scm \
@@ -373,7 +373,6 @@ GNU_SYSTEM_MODULES = \
%D%/packages/unrtf.scm \
%D%/packages/upnp.scm \
%D%/packages/uucp.scm \
- %D%/packages/u-boot.scm \
%D%/packages/valgrind.scm \
%D%/packages/version-control.scm \
%D%/packages/video.scm \
diff --git a/gnu/packages/grub.scm b/gnu/packages/bootloaders.scm
similarity index 64%
rename from gnu/packages/grub.scm
rename to gnu/packages/bootloaders.scm
index 4d9dc819b..16cb7b4c0 100644
--- a/gnu/packages/grub.scm
+++ b/gnu/packages/bootloaders.scm
@@ -4,6 +4,8 @@
;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym@scratchpost.org>
+;;; Copyright © 2016, 2017 David Craven <david@craven.ch>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -20,26 +22,33 @@
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
-(define-module (gnu packages grub)
- #:use-module (guix download)
- #:use-module (guix packages)
- #:use-module (guix utils)
- #:use-module ((guix licenses) #:prefix license:)
- #:use-module (guix build-system gnu)
+(define-module (gnu packages bootloaders)
#:use-module (gnu packages)
+ #:use-module (gnu packages admin)
+ #:use-module ((gnu packages algebra) #:select (bc))
+ #:use-module (gnu packages assembly)
#:use-module (gnu packages flex)
#:use-module (gnu packages disk)
#:use-module (gnu packages bison)
- #:use-module (gnu packages gettext)
+ #:use-module (gnu packages cdrom)
+ #:use-module (gnu packages cross-base)
+ #:use-module (gnu packages disk)
+ #:use-module (gnu packages flex)
#:use-module (gnu packages fontutils)
+ #:use-module (gnu packages gettext)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages man)
+ #:use-module (gnu packages ncurses)
#:use-module (gnu packages perl)
#:use-module (gnu packages python)
#:use-module (gnu packages qemu)
- #:use-module (gnu packages man)
#:use-module (gnu packages texinfo)
- #:use-module (gnu packages ncurses)
- #:use-module (gnu packages cdrom))
+ #:use-module (guix build-system gnu)
+ #:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix packages)
+ #:use-module (guix utils))
(define unifont
;; GNU Unifont, <http://gnu.org/s/unifont>.
@@ -213,3 +222,111 @@ menu to select one of the installed operating systems.")
license:bsd-4 ; gnu-efi/inc/* gnu-efi/lib/*
;; Also contains:
license:expat license:isc license:zlib)))))
+
+(define-public dtc
+ (package
+ (name "dtc")
+ (version "1.4.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://www.kernel.org/pub/software/utils/dtc/"
+ "dtc-" version ".tar.xz"))
+ (sha256
+ (base32
+ "1b7si8niyca4wxbfah3qw4p4wli81mc1qwfhaswvrfqahklnwi8k"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("bison" ,bison)
+ ("flex" ,flex)))
+ (arguments
+ `(#:make-flags
+ (list "CC=gcc"
+ (string-append "PREFIX=" (assoc-ref %outputs "out"))
+ "INSTALL=install")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (home-page "https://www.devicetree.org")
+ (synopsis "Compiles device tree source files")
+ (description "@command{dtc} compiles
+@uref{http://elinux.org/Device_Tree_Usage, device tree source files} to device
+tree binary files. These are board description files used by Linux and BSD.")
+ (license license:gpl2+)))
+
+(define u-boot
+ (package
+ (name "u-boot")
+ (version "2017.01")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "ftp://ftp.denx.de/pub/u-boot/"
+ "u-boot-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "1wpc51jm3zyibgcr78jng2yksqvrya76bxgsr4pcyjrsz5sm2hkc"))))
+ (native-inputs
+ `(("bc" ,bc)
+ ("dtc" ,dtc)
+ ("python-2" ,python-2)))
+ (build-system gnu-build-system)
+ (home-page "http://www.denx.de/wiki/U-Boot/")
+ (synopsis "ARM bootloader")
+ (description "U-Boot is a bootloader used mostly for ARM boards. It
+also initializes the boards (RAM etc).")
+ (license license:gpl2+)))
+
+(define (make-u-boot-package board triplet)
+ "Returns a u-boot package for BOARD cross-compiled for TRIPLET."
+ (package
+ (inherit u-boot)
+ (name (string-append "u-boot-" (string-downcase board)))
+ (native-inputs
+ `(("cross-gcc" ,(cross-gcc triplet))
+ ("cross-binutils" ,(cross-binutils triplet))
+ ,@(package-native-inputs u-boot)))
+ (arguments
+ `(#:modules ((ice-9 ftw) (guix build utils) (guix build gnu-build-system))
+ #:test-target "test"
+ #:make-flags
+ (list "HOSTCC=gcc" (string-append "CROSS_COMPILE=" ,triplet "-"))
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs make-flags #:allow-other-keys)
+ (let ((config-name (string-append ,board "_defconfig")))
+ (if (file-exists? (string-append "configs/" config-name))
+ (zero? (apply system* "make" `(,@make-flags ,config-name)))
+ (begin
+ (display "Invalid board name. Valid board names are:")
+ (let ((suffix-len (string-length "_defconfig")))
+ (scandir "configs"
+ (lambda (file-name)
+ (when (string-suffix? "_defconfig" file-name)
+ (format #t
+ "- ~A\n"
+ (string-drop-right file-name
+ suffix-len))))))
+ #f)))))
+ (replace 'install
+ (lambda* (#:key outputs make-flags #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (libexec (string-append out "/libexec"))
+ (uboot-files (find-files "." ".*\\.(bin|efi|spl)$")))
+ (mkdir-p libexec)
+ (for-each
+ (lambda (file)
+ (let ((target-file (string-append libexec "/" file)))
+ (mkdir-p (dirname target-file))
+ (copy-file file target-file)))
+ uboot-files)))))))))
+
+(define-public u-boot-vexpress
+ (make-u-boot-package "vexpress_ca9x4" "arm-linux-gnueabihf"))
+
+(define-public u-boot-malta
+ (make-u-boot-package "malta" "mips64el-linux-gnuabi64"))
+
+(define-public u-boot-beagle-bone-black
+ (make-u-boot-package "am335x_boneblack" "arm-linux-gnueabihf"))
diff --git a/gnu/packages/u-boot.scm b/gnu/packages/u-boot.scm
deleted file mode 100644
index bcfe059ee..000000000
--- a/gnu/packages/u-boot.scm
+++ /dev/null
@@ -1,138 +0,0 @@
-;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
-;;; Copyright © 2016 David Craven <david@craven.ch>
-;;;
-;;; This file is part of GNU Guix.
-;;;
-;;; GNU Guix is free software; you can redistribute it and/or modify it
-;;; under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 3 of the License, or (at
-;;; your option) any later version.
-;;;
-;;; GNU Guix is distributed in the hope that it will be useful, but
-;;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
-
-(define-module (gnu packages u-boot)
- #:use-module (guix build-system gnu)
- #:use-module (guix download)
- #:use-module (guix packages)
- #:use-module ((guix licenses) #:prefix license:)
- #:use-module (gnu packages)
- #:use-module ((gnu packages algebra) #:select (bc))
- #:use-module (gnu packages bison)
- #:use-module (gnu packages cross-base)
- #:use-module (gnu packages flex)
- #:use-module (gnu packages python))
-
-(define-public dtc
- (package
- (name "dtc")
- (version "1.4.2")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "https://www.kernel.org/pub/software/utils/dtc/"
- "dtc-" version ".tar.xz"))
- (sha256
- (base32
- "1b7si8niyca4wxbfah3qw4p4wli81mc1qwfhaswvrfqahklnwi8k"))))
- (build-system gnu-build-system)
- (native-inputs
- `(("bison" ,bison)
- ("flex" ,flex)))
- (arguments
- `(#:make-flags
- (list "CC=gcc"
- (string-append "PREFIX=" (assoc-ref %outputs "out"))
- "INSTALL=install")
- #:phases
- (modify-phases %standard-phases
- (delete 'configure))))
- (home-page "https://www.devicetree.org")
- (synopsis "Compiles device tree source files")
- (description "@command{dtc} compiles
-@uref{http://elinux.org/Device_Tree_Usage, device tree source files} to device
-tree binary files. These are board description files used by Linux and BSD.")
- (license license:gpl2+)))
-
-(define u-boot
- (package
- (name "u-boot")
- (version "2017.01")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "ftp://ftp.denx.de/pub/u-boot/"
- "u-boot-" version ".tar.bz2"))
- (sha256
- (base32
- "1wpc51jm3zyibgcr78jng2yksqvrya76bxgsr4pcyjrsz5sm2hkc"))))
- (native-inputs
- `(("bc" ,bc)
- ("dtc" ,dtc)
- ("python-2" ,python-2)))
- (build-system gnu-build-system)
- (home-page "http://www.denx.de/wiki/U-Boot/")
- (synopsis "ARM bootloader")
- (description "U-Boot is a bootloader used mostly for ARM boards. It
-also initializes the boards (RAM etc).")
- (license license:gpl2+)))
-
-(define (make-u-boot-package board triplet)
- "Returns a u-boot package for BOARD cross-compiled for TRIPLET."
- (package
- (inherit u-boot)
- (name (string-append "u-boot-" (string-downcase board)))
- (native-inputs
- `(("cross-gcc" ,(cross-gcc triplet))
- ("cross-binutils" ,(cross-binutils triplet))
- ,@(package-native-inputs u-boot)))
- (arguments
- `(#:modules ((ice-9 ftw) (guix build utils) (guix build gnu-build-system))
- #:test-target "test"
- #:make-flags
- (list "HOSTCC=gcc" (string-append "CROSS_COMPILE=" ,triplet "-"))
- #:phases
- (modify-phases %standard-phases
- (replace 'configure
- (lambda* (#:key outputs make-flags #:allow-other-keys)
- (let ((config-name (string-append ,board "_defconfig")))
- (if (file-exists? (string-append "configs/" config-name))
- (zero? (apply system* "make" `(,@make-flags ,config-name)))
- (begin
- (display "Invalid board name. Valid board names are:")
- (let ((suffix-len (string-length "_defconfig")))
- (scandir "configs"
- (lambda (file-name)
- (when (string-suffix? "_defconfig" file-name)
- (format #t
- "- ~A\n"
- (string-drop-right file-name
- suffix-len))))))
- #f)))))
- (replace 'install
- (lambda* (#:key outputs make-flags #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (libexec (string-append out "/libexec"))
- (uboot-files (find-files "." ".*\\.(bin|efi|spl)$")))
- (mkdir-p libexec)
- (for-each
- (lambda (file)
- (let ((target-file (string-append libexec "/" file)))
- (mkdir-p (dirname target-file))
- (copy-file file target-file)))
- uboot-files)))))))))
-
-(define-public u-boot-vexpress
- (make-u-boot-package "vexpress_ca9x4" "arm-linux-gnueabihf"))
-
-(define-public u-boot-malta
- (make-u-boot-package "malta" "mips64el-linux-gnuabi64"))
-
-(define-public u-boot-beagle-bone-black
- (make-u-boot-package "am335x_boneblack" "arm-linux-gnueabihf"))
diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm
index 7df7d4615..b18b8be6d 100644
--- a/gnu/system/grub.scm
+++ b/gnu/system/grub.scm
@@ -27,7 +27,7 @@
#:use-module (guix download)
#:use-module (gnu artwork)
#:use-module (gnu system file-systems)
- #:autoload (gnu packages grub) (grub)
+ #:autoload (gnu packages bootloaders) (grub)
#:autoload (gnu packages compression) (gzip)
#:autoload (gnu packages gtk) (guile-cairo guile-rsvg)
#:use-module (ice-9 match)
@@ -108,7 +108,7 @@ denoting a file name."
grub-configuration make-grub-configuration
grub-configuration?
(grub grub-configuration-grub ; package
- (default (@ (gnu packages grub) grub)))
+ (default (@ (gnu packages bootloaders) grub)))
(device grub-configuration-device) ; string
(menu-entries grub-configuration-menu-entries ; list
(default '()))
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 944d9f7e7..3ec343570 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -28,11 +28,11 @@
#:use-module (gnu services shepherd)
#:use-module (gnu packages admin)
#:use-module (gnu packages bash)
+ #:use-module (gnu packages bootloaders)
#:use-module (gnu packages linux)
#:use-module (gnu packages cryptsetup)
#:use-module (gnu packages package-management)
#:use-module (gnu packages disk)
- #:use-module (gnu packages grub)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages compression)
#:use-module (gnu packages nvi)
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 1e680b85a..8a35f7fbc 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -31,6 +31,7 @@
#:use-module ((gnu build vm)
#:select (qemu-command))
#:use-module (gnu packages base)
+ #:use-module (gnu packages bootloaders)
#:use-module (gnu packages guile)
#:use-module (gnu packages gawk)
#:use-module (gnu packages bash)
@@ -38,7 +39,6 @@
#:use-module (gnu packages qemu)
#:use-module (gnu packages disk)
#:use-module (gnu packages zile)
- #:use-module (gnu packages grub)
#:use-module (gnu packages linux)
#:use-module (gnu packages package-management)
#:use-module ((gnu packages make-bootstrap)
--
2.11.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/6] gnu: Use 'license:' prefix in (gnu packages firmware).
2017-02-10 14:58 [PATCH 1/6] gnu: Use 'license:' prefix in (gnu packages grub) David Craven
2017-02-10 14:58 ` [PATCH 2/6] gnu: Add syslinux David Craven
2017-02-10 14:58 ` [PATCH 3/6] gnu: Move (gnu packages grub) and (gnu packages u-boot) ... to (gnu packages bootloaders) David Craven
@ 2017-02-10 14:58 ` David Craven
2017-02-10 14:58 ` [PATCH 5/6] gnu: Add seabios David Craven
2017-02-10 14:58 ` [PATCH 6/6] gnu: Add ovmf David Craven
4 siblings, 0 replies; 6+ messages in thread
From: David Craven @ 2017-02-10 14:58 UTC (permalink / raw)
To: guix-devel
* gnu/packages/firmware.scm (ath9k-htc-firmware, b43-tools,
openfwwf-firmware): Add prefix.
---
gnu/packages/firmware.scm | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 443c38e94..e7d1ce49c 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2017 David Craven <david@craven.ch>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -18,7 +19,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages firmware)
- #:use-module (guix licenses)
+ #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
@@ -85,7 +86,7 @@
"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.")
- (license (non-copyleft "http://directory.fsf.org/wiki/License:ClearBSD"))))
+ (license (license:non-copyleft "http://directory.fsf.org/wiki/License:ClearBSD"))))
(define-public b43-tools
(let ((commit "8dce53297966b31b6c70a7a03c2433978dd9f288")
@@ -143,7 +144,7 @@ Linux-libre.")
"The b43 firmware tools is a collection of firmware extractor,
assembler, disassembler, and debugging tools for the Linux kernel b43 wireless
driver.")
- (license gpl2))))
+ (license license:gpl2))))
(define-public openfwwf-firmware
(package
@@ -173,4 +174,4 @@ driver.")
"This is firmware from Open FirmWare for WiFi networks (OpenFWWF) for the
Broadcom/AirForce chipset BCM43xx with Wireless-Core Revision 5. It is used
by the b43-open driver of Linux-libre.")
- (license gpl2)))
+ (license license:gpl2)))
--
2.11.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 5/6] gnu: Add seabios.
2017-02-10 14:58 [PATCH 1/6] gnu: Use 'license:' prefix in (gnu packages grub) David Craven
` (2 preceding siblings ...)
2017-02-10 14:58 ` [PATCH 4/6] gnu: Use 'license:' prefix in (gnu packages firmware) David Craven
@ 2017-02-10 14:58 ` David Craven
2017-02-10 14:58 ` [PATCH 6/6] gnu: Add ovmf David Craven
4 siblings, 0 replies; 6+ messages in thread
From: David Craven @ 2017-02-10 14:58 UTC (permalink / raw)
To: guix-devel
* gnu/packages/firmware.scm (seabios): New variable.
---
gnu/packages/firmware.scm | 44 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 43 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index e7d1ce49c..ff4ea1482 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -29,7 +29,8 @@
#:use-module (gnu packages cmake)
#:use-module (gnu packages cross-base)
#:use-module (gnu packages flex)
- #:use-module (gnu packages perl))
+ #:use-module (gnu packages perl)
+ #:use-module (gnu packages python))
(define-public ath9k-htc-firmware
(package
@@ -175,3 +176,44 @@ driver.")
Broadcom/AirForce chipset BCM43xx with Wireless-Core Revision 5. It is used
by the b43-open driver of Linux-libre.")
(license license:gpl2)))
+
+(define-public seabios
+ (package
+ (name "seabios")
+ (version "1.10.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://code.coreboot.org/p/seabios/downloads/get/"
+ "seabios-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1jyjl719drnl1v0gf0l5q6qjjmkyqcqkka6s28dfdi0yqsxdsqsh"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("python-2" ,python-2)))
+ (arguments
+ `(#:tests? #f ; No check target.
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (setenv "CC" "gcc")
+ #t))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (fmw (string-append out "/share/firmware")))
+ (mkdir-p fmw)
+ (copy-file "out/bios.bin" (string-append fmw "/bios.bin"))))))))
+ (home-page "https://www.seabios.org/SeaBIOS")
+ (synopsis "x86 BIOS implementation")
+ (description "SeaBIOS is an open source 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.")
+ ;; Dual licensed.
+ (license (list license:gpl3+ license:lgpl3+
+ ;; src/fw/acpi-dsdt.dsl is lgpl2
+ license:lgpl2.1
+ ;; src/fw/lzmadecode.c and src/fw/lzmadecode.h are lgpl3+ and
+ ;; cpl with a linking exception.
+ license:cpl1.0))))
--
2.11.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 6/6] gnu: Add ovmf.
2017-02-10 14:58 [PATCH 1/6] gnu: Use 'license:' prefix in (gnu packages grub) David Craven
` (3 preceding siblings ...)
2017-02-10 14:58 ` [PATCH 5/6] gnu: Add seabios David Craven
@ 2017-02-10 14:58 ` David Craven
4 siblings, 0 replies; 6+ messages in thread
From: David Craven @ 2017-02-10 14:58 UTC (permalink / raw)
To: guix-devel
* gnu/packages/grub.scm (edk2-commit, edk2-version, edk2-origin, ovmf): New
variables.
---
gnu/packages/firmware.scm | 83 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 83 insertions(+)
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index ff4ea1482..9106eec4a 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -25,10 +25,13 @@
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
+ #:use-module (gnu packages admin)
+ #:use-module (gnu packages assembly)
#:use-module (gnu packages bison)
#:use-module (gnu packages cmake)
#:use-module (gnu packages cross-base)
#:use-module (gnu packages flex)
+ #:use-module (gnu packages linux)
#:use-module (gnu packages perl)
#:use-module (gnu packages python))
@@ -217,3 +220,83 @@ use of coreboot.")
;; src/fw/lzmadecode.c and src/fw/lzmadecode.h are lgpl3+ and
;; cpl with a linking exception.
license:cpl1.0))))
+
+;; OVMF is part of the edk2 source tree.
+(define edk2-commit "13a50a6fe1dcfa6600c38456ee24e0f9ecf51b5f")
+(define edk2-version (git-version "20170116" "1" edk2-commit))
+(define edk2-origin
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tianocore/edk2")
+ (commit edk2-commit)))
+ (file-name (git-file-name "edk2" edk2-version))
+ (sha256
+ (base32
+ "1gy2332kdqk8bjzpcsripx10896rbvgl0ic7r344kmpiwdgm948b"))))
+
+(define-public ovmf
+ (package
+ (name "ovmf")
+ (version edk2-version)
+ (source edk2-origin)
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("acpica" ,acpica)
+ ("nasm" ,nasm)
+ ("python-2" ,python-2)
+ ("util-linux" ,util-linux)))
+ (arguments
+ `(#:tests? #f ; No check target.
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (let* ((cwd (getcwd))
+ (tools (string-append cwd "/BaseTools"))
+ (bin (string-append tools "/BinWrappers/PosixLike")))
+ (setenv "WORKSPACE" cwd)
+ (setenv "EDK_TOOLS_PATH" tools)
+ (setenv "PATH" (string-append (getenv "PATH") ":" bin))
+ (system* "bash" "edksetup.sh" "BaseTools")
+ (substitute* "Conf/target.txt"
+ (("^TARGET[ ]*=.*$") "TARGET = RELEASE\n")
+ (("^TOOL_CHAIN_TAG[ ]*=.*$") "TOOL_CHAIN_TAG = GCC49\n")
+ (("^MAX_CONCURRENT_THREAD_NUMBER[ ]*=.*$")
+ (format #f "MAX_CONCURRENT_THREAD_NUMBER = ~a~%"
+ (number->string (parallel-job-count)))))
+ ;; Build build support.
+ (setenv "BUILD_CC" "gcc")
+ (zero? (system* "make" "-C" (string-append tools "/Source/C"))))))
+ (add-after 'build 'build-ia32
+ (lambda _
+ (substitute* "Conf/target.txt"
+ (("^TARGET_ARCH[ ]*=.*$") "TARGET_ARCH = IA32\n")
+ (("^ACTIVE_PLATFORM[ ]*=.*$")
+ "ACTIVE_PLATFORM = OvmfPkg/OvmfPkgIa32.dsc\n"))
+ (zero? (system* "build"))))
+ (add-after 'build 'build-x64
+ (lambda _
+ (substitute* "Conf/target.txt"
+ (("^TARGET_ARCH[ ]*=.*$") "TARGET_ARCH = X64\n")
+ (("^ACTIVE_PLATFORM[ ]*=.*$")
+ "ACTIVE_PLATFORM = OvmfPkg/OvmfPkgX64.dsc\n"))
+ (zero? (system* "build"))))
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (fmw (string-append out "/share/firmware")))
+ (mkdir-p fmw)
+ (copy-file "Build/OvmfIa32/RELEASE_GCC49/FV/OVMF.fd"
+ (string-append fmw "/ovmf_ia32.bin"))
+ (copy-file "Build/OvmfX64/RELEASE_GCC49/FV/OVMF.fd"
+ (string-append fmw "/ovmf_x64.bin")))
+ #t)))))
+ (supported-systems '("x86_64-linux" "i686-linux"))
+ (home-page "http://www.tianocore.org")
+ (synopsis "UEFI firmware for QEMU")
+ (description "OVMF is an EDK II based project to enable UEFI support for
+Virtual Machines. OVMF contains a sample UEFI firmware for QEMU and KVM.")
+ (license (list license:expat
+ license:bsd-2 license:bsd-3 license:bsd-4))))
--
2.11.1
^ permalink raw reply related [flat|nested] 6+ messages in thread