From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:51976) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNgtn-0002e5-Ru for guix-patches@gnu.org; Sun, 12 Apr 2020 14:00:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNgtm-0005cW-HP for guix-patches@gnu.org; Sun, 12 Apr 2020 14:00:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47276) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jNgtm-0005c2-Ck for guix-patches@gnu.org; Sun, 12 Apr 2020 14:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jNgtm-00079Z-DL for guix-patches@gnu.org; Sun, 12 Apr 2020 14:00:02 -0400 Subject: [bug#40579] [RFC PATCH] add iPXE. Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:51765) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNgsx-00021P-Us for guix-patches@gnu.org; Sun, 12 Apr 2020 13:59:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNgsw-0004r2-DO for guix-patches@gnu.org; Sun, 12 Apr 2020 13:59:11 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:54770) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jNgsw-0004pX-4Q for guix-patches@gnu.org; Sun, 12 Apr 2020 13:59:10 -0400 Received: by mail-wm1-x32e.google.com with SMTP id h2so7513734wmb.4 for ; Sun, 12 Apr 2020 10:59:09 -0700 (PDT) Received: from [10.0.0.2] (se167-1-82-242-148-1.fbx.proxad.net. [82.242.148.1]) by smtp.gmail.com with ESMTPSA id y20sm12101659wra.79.2020.04.12.10.59.06 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Apr 2020 10:59:06 -0700 (PDT) From: Vincent Legoll Message-ID: Date: Sun, 12 Apr 2020 19:59:05 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------54210322BF67731B175BE69E" Content-Language: en-US List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 40579@debbugs.gnu.org This is a multi-part message in MIME format. --------------54210322BF67731B175BE69E Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Here is a patch for review that adds iPXE. The licensing is "interesting", see: https://ipxe.org/licensing Is that a problem ? There was no real install target in makefile, so I added one, any hints on how to write that in a cleaner way ? I've put all firmware & rom images in $(out)/bin Is there a better subdirectory to put such files ? The double with-directory-excursion could be handled with a single phase cd'ing into src, but I can't find where I've seen that... WDYT ? -- Vincent Legoll --------------54210322BF67731B175BE69E Content-Type: text/x-patch; charset=UTF-8; name="0001-gnu-Add-iPXE.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0001-gnu-Add-iPXE.patch" >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 --------------54210322BF67731B175BE69E--