From d0fcf7a69a7503e8fb5b61a4c1109ebfed208a40 Mon Sep 17 00:00:00 2001 From: Vincent Legoll Date: Sun, 12 Apr 2020 19:54:47 +0200 Subject: [PATCH] gnu: Add iPXE. * gnu/packages/bootloaders.scm (ipxe): New variable. --- gnu/packages/bootloaders.scm | 54 ++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index cadcc937e1..4b1f209540 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2019 nee ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2020 Björn Höfling +;;; Copyright © 2020 Vincent Legoll ;;; ;;; This file is part of GNU Guix. ;;; @@ -834,6 +835,59 @@ to Novena upstream, does not load u-boot.img from the first partition.") `(("firmware" ,arm-trusted-firmware-rk3399) ,@(package-native-inputs base)))))) +(define-public ipxe + (package + (name "ipxe") + (version "1.20.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ipxe/ipxe") + (commit (string-append "v" version)))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "0w7h7y97gj9nqvbmsg1zp6zj5mpbbpckqbbx7bpp6k3ahy5fk8zp")))) + (build-system gnu-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'add-real-make-install + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "src/Makefile" + (("^install :") + (string-append "install :" + "\n\t@$(MKDIR) -p " + (assoc-ref outputs "out") "/bin" + "\n\t@$(CP) $(ALL) " + (assoc-ref outputs "out") "/bin" + "\n\n__old_install :"))) + #t)) + (delete 'configure) + (replace 'build + (lambda _ (with-directory-excursion "src" + (invoke "make" "-j" (number->string + (parallel-job-count)))))) + (replace 'install + (lambda _ (with-directory-excursion "src" + (invoke "make" "install"))))) + #:tests? #f)) + (native-inputs + `(("perl" ,perl) + ("syslinux" ,syslinux) + ("cdrtools" ,cdrtools) + ("mtools" ,mtools) + ("xz" ,xz))) + (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 +wireless network, a wide-area network, an Infiniband network. It allows to +control the boot process with a script. You can use iPXE to replace the +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+))) + (define-public vboot-utils (package (name "vboot-utils") -- 2.26.0