Patchwork Guix on a Dell XPS 13 DE - 9350

login
register
mail settings
Submitter Jan Nieuwenhuizen
Date June 16, 2016, 10:12 p.m.
Message ID <87twgsail1.fsf@gnu.org>
Download mbox | patch
Permalink /patch/13141/
State New
Headers show

Comments

Jan Nieuwenhuizen - June 16, 2016, 10:12 p.m.
Hi,

There were some hurdles I had to get over so sharing my experiences
here.

The XPS ships with Ubuntu 14.04, but uses UEFI boot and GPT disk.
In the bios I selected "legacy" boot and used gdisk (from gptfdisk,
see patch below) to change it to MBR.

The SSD uses the NVMe protocol, which means I needed to include that
module in the initial ramdisk (patch below).  Grub 2.0 cannot handle
NVMe devices and needs a patch from 2014.  I decided to use
grub-2.02~beta3 (patch below...using a custom url because guix does
not like the ~).

I expect we want to include probably patches #1 and #2, we may want
to cherry pick the patch...not sure.

Greetings,
Jan
Leo Famulari - June 16, 2016, 11:31 p.m.
On Fri, Jun 17, 2016 at 12:12:58AM +0200, Jan Nieuwenhuizen wrote:
> Hi,
> 
> There were some hurdles I had to get over so sharing my experiences
> here.
> 
> The XPS ships with Ubuntu 14.04, but uses UEFI boot and GPT disk.
> In the bios I selected "legacy" boot and used gdisk (from gptfdisk,
> see patch below) to change it to MBR.
> 
> The SSD uses the NVMe protocol, which means I needed to include that
> module in the initial ramdisk (patch below).  Grub 2.0 cannot handle
> NVMe devices and needs a patch from 2014.  I decided to use
> grub-2.02~beta3 (patch below...using a custom url because guix does
> not like the ~).
> 
> I expect we want to include probably patches #1 and #2, we may want
> to cherry pick the patch...not sure.
> 
> Greetings,
> Jan
> 

> +(define-public gptfdisk

[...]

> +      ;; (patches
> +      ;;  (search-patches "gdisk.patch"))

Leftover?

> +       ("util-linux" ,util-linux)))

What part of util-linux is used? Since it's a grab-bag of miscellaneous
utilities, it's nice to say in a comment what part is used. Or, if it's
just one component, to use that component as the name. For examples, see
btrfs-progs or ntfs-3g.

> +         (replace 'install

Can you leave a comment saying "No 'install' target", if that's
accurate? Or explain why we replace the install phase.

> * gnu/system/linux-initrd.scm (base-initrd): Add nvme to linux-modules.

Sounds like a good addition.

> * gnu/packages/grub.scm (grub): Change version no 2.02.beta3, use
> custom url symlinked to 2.02~beta3.

We should fix the problem that requires this workaround :)

Patch

From e31dbeff2cb619d9d2589436f5bd71eeb0711431 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Thu, 16 Jun 2016 09:50:27 +0200
Subject: [PATCH 3/3] gnu: Update grub to 2.02~beta3.

* gnu/packages/grub.scm (grub): Change version no 2.02.beta3, use
custom url symlinked to 2.02~beta3.
---
 gnu/packages/grub.scm | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/grub.scm b/gnu/packages/grub.scm
index 31b270c..b7bef89 100644
--- a/gnu/packages/grub.scm
+++ b/gnu/packages/grub.scm
@@ -2,6 +2,7 @@ 
 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -76,20 +77,21 @@ 
 (define-public grub
   (package
     (name "grub")
-    (version "2.00")
+    ;;(version "2.02~beta3")
+    (version "2.02.beta3")
     (source (origin
              (method url-fetch)
-             (uri (string-append "mirror://gnu/grub/grub-"
-                                 version ".tar.xz"))
+             (uri (string-append
+                   ;;"ftp://alpha.gnu.org/gnu/grub/grub-"
+                   "http://janneke.lilypond.org/download/grub-"
+                   version ".tar.xz"))
              (sha256
               (base32
-               "0n64hpmsccvicagvr0c6v0kgp2yw0kgnd3jvsyd26cnwgs7c6kkq"))
-             (patches (search-patches "grub-gets-undeclared.patch"
-                                      "grub-freetype.patch"
-                                      "grub-CVE-2015-8370.patch"))))
+               "18ddwnw0vxs7zigvah0g6a5z5vvlz0p8fjglxv1h59sjbrakvv1h"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags '("--disable-werror")
+       #:tests? #f ;; fail
        #:phases (modify-phases %standard-phases
                   (add-after
                    'unpack 'patch-stuff
-- 
2.8.4