Subject: bug#34356: closed (Re: [bug#34356] [PATCH] gnu: u-boot-novena: Allow booting from raw device offset.)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 11 Feb 2019 10:05:02 +0000

Your bug report

#34356: [PATCH] gnu: u-boot-novena: Allow booting from raw device offset.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
34356: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34356
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#34356] [PATCH] gnu: u-boot-novena: Allow booting from raw device offset.
From: Danny Milosavljevic <[email-masked]>
To: Vagrant Cascadian <[email-masked]>
Cc: [email-masked]
Date: Mon, 11 Feb 2019 11:04:03 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Vagrant,

On Sun, 10 Feb 2019 17:23:28 -0800
Vagrant Cascadian <[email-masked]> wrote:

> The more complicated way would be to make novena-installation-os and/or
> embedded-installation-os smart enough to drop "u-boot.img" in the
> correct place, on the first FAT or EXT* partition of the microSD. That
> is certainly currently over my head to attempt that at the moment.
> 
> I think we had touched on this in the bugs where I introduced
> u-boot-novena in #31404.

Fair enough.  For something as basic as a bootloader, I guess it's better
for it to be contained in one place anyway.  I'm now reasonably sure that
it works fine in this configuration.

I've amended the description and applied your patch to guix master.

(If we wanted to add the original functionality anyway, grub-efi already
requires something like it and could be used as a template).

Subject: [PATCH] gnu: u-boot-novena: Allow booting from raw device offset.
From: Vagrant Cascadian <[email-masked]>
To: [email-masked]
Date: Wed, 06 Feb 2019 14:35:54 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/bootloaders.scm (u-boot-novena): Disable loading u-boot.img
  from FAT partition.
---
 gnu/packages/bootloaders.scm | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 5bd784f73c..40b14fcce8 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -624,7 +624,20 @@ board-independent tools.")))
   (make-u-boot-package "mx6cuboxi" "arm-linux-gnueabihf"))
 
 (define-public u-boot-novena
-  (make-u-boot-package "novena" "arm-linux-gnueabihf"))
+  (let ((base (make-u-boot-package "novena" "arm-linux-gnueabihf")))
+    (package
+      (inherit base)
+      (arguments
+       (substitute-keyword-arguments (package-arguments base)
+         ((#:phases phases)
+          `(modify-phases ,phases
+             (add-after 'unpack 'patch-novena-defconfig
+               ;; Patch configuration to disable loading u-boot.img from FAT partition,
+               ;; allowing it to be installed at a device offset.
+               (lambda _
+                 (substitute* "configs/novena_defconfig"
+                   (("CONFIG_SPL_FAT_SUPPORT=y") "# CONFIG_SPL_FAT_SUPPORT is not set"))
+                 #t)))))))))
 
 (define-public u-boot-cubieboard
   (make-u-boot-package "Cubieboard" "arm-linux-gnueabihf"))
-- 
2.20.1