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

  • Done
  • quality assurance status badge
Details
2 participants
  • Danny Milosavljevic
  • Vagrant Cascadian
Owner
unassigned
Submitted by
Vagrant Cascadian
Severity
normal

Debbugs page

Vagrant Cascadian wrote 6 years ago
(address . guix-patches@gnu.org)
87y36s1r5h.fsf@ponder
* 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(-)

Toggle diff (28 lines)
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
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCXFthSgAKCRDcUY/If5cW
qpBUAQCYIJolQ41EfBHjeC0a7P6o3ytJFhWc0N6oBgf9yRls8gEAuM3ljXGTEB5J
e1tocD17yf3VZi+WO2Dzs9wn0oY12wI=
=iWZ+
-----END PGP SIGNATURE-----

Danny Milosavljevic wrote 6 years ago
(name . Vagrant Cascadian)(address . vagrant@debian.org)(address . 34356@debbugs.gnu.org)
20190210195954.107d21a0@scratchpost.org
Hi Vagrant,

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

Hmm, why?

loads u-boot.img from the first partition. Is it incorrect?
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlxgdKoACgkQ5xo1VCww
uqU66wf+I8uckfMy/Jdr5Nt1PfGnFhNSddgn1mSZZ04ds3Wh+ImcuDihcH8LOmSQ
+3yCG/q6UKZBQbGP+jqjJoUzxBPXv01dq/Lgo3fhIKDWBX6zksZrYUEP0sC1i1AJ
PEiuL25rVgpo73ez+fqxyKst5uSti0tzQogct2G7d0lGNyjcioDV0ZUvEHHmBmMh
qe1Re+UDXJdaMBTai7set6WBkoX1JmKXKXtThBYBe4E9lqASO5611X3ScAsI5irX
d9cHQpYPO1pdZP1WSKPQVvWFixUbim843sIqengPsZMa4oqy9CI8JapulsY/0Y5S
aezREx2Ko6QrSVcsxEHAduJ7oj1EEQ==
=22tA
-----END PGP SIGNATURE-----


Vagrant Cascadian wrote 6 years ago
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 34356@debbugs.gnu.org)
87k1i73ypb.fsf@ponder
On 2019-02-10, Danny Milosavljevic wrote:
Toggle quote (12 lines)
> 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
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCXGDOkQAKCRDcUY/If5cW
qt6pAQC5qzA62DU5zb7Hbhm23Y6wBqwAD7vqlTctvjpiidrr/QEAq4ottfPRqP92
4B+Rg9t7mBiIUW/e2WU0KbswBLxUXg4=
=YdON
-----END PGP SIGNATURE-----

Danny Milosavljevic wrote 6 years ago
(name . Vagrant Cascadian)(address . vagrant@debian.org)(address . 34356-done@debbugs.gnu.org)
20190211110403.2c03580c@scratchpost.org
Hi Vagrant,

On Sun, 10 Feb 2019 17:23:28 -0800
Vagrant Cascadian <vagrant@debian.org> wrote:

Toggle quote (8 lines)
> 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).
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlxhSJMACgkQ5xo1VCww
uqXhLwf/XPfw2E+bwINlzet2Qjxr9OgJ2RYBZpQIWiOVT6yaq9fNBaj04GAAkaJt
oSZ9dUO5CDMwz98HeW4F+2RNyKJ0HHpLNGGL8xSPSyp5GOLgZHrUKoei/CD+4eR0
pbXicDT6Kg6X5CnDHBlN2x0bWo6NB0F6/uF7N/LfiJg53Uuo5SdQgytwE9fNNiih
gDiO0NObbIiUgSJOtRMDCe+s9VL8A0axXvVNeDXQlrH7SOudsu+sJ56BlpA4ihg/
GXXNof8ObDH74M1hSkiqc+BhrgKbmNHol+2dsinCTgkgHJkibOxfujkEjdsjgXJF
AoAyIel4TQBd8yFBuEaClcToUa4Uvw==
=8EPR
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 34356@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 34356
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help