From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBIRZ-0003sl-RT for guix-patches@gnu.org; Thu, 18 May 2017 06:14:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dBIRW-0006qR-Nh for guix-patches@gnu.org; Thu, 18 May 2017 06:14:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:49278) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dBIRW-0006qN-IW for guix-patches@gnu.org; Thu, 18 May 2017 06:14:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dBIRW-0005nO-Dp for guix-patches@gnu.org; Thu, 18 May 2017 06:14:02 -0400 Subject: bug#26339: [PATCH] bootloader: extlinux: Add extlinux-bootloader-gpt. References: <20170402134916.2871-1-m.othacehe@gmail.com> In-Reply-To: <20170402134916.2871-1-m.othacehe@gmail.com> Resent-Message-ID: From: Mathieu Othacehe Date: Thu, 18 May 2017 12:13:26 +0200 Message-Id: <20170518101326.11450-1-m.othacehe@gmail.com> 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: 26339@debbugs.gnu.org * gnu/bootloader/extlinux.scm (extlinux-bootloader-gpt): New exported variable. (install-extlinux)[mbr]: New argument. (install-extlinux-mbr, install-extlinux-gpt): New variables. (extlinux-bootloader)[installer]: Use install-extlinux-mbr. --- Hi, Here's a patch to add gpt support to extlinux. I will be used later on system tests based on gpt. Thanks, Mathieu gnu/bootloader/extlinux.scm | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/gnu/bootloader/extlinux.scm b/gnu/bootloader/extlinux.scm index 12fa447c3..8f928ff22 100644 --- a/gnu/bootloader/extlinux.scm +++ b/gnu/bootloader/extlinux.scm @@ -26,7 +26,7 @@ #:use-module (guix records) #:use-module (guix utils) #:export (extlinux-bootloader - syslinux-bootloader)) + extlinux-bootloader-gpt)) (define* (extlinux-configuration-file config entries #:key @@ -92,7 +92,7 @@ TIMEOUT ~a~%" (string-append "if=" if) (string-append "of=" of))))) -(define install-extlinux +(define (install-extlinux mbr) #~(lambda (bootloader device mount-point) (let ((extlinux (string-append bootloader "/sbin/extlinux")) (install-dir (string-append mount-point "/boot/extlinux")) @@ -102,9 +102,15 @@ TIMEOUT ~a~%" (find-files syslinux-dir "\\.c32$")) (unless (and (zero? (system* extlinux "--install" install-dir)) - (#$dd 440 1 (string-append syslinux-dir "/mbr.bin") device)) + (#$dd 440 1 (string-append syslinux-dir "/" #$mbr) device)) (error "failed to install SYSLINUX"))))) +(define install-extlinux-mbr + (install-extlinux "mbr.bin")) + +(define install-extlinux-gpt + (install-extlinux "gptmbr.bin")) + ;;; @@ -115,6 +121,11 @@ TIMEOUT ~a~%" (bootloader (name 'extlinux) (package syslinux) - (installer install-extlinux) + (installer install-extlinux-mbr) (configuration-file "/boot/extlinux/extlinux.conf") (configuration-file-generator extlinux-configuration-file))) + +(define extlinux-bootloader-gpt + (bootloader + (inherit extlinux-bootloader) + (installer install-extlinux-gpt))) -- 2.13.0