[PATCH] Install guix system on Raspberry Pi

OpenSubmitted by Stefan.
Details
4 participants
  • Danny Milosavljevic
  • phodina
  • Stefan
  • Vagrant Cascadian
Owner
unassigned
Severity
normal
S
S
Stefan wrote on 9 May 2021 17:32
Patches to install guix system on Raspberry Pi
(address . guix-patches@gnu.org)
19E4796A-B0DB-444F-8773-2E8D3EF6132D@vodafonemail.de
Hi!

This patch series adds support for the Raspberry Pi. It allows to use ‘sudo -E guix system init … /mnt’ with the root partition mounted at /mnt and the boot partition mounted at /mnt/boot/efi, as you would expect it for a PC with UEFI. Installing for netboot is possible as well.

It is currently not possible to build an image with this patch series, because of the intercepting handling for efi system image creation.

Some of these patches are generic and not related to the Raspberry Pi. I hope they will be a useful contribution for everyone.

Here is a quick overview of the single patches:

01: Disable the tests on aarch64 for qemu-minimal, because it is non-deterministic but needed to build grub.

02: Rework the grub-efi-netboot-bootloader and add a grub-efi-netboot-removable-bootloader which then are pre-installed. This allows a simplification of the efi-bootloader-chain, as these pre-installed bootloaders just need to be copied and can therefore easily be collected in a bootloader-profile.

03: A new build-side module to modify a defconfig. It is used to customize U-Boot and Linux packages.

04: Customized and pre-installed U-Boot packages for the Raspberry Pi.

05: Fixed the EXTRAVERSION variable used to build Linux, so that the extra-version argument will be visible with uname.

06: New function to modify a Linux package by using another defconfig and/or adding or removing configurations.

07: Raspberry Pi specific defconfig objects.

08: Some helpers to construct config.txt files for the Raspberry Pi firmware.

09: A function to create a package with device-tree files from a Linux package for the Raspberry Pi.

10: A bootloader for the Raspberry Pi. Additionally two examples of operating-system definitions to boot from local storage or over network, the latter is making necessary configuration changes to Linux.

The firmware topic is excluded. In the same way that guix assumes that some UEFI firmware is already present on a PC, this patch series assumes that a firmware to start U-Boot is already present.

The grub bootloaders are usable on PCs as well. In contrast to the normal grub-efi, all grub files are copied to the EFI system partition, instead of the root partition. This is a side effect of the netboot capability. Maybe this is helpful for some spacial cases. I realized for example that the normal grub-efi locates the partition containing the grub.cfg by a device name like (hd0,gpt1), this may be problematic when adding disks to a system. The new grub bootloaders determine the partition by UUID.

The new possibility to customize Linux with (modify-linux) will be useful for anyone in need to do small configuration changes. There is also the possibility to pass an own defconfig file to this function. It can either be the name of a defconfig file from the Linux sources, or it can be a file-like object, like produced by (local-file) or possibly downloaded with the new (make-defconfig) function.


Bye

Stefan
S
S
Stefan wrote on 16 May 2021 14:46
(address . 48314@debbugs.gnu.org)
53799D56-08BA-401A-BC09-81BA61736AAC@vodafonemail.de
Hi!

There were errors in the patches 05 and 06 in the EXTRAVERSION handling and in the modify-linux function.

Here an updated patch series. They apply to commit f661e6883ec345258634940ce5d52957e1bb90c3.


Bye

Stefan
D
D
Danny Milosavljevic wrote on 19 Jun 2021 20:11
(name . Stefan)(address . stefan-guix@vodafonemail.de)
20210619201103.69502840@scratchpost.org
Hi Stefan,

Thanks!

Pushed 05-gnu-linux-correct-name-of.patch to guix master as commit b04cba9ee533945f90ffd72637f064c60188f945.

