2013-02-10 12:48:23 -05:00
|
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2019-01-16 08:01:17 -05:00
|
|
|
|
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
|
2018-01-29 06:19:06 -05:00
|
|
|
|
;;; Copyright © 2015, 2018 Mark H Weaver <mhw@netris.org>
|
2015-12-19 18:18:43 -05:00
|
|
|
|
;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
|
2020-06-21 09:18:18 -04:00
|
|
|
|
;;; Copyright © 2016, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
2021-06-13 08:44:06 -04:00
|
|
|
|
;;; Copyright © 2016, 2017, 2018, 2021 Marius Bakke <marius@gnu.org>
|
2017-02-09 13:46:47 -05:00
|
|
|
|
;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym@scratchpost.org>
|
|
|
|
|
;;; Copyright © 2016, 2017 David Craven <david@craven.ch>
|
2021-06-08 04:05:51 -04:00
|
|
|
|
;;; Copyright © 2017, 2018, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
|
2021-01-12 16:44:18 -05:00
|
|
|
|
;;; Copyright © 2018, 2019, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
|
2019-01-16 08:01:17 -05:00
|
|
|
|
;;; Copyright © 2019 nee <nee@cock.li>
|
2019-12-14 11:34:28 -05:00
|
|
|
|
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
|
2020-01-04 19:08:12 -05:00
|
|
|
|
;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
|
2020-04-20 21:21:07 -04:00
|
|
|
|
;;; Copyright © 2018, 2019, 2020 Vagrant Cascadian <vagrant@debian.org>
|
2020-04-15 02:14:01 -04:00
|
|
|
|
;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
|
2021-01-12 16:44:18 -05:00
|
|
|
|
;;; Copyright © 2021 Vincent Legoll <vincent.legoll@gmail.com>
|
|
|
|
|
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
|
2013-02-10 12:48:23 -05:00
|
|
|
|
;;;
|
|
|
|
|
;;; 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/>.
|
|
|
|
|
|
2017-02-09 13:46:47 -05:00
|
|
|
|
(define-module (gnu packages bootloaders)
|
2013-02-10 12:48:23 -05:00
|
|
|
|
#:use-module (gnu packages)
|
2017-02-09 13:46:47 -05:00
|
|
|
|
#:use-module (gnu packages admin)
|
2019-12-14 18:19:17 -05:00
|
|
|
|
#:use-module (gnu packages algebra)
|
2017-02-09 13:46:47 -05:00
|
|
|
|
#:use-module (gnu packages assembly)
|
2017-10-26 08:52:19 -04:00
|
|
|
|
#:use-module (gnu packages base)
|
2015-12-04 12:00:32 -05:00
|
|
|
|
#:use-module (gnu packages disk)
|
2013-02-10 12:48:23 -05:00
|
|
|
|
#:use-module (gnu packages bison)
|
2017-02-09 13:46:47 -05:00
|
|
|
|
#:use-module (gnu packages cdrom)
|
2018-05-18 15:12:47 -04:00
|
|
|
|
#:use-module (gnu packages check)
|
2018-11-14 17:23:21 -05:00
|
|
|
|
#:use-module (gnu packages compression)
|
2017-02-09 13:46:47 -05:00
|
|
|
|
#:use-module (gnu packages cross-base)
|
|
|
|
|
#:use-module (gnu packages disk)
|
2018-01-31 14:10:47 -05:00
|
|
|
|
#:use-module (gnu packages firmware)
|
2017-02-09 13:46:47 -05:00
|
|
|
|
#:use-module (gnu packages flex)
|
2013-02-12 07:19:26 -05:00
|
|
|
|
#:use-module (gnu packages fontutils)
|
2018-01-20 09:49:03 -05:00
|
|
|
|
#:use-module (gnu packages gcc)
|
2017-02-09 13:46:47 -05:00
|
|
|
|
#:use-module (gnu packages gettext)
|
2013-02-10 12:48:23 -05:00
|
|
|
|
#:use-module (gnu packages linux)
|
2017-02-09 13:46:47 -05:00
|
|
|
|
#:use-module (gnu packages man)
|
2017-07-20 19:06:45 -04:00
|
|
|
|
#:use-module (gnu packages mtools)
|
2017-02-09 13:46:47 -05:00
|
|
|
|
#:use-module (gnu packages ncurses)
|
2017-02-09 13:21:22 -05:00
|
|
|
|
#:use-module (gnu packages perl)
|
2017-10-26 08:52:19 -04:00
|
|
|
|
#:use-module (gnu packages pkg-config)
|
2017-02-09 13:21:22 -05:00
|
|
|
|
#:use-module (gnu packages python)
|
2015-08-19 13:57:30 -04:00
|
|
|
|
#:use-module (gnu packages texinfo)
|
2017-10-26 08:52:19 -04:00
|
|
|
|
#:use-module (gnu packages tls)
|
2018-05-18 15:12:47 -04:00
|
|
|
|
#:use-module (gnu packages sdl)
|
2017-11-06 13:34:31 -05:00
|
|
|
|
#:use-module (gnu packages swig)
|
2018-08-16 17:53:17 -04:00
|
|
|
|
#:use-module (gnu packages valgrind)
|
2017-07-12 08:35:57 -04:00
|
|
|
|
#:use-module (gnu packages virtualization)
|
2019-01-16 08:01:17 -05:00
|
|
|
|
#:use-module (gnu packages xorg)
|
2017-10-26 08:52:19 -04:00
|
|
|
|
#:use-module (gnu packages web)
|
2017-02-09 13:46:47 -05:00
|
|
|
|
#: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)
|
2017-11-29 13:34:15 -05:00
|
|
|
|
#:use-module (guix utils)
|
|
|
|
|
#:use-module (srfi srfi-1)
|
2018-06-15 07:48:51 -04:00
|
|
|
|
#:use-module (srfi srfi-26)
|
|
|
|
|
#:use-module (ice-9 regex))
|
2013-02-10 12:48:23 -05:00
|
|
|
|
|
2014-11-07 18:30:52 -05:00
|
|
|
|
(define unifont
|
|
|
|
|
;; GNU Unifont, <http://gnu.org/s/unifont>.
|
|
|
|
|
;; GRUB needs it for its graphical terminal, gfxterm.
|
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri
|
|
|
|
|
"http://unifoundry.com/pub/unifont-7.0.06/font-builds/unifont-7.0.06.bdf.gz")
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"0p2vhnc18cnbmb39vq4m7hzv4mhnm2l0a2s7gx3ar277fwng3hys"))))
|
|
|
|
|
|
2013-02-10 12:48:23 -05:00
|
|
|
|
(define-public grub
|
|
|
|
|
(package
|
|
|
|
|
(name "grub")
|
2021-06-10 20:05:33 -04:00
|
|
|
|
(version "2.06")
|
2013-02-10 12:48:23 -05:00
|
|
|
|
(source (origin
|
|
|
|
|
(method url-fetch)
|
2017-04-21 15:03:53 -04:00
|
|
|
|
(uri (string-append "mirror://gnu/grub/grub-" version ".tar.xz"))
|
2013-02-10 12:48:23 -05:00
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2021-06-10 20:05:33 -04:00
|
|
|
|
"1qbycnxkx07arj9f2nlsi9kp0dyldspbv07ysdyd34qvz55a97mp"))
|
2020-03-10 19:33:24 -04:00
|
|
|
|
(patches (search-patches
|
|
|
|
|
"grub-efi-fat-serial-number.patch"
|
2021-06-13 08:44:06 -04:00
|
|
|
|
"grub-setup-root.patch"))
|
|
|
|
|
(modules '((guix build utils)))
|
|
|
|
|
(snippet
|
|
|
|
|
'(begin
|
|
|
|
|
;; Adjust QEMU invocation to not use a deprecated device
|
|
|
|
|
;; name that was removed in QEMU 6.0. Remove for >2.06.
|
|
|
|
|
(substitute* "tests/ahci_test.in"
|
|
|
|
|
(("ide-drive")
|
|
|
|
|
"ide-hd"))))))
|
2013-02-10 12:48:23 -05:00
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
|
(arguments
|
2019-07-08 19:24:17 -04:00
|
|
|
|
`(#:configure-flags
|
|
|
|
|
;; Counterintuitively, this *disables* a spurious Python dependency by
|
|
|
|
|
;; calling the ‘true’ binary instead. Python is only needed during
|
|
|
|
|
;; bootstrapping (for genptl.py), not when building from a release.
|
|
|
|
|
(list "PYTHON=true")
|
|
|
|
|
#:phases (modify-phases %standard-phases
|
2016-10-05 09:08:38 -04:00
|
|
|
|
(add-after 'unpack 'patch-stuff
|
2019-08-18 07:02:21 -04:00
|
|
|
|
(lambda* (#:key native-inputs inputs #:allow-other-keys)
|
2015-08-15 01:22:06 -04:00
|
|
|
|
(substitute* "grub-core/Makefile.in"
|
|
|
|
|
(("/bin/sh") (which "sh")))
|
2013-02-10 12:48:23 -05:00
|
|
|
|
|
2016-10-05 09:08:38 -04:00
|
|
|
|
;; Give the absolute file name of 'mdadm', used to
|
|
|
|
|
;; determine the root file system when it's a RAID
|
|
|
|
|
;; device. Failing to do that, 'grub-probe' silently
|
|
|
|
|
;; fails if 'mdadm' is not in $PATH.
|
2020-11-08 05:26:24 -05:00
|
|
|
|
(when (assoc-ref inputs "mdadm")
|
|
|
|
|
(substitute* "grub-core/osdep/linux/getroot.c"
|
|
|
|
|
(("argv\\[0\\] = \"mdadm\"")
|
|
|
|
|
(string-append "argv[0] = \""
|
|
|
|
|
(assoc-ref inputs "mdadm")
|
|
|
|
|
"/sbin/mdadm\""))))
|
2016-10-05 09:08:38 -04:00
|
|
|
|
|
2015-08-15 01:22:06 -04:00
|
|
|
|
;; Make the font visible.
|
2019-08-18 07:02:21 -04:00
|
|
|
|
(copy-file (assoc-ref (or native-inputs inputs)
|
|
|
|
|
"unifont")
|
|
|
|
|
"unifont.bdf.gz")
|
2015-08-15 01:22:06 -04:00
|
|
|
|
(system* "gunzip" "unifont.bdf.gz")
|
2019-01-16 08:01:17 -05:00
|
|
|
|
|
|
|
|
|
;; Give the absolute file name of 'ckbcomp'.
|
|
|
|
|
(substitute* "util/grub-kbdcomp.in"
|
|
|
|
|
(("^ckbcomp ")
|
|
|
|
|
(string-append (assoc-ref inputs "console-setup")
|
|
|
|
|
"/bin/ckbcomp ")))
|
2017-06-24 13:17:37 -04:00
|
|
|
|
#t))
|
2020-11-16 15:36:15 -05:00
|
|
|
|
(add-after 'unpack 'set-freetype-variables
|
|
|
|
|
;; These variables need to be set to the native versions
|
|
|
|
|
;; of the dependencies because they are used to build
|
|
|
|
|
;; programs which are executed during build time.
|
2020-11-23 04:34:16 -05:00
|
|
|
|
(lambda* (#:key native-inputs #:allow-other-keys)
|
|
|
|
|
(when (assoc-ref native-inputs "freetype")
|
|
|
|
|
(let ((freetype (assoc-ref native-inputs "freetype")))
|
|
|
|
|
(setenv "BUILD_FREETYPE_LIBS"
|
|
|
|
|
(string-append "-L" freetype
|
|
|
|
|
"/lib -lfreetype"))
|
|
|
|
|
(setenv "BUILD_FREETYPE_CFLAGS"
|
|
|
|
|
(string-append "-I" freetype
|
|
|
|
|
"/include/freetype2"))))
|
2020-11-16 15:36:15 -05:00
|
|
|
|
#t))
|
2017-06-24 13:17:37 -04:00
|
|
|
|
(add-before 'check 'disable-flaky-test
|
|
|
|
|
(lambda _
|
|
|
|
|
;; This test is unreliable. For more information, see:
|
|
|
|
|
;; <https://bugs.gnu.org/26936>.
|
|
|
|
|
(substitute* "Makefile.in"
|
|
|
|
|
(("grub_cmd_date grub_cmd_set_date grub_cmd_sleep")
|
|
|
|
|
"grub_cmd_date grub_cmd_sleep"))
|
2019-07-08 19:24:17 -04:00
|
|
|
|
#t))
|
|
|
|
|
(add-before 'check 'disable-pixel-perfect-test
|
|
|
|
|
(lambda _
|
|
|
|
|
;; This test compares many screenshots rendered with an
|
|
|
|
|
;; older Unifont (9.0.06) than that packaged in Guix.
|
|
|
|
|
(substitute* "Makefile.in"
|
|
|
|
|
(("test_unset grub_func_test")
|
|
|
|
|
"test_unset"))
|
2017-11-28 04:25:00 -05:00
|
|
|
|
#t)))
|
2020-11-16 15:34:39 -05:00
|
|
|
|
;; Disable tests on ARM and AARCH64 platforms or when cross-compiling.
|
|
|
|
|
#:tests? ,(not (or (any (cute string-prefix? <> (or (%current-target-system)
|
|
|
|
|
(%current-system)))
|
|
|
|
|
'("arm" "aarch64"))
|
|
|
|
|
(%current-target-system)))))
|
2013-02-10 12:48:23 -05:00
|
|
|
|
(inputs
|
2016-11-22 05:26:02 -05:00
|
|
|
|
`(("gettext" ,gettext-minimal)
|
|
|
|
|
|
|
|
|
|
;; Depend on LVM2 for libdevmapper, used by 'grub-probe' and
|
|
|
|
|
;; 'grub-install' to recognize mapped devices (LUKS, etc.)
|
2020-03-10 19:33:24 -04:00
|
|
|
|
,@(if (member (or (%current-target-system)
|
|
|
|
|
(%current-system))
|
|
|
|
|
(package-supported-systems lvm2))
|
|
|
|
|
`(("lvm2" ,lvm2))
|
|
|
|
|
'())
|
2016-11-22 05:26:02 -05:00
|
|
|
|
|
|
|
|
|
;; Depend on mdadm, which is invoked by 'grub-probe' and 'grub-install'
|
|
|
|
|
;; to determine whether the root file system is RAID.
|
2020-03-10 19:33:24 -04:00
|
|
|
|
,@(if (member (or (%current-target-system)
|
|
|
|
|
(%current-system))
|
|
|
|
|
(package-supported-systems mdadm))
|
|
|
|
|
`(("mdadm" ,mdadm))
|
|
|
|
|
'())
|
2016-11-22 05:26:02 -05:00
|
|
|
|
|
2019-01-16 08:01:17 -05:00
|
|
|
|
;; Console-setup's ckbcomp is invoked by grub-kbdcomp. It is required
|
|
|
|
|
;; for generating alternative keyboard layouts.
|
|
|
|
|
("console-setup" ,console-setup)
|
|
|
|
|
|
2019-07-08 19:43:07 -04:00
|
|
|
|
;; Needed for ‘grub-mount’, the only reliable way to tell whether a given
|
|
|
|
|
;; file system will be readable by GRUB without rebooting.
|
2020-03-10 19:33:24 -04:00
|
|
|
|
,@(if (member (or (%current-target-system)
|
|
|
|
|
(%current-system))
|
|
|
|
|
(package-supported-systems fuse))
|
|
|
|
|
`(("fuse" ,fuse))
|
|
|
|
|
'())
|
2019-07-08 19:43:07 -04:00
|
|
|
|
|
2013-02-10 12:48:23 -05:00
|
|
|
|
("freetype" ,freetype)
|
|
|
|
|
;; ("libusb" ,libusb)
|
gnu: Use the 'patches' field of <origin>.
* gnu/packages/apr.scm,
gnu/packages/autotools.scm,
gnu/packages/avahi.scm,
gnu/packages/cdrom.scm,
gnu/packages/cmake.scm,
gnu/packages/cpio.scm,
gnu/packages/cross-base.scm,
gnu/packages/emacs.scm,
gnu/packages/flex.scm,
gnu/packages/fontutils.scm,
gnu/packages/glib.scm,
gnu/packages/grub.scm,
gnu/packages/guile.scm,
gnu/packages/idutils.scm,
gnu/packages/libevent.scm,
gnu/packages/linux.scm,
gnu/packages/mail.scm,
gnu/packages/make-bootstrap.scm,
gnu/packages/mp3.scm,
gnu/packages/oggvorbis.scm,
gnu/packages/pdf.scm,
gnu/packages/plotutils.scm,
gnu/packages/qemu.scm,
gnu/packages/recutils.scm,
gnu/packages/rush.scm,
gnu/packages/scheme.scm,
gnu/packages/system.scm,
gnu/packages/tcsh.scm,
gnu/packages/valgrind.scm,
gnu/packages/vpn.scm,
gnu/packages/w3m: Use the 'patches' field of <origin> instead of
adding a patch as input plus using #:patches.
2013-10-08 18:09:04 -04:00
|
|
|
|
("ncurses" ,ncurses)))
|
2013-02-10 12:48:23 -05:00
|
|
|
|
(native-inputs
|
2018-01-29 06:19:06 -05:00
|
|
|
|
`(("pkg-config" ,pkg-config)
|
|
|
|
|
("unifont" ,unifont)
|
2014-11-07 18:30:52 -05:00
|
|
|
|
("bison" ,bison)
|
2020-03-21 10:13:28 -04:00
|
|
|
|
("flex" ,flex)
|
2015-08-19 13:57:30 -04:00
|
|
|
|
("texinfo" ,texinfo)
|
|
|
|
|
("help2man" ,help2man)
|
2020-11-16 15:36:15 -05:00
|
|
|
|
("freetype" ,freetype) ; native version needed for build-grub-mkfont
|
2013-02-10 12:48:23 -05:00
|
|
|
|
|
2018-06-15 07:48:51 -04:00
|
|
|
|
;; XXX: When building GRUB 2.02 on 32-bit x86, we need a binutils
|
|
|
|
|
;; capable of assembling 64-bit instructions. However, our default
|
|
|
|
|
;; binutils on 32-bit x86 is not 64-bit capable.
|
|
|
|
|
,@(if (string-match "^i[3456]86-" (%current-system))
|
|
|
|
|
(let ((binutils (package/inherit
|
|
|
|
|
binutils
|
|
|
|
|
(name "binutils-i386")
|
|
|
|
|
(arguments
|
|
|
|
|
(substitute-keyword-arguments (package-arguments binutils)
|
|
|
|
|
((#:configure-flags flags ''())
|
|
|
|
|
`(cons "--enable-64-bit-bfd" ,flags)))))))
|
|
|
|
|
`(("ld-wrapper" ,(make-ld-wrapper "ld-wrapper-i386"
|
|
|
|
|
#:binutils binutils))
|
|
|
|
|
("binutils" ,binutils)))
|
|
|
|
|
'())
|
|
|
|
|
|
2013-02-10 12:48:23 -05:00
|
|
|
|
;; Dependencies for the test suite. The "real" QEMU is needed here,
|
|
|
|
|
;; because several targets are used.
|
2015-12-04 12:00:32 -05:00
|
|
|
|
("parted" ,parted)
|
2020-03-10 19:33:24 -04:00
|
|
|
|
,@(if (member (%current-system) (package-supported-systems qemu-minimal))
|
|
|
|
|
`(("qemu" ,qemu-minimal))
|
|
|
|
|
'())
|
2013-02-10 12:48:23 -05:00
|
|
|
|
("xorriso" ,xorriso)))
|
2016-08-27 09:47:19 -04:00
|
|
|
|
(home-page "https://www.gnu.org/software/grub/")
|
2013-12-01 16:33:23 -05:00
|
|
|
|
(synopsis "GRand Unified Boot loader")
|
2013-02-10 12:48:23 -05:00
|
|
|
|
(description
|
Synchronize package descriptions with the Womb.
* gnu/packages/algebra.scm,
gnu/packages/aspell.scm,
gnu/packages/autotools.scm,
gnu/packages/base.scm,
gnu/packages/bash.scm,
gnu/packages/bison.scm,
gnu/packages/cdrom.scm,
gnu/packages/cflow.scm,
gnu/packages/compression.scm,
gnu/packages/cpio.scm,
gnu/packages/cppi.scm,
gnu/packages/ddrescue.scm,
gnu/packages/dejagnu.scm,
gnu/packages/ed.scm,
gnu/packages/emacs.scm,
gnu/packages/fdisk.scm,
gnu/packages/freeipmi.scm,
gnu/packages/gawk.scm,
gnu/packages/gcal.scm,
gnu/packages/gcc.scm,
gnu/packages/gdb.scm,
gnu/packages/gdbm.scm,
gnu/packages/gettext.scm,
gnu/packages/ghostscript.scm,
gnu/packages/global.scm,
gnu/packages/gnunet.scm,
gnu/packages/gnupg.scm,
gnu/packages/gnutls.scm,
gnu/packages/gperf.scm,
gnu/packages/gprolog.scm,
gnu/packages/groff.scm,
gnu/packages/grub.scm,
gnu/packages/gsasl.scm,
gnu/packages/guile.scm,
gnu/packages/gv.scm,
gnu/packages/help2man.scm,
gnu/packages/idutils.scm,
gnu/packages/indent.scm,
gnu/packages/less.scm,
gnu/packages/libidn.scm,
gnu/packages/libsigsegv.scm,
gnu/packages/libunistring.scm,
gnu/packages/lightning.scm,
gnu/packages/linux.scm,
gnu/packages/lsh.scm,
gnu/packages/m4.scm,
gnu/packages/mail.scm,
gnu/packages/maths.scm,
gnu/packages/multiprecision.scm,
gnu/packages/nano.scm,
gnu/packages/ncurses.scm,
gnu/packages/nettle.scm,
gnu/packages/ocrad.scm,
gnu/packages/oggvorbis.scm,
gnu/packages/parted.scm,
gnu/packages/plotutils.scm,
gnu/packages/pth.scm,
gnu/packages/readline.scm,
gnu/packages/recutils.scm,
gnu/packages/rush.scm,
gnu/packages/scheme.scm,
gnu/packages/screen.scm,
gnu/packages/shishi.scm,
gnu/packages/smalltalk.scm,
gnu/packages/system.scm,
gnu/packages/texinfo.scm,
gnu/packages/time.scm,
gnu/packages/unrtf.scm,
gnu/packages/version-control.scm,
gnu/packages/wdiff.scm,
gnu/packages/wget.scm,
gnu/packages/which.scm,
gnu/packages/xnee.scm,
gnu/packages/zile.scm: Change value of the 'description' field to that
of the Womb.
2013-10-09 10:14:23 -04:00
|
|
|
|
"GRUB is a multiboot bootloader. It is used for initially loading the
|
gnu: Some cleanup based on lint checkers.
* gnu/packages/admin.scm, gnu/packages/aidc.scm, gnu/packages/algebra.scm,
gnu/packages/apr.scm, gnu/packages/avahi.scm, gnu/packages/backup.scm,
gnu/packages/base.scm, gnu/packages/calcurse.scm, gnu/packages/cdrom.scm,
gnu/packages/check.scm, gnu/packages/compression.scm, gnu/packages/cook.scm,
gnu/packages/crypto.scm, gnu/packages/cryptsetup.scm, gnu/packages/curl.scm,
gnu/packages/cyrus-sasl.scm, gnu/packages/databases.scm,
gnu/packages/doxygen.scm, gnu/packages/dwm.scm, gnu/packages/elf.scm,
gnu/packages/emacs.scm, gnu/packages/feh.scm, gnu/packages/file.scm,
gnu/packages/fish.scm, gnu/packages/flex.scm, gnu/packages/fltk.scm,
gnu/packages/fontutils.scm, gnu/packages/games.scm, gnu/packages/gcal.scm,
gnu/packages/gcc.scm, gnu/packages/geeqie.scm, gnu/packages/ghostscript.scm,
gnu/packages/gimp.scm, gnu/packages/gl.scm, gnu/packages/glib.scm,
gnu/packages/gnome.scm, gnu/packages/gnunet.scm, gnu/packages/gnupg.scm,
gnu/packages/gperf.scm, gnu/packages/grub.scm, gnu/packages/gsasl.scm,
gnu/packages/gtk.scm, gnu/packages/guile-wm.scm, gnu/packages/guile.scm,
gnu/packages/hurd.scm, gnu/packages/icu4c.scm, gnu/packages/image.scm,
gnu/packages/imagemagick.scm, gnu/packages/irssi.scm, gnu/packages/kde.scm,
gnu/packages/libdaemon.scm, gnu/packages/libevent.scm,
gnu/packages/libidn.scm, gnu/packages/libusb.scm, gnu/packages/linux.scm,
gnu/packages/lout.scm, gnu/packages/lsh.scm, gnu/packages/lsof.scm,
gnu/packages/lua.scm, gnu/packages/maths.scm, gnu/packages/mcrypt.scm,
gnu/packages/mp3.scm, gnu/packages/netpbm.scm, gnu/packages/noweb.scm,
gnu/packages/ocaml.scm, gnu/packages/openssl.scm, gnu/packages/pcre.scm,
gnu/packages/pdf.scm, gnu/packages/pkg-config.scm,
gnu/packages/pretty-print.scm, gnu/packages/python.scm, gnu/packages/qt.scm,
gnu/packages/rsync.scm, gnu/packages/scheme.scm, gnu/packages/scrot.scm,
gnu/packages/sdl.scm, gnu/packages/skribilo.scm, gnu/packages/ssh.scm,
gnu/packages/stalonetray.scm, gnu/packages/tcl.scm, gnu/packages/tcsh.scm,
gnu/packages/telephony.scm, gnu/packages/texlive.scm, gnu/packages/tor.scm,
gnu/packages/valgrind.scm, gnu/packages/version-control.scm,
gnu/packages/vim.scm, gnu/packages/vpn.scm, gnu/packages/w3m.scm,
gnu/packages/web.scm, gnu/packages/wordnet.scm, gnu/packages/xiph.scm,
gnu/packages/xml.scm, gnu/packages/xorg.scm, gnu/packages/zile.scm,
gnu/packages/zip.scm, gnu/packages/zsh.scm [synopsis, description]: Adjust
according to lint checkers.
* gnu/packages/fltk.scm (fltk)[source]: Wrap long line in uri.
* /gnu/packages/xiph.scm (libogg, libtheora, vorbis-tools)[source]: Same.
2014-10-24 00:46:59 -04:00
|
|
|
|
kernel of an operating system and then transferring control to it. The kernel
|
2014-09-13 09:31:31 -04:00
|
|
|
|
then goes on to load the rest of the operating system. As a multiboot
|
2014-04-06 15:17:42 -04:00
|
|
|
|
bootloader, GRUB handles the presence of multiple operating systems installed
|
|
|
|
|
on the same computer; upon booting the computer, the user is presented with a
|
Synchronize package descriptions with the Womb.
* gnu/packages/algebra.scm,
gnu/packages/aspell.scm,
gnu/packages/autotools.scm,
gnu/packages/base.scm,
gnu/packages/bash.scm,
gnu/packages/bison.scm,
gnu/packages/cdrom.scm,
gnu/packages/cflow.scm,
gnu/packages/compression.scm,
gnu/packages/cpio.scm,
gnu/packages/cppi.scm,
gnu/packages/ddrescue.scm,
gnu/packages/dejagnu.scm,
gnu/packages/ed.scm,
gnu/packages/emacs.scm,
gnu/packages/fdisk.scm,
gnu/packages/freeipmi.scm,
gnu/packages/gawk.scm,
gnu/packages/gcal.scm,
gnu/packages/gcc.scm,
gnu/packages/gdb.scm,
gnu/packages/gdbm.scm,
gnu/packages/gettext.scm,
gnu/packages/ghostscript.scm,
gnu/packages/global.scm,
gnu/packages/gnunet.scm,
gnu/packages/gnupg.scm,
gnu/packages/gnutls.scm,
gnu/packages/gperf.scm,
gnu/packages/gprolog.scm,
gnu/packages/groff.scm,
gnu/packages/grub.scm,
gnu/packages/gsasl.scm,
gnu/packages/guile.scm,
gnu/packages/gv.scm,
gnu/packages/help2man.scm,
gnu/packages/idutils.scm,
gnu/packages/indent.scm,
gnu/packages/less.scm,
gnu/packages/libidn.scm,
gnu/packages/libsigsegv.scm,
gnu/packages/libunistring.scm,
gnu/packages/lightning.scm,
gnu/packages/linux.scm,
gnu/packages/lsh.scm,
gnu/packages/m4.scm,
gnu/packages/mail.scm,
gnu/packages/maths.scm,
gnu/packages/multiprecision.scm,
gnu/packages/nano.scm,
gnu/packages/ncurses.scm,
gnu/packages/nettle.scm,
gnu/packages/ocrad.scm,
gnu/packages/oggvorbis.scm,
gnu/packages/parted.scm,
gnu/packages/plotutils.scm,
gnu/packages/pth.scm,
gnu/packages/readline.scm,
gnu/packages/recutils.scm,
gnu/packages/rush.scm,
gnu/packages/scheme.scm,
gnu/packages/screen.scm,
gnu/packages/shishi.scm,
gnu/packages/smalltalk.scm,
gnu/packages/system.scm,
gnu/packages/texinfo.scm,
gnu/packages/time.scm,
gnu/packages/unrtf.scm,
gnu/packages/version-control.scm,
gnu/packages/wdiff.scm,
gnu/packages/wget.scm,
gnu/packages/which.scm,
gnu/packages/xnee.scm,
gnu/packages/zile.scm: Change value of the 'description' field to that
of the Womb.
2013-10-09 10:14:23 -04:00
|
|
|
|
menu to select one of the installed operating systems.")
|
2017-01-16 14:17:46 -05:00
|
|
|
|
(license license:gpl3+)
|
2016-05-17 12:04:13 -04:00
|
|
|
|
(properties '((cpe-name . "grub2")))))
|
2016-10-20 12:26:52 -04:00
|
|
|
|
|
2020-03-08 16:17:03 -04:00
|
|
|
|
(define-public grub-minimal
|
|
|
|
|
(package
|
|
|
|
|
(inherit grub)
|
|
|
|
|
(name "grub-minimal")
|
|
|
|
|
(inputs
|
|
|
|
|
(fold alist-delete (package-inputs grub)
|
|
|
|
|
'("lvm2" "mdadm" "fuse" "console-setup")))
|
|
|
|
|
(native-inputs
|
|
|
|
|
(fold alist-delete (package-native-inputs grub)
|
|
|
|
|
'("help2man" "texinfo" "parted" "qemu" "xorriso")))
|
|
|
|
|
(arguments
|
2020-11-24 04:17:28 -05:00
|
|
|
|
(substitute-keyword-arguments (package-arguments grub)
|
|
|
|
|
((#:configure-flags _ ''())
|
|
|
|
|
'(list "PYTHON=true"))
|
|
|
|
|
((#:tests? _ #t)
|
|
|
|
|
#f)
|
|
|
|
|
((#:phases phases '%standard-phases)
|
|
|
|
|
`(modify-phases ,phases
|
|
|
|
|
(replace 'patch-stuff
|
|
|
|
|
(lambda* (#:key native-inputs inputs #:allow-other-keys)
|
|
|
|
|
(substitute* "grub-core/Makefile.in"
|
|
|
|
|
(("/bin/sh") (which "sh")))
|
2020-03-08 16:17:03 -04:00
|
|
|
|
|
2020-11-24 04:17:28 -05:00
|
|
|
|
;; Make the font visible.
|
|
|
|
|
(copy-file (assoc-ref (or native-inputs inputs)
|
|
|
|
|
"unifont")
|
|
|
|
|
"unifont.bdf.gz")
|
|
|
|
|
(system* "gunzip" "unifont.bdf.gz")
|
2020-03-08 16:17:03 -04:00
|
|
|
|
|
2020-11-24 04:17:28 -05:00
|
|
|
|
#t))))))))
|
2020-03-08 16:17:03 -04:00
|
|
|
|
|
2016-10-20 12:26:52 -04:00
|
|
|
|
(define-public grub-efi
|
|
|
|
|
(package
|
|
|
|
|
(inherit grub)
|
|
|
|
|
(name "grub-efi")
|
|
|
|
|
(synopsis "GRand Unified Boot loader (UEFI version)")
|
|
|
|
|
(inputs
|
|
|
|
|
`(("efibootmgr" ,efibootmgr)
|
2018-03-16 11:50:14 -04:00
|
|
|
|
("mtools" ,mtools)
|
2016-10-20 12:26:52 -04:00
|
|
|
|
,@(package-inputs grub)))
|
|
|
|
|
(arguments
|
|
|
|
|
`(;; TODO: Tests need a UEFI firmware for qemu. There is one at
|
|
|
|
|
;; https://github.com/tianocore/edk2/tree/master/OvmfPkg .
|
|
|
|
|
;; Search for 'OVMF' in "tests/util/grub-shell.in".
|
|
|
|
|
,@(substitute-keyword-arguments (package-arguments grub)
|
2017-11-30 03:17:09 -05:00
|
|
|
|
((#:tests? _ #f) #f)
|
2017-02-07 05:14:09 -05:00
|
|
|
|
((#:configure-flags flags ''())
|
2021-06-10 20:21:27 -04:00
|
|
|
|
`(cons* "--with-platform=efi"
|
|
|
|
|
"--enable-stack-protector" ; EFI-only for now
|
|
|
|
|
,flags))
|
2016-10-20 12:26:52 -04:00
|
|
|
|
((#:phases phases)
|
|
|
|
|
`(modify-phases ,phases
|
|
|
|
|
(add-after 'patch-stuff 'use-absolute-efibootmgr-path
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(substitute* "grub-core/osdep/unix/platform.c"
|
|
|
|
|
(("efibootmgr")
|
|
|
|
|
(string-append (assoc-ref inputs "efibootmgr")
|
|
|
|
|
"/sbin/efibootmgr")))
|
2017-07-20 19:06:45 -04:00
|
|
|
|
#t))
|
|
|
|
|
(add-after 'patch-stuff 'use-absolute-mtools-path
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(let ((mtools (assoc-ref inputs "mtools")))
|
|
|
|
|
(substitute* "util/grub-mkrescue.c"
|
|
|
|
|
(("\"mformat\"")
|
|
|
|
|
(string-append "\"" mtools
|
|
|
|
|
"/bin/mformat\"")))
|
|
|
|
|
(substitute* "util/grub-mkrescue.c"
|
|
|
|
|
(("\"mcopy\"")
|
|
|
|
|
(string-append "\"" mtools
|
|
|
|
|
"/bin/mcopy\"")))
|
|
|
|
|
#t))))))))))
|
2017-02-09 13:21:22 -05:00
|
|
|
|
|
2017-07-20 19:06:47 -04:00
|
|
|
|
;; Because grub searches hardcoded paths it's easiest to just build grub
|
|
|
|
|
;; again to make it find both grub-pc and grub-efi. There is a command
|
|
|
|
|
;; line argument which allows you to specify ONE platform - but
|
|
|
|
|
;; grub-mkrescue will use multiple platforms if they are available
|
|
|
|
|
;; in the installation directory (without command line argument).
|
|
|
|
|
(define-public grub-hybrid
|
|
|
|
|
(package
|
|
|
|
|
(inherit grub-efi)
|
|
|
|
|
(name "grub-hybrid")
|
|
|
|
|
(synopsis "GRand Unified Boot loader (hybrid version)")
|
|
|
|
|
(inputs
|
|
|
|
|
`(("grub" ,grub)
|
|
|
|
|
,@(package-inputs grub-efi)))
|
|
|
|
|
(arguments
|
|
|
|
|
(substitute-keyword-arguments (package-arguments grub-efi)
|
|
|
|
|
((#:modules modules `((guix build utils) (guix build gnu-build-system)))
|
|
|
|
|
`((ice-9 ftw) ,@modules))
|
|
|
|
|
((#:phases phases)
|
|
|
|
|
`(modify-phases ,phases
|
|
|
|
|
(add-after 'install 'install-non-efi
|
|
|
|
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
|
|
|
(let ((input-dir (string-append (assoc-ref inputs "grub")
|
|
|
|
|
"/lib/grub"))
|
|
|
|
|
(output-dir (string-append (assoc-ref outputs "out")
|
|
|
|
|
"/lib/grub")))
|
|
|
|
|
(for-each
|
|
|
|
|
(lambda (basename)
|
2018-01-10 14:06:05 -05:00
|
|
|
|
(if (not (or (string-prefix? "." basename)
|
|
|
|
|
(file-exists? (string-append output-dir "/" basename))))
|
2017-07-20 19:06:47 -04:00
|
|
|
|
(symlink (string-append input-dir "/" basename)
|
|
|
|
|
(string-append output-dir "/" basename))))
|
|
|
|
|
(scandir input-dir))
|
|
|
|
|
#t)))))))))
|
|
|
|
|
|
2017-02-09 13:21:22 -05:00
|
|
|
|
(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
|
gnu: util-linux: Move libraries to separate output.
Fixes <https://bugs.gnu.org/37732>.
Reported by Diego Nicola Barbato <dnbarbato@posteo.de>.
* gnu/packages/linux.scm (util-linux)[outputs]: Add "lib".
[arguments]: Update #:configure-flags and the "move-static-libraries" phase
accordingly. Add phases "patch-build-scripts" and "adjust-pkg-config-files".
(e2fsprogs, psm, mtd-utils, f2fs-tools, f2fs-tools-1.7, eudev,
xfsprogs)[inputs]: Change to the "lib" output of UTIL-LINUX.
(btrfs-progs)[inputs]: Remove duplicate UTIL-LINUX inputs and change to use
the "lib" output.
* gnu/packages/admin.scm (pam-mount)[inputs]: Add UTIL-LINUX:LIB.
(testdisk)[inputs]: Change to the "lib" output of UTIL-LINUX.
* gnu/packages/android.scm (abootimg)[inputs]: Likewise.
* gnu/packages/audio.scm (jack-1)[propagated-inputs]: Likewise.
* gnu/packages/bootloaders.scm (syslinux, vboot-utils)[inputs]: Likewise.
* gnu/packages/chez.scm (chez-scheme)[inputs]: Likewise.
* gnu/packages/cryptsetup.scm (cryptsetup, cryptsetup-static)[inputs]: Likewise.
* gnu/packages/databases.scm (postgresql, 4store)[inputs]: Likewise.
* gnu/packages/disk.scm (ndctl, gptfdisk, fdisk, gparted, rmlint,
volume-key)[inputs]: Likewise.
(parted)[inputs]: Likewise.
[native-inputs]: Add UTIL-LINUX.
* gnu/packages/efi.scm (sbsigntools)[inputs]: Add UTIL-LINUX:LIB.
* gnu/packages/engineering.scm (lib3mf)[inputs]: Change to the "lib" output of
UTIL-LINUX.
* gnu/packages/enlightenment.scm (efl)[propagated-inputs]: Likewise.
* gnu/packages/file-systems.scm (glusterfs, jfsutils, zfs)[inputs]: Likewise.
* gnu/packages/firmware.scm (ovmf)[inputs]: Likewise.
* gnu/packages/fontutils.scm (fontconfig)[propagated-inputs]: Likewise.
* gnu/packages/freedesktop.scm (localed)[inputs]: Likewise.
* gnu/packages/glib.scm (glib, appstream-glib)[propagated-inputs]: Likewise.
* gnu/packages/gnome.scm (tracker, gnome-terminal)[inputs]: Likewise.
* gnu/packages/jupyter.scm (xeus)[inputs]: Likewise.
* gnu/packages/kde.scm (kpmcore)[inputs]: Likewise.
* gnu/packages/kodi.scm (crossguid)[inputs]: Likewise.
* gnu/packages/lighting.scm (ola)[inputs]: Likewise.
* gnu/packages/music.scm (libgig)[inputs]: Likewise.
* gnu/packages/nfs.scm (nfs-utils)[inputs]: Likewise.
* gnu/packages/opencog.scm (opencog)[inputs]: Likewise.
* gnu/packages/package-management.scm (msitools)[inputs]: Change to the "lib"
output of UTIL-LINUX.
* gnu/packages/password-utils.scm (pwsafe)[inputs]: Likewise.
* gnu/packages/telephony.scm (pjproject)[propagated-inputs]: Likewise.
* gnu/packages/rdf.scm (rasqal)[inputs]: Likewise.
* gnu/packages/search.scm (xapian)[inputs]: Likewise.
* gnu/packages/sssd.scm (sssd)[native-inputs]: Likewise.
* gnu/packages/storage.scm (ceph)[inputs]: Add UTIL-LINUX:LIB.
* gnu/packages/task-management.scm (taskwarrior)[inputs]: Change to the "lib"
output of UTIL-LINUX.
* gnu/packages/virtualization.scm (libvirt, xen)[inputs]: Likewise.
* gnu/packages/xorg.scm (libsm)[inputs]: Likewise.
2020-01-14 18:24:28 -05:00
|
|
|
|
`(("libuuid" ,util-linux "lib")
|
2017-11-16 04:41:04 -05:00
|
|
|
|
("mtools" ,mtools)))
|
2017-02-09 13:21:22 -05:00
|
|
|
|
(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
|
2017-11-16 04:41:04 -05:00
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
2017-02-09 13:21:22 -05:00
|
|
|
|
(substitute* (find-files "." "Makefile.*|ppmtolss16")
|
|
|
|
|
(("/bin/pwd") (which "pwd"))
|
|
|
|
|
(("/bin/echo") (which "echo"))
|
|
|
|
|
(("/usr/bin/perl") (which "perl")))
|
2017-11-16 04:41:04 -05:00
|
|
|
|
(let ((mtools (assoc-ref inputs "mtools")))
|
|
|
|
|
(substitute* (find-files "." "\\.c$")
|
|
|
|
|
(("mcopy")
|
|
|
|
|
(string-append mtools "/bin/mcopy"))
|
|
|
|
|
(("mattrib")
|
|
|
|
|
(string-append mtools "/bin/mattrib"))))
|
2017-02-09 13:21:22 -05:00
|
|
|
|
#t))
|
|
|
|
|
(delete 'configure)
|
|
|
|
|
(add-before 'build 'set-permissions
|
|
|
|
|
(lambda _
|
2018-09-11 16:06:42 -04:00
|
|
|
|
(invoke "chmod" "a+w" "utils/isohybrid.in")))
|
2017-02-09 13:21:22 -05:00
|
|
|
|
(replace 'check
|
|
|
|
|
(lambda _
|
|
|
|
|
(setenv "CC" "gcc")
|
|
|
|
|
(substitute* "tests/unittest/include/unittest/unittest.h"
|
|
|
|
|
;; Don't look up headers under /usr.
|
|
|
|
|
(("/usr/include/") ""))
|
2018-09-11 16:06:42 -04:00
|
|
|
|
(invoke "make" "unittest"))))))
|
2018-09-11 16:08:16 -04:00
|
|
|
|
(home-page "https://www.syslinux.org")
|
2017-02-09 13:21:22 -05:00
|
|
|
|
(synopsis "Lightweight Linux bootloader")
|
|
|
|
|
(description "Syslinux is a lightweight Linux bootloader.")
|
2018-12-09 08:41:12 -05:00
|
|
|
|
;; The Makefile specifically targets i386 and x86_64 using nasm.
|
|
|
|
|
(supported-systems '("i686-linux" "x86_64-linux"))
|
2017-02-09 13:21:22 -05:00
|
|
|
|
(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)))))
|
2017-02-09 13:46:47 -05:00
|
|
|
|
|
|
|
|
|
(define-public dtc
|
|
|
|
|
(package
|
|
|
|
|
(name "dtc")
|
2021-06-10 18:36:14 -04:00
|
|
|
|
(version "1.6.1")
|
2017-02-09 13:46:47 -05:00
|
|
|
|
(source (origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append
|
2017-03-20 20:06:41 -04:00
|
|
|
|
"mirror://kernel.org/software/utils/dtc/"
|
2017-02-09 13:46:47 -05:00
|
|
|
|
"dtc-" version ".tar.xz"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2021-06-10 18:36:14 -04:00
|
|
|
|
"0wrl43rvd8nnm1v1wyfdr17vk8q7ymib62vli6da8n9ni4lwbkk5"))))
|
2017-02-09 13:46:47 -05:00
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
|
(native-inputs
|
|
|
|
|
`(("bison" ,bison)
|
2017-11-06 13:34:31 -05:00
|
|
|
|
("flex" ,flex)
|
2019-03-13 18:50:22 -04:00
|
|
|
|
("libyaml" ,libyaml)
|
|
|
|
|
("pkg-config" ,pkg-config)
|
2018-08-16 17:53:17 -04:00
|
|
|
|
("swig" ,swig)
|
|
|
|
|
("valgrind" ,valgrind)))
|
2017-11-06 13:34:31 -05:00
|
|
|
|
(inputs
|
2020-01-04 19:08:12 -05:00
|
|
|
|
`(("python" ,python)))
|
2017-02-09 13:46:47 -05:00
|
|
|
|
(arguments
|
|
|
|
|
`(#:make-flags
|
2020-11-16 05:43:57 -05:00
|
|
|
|
(list (string-append "CC=" ,(cc-for-target))
|
2019-09-26 00:24:18 -04:00
|
|
|
|
|
|
|
|
|
;; /bin/fdt{get,overlay,put} need help finding libfdt.so.1.
|
|
|
|
|
(string-append "LDFLAGS=-Wl,-rpath="
|
|
|
|
|
(assoc-ref %outputs "out") "/lib")
|
|
|
|
|
|
2017-02-09 13:46:47 -05:00
|
|
|
|
(string-append "PREFIX=" (assoc-ref %outputs "out"))
|
2017-11-06 13:34:31 -05:00
|
|
|
|
(string-append "SETUP_PREFIX=" (assoc-ref %outputs "out"))
|
2017-02-09 13:46:47 -05:00
|
|
|
|
"INSTALL=install")
|
|
|
|
|
#:phases
|
|
|
|
|
(modify-phases %standard-phases
|
2020-11-16 05:43:57 -05:00
|
|
|
|
(add-after 'unpack 'patch-pkg-config
|
|
|
|
|
(lambda _
|
|
|
|
|
(substitute* '("Makefile"
|
|
|
|
|
"tests/run_tests.sh")
|
|
|
|
|
(("pkg-config")
|
|
|
|
|
(or (which "pkg-config")
|
|
|
|
|
(string-append ,(%current-target-system)
|
|
|
|
|
"-pkg-config"))))
|
|
|
|
|
#t))
|
2018-01-12 10:43:24 -05:00
|
|
|
|
(delete 'configure)))) ; no configure script
|
2017-02-09 13:46:47 -05:00
|
|
|
|
(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+)))
|
|
|
|
|
|
2021-04-28 10:44:52 -04:00
|
|
|
|
(define %u-boot-rockchip-inno-usb-patch
|
|
|
|
|
;; Fix regression in 2020.10 causing freezes on boot with USB boot enabled.
|
|
|
|
|
;; See https://gitlab.manjaro.org/manjaro-arm/packages/core/uboot-rockpro64/-/issues/4
|
|
|
|
|
;; and https://patchwork.ozlabs.org/project/uboot/patch/20210406151059.1187379-1-icenowy@aosc.io
|
|
|
|
|
(search-patch "u-boot-rockchip-inno-usb.patch"))
|
|
|
|
|
|
2017-02-09 13:46:47 -05:00
|
|
|
|
(define u-boot
|
|
|
|
|
(package
|
|
|
|
|
(name "u-boot")
|
2021-04-11 01:53:40 -04:00
|
|
|
|
(version "2021.04")
|
2017-02-09 13:46:47 -05:00
|
|
|
|
(source (origin
|
2021-04-28 10:44:52 -04:00
|
|
|
|
(patches
|
|
|
|
|
(list %u-boot-rockchip-inno-usb-patch))
|
2017-02-09 13:46:47 -05:00
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append
|
2021-04-11 01:53:40 -04:00
|
|
|
|
"https://ftp.denx.de/pub/u-boot/"
|
2017-02-09 13:46:47 -05:00
|
|
|
|
"u-boot-" version ".tar.bz2"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2021-04-11 01:53:40 -04:00
|
|
|
|
"06p1vymf0dl6jc2xy5w7p42mpgppa46lmpm2ishmgsycnldqnhqd"))))
|
2017-02-09 13:46:47 -05:00
|
|
|
|
(native-inputs
|
|
|
|
|
`(("bc" ,bc)
|
2018-07-09 20:26:54 -04:00
|
|
|
|
("bison" ,bison)
|
2018-05-12 03:43:23 -04:00
|
|
|
|
("dtc" ,dtc)
|
2018-07-09 20:26:54 -04:00
|
|
|
|
("flex" ,flex)
|
2018-11-14 17:23:21 -05:00
|
|
|
|
("lz4" ,lz4)
|
2020-01-08 20:44:48 -05:00
|
|
|
|
("perl" ,perl)
|
|
|
|
|
("python" ,python)
|
|
|
|
|
("python-coverage" ,python-coverage)
|
|
|
|
|
("python-pytest" ,python-pytest)
|
2018-01-20 09:49:03 -05:00
|
|
|
|
("swig" ,swig)))
|
2017-02-09 13:46:47 -05:00
|
|
|
|
(build-system gnu-build-system)
|
2018-09-19 22:48:41 -04:00
|
|
|
|
(home-page "https://www.denx.de/wiki/U-Boot/")
|
2017-02-09 13:46:47 -05:00
|
|
|
|
(synopsis "ARM bootloader")
|
|
|
|
|
(description "U-Boot is a bootloader used mostly for ARM boards. It
|
|
|
|
|
also initializes the boards (RAM etc).")
|
|
|
|
|
(license license:gpl2+)))
|
|
|
|
|
|
2021-05-01 15:58:25 -04:00
|
|
|
|
(define-public u-boot-2021.07
|
|
|
|
|
(package
|
|
|
|
|
(inherit u-boot)
|
2021-06-08 04:05:51 -04:00
|
|
|
|
(version "2021.07-rc4")
|
2021-05-01 15:58:25 -04:00
|
|
|
|
(source (origin
|
2021-06-08 04:05:51 -04:00
|
|
|
|
(patches
|
|
|
|
|
(list %u-boot-rockchip-inno-usb-patch))
|
2021-05-01 15:58:25 -04:00
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append
|
|
|
|
|
"https://ftp.denx.de/pub/u-boot/"
|
|
|
|
|
"u-boot-" version ".tar.bz2"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2021-06-08 04:05:51 -04:00
|
|
|
|
"0bnsywgy2b0jxim5h9dc807lqk5kq8hvgf4lcsmffnc0hf4isv8p"))))))
|
2021-05-01 15:58:25 -04:00
|
|
|
|
|
2018-05-17 20:40:55 -04:00
|
|
|
|
(define-public u-boot-tools
|
|
|
|
|
(package
|
|
|
|
|
(inherit u-boot)
|
|
|
|
|
(name "u-boot-tools")
|
2020-09-19 15:51:44 -04:00
|
|
|
|
(native-inputs
|
|
|
|
|
`(("sdl2" ,sdl2)
|
|
|
|
|
,@(package-native-inputs u-boot)))
|
2018-05-17 20:40:55 -04:00
|
|
|
|
(arguments
|
2018-05-18 15:12:47 -04:00
|
|
|
|
`(#:make-flags '("HOSTCC=gcc")
|
2020-10-24 15:49:25 -04:00
|
|
|
|
#:test-target "tcheck"
|
2018-05-17 20:40:55 -04:00
|
|
|
|
#:phases
|
|
|
|
|
(modify-phases %standard-phases
|
2018-05-18 15:12:47 -04:00
|
|
|
|
(add-after 'unpack 'patch
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(substitute* "Makefile"
|
|
|
|
|
(("/bin/pwd") (which "pwd"))
|
|
|
|
|
(("/bin/false") (which "false")))
|
|
|
|
|
(substitute* "tools/dtoc/fdt_util.py"
|
|
|
|
|
(("'cc'") "'gcc'"))
|
2018-10-07 23:16:47 -04:00
|
|
|
|
(substitute* "tools/patman/test_util.py"
|
2020-10-24 15:49:25 -04:00
|
|
|
|
;; python3-coverage is simply called coverage in guix.
|
|
|
|
|
(("python3-coverage") "coverage"))
|
2018-05-18 15:12:47 -04:00
|
|
|
|
(substitute* "test/run"
|
|
|
|
|
;; Make it easier to find test failures.
|
|
|
|
|
(("#!/bin/bash") "#!/bin/bash -x")
|
|
|
|
|
;; This test would require git.
|
|
|
|
|
(("\\./tools/patman/patman") (which "true"))
|
2020-01-08 20:44:48 -05:00
|
|
|
|
;; FIXME: test fails, needs further investiation
|
|
|
|
|
(("run_test \"binman\"") ": run_test \"binman\"")
|
|
|
|
|
;; FIXME: code coverage not working
|
|
|
|
|
(("run_test \"binman code coverage\"") ": run_test \"binman code coverage\"")
|
2018-05-18 15:12:47 -04:00
|
|
|
|
;; This test would require internet access.
|
|
|
|
|
(("\\./tools/buildman/buildman") (which "true")))
|
|
|
|
|
(substitute* "test/py/tests/test_sandbox_exit.py"
|
|
|
|
|
(("def test_ctrl_c")
|
|
|
|
|
"@pytest.mark.skip(reason='Guix has problems with SIGINT')
|
|
|
|
|
def test_ctrl_c"))
|
2019-04-28 23:55:39 -04:00
|
|
|
|
;; Test against the tools being installed rather than tools built
|
|
|
|
|
;; for "sandbox" target.
|
|
|
|
|
(substitute* "test/image/test-imagetools.sh"
|
|
|
|
|
(("BASEDIR=sandbox") "BASEDIR=."))
|
2019-01-16 18:21:52 -05:00
|
|
|
|
(for-each (lambda (file)
|
|
|
|
|
(substitute* file
|
2020-10-24 15:49:25 -04:00
|
|
|
|
;; Disable features that require OpenSSL due
|
|
|
|
|
;; to GPL/Openssl license incompatibilities.
|
|
|
|
|
;; See https://bugs.gnu.org/34717 for
|
|
|
|
|
;; details.
|
|
|
|
|
(("CONFIG_FIT_SIGNATURE=y")
|
|
|
|
|
"CONFIG_FIT_SIGNATURE=n\nCONFIG_UT_LIB_ASN1=n")
|
2019-03-07 16:50:58 -05:00
|
|
|
|
;; This test requires a sound system, which is un-used
|
|
|
|
|
;; in u-boot-tools.
|
2019-01-16 18:21:52 -05:00
|
|
|
|
(("CONFIG_SOUND=y") "CONFIG_SOUND=n")))
|
2020-01-08 20:44:48 -05:00
|
|
|
|
(find-files "configs" "sandbox_.*defconfig$|tools-only_defconfig"))
|
2018-05-18 15:12:47 -04:00
|
|
|
|
#t))
|
2018-05-17 20:40:55 -04:00
|
|
|
|
(replace 'configure
|
|
|
|
|
(lambda* (#:key make-flags #:allow-other-keys)
|
2020-01-08 20:44:48 -05:00
|
|
|
|
(apply invoke "make" "tools-only_defconfig" make-flags)))
|
2018-05-17 20:40:55 -04:00
|
|
|
|
(replace 'build
|
|
|
|
|
(lambda* (#:key inputs make-flags #:allow-other-keys)
|
2018-07-11 11:05:53 -04:00
|
|
|
|
(apply invoke "make" "tools-all" make-flags)))
|
2018-05-17 20:40:55 -04:00
|
|
|
|
(replace 'install
|
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
|
(let* ((out (assoc-ref outputs "out"))
|
|
|
|
|
(bin (string-append out "/bin")))
|
|
|
|
|
(for-each (lambda (name)
|
|
|
|
|
(install-file name bin))
|
|
|
|
|
'("tools/netconsole"
|
|
|
|
|
"tools/jtagconsole"
|
|
|
|
|
"tools/gen_eth_addr"
|
|
|
|
|
"tools/gen_ethaddr_crc"
|
|
|
|
|
"tools/img2srec"
|
|
|
|
|
"tools/mkenvimage"
|
|
|
|
|
"tools/dumpimage"
|
|
|
|
|
"tools/mkimage"
|
|
|
|
|
"tools/proftool"
|
|
|
|
|
"tools/fdtgrep"
|
2018-07-11 10:10:36 -04:00
|
|
|
|
"tools/env/fw_printenv"
|
|
|
|
|
"tools/sunxi-spl-image-builder"))
|
2018-05-18 15:12:47 -04:00
|
|
|
|
#t)))
|
|
|
|
|
(delete 'check)
|
|
|
|
|
(add-after 'install 'check
|
|
|
|
|
(lambda* (#:key make-flags test-target #:allow-other-keys)
|
2019-04-28 23:55:39 -04:00
|
|
|
|
(invoke "test/image/test-imagetools.sh")))
|
|
|
|
|
;; Only run full test suite on x86_64 systems, as many tests
|
|
|
|
|
;; assume x86_64.
|
|
|
|
|
,@(if (string-match "^x86_64-linux"
|
|
|
|
|
(or (%current-target-system)
|
|
|
|
|
(%current-system)))
|
|
|
|
|
'((add-after 'check 'check-x86
|
|
|
|
|
(lambda* (#:key make-flags test-target #:allow-other-keys)
|
|
|
|
|
(apply invoke "make" "mrproper" make-flags)
|
|
|
|
|
(setenv "SDL_VIDEODRIVER" "dummy")
|
|
|
|
|
(setenv "PAGER" "cat")
|
|
|
|
|
(apply invoke "make" test-target make-flags))))
|
|
|
|
|
'()))))
|
2018-05-17 20:40:55 -04:00
|
|
|
|
(description "U-Boot is a bootloader used mostly for ARM boards. It
|
|
|
|
|
also initializes the boards (RAM etc). This package provides its
|
|
|
|
|
board-independent tools.")))
|
|
|
|
|
|
2018-06-15 03:52:42 -04:00
|
|
|
|
(define-public (make-u-boot-package board triplet)
|
2017-02-09 13:46:47 -05:00
|
|
|
|
"Returns a u-boot package for BOARD cross-compiled for TRIPLET."
|
2019-07-17 09:23:04 -04:00
|
|
|
|
(let ((same-arch? (lambda ()
|
|
|
|
|
(string=? (%current-system)
|
|
|
|
|
(gnu-triplet->nix-system triplet)))))
|
2017-08-05 17:13:06 -04:00
|
|
|
|
(package
|
|
|
|
|
(inherit u-boot)
|
2018-01-20 15:59:03 -05:00
|
|
|
|
(name (string-append "u-boot-"
|
|
|
|
|
(string-replace-substring (string-downcase board)
|
|
|
|
|
"_" "-")))
|
2017-08-05 17:13:06 -04:00
|
|
|
|
(native-inputs
|
2019-07-17 09:23:04 -04:00
|
|
|
|
`(,@(if (not (same-arch?))
|
2019-10-30 19:47:53 -04:00
|
|
|
|
`(("cross-gcc" ,(cross-gcc triplet))
|
2017-08-05 17:13:06 -04:00
|
|
|
|
("cross-binutils" ,(cross-binutils triplet)))
|
2019-10-30 19:47:53 -04:00
|
|
|
|
`())
|
2017-08-05 17:13:06 -04:00
|
|
|
|
,@(package-native-inputs u-boot)))
|
|
|
|
|
(arguments
|
2018-07-29 13:49:42 -04:00
|
|
|
|
`(#:modules ((ice-9 ftw)
|
|
|
|
|
(srfi srfi-1)
|
|
|
|
|
(guix build utils)
|
|
|
|
|
(guix build gnu-build-system))
|
2017-08-05 17:13:06 -04:00
|
|
|
|
#:test-target "test"
|
|
|
|
|
#:make-flags
|
|
|
|
|
(list "HOSTCC=gcc"
|
2019-07-17 09:23:04 -04:00
|
|
|
|
,@(if (not (same-arch?))
|
2017-08-05 17:13:06 -04:00
|
|
|
|
`((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))
|
2019-01-26 08:44:32 -05:00
|
|
|
|
(apply invoke "make" `(,@make-flags ,config-name))
|
2017-08-05 17:13:06 -04:00
|
|
|
|
(begin
|
2018-05-12 04:56:25 -04:00
|
|
|
|
(display "Invalid board name. Valid board names are:"
|
|
|
|
|
(current-error-port))
|
2018-05-12 04:54:19 -04:00
|
|
|
|
(let ((suffix-len (string-length "_defconfig"))
|
|
|
|
|
(entries (scandir "configs")))
|
|
|
|
|
(for-each (lambda (file-name)
|
|
|
|
|
(when (string-suffix? "_defconfig" file-name)
|
2018-05-12 04:56:25 -04:00
|
|
|
|
(format (current-error-port)
|
2018-05-12 04:54:19 -04:00
|
|
|
|
"- ~A\n"
|
|
|
|
|
(string-drop-right file-name
|
|
|
|
|
suffix-len))))
|
2018-05-28 18:37:10 -04:00
|
|
|
|
(sort entries string-ci<)))
|
2018-06-22 17:40:54 -04:00
|
|
|
|
(error "Invalid boardname ~s." ,board))))))
|
2017-08-05 17:13:06 -04:00
|
|
|
|
(replace 'install
|
2018-01-31 13:07:45 -05:00
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
2017-08-05 17:13:06 -04:00
|
|
|
|
(let* ((out (assoc-ref outputs "out"))
|
|
|
|
|
(libexec (string-append out "/libexec"))
|
2017-11-03 10:17:08 -04:00
|
|
|
|
(uboot-files (append
|
2018-07-13 09:57:48 -04:00
|
|
|
|
(remove
|
|
|
|
|
;; Those would not be reproducible
|
|
|
|
|
;; because of the randomness used
|
|
|
|
|
;; to produce them.
|
|
|
|
|
;; It's expected that the user will
|
|
|
|
|
;; use u-boot-tools to generate them
|
|
|
|
|
;; instead.
|
|
|
|
|
(lambda (name)
|
|
|
|
|
(string-suffix?
|
|
|
|
|
"sunxi-spl-with-ecc.bin"
|
|
|
|
|
name))
|
|
|
|
|
(find-files "." ".*\\.(bin|efi|img|spl|itb|dtb|rksd)$"))
|
2018-04-29 00:33:00 -04:00
|
|
|
|
(find-files "." "^(MLO|SPL)$"))))
|
2017-08-05 17:13:06 -04:00
|
|
|
|
(mkdir-p libexec)
|
2018-02-13 16:35:41 -05:00
|
|
|
|
(install-file ".config" libexec)
|
2018-05-12 16:19:14 -04:00
|
|
|
|
;; Useful for "qemu -kernel".
|
|
|
|
|
(install-file "u-boot" libexec)
|
2017-08-05 17:13:06 -04:00
|
|
|
|
(for-each
|
|
|
|
|
(lambda (file)
|
|
|
|
|
(let ((target-file (string-append libexec "/" file)))
|
|
|
|
|
(mkdir-p (dirname target-file))
|
|
|
|
|
(copy-file file target-file)))
|
2018-07-11 09:56:41 -04:00
|
|
|
|
uboot-files)
|
|
|
|
|
#t)))))))))
|
2017-02-09 13:46:47 -05:00
|
|
|
|
|
|
|
|
|
(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"))
|
|
|
|
|
|
2019-04-16 00:46:57 -04:00
|
|
|
|
(define-public u-boot-am335x-boneblack
|
|
|
|
|
(let ((base (make-u-boot-package "am335x_evm" "arm-linux-gnueabihf")))
|
|
|
|
|
(package
|
|
|
|
|
(inherit base)
|
|
|
|
|
(name "u-boot-am335x-boneblack")
|
|
|
|
|
(description "U-Boot is a bootloader used mostly for ARM boards. It
|
|
|
|
|
also initializes the boards (RAM etc).
|
|
|
|
|
|
|
|
|
|
This U-Boot is built for the BeagleBone Black, which was removed upstream,
|
|
|
|
|
adjusted from the am335x_evm build with several device trees removed so that
|
|
|
|
|
it fits within common partitioning schemes.")
|
|
|
|
|
(arguments
|
|
|
|
|
(substitute-keyword-arguments (package-arguments base)
|
|
|
|
|
((#:phases phases)
|
|
|
|
|
`(modify-phases ,phases
|
|
|
|
|
(add-after 'unpack 'patch-defconfig
|
|
|
|
|
;; Patch out other devicetrees to build image small enough to
|
|
|
|
|
;; fit within typical partitioning schemes where the first
|
|
|
|
|
;; partition begins at sector 2048.
|
|
|
|
|
(lambda _
|
|
|
|
|
(substitute* "configs/am335x_evm_defconfig"
|
|
|
|
|
(("CONFIG_OF_LIST=.*$") "CONFIG_OF_LIST=\"am335x-evm am335x-boneblack\"\n"))
|
|
|
|
|
#t)))))))))
|
|
|
|
|
|
|
|
|
|
(define-public u-boot-am335x-evm
|
|
|
|
|
(make-u-boot-package "am335x_evm" "arm-linux-gnueabihf"))
|
2017-07-21 08:42:57 -04:00
|
|
|
|
|
2018-11-20 00:04:48 -05:00
|
|
|
|
(define-public (make-u-boot-sunxi64-package board triplet)
|
|
|
|
|
(let ((base (make-u-boot-package board triplet)))
|
2018-01-31 14:10:47 -05:00
|
|
|
|
(package
|
|
|
|
|
(inherit base)
|
|
|
|
|
(arguments
|
|
|
|
|
(substitute-keyword-arguments (package-arguments base)
|
|
|
|
|
((#:phases phases)
|
|
|
|
|
`(modify-phases ,phases
|
|
|
|
|
(add-after 'unpack 'set-environment
|
2019-12-14 11:35:02 -05:00
|
|
|
|
(lambda* (#:key native-inputs inputs #:allow-other-keys)
|
|
|
|
|
(let ((bl31
|
|
|
|
|
(string-append
|
|
|
|
|
(assoc-ref (or native-inputs inputs) "firmware")
|
|
|
|
|
"/bl31.bin")))
|
2018-01-31 14:10:47 -05:00
|
|
|
|
(setenv "BL31" bl31)
|
2018-05-12 05:09:42 -04:00
|
|
|
|
;; This is necessary when we're using the bundled dtc.
|
|
|
|
|
;(setenv "PATH" (string-append (getenv "PATH") ":"
|
|
|
|
|
; "scripts/dtc"))
|
|
|
|
|
)
|
2018-01-31 14:10:47 -05:00
|
|
|
|
#t))))))
|
|
|
|
|
(native-inputs
|
2018-11-14 11:53:14 -05:00
|
|
|
|
`(("firmware" ,arm-trusted-firmware-sun50i-a64)
|
2018-01-31 14:10:47 -05:00
|
|
|
|
,@(package-native-inputs base))))))
|
|
|
|
|
|
2018-11-20 00:04:48 -05:00
|
|
|
|
(define-public u-boot-pine64-plus
|
|
|
|
|
(make-u-boot-sunxi64-package "pine64_plus" "aarch64-linux-gnu"))
|
|
|
|
|
|
2019-12-14 11:34:28 -05:00
|
|
|
|
(define-public u-boot-pine64-lts
|
|
|
|
|
(make-u-boot-sunxi64-package "pine64-lts" "aarch64-linux-gnu"))
|
|
|
|
|
|
2018-11-20 19:32:16 -05:00
|
|
|
|
(define-public u-boot-pinebook
|
2020-02-15 02:16:08 -05:00
|
|
|
|
(let ((base (make-u-boot-sunxi64-package "pinebook" "aarch64-linux-gnu")))
|
|
|
|
|
(package
|
|
|
|
|
(inherit base)
|
|
|
|
|
(arguments
|
|
|
|
|
(substitute-keyword-arguments (package-arguments base)
|
|
|
|
|
((#:phases phases)
|
|
|
|
|
`(modify-phases ,phases
|
|
|
|
|
(add-after 'unpack 'patch-pinebook-config
|
|
|
|
|
;; Fix regression with LCD video output introduced in 2020.01
|
|
|
|
|
;; https://patchwork.ozlabs.org/patch/1225130/
|
|
|
|
|
(lambda _
|
|
|
|
|
(substitute* "configs/pinebook_defconfig"
|
|
|
|
|
(("CONFIG_VIDEO_BRIDGE_ANALOGIX_ANX6345=y") "CONFIG_VIDEO_BRIDGE_ANALOGIX_ANX6345=y\nCONFIG_VIDEO_BPP32=y"))
|
|
|
|
|
#t)))))))))
|
2018-11-20 19:32:16 -05:00
|
|
|
|
|
2018-09-14 15:31:24 -04:00
|
|
|
|
(define-public u-boot-bananapi-m2-ultra
|
2018-01-18 18:25:13 -05:00
|
|
|
|
(make-u-boot-package "Bananapi_M2_Ultra" "arm-linux-gnueabihf"))
|
|
|
|
|
|
2018-01-22 16:35:06 -05:00
|
|
|
|
(define-public u-boot-a20-olinuxino-lime
|
|
|
|
|
(make-u-boot-package "A20-OLinuXino-Lime" "arm-linux-gnueabihf"))
|
|
|
|
|
|
2018-01-20 14:46:00 -05:00
|
|
|
|
(define-public u-boot-a20-olinuxino-lime2
|
|
|
|
|
(make-u-boot-package "A20-OLinuXino-Lime2" "arm-linux-gnueabihf"))
|
|
|
|
|
|
2018-01-20 14:55:52 -05:00
|
|
|
|
(define-public u-boot-a20-olinuxino-micro
|
|
|
|
|
(make-u-boot-package "A20-OLinuXino_MICRO" "arm-linux-gnueabihf"))
|
|
|
|
|
|
2018-01-20 16:05:16 -05:00
|
|
|
|
(define-public u-boot-nintendo-nes-classic-edition
|
|
|
|
|
(make-u-boot-package "Nintendo_NES_Classic_Edition" "arm-linux-gnueabihf"))
|
|
|
|
|
|
2018-04-29 00:38:05 -04:00
|
|
|
|
(define-public u-boot-wandboard
|
|
|
|
|
(make-u-boot-package "wandboard" "arm-linux-gnueabihf"))
|
|
|
|
|
|
2018-04-29 02:39:10 -04:00
|
|
|
|
(define-public u-boot-mx6cuboxi
|
|
|
|
|
(make-u-boot-package "mx6cuboxi" "arm-linux-gnueabihf"))
|
|
|
|
|
|
2018-05-09 02:59:10 -04:00
|
|
|
|
(define-public u-boot-novena
|
2019-02-06 17:35:54 -05:00
|
|
|
|
(let ((base (make-u-boot-package "novena" "arm-linux-gnueabihf")))
|
|
|
|
|
(package
|
|
|
|
|
(inherit base)
|
|
|
|
|
(description "U-Boot is a bootloader used mostly for ARM boards. It
|
|
|
|
|
also initializes the boards (RAM etc).
|
|
|
|
|
|
|
|
|
|
This U-Boot is built for Novena. Be advised that this version, contrary
|
2019-04-16 00:46:57 -04:00
|
|
|
|
to Novena upstream, does not load u-boot.img from the first partition.")
|
2019-02-06 17:35:54 -05:00
|
|
|
|
(arguments
|
|
|
|
|
(substitute-keyword-arguments (package-arguments base)
|
|
|
|
|
((#:phases phases)
|
|
|
|
|
`(modify-phases ,phases
|
|
|
|
|
(add-after 'unpack 'patch-novena-defconfig
|
|
|
|
|
;; Patch configuration to disable loading u-boot.img from FAT partition,
|
|
|
|
|
;; allowing it to be installed at a device offset.
|
|
|
|
|
(lambda _
|
|
|
|
|
(substitute* "configs/novena_defconfig"
|
2019-04-16 00:46:57 -04:00
|
|
|
|
(("CONFIG_SPL_FS_FAT=y") "# CONFIG_SPL_FS_FAT is not set"))
|
2019-02-06 17:35:54 -05:00
|
|
|
|
#t)))))))))
|
2018-05-09 02:59:10 -04:00
|
|
|
|
|
2018-05-12 05:24:53 -04:00
|
|
|
|
(define-public u-boot-cubieboard
|
|
|
|
|
(make-u-boot-package "Cubieboard" "arm-linux-gnueabihf"))
|
|
|
|
|
|
2018-07-22 03:50:28 -04:00
|
|
|
|
(define-public u-boot-cubietruck
|
|
|
|
|
(make-u-boot-package "Cubietruck" "arm-linux-gnueabihf"))
|
|
|
|
|
|
2018-05-29 00:10:15 -04:00
|
|
|
|
(define-public u-boot-puma-rk3399
|
|
|
|
|
(let ((base (make-u-boot-package "puma-rk3399" "aarch64-linux-gnu")))
|
|
|
|
|
(package
|
|
|
|
|
(inherit base)
|
|
|
|
|
(arguments
|
2021-02-08 10:06:32 -05:00
|
|
|
|
(substitute-keyword-arguments (package-arguments base)
|
|
|
|
|
((#:phases phases)
|
|
|
|
|
`(modify-phases ,phases
|
|
|
|
|
(add-after 'unpack 'set-environment
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(setenv "BL31" (string-append (assoc-ref inputs "firmware")
|
|
|
|
|
"/bl31.elf"))
|
|
|
|
|
#t))
|
|
|
|
|
;; Phases do not succeed on the bl31 ELF.
|
|
|
|
|
(delete 'strip)
|
|
|
|
|
(delete 'validate-runpath)))))
|
2018-05-29 00:10:15 -04:00
|
|
|
|
(native-inputs
|
2021-02-08 10:06:32 -05:00
|
|
|
|
`(("firmware" ,arm-trusted-firmware-rk3399)
|
2018-05-29 00:10:15 -04:00
|
|
|
|
,@(package-native-inputs base))))))
|
|
|
|
|
|
2020-01-31 23:19:11 -05:00
|
|
|
|
(define-public u-boot-qemu-riscv64
|
|
|
|
|
(make-u-boot-package "qemu-riscv64" "riscv64-linux-gnu"))
|
|
|
|
|
|
2020-01-31 20:21:12 -05:00
|
|
|
|
(define-public u-boot-qemu-riscv64-smode
|
2020-02-01 21:07:17 -05:00
|
|
|
|
(let ((base (make-u-boot-package "qemu-riscv64_smode" "riscv64-linux-gnu")))
|
|
|
|
|
(package
|
|
|
|
|
(inherit base)
|
|
|
|
|
(source (origin
|
|
|
|
|
(inherit (package-source u-boot))
|
|
|
|
|
(patches
|
|
|
|
|
(search-patches "u-boot-riscv64-fix-extlinux.patch")))))))
|
2020-01-31 20:21:12 -05:00
|
|
|
|
|
2020-01-31 23:18:12 -05:00
|
|
|
|
(define-public u-boot-sifive-fu540
|
|
|
|
|
(make-u-boot-package "sifive_fu540" "riscv64-linux-gnu"))
|
|
|
|
|
|
2021-06-08 04:06:42 -04:00
|
|
|
|
(define-public u-boot-sifive-unmatched
|
|
|
|
|
(let ((base (make-u-boot-package "sifive_unmatched" "riscv64-linux-gnu")))
|
|
|
|
|
(package
|
|
|
|
|
(inherit base)
|
|
|
|
|
(version (package-version u-boot-2021.07))
|
|
|
|
|
(source (package-source u-boot-2021.07)))))
|
|
|
|
|
|
2019-10-18 16:14:08 -04:00
|
|
|
|
(define-public u-boot-rock64-rk3328
|
|
|
|
|
(let ((base (make-u-boot-package "rock64-rk3328" "aarch64-linux-gnu")))
|
|
|
|
|
(package
|
|
|
|
|
(inherit base)
|
|
|
|
|
(arguments
|
|
|
|
|
(substitute-keyword-arguments (package-arguments base)
|
|
|
|
|
((#:phases phases)
|
|
|
|
|
`(modify-phases ,phases
|
|
|
|
|
(add-after 'unpack 'set-environment
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(let ((bl31 (string-append (assoc-ref inputs "firmware")
|
|
|
|
|
"/bl31.elf")))
|
|
|
|
|
(setenv "BL31" bl31))
|
|
|
|
|
#t))))))
|
|
|
|
|
(native-inputs
|
|
|
|
|
`(("firmware" ,arm-trusted-firmware-rk3328)
|
|
|
|
|
,@(package-native-inputs base))))))
|
|
|
|
|
|
2019-10-18 18:43:09 -04:00
|
|
|
|
(define-public u-boot-firefly-rk3399
|
|
|
|
|
(let ((base (make-u-boot-package "firefly-rk3399" "aarch64-linux-gnu")))
|
|
|
|
|
(package
|
|
|
|
|
(inherit base)
|
|
|
|
|
(arguments
|
|
|
|
|
(substitute-keyword-arguments (package-arguments base)
|
|
|
|
|
((#:phases phases)
|
|
|
|
|
`(modify-phases ,phases
|
2020-12-29 07:25:47 -05:00
|
|
|
|
(add-after 'unpack 'set-environment
|
2019-10-18 18:43:09 -04:00
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(setenv "BL31" (string-append (assoc-ref inputs "firmware")
|
|
|
|
|
"/bl31.elf"))
|
|
|
|
|
#t))
|
|
|
|
|
;; Phases do not succeed on the bl31 ELF.
|
|
|
|
|
(delete 'strip)
|
|
|
|
|
(delete 'validate-runpath)))))
|
|
|
|
|
(native-inputs
|
|
|
|
|
`(("firmware" ,arm-trusted-firmware-rk3399)
|
|
|
|
|
,@(package-native-inputs base))))))
|
|
|
|
|
|
2019-10-14 02:01:53 -04:00
|
|
|
|
(define-public u-boot-rockpro64-rk3399
|
|
|
|
|
(let ((base (make-u-boot-package "rockpro64-rk3399" "aarch64-linux-gnu")))
|
|
|
|
|
(package
|
|
|
|
|
(inherit base)
|
2020-04-20 21:21:07 -04:00
|
|
|
|
(arguments
|
|
|
|
|
(substitute-keyword-arguments (package-arguments base)
|
|
|
|
|
((#:phases phases)
|
|
|
|
|
`(modify-phases ,phases
|
2020-12-29 07:28:16 -05:00
|
|
|
|
(add-after 'patch-rockpro64-config 'set-environment
|
2020-04-20 21:21:07 -04:00
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(setenv "BL31" (string-append (assoc-ref inputs "firmware")
|
|
|
|
|
"/bl31.elf"))
|
|
|
|
|
#t))
|
|
|
|
|
;; Phases do not succeed on the bl31 ELF.
|
|
|
|
|
(delete 'strip)
|
|
|
|
|
(delete 'validate-runpath)))))
|
|
|
|
|
(native-inputs
|
|
|
|
|
`(("firmware" ,arm-trusted-firmware-rk3399)
|
|
|
|
|
,@(package-native-inputs base))))))
|
|
|
|
|
|
|
|
|
|
(define-public u-boot-pinebook-pro-rk3399
|
|
|
|
|
(let ((base (make-u-boot-package "pinebook-pro-rk3399" "aarch64-linux-gnu")))
|
|
|
|
|
(package
|
|
|
|
|
(inherit base)
|
2021-05-01 15:58:25 -04:00
|
|
|
|
(version (package-version u-boot-2021.07))
|
|
|
|
|
(source (package-source u-boot-2021.07))
|
2019-10-14 02:01:53 -04:00
|
|
|
|
(arguments
|
|
|
|
|
(substitute-keyword-arguments (package-arguments base)
|
|
|
|
|
((#:phases phases)
|
|
|
|
|
`(modify-phases ,phases
|
|
|
|
|
(add-after 'unpack 'set-environment
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(setenv "BL31" (string-append (assoc-ref inputs "firmware")
|
|
|
|
|
"/bl31.elf"))
|
|
|
|
|
#t))
|
|
|
|
|
;; Phases do not succeed on the bl31 ELF.
|
|
|
|
|
(delete 'strip)
|
|
|
|
|
(delete 'validate-runpath)))))
|
|
|
|
|
(native-inputs
|
|
|
|
|
`(("firmware" ,arm-trusted-firmware-rk3399)
|
|
|
|
|
,@(package-native-inputs base))))))
|
|
|
|
|
|
2017-10-26 08:52:19 -04:00
|
|
|
|
(define-public vboot-utils
|
|
|
|
|
(package
|
|
|
|
|
(name "vboot-utils")
|
|
|
|
|
(version "R63-10032.B")
|
|
|
|
|
(source (origin
|
|
|
|
|
;; XXX: Snapshots are available but changes timestamps every download.
|
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url (string-append "https://chromium.googlesource.com"
|
|
|
|
|
"/chromiumos/platform/vboot_reference"))
|
|
|
|
|
(commit (string-append "release-" version))))
|
|
|
|
|
(file-name (string-append name "-" version "-checkout"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2018-12-30 09:46:29 -05:00
|
|
|
|
"0h0m3l69vp9dr6xrs1p6y7ilkq3jq8jraw2z20kqfv7lvc9l1lxj"))
|
|
|
|
|
(patches
|
|
|
|
|
(search-patches "vboot-utils-skip-test-workbuf.patch"
|
|
|
|
|
"vboot-utils-fix-tests-show-contents.patch"
|
|
|
|
|
"vboot-utils-fix-format-load-address.patch"))))
|
2017-10-26 08:52:19 -04:00
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:make-flags (list "CC=gcc"
|
2018-12-30 09:46:29 -05:00
|
|
|
|
;; On ARM, we must pass "HOST_ARCH=arm" so that the
|
|
|
|
|
;; ${HOST_ARCH} and ${ARCH} variables in the makefile
|
|
|
|
|
;; match. Otherwise, ${HOST_ARCH} will be assigned
|
|
|
|
|
;; "armv7l", the value of `uname -m`, and will not
|
|
|
|
|
;; match ${ARCH}, which will make the tests require
|
|
|
|
|
;; QEMU for testing.
|
|
|
|
|
,@(if (string-prefix? "arm"
|
|
|
|
|
(or (%current-target-system)
|
|
|
|
|
(%current-system)))
|
|
|
|
|
'("HOST_ARCH=arm")
|
|
|
|
|
'())
|
2017-10-26 08:52:19 -04:00
|
|
|
|
(string-append "DESTDIR=" (assoc-ref %outputs "out")))
|
|
|
|
|
#:phases (modify-phases %standard-phases
|
|
|
|
|
(add-after 'unpack 'patch-hard-coded-paths
|
|
|
|
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
|
|
|
(let ((coreutils (assoc-ref inputs "coreutils"))
|
|
|
|
|
(diffutils (assoc-ref inputs "diffutils")))
|
|
|
|
|
(substitute* "futility/misc.c"
|
|
|
|
|
(("/bin/cp") (string-append coreutils "/bin/cp")))
|
|
|
|
|
(substitute* "tests/bitmaps/TestBmpBlock.py"
|
|
|
|
|
(("/usr/bin/cmp") (string-append diffutils "/bin/cmp")))
|
|
|
|
|
(substitute* "vboot_host.pc.in"
|
|
|
|
|
(("prefix=/usr")
|
|
|
|
|
(string-append "prefix=" (assoc-ref outputs "out"))))
|
|
|
|
|
#t)))
|
|
|
|
|
(delete 'configure)
|
|
|
|
|
(add-before 'check 'patch-tests
|
|
|
|
|
(lambda _
|
|
|
|
|
;; These tests compare diffs against known-good values.
|
|
|
|
|
;; Patch the paths to match those in the build container.
|
|
|
|
|
(substitute* (find-files "tests/futility/expect_output")
|
|
|
|
|
(("/mnt/host/source/src/platform/vboot_reference")
|
|
|
|
|
(string-append "/tmp/guix-build-" ,name "-" ,version
|
|
|
|
|
".drv-0/source")))
|
|
|
|
|
;; Tests require write permissions to many of these files.
|
|
|
|
|
(for-each make-file-writable (find-files "tests/futility"))
|
2019-01-20 01:51:39 -05:00
|
|
|
|
#t))
|
|
|
|
|
(add-after 'install 'install-devkeys
|
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
|
(let* ((out (assoc-ref outputs "out"))
|
|
|
|
|
(share (string-append out "/share/vboot-utils")))
|
|
|
|
|
(copy-recursively "tests/devkeys"
|
|
|
|
|
(string-append share "/devkeys"))
|
|
|
|
|
#t))))
|
2017-10-26 08:52:19 -04:00
|
|
|
|
#:test-target "runtests"))
|
|
|
|
|
(native-inputs
|
|
|
|
|
`(("pkg-config" ,pkg-config)
|
|
|
|
|
|
|
|
|
|
;; For tests.
|
|
|
|
|
("diffutils" ,diffutils)
|
|
|
|
|
("python@2" ,python-2)))
|
|
|
|
|
(inputs
|
|
|
|
|
`(("coreutils" ,coreutils)
|
|
|
|
|
("libyaml" ,libyaml)
|
|
|
|
|
("openssl" ,openssl)
|
|
|
|
|
("openssl:static" ,openssl "static")
|
gnu: util-linux: Move libraries to separate output.
Fixes <https://bugs.gnu.org/37732>.
Reported by Diego Nicola Barbato <dnbarbato@posteo.de>.
* gnu/packages/linux.scm (util-linux)[outputs]: Add "lib".
[arguments]: Update #:configure-flags and the "move-static-libraries" phase
accordingly. Add phases "patch-build-scripts" and "adjust-pkg-config-files".
(e2fsprogs, psm, mtd-utils, f2fs-tools, f2fs-tools-1.7, eudev,
xfsprogs)[inputs]: Change to the "lib" output of UTIL-LINUX.
(btrfs-progs)[inputs]: Remove duplicate UTIL-LINUX inputs and change to use
the "lib" output.
* gnu/packages/admin.scm (pam-mount)[inputs]: Add UTIL-LINUX:LIB.
(testdisk)[inputs]: Change to the "lib" output of UTIL-LINUX.
* gnu/packages/android.scm (abootimg)[inputs]: Likewise.
* gnu/packages/audio.scm (jack-1)[propagated-inputs]: Likewise.
* gnu/packages/bootloaders.scm (syslinux, vboot-utils)[inputs]: Likewise.
* gnu/packages/chez.scm (chez-scheme)[inputs]: Likewise.
* gnu/packages/cryptsetup.scm (cryptsetup, cryptsetup-static)[inputs]: Likewise.
* gnu/packages/databases.scm (postgresql, 4store)[inputs]: Likewise.
* gnu/packages/disk.scm (ndctl, gptfdisk, fdisk, gparted, rmlint,
volume-key)[inputs]: Likewise.
(parted)[inputs]: Likewise.
[native-inputs]: Add UTIL-LINUX.
* gnu/packages/efi.scm (sbsigntools)[inputs]: Add UTIL-LINUX:LIB.
* gnu/packages/engineering.scm (lib3mf)[inputs]: Change to the "lib" output of
UTIL-LINUX.
* gnu/packages/enlightenment.scm (efl)[propagated-inputs]: Likewise.
* gnu/packages/file-systems.scm (glusterfs, jfsutils, zfs)[inputs]: Likewise.
* gnu/packages/firmware.scm (ovmf)[inputs]: Likewise.
* gnu/packages/fontutils.scm (fontconfig)[propagated-inputs]: Likewise.
* gnu/packages/freedesktop.scm (localed)[inputs]: Likewise.
* gnu/packages/glib.scm (glib, appstream-glib)[propagated-inputs]: Likewise.
* gnu/packages/gnome.scm (tracker, gnome-terminal)[inputs]: Likewise.
* gnu/packages/jupyter.scm (xeus)[inputs]: Likewise.
* gnu/packages/kde.scm (kpmcore)[inputs]: Likewise.
* gnu/packages/kodi.scm (crossguid)[inputs]: Likewise.
* gnu/packages/lighting.scm (ola)[inputs]: Likewise.
* gnu/packages/music.scm (libgig)[inputs]: Likewise.
* gnu/packages/nfs.scm (nfs-utils)[inputs]: Likewise.
* gnu/packages/opencog.scm (opencog)[inputs]: Likewise.
* gnu/packages/package-management.scm (msitools)[inputs]: Change to the "lib"
output of UTIL-LINUX.
* gnu/packages/password-utils.scm (pwsafe)[inputs]: Likewise.
* gnu/packages/telephony.scm (pjproject)[propagated-inputs]: Likewise.
* gnu/packages/rdf.scm (rasqal)[inputs]: Likewise.
* gnu/packages/search.scm (xapian)[inputs]: Likewise.
* gnu/packages/sssd.scm (sssd)[native-inputs]: Likewise.
* gnu/packages/storage.scm (ceph)[inputs]: Add UTIL-LINUX:LIB.
* gnu/packages/task-management.scm (taskwarrior)[inputs]: Change to the "lib"
output of UTIL-LINUX.
* gnu/packages/virtualization.scm (libvirt, xen)[inputs]: Likewise.
* gnu/packages/xorg.scm (libsm)[inputs]: Likewise.
2020-01-14 18:24:28 -05:00
|
|
|
|
("util-linux" ,util-linux "lib")))
|
2017-10-26 08:52:19 -04:00
|
|
|
|
(home-page
|
|
|
|
|
"https://dev.chromium.org/chromium-os/chromiumos-design-docs/verified-boot")
|
|
|
|
|
(synopsis "ChromiumOS verified boot utilities")
|
|
|
|
|
(description
|
|
|
|
|
"vboot-utils is a collection of tools to facilitate booting of
|
|
|
|
|
Chrome-branded devices. This includes the @command{cgpt} partitioning
|
|
|
|
|
program, the @command{futility} and @command{crossystem} firmware management
|
|
|
|
|
tools, and more.")
|
|
|
|
|
(license license:bsd-3)))
|
|
|
|
|
|
2017-08-29 14:26:28 -04:00
|
|
|
|
(define-public os-prober
|
|
|
|
|
(package
|
|
|
|
|
(name "os-prober")
|
2021-03-10 18:38:34 -05:00
|
|
|
|
(version "1.78")
|
2017-08-29 14:26:28 -04:00
|
|
|
|
(source
|
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append "mirror://debian/pool/main/o/os-prober/os-prober_"
|
|
|
|
|
version ".tar.xz"))
|
|
|
|
|
(sha256
|
2021-03-10 18:38:34 -05:00
|
|
|
|
(base32 "1sahk72blsrlirly4xlwa8jfxrpwagyn7b81p92q2s9m218rz43f"))))
|
2017-08-29 14:26:28 -04:00
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:modules ((guix build gnu-build-system)
|
|
|
|
|
(guix build utils)
|
2019-02-12 07:20:35 -05:00
|
|
|
|
(ice-9 regex) ; for string-match
|
|
|
|
|
(srfi srfi-26)) ; for cut
|
2020-06-02 12:57:15 -04:00
|
|
|
|
#:make-flags
|
|
|
|
|
(list ,(string-append "CC=" (cc-for-target)))
|
2019-02-12 07:20:35 -05:00
|
|
|
|
#:tests? #f ; no tests
|
2017-08-29 14:26:28 -04:00
|
|
|
|
#:phases
|
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
|
(replace 'configure
|
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
|
(substitute* (find-files ".")
|
|
|
|
|
(("/usr") (assoc-ref outputs "out")))
|
|
|
|
|
(substitute* (find-files "." "50mounted-tests$")
|
|
|
|
|
(("mkdir") "mkdir -p"))
|
|
|
|
|
#t))
|
|
|
|
|
(replace 'install
|
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
|
(define (find-files-non-recursive directory)
|
|
|
|
|
(find-files directory
|
|
|
|
|
(lambda (file stat)
|
|
|
|
|
(string-match (string-append "^" directory "/[^/]*$")
|
|
|
|
|
file))
|
|
|
|
|
#:directories? #t))
|
|
|
|
|
|
|
|
|
|
(let* ((out (assoc-ref outputs "out"))
|
|
|
|
|
(bin (string-append out "/bin"))
|
|
|
|
|
(lib (string-append out "/lib"))
|
|
|
|
|
(share (string-append out "/share")))
|
|
|
|
|
(for-each (cut install-file <> bin)
|
|
|
|
|
(list "linux-boot-prober" "os-prober"))
|
|
|
|
|
(install-file "newns" (string-append lib "/os-prober"))
|
|
|
|
|
(install-file "common.sh" (string-append share "/os-prober"))
|
|
|
|
|
(install-file "os-probes/mounted/powerpc/20macosx"
|
|
|
|
|
(string-append lib "/os-probes/mounted"))
|
|
|
|
|
(for-each
|
|
|
|
|
(lambda (directory)
|
|
|
|
|
(for-each
|
|
|
|
|
(lambda (file)
|
|
|
|
|
(let ((destination (string-append lib "/" directory
|
|
|
|
|
"/" (basename file))))
|
|
|
|
|
(mkdir-p (dirname destination))
|
|
|
|
|
(copy-recursively file destination)))
|
|
|
|
|
(append (find-files-non-recursive (string-append directory "/common"))
|
|
|
|
|
(find-files-non-recursive (string-append directory "/x86")))))
|
|
|
|
|
(list "os-probes" "os-probes/mounted" "os-probes/init"
|
|
|
|
|
"linux-boot-probes" "linux-boot-probes/mounted"))
|
|
|
|
|
#t))))))
|
|
|
|
|
(home-page "https://joeyh.name/code/os-prober")
|
|
|
|
|
(synopsis "Detect other operating systems")
|
|
|
|
|
(description "os-prober probes disks on the system for other operating
|
|
|
|
|
systems so that they can be added to the bootloader. It also works out how to
|
|
|
|
|
boot existing GNU/Linux systems and detects what distribution is installed in
|
|
|
|
|
order to add a suitable bootloader menu entry.")
|
|
|
|
|
(license license:gpl2+)))
|
2021-01-12 16:44:18 -05:00
|
|
|
|
|
|
|
|
|
(define-public ipxe
|
|
|
|
|
;; XXX: 'BUILD_TIMESTAMP' is used to automatically select the newest version
|
|
|
|
|
;; of iPXE if multiple iPXE drivers are loaded concurrently in a UEFI system.
|
|
|
|
|
;;
|
|
|
|
|
;; TODO: Bump this timestamp at each modifications of the package (not only
|
|
|
|
|
;; for updates) by running: date +%s.
|
|
|
|
|
(let ((timestamp "1591706427"))
|
|
|
|
|
(package
|
|
|
|
|
(name "ipxe")
|
2021-01-12 16:44:19 -05:00
|
|
|
|
(version "1.21.1")
|
2021-01-12 16:44:18 -05:00
|
|
|
|
(source (origin
|
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/ipxe/ipxe")
|
|
|
|
|
(commit (string-append "v" version))))
|
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
|
(patches (search-patches "ipxe-reproducible-geniso.patch"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2021-01-12 16:44:19 -05:00
|
|
|
|
"1pkf1n1c0rdlzfls8fvjvi1sd9xjd9ijqlyz3wigr70ijcv6x8i9"))))
|
2021-01-12 16:44:18 -05:00
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:modules ((guix build utils)
|
|
|
|
|
(guix build gnu-build-system)
|
|
|
|
|
(guix base32)
|
|
|
|
|
(ice-9 string-fun)
|
|
|
|
|
(ice-9 regex)
|
|
|
|
|
(rnrs bytevectors))
|
|
|
|
|
#:imported-modules ((guix base32)
|
|
|
|
|
,@%gnu-build-system-modules)
|
|
|
|
|
#:make-flags
|
|
|
|
|
;; XXX: 'BUILD_ID' is used to determine when another ROM in the
|
|
|
|
|
;; system contains identical code in order to save space within the
|
|
|
|
|
;; legacy BIOS option ROM area, which is extremely limited in size.
|
|
|
|
|
;; It is supposed to be collision-free across all ROMs, to do so we
|
|
|
|
|
;; use the truncated output hash of the package.
|
|
|
|
|
(let ((build-id
|
|
|
|
|
(lambda (out)
|
|
|
|
|
(let* ((nix-store (string-append
|
|
|
|
|
(or (getenv "NIX_STORE") "/gnu/store")
|
|
|
|
|
"/"))
|
|
|
|
|
(filename
|
|
|
|
|
(string-replace-substring out nix-store ""))
|
|
|
|
|
(hash (match:substring (string-match "[0-9a-z]{32}"
|
|
|
|
|
filename)))
|
|
|
|
|
(bv (nix-base32-string->bytevector hash)))
|
|
|
|
|
(format #f "0x~x"
|
|
|
|
|
(bytevector-u32-ref bv 0 (endianness big))))))
|
|
|
|
|
(out (assoc-ref %outputs "out"))
|
|
|
|
|
(syslinux (assoc-ref %build-inputs "syslinux")))
|
|
|
|
|
(list "ECHO_E_BIN_ECHO=echo"
|
|
|
|
|
"ECHO_E_BIN_ECHO_E=echo -e"
|
|
|
|
|
|
|
|
|
|
;; cdrtools' mkisofs will silently ignore a missing isolinux.bin!
|
|
|
|
|
;; Luckily xorriso is more strict.
|
|
|
|
|
(string-append "ISOLINUX_BIN=" syslinux
|
|
|
|
|
"/share/syslinux/isolinux.bin")
|
|
|
|
|
(string-append "SYSLINUX_MBR_DISK_PATH=" syslinux
|
|
|
|
|
"/share/syslinux/isohdpfx.bin")
|
|
|
|
|
|
|
|
|
|
;; Build reproducibly.
|
|
|
|
|
(string-append "BUILD_ID_CMD=echo -n " (build-id out))
|
|
|
|
|
(string-append "BUILD_TIMESTAMP=" ,timestamp)
|
|
|
|
|
"everything"))
|
|
|
|
|
#:phases
|
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
|
(add-after 'unpack 'enter-source-directory
|
|
|
|
|
(lambda _ (chdir "src") #t))
|
|
|
|
|
(add-after 'enter-source-directory 'set-options
|
|
|
|
|
(lambda _
|
|
|
|
|
(substitute* "config/general.h"
|
|
|
|
|
(("^//(#define PING_CMD.*)" _ uncommented) uncommented)
|
|
|
|
|
(("^//(#define IMAGE_TRUST_CMD.*)" _ uncommented)
|
|
|
|
|
uncommented)
|
|
|
|
|
(("^#undef.*(DOWNLOAD_PROTO_HTTPS.*)" _ option)
|
|
|
|
|
(string-append "#define " option))
|
|
|
|
|
(("^#undef.*(DOWNLOAD_PROTO_NFS.*)" _ option)
|
|
|
|
|
(string-append "#define " option)))
|
|
|
|
|
#t))
|
|
|
|
|
(delete 'configure) ; no configure script
|
|
|
|
|
(replace 'install
|
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
|
(let* ((out (assoc-ref outputs "out"))
|
|
|
|
|
(ipxe (string-append out "/lib/ipxe"))
|
|
|
|
|
(exts-re
|
|
|
|
|
"\\.(efi|efirom|iso|kkpxe|kpxe|lkrn|mrom|pxe|rom|usb)$")
|
|
|
|
|
(dirs '("bin" "bin-i386-linux" "bin-x86_64-pcbios"
|
|
|
|
|
"bin-x86_64-efi" "bin-x86_64-linux" "bin-i386-efi"))
|
|
|
|
|
(files (apply append
|
|
|
|
|
(map (lambda (dir)
|
|
|
|
|
(find-files dir exts-re)) dirs))))
|
|
|
|
|
(for-each (lambda (file)
|
|
|
|
|
(let* ((subdir (dirname file))
|
|
|
|
|
(fn (basename file))
|
|
|
|
|
(tgtsubdir (cond
|
|
|
|
|
((string=? "bin" subdir) "")
|
|
|
|
|
((string-prefix? "bin-" subdir)
|
|
|
|
|
(string-drop subdir 4)))))
|
|
|
|
|
(install-file file
|
|
|
|
|
(string-append ipxe "/" tgtsubdir))))
|
|
|
|
|
files))
|
|
|
|
|
#t))
|
|
|
|
|
(add-after 'install 'leave-source-directory
|
|
|
|
|
(lambda _ (chdir "..") #t)))
|
|
|
|
|
#:tests? #f)) ; no test suite
|
|
|
|
|
(native-inputs
|
|
|
|
|
`(("perl" ,perl)
|
|
|
|
|
("syslinux" ,syslinux)
|
|
|
|
|
("xorriso" ,xorriso)))
|
|
|
|
|
(home-page "https://ipxe.org")
|
|
|
|
|
(synopsis "PXE-compliant network boot firmware")
|
|
|
|
|
(description "iPXE is a network boot firmware. It provides a full PXE
|
|
|
|
|
implementation enhanced with additional features such as booting from: a web
|
|
|
|
|
server via HTTP, an iSCSI SAN, a Fibre Channel SAN via FCoE, an AoE SAN, a
|
2021-04-21 10:52:47 -04:00
|
|
|
|
wireless network, a wide-area network, an Infiniband network. It
|
|
|
|
|
controls the boot process with a script. You can use iPXE to replace the
|
2021-01-12 16:44:18 -05:00
|
|
|
|
existing PXE ROM on your network card, or you can chainload into iPXE to obtain
|
|
|
|
|
the features of iPXE without the hassle of reflashing.")
|
|
|
|
|
(license license:gpl2+))))
|
|
|
|
|
|