unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#34356] [PATCH] gnu: u-boot-novena: Allow booting from raw device offset.
@ 2019-02-06 22:35 Vagrant Cascadian
  2019-02-10 18:59 ` Danny Milosavljevic
  0 siblings, 1 reply; 4+ messages in thread
From: Vagrant Cascadian @ 2019-02-06 22:35 UTC (permalink / raw)
  To: 34356

[-- Attachment #1: Type: text/plain, Size: 1392 bytes --]

* 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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#34356] [PATCH] gnu: u-boot-novena: Allow booting from raw device offset.
  2019-02-06 22:35 [bug#34356] [PATCH] gnu: u-boot-novena: Allow booting from raw device offset Vagrant Cascadian
@ 2019-02-10 18:59 ` Danny Milosavljevic
  2019-02-11  1:23   ` Vagrant Cascadian
  0 siblings, 1 reply; 4+ messages in thread
From: Danny Milosavljevic @ 2019-02-10 18:59 UTC (permalink / raw)
  To: Vagrant Cascadian; +Cc: 34356

[-- Attachment #1: Type: text/plain, Size: 451 bytes --]

Hi Vagrant,

On Wed, 06 Feb 2019 14:35:54 -0800
Vagrant Cascadian <vagrant@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?

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#34356] [PATCH] gnu: u-boot-novena: Allow booting from raw device offset.
  2019-02-10 18:59 ` Danny Milosavljevic
@ 2019-02-11  1:23   ` Vagrant Cascadian
  2019-02-11 10:04     ` bug#34356: " Danny Milosavljevic
  0 siblings, 1 reply; 4+ messages in thread
From: Vagrant Cascadian @ 2019-02-11  1:23 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 34356

[-- Attachment #1: Type: text/plain, Size: 1289 bytes --]

On 2019-02-10, Danny Milosavljevic wrote:
> On Wed, 06 Feb 2019 14:35:54 -0800
> Vagrant Cascadian <vagrant@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#34356: [PATCH] gnu: u-boot-novena: Allow booting from raw device offset.
  2019-02-11  1:23   ` Vagrant Cascadian
@ 2019-02-11 10:04     ` Danny Milosavljevic
  0 siblings, 0 replies; 4+ messages in thread
From: Danny Milosavljevic @ 2019-02-11 10:04 UTC (permalink / raw)
  To: Vagrant Cascadian; +Cc: 34356-done

[-- Attachment #1: Type: text/plain, Size: 884 bytes --]

Hi Vagrant,

On Sun, 10 Feb 2019 17:23:28 -0800
Vagrant Cascadian <vagrant@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).

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-02-11 10:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-06 22:35 [bug#34356] [PATCH] gnu: u-boot-novena: Allow booting from raw device offset Vagrant Cascadian
2019-02-10 18:59 ` Danny Milosavljevic
2019-02-11  1:23   ` Vagrant Cascadian
2019-02-11 10:04     ` bug#34356: " Danny Milosavljevic

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).