(I've also started testing the other patches of this patchset, but it will take a while)

Toggle diff (36 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 84ea849108..51e692a8c3 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -749,9 +749,9 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
 
 (define* (make-linux-libre version hash-string supported-systems
                            #:key
+                           (extra-version #f)
                            ;; A function that takes an arch and a variant.
                            ;; See kernel-config for an example.
-                           (extra-version #f)
                            (configuration-file #f)
                            (defconfig "defconfig")
                            (extra-options %default-extra-linux-options)
@@ -770,9 +770,9 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
 
 (define* (make-linux-libre* version source supported-systems
                             #:key
+                            (extra-version #f)
                             ;; A function that takes an arch and a variant.
                             ;; See kernel-config for an example.
-                            (extra-version #f)
                             (configuration-file #f)
                             (defconfig "defconfig")
                             (extra-options %default-extra-linux-options))
@@ -838,7 +838,8 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
                  (format #t "`CROSS_COMPILE' set to `~a'~%"
                          (getenv "CROSS_COMPILE"))))
 
-             (setenv "EXTRA_VERSION" ,extra-version)
+             (setenv "EXTRAVERSION" ,(and extra-version
+                                          (string-append "-" extra-version)))
 
              (let ((build  (assoc-ref %standard-phases 'build))
                    (config (assoc-ref (or native-inputs inputs) "kconfig")))
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAmDOMzcACgkQ5xo1VCww
uqVnVgf+MFlQTHVvJg/06G3HbaXgAe0tqPql7swHL83tSPikO1XRB9VjGp2FdzSH
NqFiGnGhVwUboEH4x3i6DuK8BOPz2A6Xc8aUDG4taNr0Tc9rttde5qg7cOY5lzj5
4dJuDURrUvvM5HQir73Kb/kgkAqvpqLQMwESl6uYE6nPDdLZaQLXuSYclnkrVFAI
MpViIUWfEVuMJlKId59YnzSXcoTgFwHgFN7SO1dGAyjL9Dl4+EqQMWkUAR1UQ32s
oXEaapihBsIN+bkNA9iSDXSTM02mJvdg0vDjEsFARSIzsK4x1n/2TC7Um+Fzq6Hp
Dr2r5W3qo9c8pOvHYWxbdyjNCHN/Tw==
=f5GG
-----END PGP SIGNATURE-----


D
D
Danny Milosavljevic wrote on 19 Jun 2021 20:13
(name . Stefan)(address . stefan-guix@vodafonemail.de)(address . 48314@debbugs.gnu.org)
20210619201311.7f3c5f60@scratchpost.org
Hi Stefan,

Since bug 43534 is closed, does that mean I can drop patch 01-gnu-qemu-disable-tests-on.patch ?
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAmDOM7gACgkQ5xo1VCww
uqVt6gf/YjZphtgKR4fzrQCi9gra8qv1hMqQvAPlE1MKha8AFUEPnHI29vIKX/pT
w2TUUEoh10mk0yfOD+V+WhU4YB3PyN1x6J86iAIF3dY9MPejh/vPWxUsMXsY3uVH
VyKDwYjfkHJbDlS3hr4wVXHic+IKixR3tBF4myXpyA5IVSqL/92Q1EWCTH9CVEby
5E9qH9tgGhoCbuCtYOSeNuhS+W5z2YirRaogcSRaNS7zzH7eNBWSxXuehfBYDHX+
+M5ZeJSu3bKghk2CK5x6ioxbGxe/lv97fy+vPtVN5OX7Nff5OQBrCc7yhdhoVe0b
AFsbNwinvUkU1xRhcNOSmQRMZcRJOg==
=QWVZ
-----END PGP SIGNATURE-----


D
D
Danny Milosavljevic wrote on 19 Jun 2021 21:04
(name . Stefan)(address . stefan-guix@vodafonemail.de)(address . 48314@debbugs.gnu.org)
20210619210417.67c21720@scratchpost.org
Hi Stefan,

In 04-gnu-bootloader-add-u-boot.patch, I think that having #:name is too magical
(it still only replaces part of the package name, and then still only after
substitution). But if made non-magical, then it has too little benefit.

Likewise for #:description.

If it's alright with you, can we just drop #:name xxx and #:description xxx
altogether and instead do:

(define-public u-boot-rpi-3-efi
(package
(inherit
(make-preinstalled-u-boot-package
"rpi_3_32b"
"arm-linux-gnueabihf"
#:name "rpi-3-efi"
#:configs %u-boot-rpi-efi-configs
#:description %u-boot-rpi-efi-description-32-bit))
(name "u-boot-rpi-3-efi")
(description %u-boot-rpi-efi-description-32-bit)))

And similar for all the other u-boot definitions, and for
the usage of make-u-boot-package inside make-preinstalled-u-boot-package ?

Or are there upsides to doing it like you did it?

I'm aware that the same can be said for "board" ... which is used already.
However, that parameter is also used for something else, so it needs to be there.

NAME isn't used for anything else but for doing what a regular package inherit
could do anyway. Is there a downside when using package inherit?
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAmDOP7EACgkQ5xo1VCww
uqVAaAf9HBxCMDHNFiQOsIsHVDFut+nWPG+PQGUa/IvGqBZglqoAZU/PH1XpmAhB
kuF4mcd4OUl88BADffwa2ur3ymgdrxYZweOlEZNPg5GoqoJd9LoEGjBJdfU+l4kK
/aWZlDWxLSX1LLRZGO5vIydWdEO+ClzRPmVit1z6UnGCZOLrs2hpnxNVoAI/7VaK
aVLhfskhoiR98rUOH5RseV2vxzafpkWL7QEkMbnUieE8WnNmi4ziYWADlJmnJjBc
n0gIoIrKdKoITdRME1oJM1kt/E4wC0nK5vdzn9/JtnYlp3saHgxJb4wbSxWNcbLW
S22zXd1f9GsnncLbh9wtJJzCNdGgLQ==
=1Gd1
-----END PGP SIGNATURE-----


D
D
Danny Milosavljevic wrote on 19 Jun 2021 21:10
(name . Stefan)(address . stefan-guix@vodafonemail.de)
20210619211026.5eb44073@scratchpost.org
Hi Mark,
Hi Leo,

could you look at 06-gnu-linux-new-function-to.patch of this patchset?

It provides the user a means of (slightly) editing kernel configs using a
high-level interface, called "modify-linux".

What do you think?

@Stefan: On the other hand, I'm not sure of the general utility of make-defconfig.
I've never needed something like it in decades. Is it worth exporting as public
from (gnu packages linux) ? Sounds like a too weird special case to have general
utility.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAmDOQSIACgkQ5xo1VCww
uqX35Qf/UePQutH3t4R3n2mL1izoKqJD7RNq+4T6RYkC+Ic8I4w3+aig9akcAmR0
7WxTZ33N3bhhV05VrMH8kyZftlSQky6JfslqgxIkJXFZwi81Qf+2unr5+GAaVdy5
+ATIRs2/M4C+/Xs55dMoVaOpw4ZfhGcG4nVKLkt3UbUdxSA7ZS4B3V/UwvzpF2NQ
COTP9VzrqEzH8aVlGgWgOn/XuV4YxLMUrNFncTegjtDs/HVnq1NlhBkCwVGEw2+a
g7mF2O/QbEV2GKu12jipQWf6+fajBqCaNEuYSvwN/ny+x1p+f8PrB5+spBadFdwf
7rVmslqAuLXnUFV+4RClU3pRfjhGRg==
=qGer
-----END PGP SIGNATURE-----


S
S
Stefan wrote on 19 Jun 2021 21:10
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 48314@debbugs.gnu.org)
D30A68B9-D3C1-4DF7-BE68-7ECE39EE296E@vodafonemail.de
Hi Danny!

Toggle quote (2 lines)
> Since bug 43534 is closed, does that mean I can drop patch 01-gnu-qemu-disable-tests-on.patch ?

Yes.

On the other side I have a bad experience with qemu substitutes for aarch64 and building qemu on a Raspberry takes a night and then still fails during the test. I hope the substitute situation improves, otherwise this patch should still be considered.


Bye

Stefan
S
S
Stefan wrote on 19 Jun 2021 21:18
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 48314@debbugs.gnu.org)
56852507-062B-4242-8584-488E691DCD84@vodafonemail.de
Hi Danny!

Toggle quote (3 lines)
> If it's alright with you, can we just drop #:name xxx and #:description xxx
> altogether

That’s OK.


Bye

Stefan
S
S
Stefan wrote on 19 Jun 2021 22:21
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
897B7FF7-24C1-4B96-8441-415596267E99@vodafonemail.de
Hi!

Toggle quote (2 lines)
> @Stefan: On the other hand, I'm not sure of the general utility of make-defconfig.

There is currently no simple way change the Linux configuration. Also by modifying the final .config as of today (which kind of contains all CONFIG_…-variables), as far as I know dependencies will not be resolved and conflicting configurations can easily happen.

A defconfig however gets striped down to a minimum of required CONFIG_…-variables and all “missing” ones get either default values or get determined through dependecies. So adding /removing/changing some few configurations to a defconfig is less error-prone. Further defconfig files are easier to maintain in git. There is a reason that only defconfig files are maintained in the Linux sources.

Please note that the patch allows to select a defconfig file from the Linux sources (if the parameter is a string), and also to provide an own defconfig file (if it is a file-like object).

Toggle quote (2 lines)
> Sounds like a too weird special case to have general utility.

Well, there is the need already in Guix to have e.g. the predefined linux-libre-arm64-generic kernel, wich just uses a certain defconfig file from the Linux sources. But this possibility is not exported.

There are many defconfig files for all sorts of boards, especially for arm32. Why shouldn’t we allow to use any of these? Why should users be restrict to “selected” configurations? Why should Guix’ kernel configuration be preferred over the plain x86_64_defconfig?

And take a look at the last patch: In order to make that kernel boot on a Raspberry from an NFS root, some few configurations are missing, which can easily be added with the “modify-linux” function. By the way, maybe “customize-linux” would be a better name.

And there is another patch from me to make the NFS root test pass. As the Linux kernel build by Guix is not able to boot over NFS root in qemu, I used the same function there to add the missing configurations.

Oh, and finally, I need the same underlying kconfig.scm and a similar defconfig modification for U-Boot as well, which allowed me to simplify the existing U-Boot packages.


Bye

Stefan
S
S
Stefan wrote on 28 Jul 2021 20:58
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
BDB9E76C-37FF-4033-81C1-9D5F0AA575F2@vodafonemail.de
Hi Danny!

Are there any news on this topic¹?


Bye

Stefan


S
S
Stefan wrote on 31 Oct 2021 23:07
(address . 48314@debbugs.gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
AFD31F40-6691-4B53-ACA9-7F821D139124@vodafonemail.de
Hi!

I did a rebase of the patch series to avoid bit-rotting. One patch got obsolete meanwhile.

This series applies on GIT commit 1a80b8909a521b91d30649a011b0257d0fadc18c.


Bye

Stefan
S
S
Stefan wrote on 13 Nov 2021 14:57
Adding patch tags
(address . control@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
BD1F8187-4952-4B75-A76E-F06C79A4BCF6@vodafonemail.de
tags 47744 + patch
tags 48314 + patch
block 47744 by 48314
retitle 48314 [PATCH] Install guix system on Raspberry Pi
retitle 47744 [PATCH] nfs-root test is failing
quit

Hi Ludovic!

Just for your information: The nfs-root test is kind of fixed, it was once blocking some other issue that you linked.


Bye

Stefan
V
V
Vagrant Cascadian wrote on 13 Nov 2021 19:05
Re: [bug#48314] Patches to install guix system on Raspberry Pi
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
87czn4aq2s.fsf@ponder
On 2021-10-31, Stefan wrote:
Toggle quote (4 lines)
> I did a rebase of the patch series to avoid bit-rotting. One patch got obsolete meanwhile.
>
> This series applies on GIT commit 1a80b8909a521b91d30649a011b0257d0fadc18c.

And still applies on master as of
193d7b5b450d2004c26720e488a9cce930542e9e :)

Subject: [PATCH 3/8] * gnu/packages/bootloader.scm (make-u-boot-package): Add
keyword parameters 'name' and 'description'.
...
(u-boot-rpi-0-w, u-boot-rpi, u-boot-rpi-2, u-boot-rpi-3,
u-boot-rpi-4, u-boot-rpi-64, u-boot-rpi-0-w-efi, u-boot-rpi-efi,
u-boot-rpi-2-efi, u-boot-rpi-3-efi, u-boot-rpi-4-efi, u-boot-rpi-efi-64): New
packages.

The u-boot-rpi-0-w and u-boot-rpi variants are ARMv6 boards, and Guix's
armhf baseline is ARMv7, so those won't work with guix system. Are there
other use-cases for providing u-boot builds for these boards?

Upstream provides defconfigs for these variants:

armv6 variants (unsupported on guix's armhf, maybe other use-cases?):

rpi_0_w
rpi

armhf-capable variants:

rpi_2
rpi_3_32b
rpi_4_32b

aarch64 variants:

rpi_3
rpi_3_b_plus
rpi_4
rpi_arm64 (supports rpi 3 and 4 variants?)


+(define-public u-boot-rpi-3
+ (make-preinstalled-u-boot-package
+ "rpi_3_32b"
+ "arm-linux-gnueabihf"
+ #:name "rpi-3"
+ #:description %u-boot-rpi-description-32-bit))

I would name this "u-boot-rpi-3-32b"


+(define-public u-boot-rpi-4
+ (make-preinstalled-u-boot-package
+ "rpi_4_32b"
+ "arm-linux-gnueabihf"
+ #:name "rpi-4"
+ #:description %u-boot-rpi-description-32-bit))

And this "u-boot-rpi-4-32b".

+(define-public u-boot-rpi-64
+ (make-preinstalled-u-boot-package
+ "rpi_arm64"
+ "aarch64-linux-gnu"
+ #:name "rpi-64"
+ #:description %u-boot-rpi-description-64-bit))

And this "u-boot-rpi-arm64".

In other words, keep names consistent with the upstream defconfig they
are based on.

I presume you didn't add the aarch64 rpi_3 and rpi_4 variants because
they are supported by rpi_arm64?


I think without addressing the rest of the patch series, adding to guix
master the following packages could make the remaining diff smaller:

u-boot-rpi-2 (rpi_2_defconfig)
u-boot-rpi-3-32b (rpi_3_32b_defconfig)
u-boot-rpi-4-32b (rpi_4_32b_defconfig)
u-boot-rpi-arm64 (rpi_arm64_defconfig)

We wouldn't have a relevent installation configuration, but at least it
would allow building them and manually copying u-boot.bin to the
firmware partition...


live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCYY/+gAAKCRDcUY/If5cW
quCEAP4qWZUmOoFzSzr9IAEciGDq1GtmAkTpByfpGYp9N43UOAEA6qfQUtP/OWCl
mY66LgQssmL/BipkXW6FXbQixP3Epwk=
=Dw5b
-----END PGP SIGNATURE-----

V
V
Vagrant Cascadian wrote on 13 Nov 2021 19:23
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
87a6i7c3sw.fsf@ponder
On 2021-10-31, Stefan wrote:
...
Subject: [PATCH 3/8] * gnu/packages/bootloader.scm (make-u-boot-package): Add
keyword parameters 'name' and 'description'.
(make-preinstalled-u-boot-package): New function to make minimal packages.

+(define*-public (make-preinstalled-u-boot-package board
+ triplet
+ #:key
+ defconfig
+ configs
+ name
+ description
+ (u-boot-file "u-boot.bin"))
+ "Returns a package with a single U-BOOT-FILE for BOARD cross-compiled for
+TRIPLET with the optional DEFCONFIG file and optional configuration changes
+from CONFIGS. Either NAME, if used, or otherwise BOARD will be part of the
+package name. DESCRIPTION will be appended to the package description."

u-boot-file appears to be hard-coded; there may be other boards which
use a different u-boot artifact. Also, why return a single file, rather
than just building a package and then allowing other functions to pick
the appropriate file out of the resulting package?

I wondered "why does it have to be cross-compiled" but then realized
that came from the existing make-u-boot-package function. I've mostly
been building u-boot natively these days. :)


live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCYZACwgAKCRDcUY/If5cW
qnWGAP9uooKKUAaUXpv9QlckQptiHVjOe9Htm7L6dNLaqDwRiQEAx0Cy4tB+jrAS
bvKHMzVyrqdJvlI1kqKM+5ORgkTV0wM=
=RuTm
-----END PGP SIGNATURE-----

V
V
Vagrant Cascadian wrote on 13 Nov 2021 19:51
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
875ysvc2it.fsf@ponder
On 2021-11-13, Vagrant Cascadian wrote:
Toggle quote (7 lines)
> Subject: [PATCH 3/8] * gnu/packages/bootloader.scm (make-u-boot-package): Add
> keyword parameters 'name' and 'description'.
> ...
> (u-boot-rpi-0-w, u-boot-rpi, u-boot-rpi-2, u-boot-rpi-3,
> u-boot-rpi-4, u-boot-rpi-64, u-boot-rpi-0-w-efi, u-boot-rpi-efi,
> u-boot-rpi-2-efi, u-boot-rpi-3-efi, u-boot-rpi-4-efi, u-boot-rpi-efi-64): New
> packages.
...
Toggle quote (11 lines)
> +(define-public u-boot-rpi-64
> + (make-preinstalled-u-boot-package
> + "rpi_arm64"
> + "aarch64-linux-gnu"
> + #:name "rpi-64"
> + #:description %u-boot-rpi-description-64-bit))
>
> And this "u-boot-rpi-arm64".
>
> In other words, keep names consistent with the upstream defconfig they
> are based on.
...
Toggle quote (8 lines)
> I think without addressing the rest of the patch series, adding to guix
> master the following packages could make the remaining diff smaller:
>
> u-boot-rpi-2 (rpi_2_defconfig)
> u-boot-rpi-3-32b (rpi_3_32b_defconfig)
> u-boot-rpi-4-32b (rpi_4_32b_defconfig)
> u-boot-rpi-arm64 (rpi_arm64_defconfig)

Patch that builds, but haven't tested on an actual board (do have rpi2
and rpi3b+ could test sometime):

Toggle diff (45 lines)
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 706ddf0207..f5a3fd51e0 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -994,6 +994,18 @@ (define-public u-boot-pinebook-pro-rk3399
        `(("firmware" ,arm-trusted-firmware-rk3399)
          ,@(package-native-inputs base))))))

+(define-public u-boot-rpi-2
+  (make-u-boot-package "rpi_2" "arm-linux-gnueabihf"))
+
+(define-public u-boot-rpi-3-32b
+  (make-u-boot-package "rpi_3_32b" "arm-linux-gnueabihf"))
+
+(define-public u-boot-rpi-4-32b
+  (make-u-boot-package "rpi_4_32b" "arm-linux-gnueabihf"))
+
+(define-public u-boot-rpi-arm64
+  (make-u-boot-package "rpi_arm64" "aarch64-linux-gnu"))
+
 (define-public vboot-utils
   (package
     (name "vboot-utils")



Which leads me to wonder, why have the name and description argument at
all, when you could just inherit and set the name, like done with the
boneblack?

(define-public u-boot-am335x-boneblack
  (let ((base (make-u-boot-package "am335x_evm" "arm-linux-gnueabihf")))
    (package
      (inherit base)
      (name "u-boot-am335x-boneblack")
      (description "U-Boot is a bootloader used mostly for ARM
boards. It also initializes the boards (RAM etc).
...


And of course, thanks for working on this! :)


live well,
  vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCYZAJPwAKCRDcUY/If5cW
qnxYAP0Z7B/K+KyoxrUExE7pXIkYiRyTF+WD8UKCOGclCukR4gD/bZKdtBpvgjOA
D6LTIr2JWJZbDpiSroRJDq5hGDfgWwI=
=HhQ2
-----END PGP SIGNATURE-----

V
V
Vagrant Cascadian wrote on 13 Nov 2021 21:21
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
87zgq7ajt5.fsf@ponder
On 2021-10-31, Stefan wrote:
Toggle quote (5 lines)
> +(define-public %u-boot-rpi-efi-configs
> + '("CONFIG_OF_EMBED="
> + "CONFIG_OF_BOARD=y"
> + "CONFIG_BOOTDELAY=0"))

This is surely a matter of opinion, but CONFIG_BOOTDELAY=0 is kind of
nasty; it makes it nearly impossible to debug from a u-boot prompt if
needed. The default is probably "2" ... long enough to actually
interrupt it, but short enough that it shouldn't cause huge delays in
the boot process...

I know grub-efi will add it's own delay, so in a working environment,
this just seems like an additional two seconds, but u-boot's EFI
implementation is changing often enough that I wouldn't be surprised if
you need to occasionally debug something.


live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCYZAePQAKCRDcUY/If5cW
qsx8AQCVOpicppWo+OHD/jlMDlBJ/27wMT3mFNLksdYI75+iUQD/VHPEdzfJpsv6
9cW4FCgwCuRy5dtkOqh7migzIkd8XAA=
=UWBU
-----END PGP SIGNATURE-----

P
P
phodina wrote on 17 Nov 2021 15:00
Install guix system on Raspberry Pi
(name . 48314@debbugs.gnu.org)(address . 48314@debbugs.gnu.org)
OahXqPKMATT16YqLIphkEprs1qTp5g42cHom8LCs7nzh7sIvl7z2VxyMPa5_K3c-A8kdSGF2OKDdv6x5QeMqm7Fu0Ta0EApAP0paB3wawbo=@protonmail.com
Hi Stefan,

I've attempted to cross compile the system on x86_64 machine and I must report here are still several issue.

- Firstly it has to be attempted off the branch core-updates as there is the latest packaged meson build system which allows cross compilation.

guix system: error: gnu/packages/glib.scm:172:2: glib@2.62.6: build system `meson' does not support cross builds

Note that a minor issue happens when applying your patches on top of core-updates is patch-04 failing due to collision in the header with your email address.
- Secondly there are some packages that need to be patched. See the attached file.

- Thirdly there is some issue in the optional test cases in the package lsof which fail if executed on btrfs (unfortunately that's my case so I disabled them, just the optional part).

If I apply all the changes I can build the system.

- However, that brings me to the last issue. There is a package efivar which does not build. The issue there is described here [1].

Then again I haven't actually ran the system on Raspberry Pi itself. I'll attempt to setup Debian and build it natively as you suggested.

Kind regards
Petr

PS: Sorry Stefan for the late answer

From 48ccde0b13a471040eccd87e409ae0cfe29fbc79 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Tue, 16 Nov 2021 14:16:16 +0100
Subject: [PATCH] Fixes to cross compile system for aarch64.


Toggle diff (145 lines)
diff --git a/gnu/packages/certs.scm b/gnu/packages/certs.scm
index 39c3ebd128..311d5d4974 100644
--- a/gnu/packages/certs.scm
+++ b/gnu/packages/certs.scm
@@ -158,7 +158,7 @@ that was originally contributed to Debian.")
                 '(set-paths install-locale unpack))
          (add-after 'unpack 'install
            (lambda _
-             (let ((certsdir (string-append %output "/etc/ssl/certs/")))
+             (let ((certsdir (string-append (assoc-ref %outputs "out") "/etc/ssl/certs/")))
                (with-directory-excursion "nss/lib/ckfw/builtins/"
                  (unless (file-exists? "blacklist.txt")
                    (call-with-output-file "blacklist.txt" (const #t)))
@@ -206,7 +206,7 @@ taken from the NSS package and thus ultimately from the Mozilla project.")
 
            ;; Create hash symlinks suitable for OpenSSL ('SSL_CERT_DIR' and
            ;; similar.)
-           (chdir (string-append %output "/etc/ssl/certs"))
+           (chdir (string-append (assoc-ref %outputs "out") "/etc/ssl/certs"))
            (invoke (string-append perl "/bin/perl")
                    (string-append openssl "/bin/c_rehash")
                    ".")))))
diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index 7d6f3811dd..fe30f0c08c 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -447,7 +447,7 @@ to recover data more efficiently by only reading the necessary blocks.")
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags (list "--enable-compat-symlinks")
-       #:make-flags (list (string-append "PREFIX=" %output)
+       #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
                           "CC=gcc")))
     (native-inputs
      `(("autoconf" ,autoconf)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index f8db781446..5910647e7a 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2851,7 +2851,7 @@ external rate conversion.")
     (arguments
      '(#:tests? #f       ; no test suite
        #:configure-flags ; add $libdir to the RUNPATH of executables
-       (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
+       (list (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") "/lib"))))
     (home-page "https://www.netfilter.org/projects/iptables/index.html")
     (synopsis "Programs to configure Linux IP packet filtering rules")
     (description
@@ -4323,9 +4323,9 @@ dm-thin, dm-cache and dm-era device-mapper targets.")
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags
-       (list (string-append "PREFIX=" %output)
-             (string-append "INSTALL_MAN=" %output "/share/man")
-             (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
+       (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+             (string-append "INSTALL_MAN=" (assoc-ref %outputs "out") "/share/man")
+             (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") "/lib")
              "BUILD_STATIC=")
        #:phases
        (modify-phases %standard-phases
@@ -5343,7 +5343,7 @@ Linux Device Mapper multipathing driver:
     (arguments
      `(#:make-flags
        (let ((target ,(%current-target-system)))
-         (list (string-append "prefix=" %output)
+         (list (string-append "prefix=" (assoc-ref %outputs "out"))
                (string-append
                 "CC=" (if target
                           (string-append (assoc-ref %build-inputs "cross-gcc")
@@ -6791,10 +6791,12 @@ under OpenGL graphics workloads.")
     (arguments
      `(;; Tests require a UEFI system and is not detected in the chroot.
        #:tests? #f
-       #:make-flags (list (string-append "prefix=" %output)
-                          (string-append "libdir=" %output "/lib")
+       #:make-flags (list (string-append "prefix=" (assoc-ref %outputs
+	   "out"))
+                          (string-append "libdir=" (assoc-ref %outputs "out") "/lib")
                           (string-append "CC_FOR_BUILD=" ,(cc-for-target))
-                          (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
+                          (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref
+						  %outputs "out") "/lib"))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure))))
@@ -6825,8 +6827,8 @@ interface to the variable facility of UEFI boot firmware.")
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ;no tests
-       #:make-flags (list (string-append "prefix=" %output)
-                          (string-append "libdir=" %output "/lib")
+       #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out"))
+                          (string-append "libdir=" (assoc-ref %outputs "out") "/lib")
                           ;; EFIDIR denotes a subdirectory relative to the
                           ;; EFI System Partition where the loader will be
                           ;; installed (known as OS_VENDOR in the code).
diff --git a/gnu/packages/lsof.scm b/gnu/packages/lsof.scm
index b317902ee7..519f7f15b2 100644
--- a/gnu/packages/lsof.scm
+++ b/gnu/packages/lsof.scm
@@ -90,7 +90,10 @@
                 (invoke "./Add2TestDB")
 
                 ;; The ‘standard’ tests suggest running ‘optional’ ones as well.
-                (invoke "make" "standard" "optional")))
+				;; optional test fail on BTRFS
+				;; https://www.spinics.net/lists/linux-btrfs/msg09044.html
+				;; https://githubmemory.com/repo/lsof-org/lsof/issues/152?page=2
+                (invoke "make" "standard" )));"optional")))
             #t))
         (replace 'install
           (lambda* (#:key outputs #:allow-other-keys)
diff --git a/gnu/packages/man.scm b/gnu/packages/man.scm
index b4431e5b08..ac4920d836 100644
--- a/gnu/packages/man.scm
+++ b/gnu/packages/man.scm
@@ -183,9 +183,9 @@ a flexible and convenient way.")
                        (string-append "--with-col=" util "/bin/col")
                        ;; The default systemd directories ignore --prefix.
                        (string-append "--with-systemdsystemunitdir="
-                                      %output "/lib/systemd/system")
+                                      (assoc-ref %outputs "out") "/lib/systemd/system")
                        (string-append "--with-systemdtmpfilesdir="
-                                      %output "/lib/tmpfiles.d"))
+                                      (assoc-ref %outputs "out") "/lib/tmpfiles.d"))
                  (map (lambda (prog)
                         (string-append "--with-" prog "=" groff-minimal
                                        "/bin/" prog))
diff --git a/gnu/packages/ntp.scm b/gnu/packages/ntp.scm
index 55b9a73b22..0d8c409b6e 100644
--- a/gnu/packages/ntp.scm
+++ b/gnu/packages/ntp.scm
@@ -159,7 +159,8 @@ time-stamping or reference clock, sub-microsecond accuracy is possible.")
             `(("libcap" ,libcap))
             '())))
    (arguments
-    `(#:phases
+    `(#:configure-flags (list "--with-yielding-select=yes")
+	  #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'disable-network-test
                    (lambda _
-- 
2.33.1
?
Your comment

Commenting via the web interface is currently disabled.

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