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

Previous Next

Package: guix-patches;

Reported by: Vagrant Cascadian <vagrant <at> debian.org>

Date: Wed, 6 Feb 2019 22:42:02 UTC

Severity: normal

Tags: patch

Done: Danny Milosavljevic <dannym <at> scratchpost.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34356 in the body.
You can then email your comments to 34356 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#34356; Package guix-patches. (Wed, 06 Feb 2019 22:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vagrant Cascadian <vagrant <at> debian.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 06 Feb 2019 22:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vagrant Cascadian <vagrant <at> debian.org>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: u-boot-novena: Allow booting from raw device offset.
Date: Wed, 06 Feb 2019 14:35:54 -0800
[Message part 1 (text/plain, inline)]
* 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

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#34356; Package guix-patches. (Sun, 10 Feb 2019 19:00:02 GMT) Full text and rfc822 format available.

Message #8 received at 34356 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Vagrant Cascadian <vagrant <at> debian.org>
Cc: 34356 <at> debbugs.gnu.org
Subject: Re: [bug#34356] [PATCH] gnu: u-boot-novena: Allow booting from raw
 device offset.
Date: Sun, 10 Feb 2019 19:59:54 +0100
[Message part 1 (text/plain, inline)]
Hi Vagrant,

On Wed, 06 Feb 2019 14:35:54 -0800
Vagrant Cascadian <vagrant <at> debian.org> wrote:
>  (define-public u-boot-novena
[...]
> +               ;; Patch configuration to disable loading u-boot.img from FAT partition,
> +               ;; allowing it to be installed at a device offset.

Hmm, why?

https://www.kosagi.com/w/index.php?title=U-boot-novena specifies that it
loads u-boot.img from the first partition.  Is it incorrect?
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#34356; Package guix-patches. (Mon, 11 Feb 2019 01:25:01 GMT) Full text and rfc822 format available.

Message #11 received at 34356 <at> debbugs.gnu.org (full text, mbox):

From: Vagrant Cascadian <vagrant <at> debian.org>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 34356 <at> debbugs.gnu.org
Subject: Re: [bug#34356] [PATCH] gnu: u-boot-novena: Allow booting from raw
 device offset.
Date: Sun, 10 Feb 2019 17:23:28 -0800
[Message part 1 (text/plain, inline)]
On 2019-02-10, Danny Milosavljevic wrote:
> On Wed, 06 Feb 2019 14:35:54 -0800
> Vagrant Cascadian <vagrant <at> debian.org> wrote:
>>  (define-public u-boot-novena
> [...]
>> +               ;; Patch configuration to disable loading u-boot.img from FAT partition,
>> +               ;; allowing it to be installed at a device offset.
>
> Hmm, why?
>
> https://www.kosagi.com/w/index.php?title=U-boot-novena specifies that it
> loads u-boot.img from the first partition.  Is it incorrect?

It's not incorrect, per se, but this was a simple way to get the
install-os functionality to work without significant refactoring.

I just recenty booted and refreshed the guixsd installation on the
novena I had, and was reminded that installation of the bootloader
required manual intervention from the user, and could potentially result
in an unbootable system of the SPL/u-boot.img were sufficiently out os
sync.

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.


live well,
  vagrant
[signature.asc (application/pgp-signature, inline)]

Reply sent to Danny Milosavljevic <dannym <at> scratchpost.org>:
You have taken responsibility. (Mon, 11 Feb 2019 10:05:01 GMT) Full text and rfc822 format available.

Notification sent to Vagrant Cascadian <vagrant <at> debian.org>:
bug acknowledged by developer. (Mon, 11 Feb 2019 10:05:02 GMT) Full text and rfc822 format available.

Message #16 received at 34356-done <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Vagrant Cascadian <vagrant <at> debian.org>
Cc: 34356-done <at> debbugs.gnu.org
Subject: Re: [bug#34356] [PATCH] gnu: u-boot-novena: Allow booting from raw
 device offset.
Date: Mon, 11 Feb 2019 11:04:03 +0100
[Message part 1 (text/plain, inline)]
Hi Vagrant,

On Sun, 10 Feb 2019 17:23:28 -0800
Vagrant Cascadian <vagrant <at> debian.org> 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).
[Message part 2 (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 11 Mar 2019 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 41 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.