From patchwork Tue Apr 14 15:11:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vincent Legoll X-Patchwork-Id: 21246 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EE04F27BBE4; Tue, 14 Apr 2020 18:05:36 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 5920C27BBE1 for ; Tue, 14 Apr 2020 18:05:36 +0100 (BST) Received: from localhost ([::1]:35590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOP0B-0005QA-PN for patchwork@mira.cbaines.net; Tue, 14 Apr 2020 13:05:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33629) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOkw-0005Yq-GE for guix-patches@gnu.org; Tue, 14 Apr 2020 12:49:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOOku-0002Iw-Mp for guix-patches@gnu.org; Tue, 14 Apr 2020 12:49:50 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51237) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jONEI-0005l5-76 for guix-patches@gnu.org; Tue, 14 Apr 2020 11:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jONEI-0007gc-2c for guix-patches@gnu.org; Tue, 14 Apr 2020 11:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#40579] [PATCH v3] gnu: Add iPXE. Resent-From: Vincent Legoll Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 14 Apr 2020 15:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40579 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tobias Geerinckx-Rice , 40579@debbugs.gnu.org Received: via spool by 40579-submit@debbugs.gnu.org id=B40579.158687710829525 (code B ref 40579); Tue, 14 Apr 2020 15:12:02 +0000 Received: (at 40579) by debbugs.gnu.org; 14 Apr 2020 15:11:48 +0000 Received: from localhost ([127.0.0.1]:34550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jONDy-0007g2-3w for submit@debbugs.gnu.org; Tue, 14 Apr 2020 11:11:48 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:39272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jONDv-0007fo-Tn for 40579@debbugs.gnu.org; Tue, 14 Apr 2020 11:11:40 -0400 Received: by mail-wm1-f65.google.com with SMTP id y24so14365124wma.4 for <40579@debbugs.gnu.org>; Tue, 14 Apr 2020 08:11:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=SmjTD2DfxjJzBM7zTVPuGCekh62Qa6LQYUznxigHjjA=; b=avVLl/cUH2E8kKXgoEPnMgJ4OtjAoanW3EQWzMT6ySmKF+TIVY9NdpF1BzYazK1hWL /2H7ved4cYAYLcwuA0ihrlb9f/PmsLesjkhxHQNxOTIuMcwQqvghY80pdh2y8EoH400d jTB5Fxo+GhpXHoHeXgipee/wcF6FqjmIgS4ruH64/qiKojTFZfhEOPB/TbhsO5YI9Tm7 v+V09ukkDKUrH7qSfNaTE6OPkbUO4CeO9zqJMCCPg3JILsaHIWjhCQ0A1lBIctvxvYpu rEG7Vzwclx6fGfd5kr2sAloou1Q4/HOp/rMNmtScDFxQmU9FgQthnyC36umyBipEclL2 PUAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=SmjTD2DfxjJzBM7zTVPuGCekh62Qa6LQYUznxigHjjA=; b=VTVEmSBcMnEpLSG8lplgpWtnMbwuYb8a7SS2kGe8YcULEfFnTyy/HSUnZT6X6a0xY9 zT83KPn6be8s0OAblGo3jBcwCBsEVEQyFluzf0G7S2NyiLd1t77pbZQXlUHpFcg9ZyVm /G+WSiYkxdgEo8ZM9wqmxMnaacVHkqHC9VuIMwmTvEmU0f4uPkDBTWu/UJanUJVcDw4q 8akNWrMRlOeRrQKXFq04cKx2AKsVo5W6EiGQXH5rRNi0C43X06XpoPLs5Vq32WMXZtiE DTGNT5a29gK/S0uXaZCVwnJtbHcrTzm/JUSsHgCGm5fomlqjjWQzYhCIm/3dkq0TjLq1 PGzw== X-Gm-Message-State: AGi0PuY6gMKU3Gt1/LQyFRsi5bxRZJHR+yS/ZjU5jLPQDNJbmlJwiz45 rr7en0VROa8RwJd6RnlnRiCocmXTaz8= X-Google-Smtp-Source: APiQypLcvHF5OMb045qqoOlcxKmVTeMPuMyx2mpN38GHk9qvOCBrnhEYLSjD1sHsmBf/6PHrS8cfTg== X-Received: by 2002:a7b:c118:: with SMTP id w24mr280443wmi.173.1586877093342; Tue, 14 Apr 2020 08:11:33 -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 g74sm19248751wme.44.2020.04.14.08.11.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Apr 2020 08:11:31 -0700 (PDT) References: <87tv1ommhu.fsf@nckx> <20200412232831.5876-1-me@tobias.gr> From: Vincent Legoll Message-ID: Date: Tue, 14 Apr 2020 17:11:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200412232831.5876-1-me@tobias.gr> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hello, On 13/04/2020 01:28, Tobias Geerinckx-Rice wrote: > The image still isn't reproducible, but it has much fewer dates in it > now and it actually boots ;-) [citation needed]. I tried it in qemu, got confused by its own ipxe stack, but I think it then went to isolinux which is from the ipxe.iso image... > I've silenced some other annoying warnings during the build, and > applied some of my suggestions from my previous mail (not all though — > please do send a V3). This new patch has the following changes: * used git-file-name * build everything, as I didn't know what subset to choose * install everything in ...-ipxe-1.20.1/lib/ipxe with subdirs for per-arch binaries: bin-i386, etc. You spoke about lib but put them in share, so I choose to change to the former * do the install phase in scheme, as it was easier to handle the above item than to generate a proper makefile target * only install files with specified extensions, this will get rid of the .a and other irrelevant files > Neither mtools nor XZ were ever used. Why were they there? I initially added the inputs in bulk from the build instructions on the website, and forgot to check their usefulness before sending the patch RFC. From a9313c42e8e07c501f1991ff98001bb3fc908584 Mon Sep 17 00:00:00 2001 From: Vincent Legoll Date: Mon, 13 Apr 2020 01:28:31 +0200 Subject: [PATCH] gnu: Add iPXE. * gnu/packages/bootloaders.scm (ipxe): New variable. Co-authored-by Tobias Geerinckx-Rice --- gnu/packages/bootloaders.scm | 82 +++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index cadcc937e1..23dda99b2a 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -7,10 +7,11 @@ ;;; Copyright © 2016, 2017 Danny Milosavljevic ;;; Copyright © 2016, 2017 David Craven ;;; Copyright © 2017, 2018 Efraim Flashner -;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice +;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice ;;; 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,85 @@ 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 (git-file-name name version)) + (sha256 + (base32 + "0w7h7y97gj9nqvbmsg1zp6zj5mpbbpckqbbx7bpp6k3ahy5fk8zp")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (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=" (assoc-ref %build-inputs "syslinux") + "/share/syslinux/isolinux.bin") + + ;; Build reproducibly. + "BUILD_ID_CMD=echo -n 0x78697547" + "everything") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'enter-source-directory + (lambda _ (chdir "src") #t)) + (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-before 'configure 'use-xorriso + ;; Use xorriso's mkisofs emulation, which is better maintained and + ;; respects SOURCE_DATE_EPOCH to create a reproducible image. + (lambda _ + (substitute* "util/geniso" + ((" genisoimage ") " \"xorriso -as mkisofs\" ")) + #t)) + (delete 'configure) ; no configure script + (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 +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