* [bug#44543] [PATCH] gnu: raspberry-pi: Add helpers for config.txt file generation.
@ 2020-11-09 23:53 Stefan
2020-11-16 9:32 ` Danny Milosavljevic
0 siblings, 1 reply; 13+ messages in thread
From: Stefan @ 2020-11-09 23:53 UTC (permalink / raw)
To: 44543; +Cc: Danny Milosavljevic
* gnu/packages/raspberry-pi.scm (raspi-config-file, raspi-custom.txt):
New functions.
(raspi-config.txt, raspi-u-boot-bootloader.txt, raspi-kernel.txt):
New variables.
---
gnu/packages/raspberry-pi.scm | 44 +++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/gnu/packages/raspberry-pi.scm b/gnu/packages/raspberry-pi.scm
index 7700c26d06..af3998c4d6 100644
--- a/gnu/packages/raspberry-pi.scm
+++ b/gnu/packages/raspberry-pi.scm
@@ -235,3 +235,47 @@ Raspberry Pi. Note: It does not work on Raspberry Pi 1.")
(install-file "arm64.bin" libexec)
#t))))))))
(supported-systems '("aarch64-linux"))))
+
+(define-public (raspi-config-file name content)
+ "Creates a configuration file like config.txt for the Raspberry Pi firmware.
+CONTENT can be a list of strings, which are concatenated with a newline
+character. Alternatively CONTENT can be a string with the full file content."
+ (plain-file
+ name
+ (if (list? content)
+ (string-join content "\n" 'suffix)
+ content)))
+
+(define-public raspi-config.txt
+ ;; Creates a config.txt to start the ARM cores up in 64-bit mode if necessary
+ ;; and to include bootloader.txt, kernel.txt, and a custom.txt, each with
+ ;; separate configurations for the Raspberry Pi firmware.
+ (raspi-config-file
+ "config.txt"
+ `("# See https://www.raspberrypi.org/documentation/configuration/config-txt/README.md for details."
+ ""
+ ,(string-append "arm_64bit=" (if (target-aarch64?) "1" "0"))
+ "include bootloader.txt"
+ "include kernel.txt"
+ "include custom.txt")))
+
+(define-public raspi-u-boot-bootloader.txt
+ ;; Creates a bootloader.txt file to be included by the config.txt to load the
+ ;; U-Boot bootloader.
+ (raspi-config-file
+ "bootloader.txt"
+ "kernel=u-boot.bin"))
+
+(define-public raspi-kernel.txt
+ ;; Creates a kernel.txt to be included by the config.txt to ensure that
+ ;; upstream kernel and device tree files can be used.
+ (raspi-config-file
+ "kernel.txt"
+ '("dtoverlay=upstream"
+ "upstream_kernel=1")))
+
+(define-public (raspi-custom.txt content)
+ "Creates a custom.txt to be included by the config.txt. CONTENT can be a list
+of strings, which are concatenated with a newline character. Alternatively
+CONTENT can be a string with the full file content."
+ (raspi-config-file "custom.txt" content))
--
2.26.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [bug#44543] [PATCH] gnu: raspberry-pi: Add helpers for config.txt file generation.
2020-11-09 23:53 [bug#44543] [PATCH] gnu: raspberry-pi: Add helpers for config.txt file generation Stefan
@ 2020-11-16 9:32 ` Danny Milosavljevic
2020-11-16 10:38 ` Stefan
0 siblings, 1 reply; 13+ messages in thread
From: Danny Milosavljevic @ 2020-11-16 9:32 UTC (permalink / raw)
To: Stefan; +Cc: 44543
[-- Attachment #1: Type: text/plain, Size: 437 bytes --]
I'm waiting for Ludo to comment about the dots in the variable names.
(Apparently, to be forward-compatible with literal pairs, dots in variable names are not nice to use)
It would be nice to also have some clients of that stuff in that file.
I.e. actually boot the raspberry pi using some chainloader config.
Otherwise it's hard to say whether this is a good API. When the API is actually
used it's much easier to say.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug#44543] [PATCH] gnu: raspberry-pi: Add helpers for config.txt file generation.
2020-11-16 9:32 ` Danny Milosavljevic
@ 2020-11-16 10:38 ` Stefan
2020-11-16 14:01 ` Danny Milosavljevic
0 siblings, 1 reply; 13+ messages in thread
From: Stefan @ 2020-11-16 10:38 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: 44543
Hi Danny!
> It would be nice to also have some clients of that stuff in that file.
>
> I.e. actually boot the raspberry pi using some chainloader config.
>
> Otherwise it's hard to say whether this is a good API. When the API is actually
> used it's much easier to say.
There will be more patches to come, then there will be a use of these functions.
The firmware blob using these files can’t be handled by Guix, this will have to be left as an exercise. But could I add a skeleton for it? Maybe something like this (but better using the copy-build-system):
(define (raspi-firmware url version hash)
(package
(build-system trivial-build-system)
(arguments
'(#:modules
((guix build utils))
#:builder (begin
(use-modules (guix build utils))
(let* ((source (assoc-ref %build-inputs "source"))
(out (assoc-ref %outputs "out"))
(boot (string-append out "/boot"))
(opt (string-append out "/opt")))
(mkdir-p boot)
(copy-recursively (string-append source "/boot") boot)
(delete-file (string-append boot "/kernel.img"))
(delete-file (string-append boot "/kernel7.img"))
(delete-file (string-append boot "/kernel7l.img"))
(delete-file (string-append boot "/kernel8.img"))
(mkdir-p opt)
(copy-recursively (string-append source "/opt") opt)
(delete-file-recursively (string-append opt "/vc/src"))
#t))))
…))
Further steps will be some functionality to modify the U-Boot configuration (done with Kconfig) and to have a specific U-Boot package.
Then I’ll care for a kernel.
The board will only boot if all of this is in place.
This is how I use it all currently (left out kernel, kernel-arguments, initrd-modules):
(operating-system
(bootloader
(bootloader-configuration
(bootloader (bootloader-chain
(list (file-append raspi-firmware "/boot/")
(file-append u-boot-rpi-3 "/libexec/u-boot.bin")
raspi-config.txt
raspi-u-boot-bootloader.txt
;; Additional configurations to use.
(raspi-custom.txt '("disable_overscan=1"
"hdmi_force_hotplug=1"
"audio=on"
"dtoverlay=gpio-ir"
"dtoverlay=disable-wifi"
"dtoverlay=vc4-fkms-v3d,cma-64")))
grub-efi-netboot-bootloader
#:installer (install-grub-efi-netboot "efi/boot")
#:copy-files? #t))
(theme
(grub-theme
(resolution
'(1920 . 1080))
(image (file-append %artwork-repository "/grub/GuixSD-fully-black-16-9.svg"))))
(target "/boot")
(keyboard-layout keyboard-layout)))
…)
The above bootloader-chain could certainly be added to Guix, but leaving out the raspi-firmware and the raspi-custom.txt – maybe as a function to allow adding an own raspi-custom.txt. If someone copies the firmware by hand onto an SD card, then such a bootloader provided as e.g. raspi-grub-bootloader would work.
Bye
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug#44543] [PATCH] gnu: raspberry-pi: Add helpers for config.txt file generation.
2020-11-16 10:38 ` Stefan
@ 2020-11-16 14:01 ` Danny Milosavljevic
2020-11-29 19:04 ` Stefan
0 siblings, 1 reply; 13+ messages in thread
From: Danny Milosavljevic @ 2020-11-16 14:01 UTC (permalink / raw)
To: Stefan; +Cc: 44543
[-- Attachment #1: Type: text/plain, Size: 2420 bytes --]
Hi Stefan,
thanks!
On Mon, 16 Nov 2020 11:38:19 +0100
Stefan <stefan-guix@vodafonemail.de> wrote:
> The firmware blob using these files can’t be handled by Guix, this will have to be left as an exercise. But could I add a skeleton for it? Maybe something like this (but better using the copy-build-system):
There is a free software Raspberry VC firmware on
https://github.com/librerpi/rpi-open-firmware/ (currently cannot handle graphics
and USB and lots of other important things--but it DOES boot) and development
is ongoing.
We can just package that free software firmware and use it.
I've already started packaging it for Guix.
> (operating-system
> (bootloader
> (bootloader-configuration
> (bootloader (bootloader-chain
> (list (file-append raspi-firmware "/boot/")
> (file-append u-boot-rpi-3 "/libexec/u-boot.bin")
> raspi-config.txt
> raspi-u-boot-bootloader.txt
> ;; Additional configurations to use.
> (raspi-custom.txt '("disable_overscan=1"
> "hdmi_force_hotplug=1"
> "audio=on"
> "dtoverlay=gpio-ir"
> "dtoverlay=disable-wifi"
> "dtoverlay=vc4-fkms-v3d,cma-64")))
> grub-efi-netboot-bootloader
> #:installer (install-grub-efi-netboot "efi/boot")
> #:copy-files? #t))
I advice to add a user-level function for a free software Raspberry Pi 3 efi
netboot bootloader to Guix (and a non-efi-netboot one, too, maybe).
Something like
(define (raspi-3-efi-netboot-bootloader efi-boot custom-text)
(bootloader-chain like you do above custom-text))
I don't think that it's reasonable to expect the user to use bootloader-chain
by himself (it's not user-friendly to have to do that).
> The above bootloader-chain could certainly be added to Guix, but leaving out the raspi-firmware and the raspi-custom.txt – maybe as a function to allow adding an own raspi-custom.txt. If someone copies the firmware by hand onto an SD card, then such a bootloader provided as e.g. raspi-grub-bootloader would work.
Yeah.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug#44543] [PATCH] gnu: raspberry-pi: Add helpers for config.txt file generation.
2020-11-16 14:01 ` Danny Milosavljevic
@ 2020-11-29 19:04 ` Stefan
2020-12-13 13:06 ` Stefan
0 siblings, 1 reply; 13+ messages in thread
From: Stefan @ 2020-11-29 19:04 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: 44543
* gnu/packages/raspberry-pi.scm (raspi-config-file, raspi-custom-txt):
New functions.
(raspi-config-txt, raspi-bcm27-dtb-txt, raspi-bcm28-dtb-txt
raspi-u-boot-bootloader-txt): New variables.
---
gnu/packages/raspberry-pi.scm | 62 +++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/gnu/packages/raspberry-pi.scm b/gnu/packages/raspberry-pi.scm
index cdea392fc7..b189ec2f4e 100644
--- a/gnu/packages/raspberry-pi.scm
+++ b/gnu/packages/raspberry-pi.scm
@@ -235,3 +235,65 @@ Raspberry Pi. Note: It does not work on Raspberry Pi 1.")
(install-file "arm64.bin" libexec)
#t))))))))
(supported-systems '("aarch64-linux"))))
+
+(define-public (raspi-config-file name content)
+ "Create a configuration file like config.txt for the Raspberry Pi firmware.
+CONTENT can be a list of strings, which are concatenated with a newline
+character. Alternatively CONTENT can be a string with the full file content."
+ (plain-file
+ name
+ (if (list? content)
+ (string-join content "\n" 'suffix)
+ content)))
+
+(define-public (raspi-config-file name content)
+ "Create a configuration file like config.txt for the Raspberry Pi firmware.
+CONTENT can be a list of strings, which are concatenated with a newline
+character. Alternatively CONTENT can be a string with the full file content."
+ (plain-file
+ name
+ (if (list? content)
+ (string-join content "\n" 'suffix)
+ content)))
+
+(define-public raspi-config-txt
+ ;; Create a config.txt to start the ARM cores up in 64-bit mode if necessary
+ ;; and to include a dtb.txt, bootloader.txt, and a custom.txt, each with
+ ;; separated configurations for the Raspberry Pi firmware.
+ (raspi-config-file
+ "config.txt"
+ `("# See https://www.raspberrypi.org/documentation/configuration/config-txt/README.md for details."
+ ""
+ ,(string-append "arm_64bit=" (if (target-aarch64?) "1" "0"))
+ "include dtb.txt"
+ "include bootloader.txt"
+ "include custom.txt")))
+
+(define-public raspi-bcm27-dtb-txt
+ ;; Create a dtb.txt to be included by the config.txt to ensure that the
+ ;; downstream device tree files bcm27*.dtb will be used.
+ (raspi-config-file
+ "dtb.txt"
+ "upstream_kernel=0"))
+
+(define-public raspi-bcm28-dtb-txt
+ ;; Create a dtb.txt to be included by the config.txt to ensure that the
+ ;; upstream device tree files bcm28*.dtb will be used.
+ ;; This also implies the use of the dtoverlay=upstream.
+ (raspi-config-file
+ "dtb.txt"
+ "upstream_kernel=1"))
+
+(define-public raspi-u-boot-bootloader-txt
+ ;; Create a bootloader.txt file to be included by the config.txt to load the
+ ;; U-Boot bootloader.
+ (raspi-config-file
+ "bootloader.txt"
+ '("dtoverlay=upstream"
+ "kernel=u-boot.bin")))
+
+(define-public (raspi-custom-txt content)
+ "Create a custom.txt for the Raspberry Pi firmware.
+CONTENT can be a list of strings, which are concatenated with a newline
+character. Alternatively CONTENT can be a string with the full file content."
+ (raspi-config-file "custom.txt" content))
--
2.29.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [bug#44543] [PATCH] gnu: raspberry-pi: Add helpers for config.txt file generation.
2020-11-29 19:04 ` Stefan
@ 2020-12-13 13:06 ` Stefan
2020-12-28 19:24 ` Stefan
0 siblings, 1 reply; 13+ messages in thread
From: Stefan @ 2020-12-13 13:06 UTC (permalink / raw)
To: Danny Milosavljevic, 44543
Hi Danny!
A friendly ping. :-)
Bye
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug#44543] [PATCH] gnu: raspberry-pi: Add helpers for config.txt file generation.
2020-12-13 13:06 ` Stefan
@ 2020-12-28 19:24 ` Stefan
2021-03-27 16:40 ` Stefan
0 siblings, 1 reply; 13+ messages in thread
From: Stefan @ 2020-12-28 19:24 UTC (permalink / raw)
To: Danny Milosavljevic, 44543; +Cc: Mathieu Othacehe
Hi!
A friendly ping! :-)
Bye
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug#44543] [PATCH] gnu: raspberry-pi: Add helpers for config.txt file generation.
2020-12-28 19:24 ` Stefan
@ 2021-03-27 16:40 ` Stefan
2021-03-27 16:47 ` Léo Le Bouter via Guix-patches via
0 siblings, 1 reply; 13+ messages in thread
From: Stefan @ 2021-03-27 16:40 UTC (permalink / raw)
To: Danny Milosavljevic, 44543; +Cc: Mathieu Othacehe
Hi!
Another friendly ping! This patch is meanwhile really getting old, but it is still not forgotten. :-)
<http://issues.guix.gnu.org/44543>
Bye
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug#44543] [PATCH] gnu: raspberry-pi: Add helpers for config.txt file generation.
2021-03-27 16:40 ` Stefan
@ 2021-03-27 16:47 ` Léo Le Bouter via Guix-patches via
2021-03-27 19:43 ` Stefan
0 siblings, 1 reply; 13+ messages in thread
From: Léo Le Bouter via Guix-patches via @ 2021-03-27 16:47 UTC (permalink / raw)
To: Stefan, Danny Milosavljevic, 44543; +Cc: Mathieu Othacehe
[-- Attachment #1: Type: text/plain, Size: 476 bytes --]
On Sat, 2021-03-27 at 17:40 +0100, Stefan wrote:
> Hi!
>
> Another friendly ping! This patch is meanwhile really getting old,
> but it is still not forgotten. :-)
>
> <http://issues.guix.gnu.org/44543>
>
>
> Bye
>
> Stefan
I have a Raspberry Pi 3B+ here at home, how can I test these changes?
I don't feel capable to review this without testing something as a
whole verifying that it works then inspecting these things that make it
work.
Thank you
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug#44543] [PATCH] gnu: raspberry-pi: Add helpers for config.txt file generation.
2021-03-27 16:47 ` Léo Le Bouter via Guix-patches via
@ 2021-03-27 19:43 ` Stefan
2021-03-27 19:51 ` Léo Le Bouter via Guix-patches via
0 siblings, 1 reply; 13+ messages in thread
From: Stefan @ 2021-03-27 19:43 UTC (permalink / raw)
To: Léo Le Bouter; +Cc: Danny Milosavljevic, 44543, Mathieu Othacehe
Hi Léo!
> I have a Raspberry Pi 3B+ here at home, how can I test these changes?
>
> I don't feel capable to review this without testing something as a
> whole verifying that it works then inspecting these things that make it
> work.
The support for the Raspberry is still not complete. I’m using mine without an SD card, booting it over TFTP with an NFS root mount.
Installing on an SD card is not tested and certainly not working yet.
One of my next patches will be several u-boot packages for different Raspberry models. To build them I need to do changes to the defconfig file of u-boot. Therefore another ticket is pending, which eases defconfig modifications (<http://issues.guix.gnu.org/45046>, and I hope this can also be used to modify Linux). When that one is done, then I will send that next patch to add the u-boot packages.
My bootloader currently looks like this, but I’m using already further modifications, mainly for GRUB, so this will not work for you, but you can get an impression of the final intended use of all patches:
(bootloader
(bootloader-configuration
(target "/boot")
(bootloader (efi-bootloader-chain
grub-efi-netboot-removable-bootloader
;; Packages needed to boot the Raspberry.
#:packages (list raspberrypi-firmware
u-boot-rpi-efi-64)
;; Additional files for configuration.
#:files (list ;; Detects 32 or 64 bit, includes other txt files.
raspi-config-txt
;; Use the downstream device tree (upstream is bcm28).
raspi-bcm27-dtb-txt
;; This is the next boot stage.
raspi-u-boot-bootloader-txt
;; Additional configurations to use.
(raspi-custom-txt '("disable_overscan=1"
"hdmi_force_hotplug=1"
"audio=on"
"dtoverlay=gpio-ir"
"dtoverlay=disable-wifi"
"dtoverlay=vc4-fkms-v3d,cma-64")))))))
Your bootloader configuration would need to look like this, and you may get it running from an SD card:
(bootloader
(bootloader-configuration
(target "/boot")
(bootloader
(efi-bootloader-chain
(list (file-append firmware "/boot/")
(file-append u-boot-my-scb "/libexec/u-boot.bin")
raspi-config-txt
raspi-bcm27-dtb-txt
raspi-u-boot-bootloader-txt)
grub-efi-netboot-bootloader
#:installer
(chain-efi-bootloader-installer (install-grub-efi-netboot "efi/boot")))))
So you need to provide firmware and u-boot (still) yourself. As a short cut you may omit both (file-append …) functions and copy both parts by hand from some other distribution, maybe openSUSE – this is basically how I got started.
If you mount an ext4-partition of an SD card to e.g. /my-target/ and the FAT partition to /my-target/boot, then you may try a ‘guix system init … /my-target’.
If this succeeds, then it may be possible that adding the file /my-target/boot/efi/boot/grub.cfg with this content gets you to a system booting from an SD card:
search --file /boot/grub/grub.cfg
configfile /boot/grub/grub.cfg
But this is all untested, it certainly fails. :-)
At least – regarding this patch – I can ensure that the three config files as used in these bootloader examples are properly generated working.
Bye
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug#44543] [PATCH] gnu: raspberry-pi: Add helpers for config.txt file generation.
2021-03-27 19:43 ` Stefan
@ 2021-03-27 19:51 ` Léo Le Bouter via Guix-patches via
2021-03-27 22:03 ` Stefan
0 siblings, 1 reply; 13+ messages in thread
From: Léo Le Bouter via Guix-patches via @ 2021-03-27 19:51 UTC (permalink / raw)
To: Stefan; +Cc: Danny Milosavljevic, 44543, Mathieu Othacehe
[-- Attachment #1: Type: text/plain, Size: 4678 bytes --]
On Sat, 2021-03-27 at 20:43 +0100, Stefan wrote:
> Hi Léo!
>
> > I have a Raspberry Pi 3B+ here at home, how can I test these
> > changes?
> >
> > I don't feel capable to review this without testing something as a
> > whole verifying that it works then inspecting these things that
> > make it
> > work.
>
> The support for the Raspberry is still not complete. I’m using mine
> without an SD card, booting it over TFTP with an NFS root mount.
>
> Installing on an SD card is not tested and certainly not working yet.
>
> One of my next patches will be several u-boot packages for different
> Raspberry models. To build them I need to do changes to the defconfig
> file of u-boot. Therefore another ticket is pending, which eases
> defconfig modifications (<http://issues.guix.gnu.org/45046>;, and I
> hope this can also be used to modify Linux). When that one is done,
> then I will send that next patch to add the u-boot packages.
>
> My bootloader currently looks like this, but I’m using already
> further modifications, mainly for GRUB, so this will not work for
> you, but you can get an impression of the final intended use of all
> patches:
>
> (bootloader
> (bootloader-configuration
> (target "/boot")
> (bootloader (efi-bootloader-chain
> grub-efi-netboot-removable-bootloader
> ;; Packages needed to boot the Raspberry.
> #:packages (list raspberrypi-firmware
> u-boot-rpi-efi-64)
> ;; Additional files for configuration.
> #:files (list ;; Detects 32 or 64 bit, includes
> other txt files.
> raspi-config-txt
> ;; Use the downstream device tree
> (upstream is bcm28).
> raspi-bcm27-dtb-txt
> ;; This is the next boot stage.
> raspi-u-boot-bootloader-txt
> ;; Additional configurations to use.
> (raspi-custom-txt
> '("disable_overscan=1"
> "hdmi_force_hotp
> lug=1"
> "audio=on"
> "dtoverlay=gpio-
> ir"
> "dtoverlay=disab
> le-wifi"
> "dtoverlay=vc4-
> fkms-v3d,cma-64")))))))
>
> Your bootloader configuration would need to look like this, and you
> may get it running from an SD card:
>
> (bootloader
> (bootloader-configuration
> (target "/boot")
> (bootloader
> (efi-bootloader-chain
> (list (file-append firmware "/boot/")
> (file-append u-boot-my-scb "/libexec/u-boot.bin")
> raspi-config-txt
> raspi-bcm27-dtb-txt
> raspi-u-boot-bootloader-txt)
> grub-efi-netboot-bootloader
> #:installer
> (chain-efi-bootloader-installer (install-grub-efi-netboot
> "efi/boot")))))
>
> So you need to provide firmware and u-boot (still) yourself. As a
> short cut you may omit both (file-append …) functions and copy both
> parts by hand from some other distribution, maybe openSUSE – this is
> basically how I got started.
>
> If you mount an ext4-partition of an SD card to e.g. /my-target/ and
> the FAT partition to /my-target/boot, then you may try a ‘guix system
> init … /my-target’.
>
> If this succeeds, then it may be possible that adding the file /my-
> target/boot/efi/boot/grub.cfg with this content gets you to a system
> booting from an SD card:
>
> search --file /boot/grub/grub.cfg
> configfile /boot/grub/grub.cfg
>
> But this is all untested, it certainly fails. :-)
>
> At least – regarding this patch – I can ensure that the three config
> files as used in these bootloader examples are properly generated
> working.
>
>
> Bye
>
> Stefan
Thanks for all your work!
I would prefer if you opened one single bug with all the changes so I
can test the whole thing, right now I don't feel at ease reviewing
things like this. How can I be sure what you are submitting is the
right abstraction for your future work? Are you sure that abstraction
will be right for your future patches? If anything needs to be changed
I feel like one big patchset about Raspberry Pi 3B+ support will be
easier to review (at least for me).
Léo
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug#44543] [PATCH] gnu: raspberry-pi: Add helpers for config.txt file generation.
2021-03-27 19:51 ` Léo Le Bouter via Guix-patches via
@ 2021-03-27 22:03 ` Stefan
2021-05-06 21:12 ` bug#44543: " Stefan
0 siblings, 1 reply; 13+ messages in thread
From: Stefan @ 2021-03-27 22:03 UTC (permalink / raw)
To: Léo Le Bouter; +Cc: Danny Milosavljevic, 44543, Mathieu Othacehe
Hi Léo!
> I would prefer if you opened one single bug with all the changes so I
> can test the whole thing, right now I don't feel at ease reviewing
> things like this.
I see. I’m doing little steps, sending patches for the parts which I think are ready.
> How can I be sure what you are submitting is the
> right abstraction for your future work?
True. In this case you only have the bootloader examples that I gave.
This patch is just a building block to generate some config.txt in a modular and comfortable way. There is a bootloader installer copying any listed file-like-object.
Who knows, in future there might be a TianoCore bootloader, then a similar patch might be required to provide a raspi-tianocore-bootloader-txt.
> Are you sure that abstraction
> will be right for your future patches?
Yes. There are basically three decisions to take for a Guix System: 32 or 64 bit, which device tree (depends on the linux kernel), which bootloader. Beyond this anything is a custom setting.
> If anything needs to be changed
> I feel like one big patchset about Raspberry Pi 3B+ support will be
> easier to review (at least for me).
I see, this is not yet testable for you out of the box to boot a system.
What is testable right now is an incomplete bootloader. At least it is possible to inspect what files will be generated by this patch and copied into /boot. It must even be buildable for x86_64.
(bootloader
(bootloader-configuration
(target "/boot")
(bootloader
(efi-bootloader-chain
(list raspi-config-txt
raspi-bcm27-dtb-txt
raspi-u-boot-bootloader-txt)
grub-efi-netboot-bootloader
#:installer
(chain-efi-bootloader-installer (install-grub-efi-netboot "efi/boot")))))
Bye
Stefan
P.S. If you change your mind and want to test that bootloader, then you should know that GRUB depends on qemu and unfortunately qemu is failing its test on aarch64 since some months. Then this patch may help you get going.
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 2262aa6197..3732320df8 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -161,8 +161,9 @@
(arguments
`(;; FIXME: Disable tests on i686 to work around
;; <https://bugs.gnu.org/40527>.
- #:tests? ,(or (%current-target-system)
- (not (string=? "i686-linux" (%current-system))))
+ #:tests? ,(and (not (target-aarch64?))
+ (or (%current-target-system)
+ (not (string=? "i686-linux" (%current-system)))))
#:configure-flags (list "--enable-usb-redir" "--enable-opengl"
"--enable-docs"
^ permalink raw reply related [flat|nested] 13+ messages in thread
end of thread, other threads:[~2021-05-06 21:13 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-09 23:53 [bug#44543] [PATCH] gnu: raspberry-pi: Add helpers for config.txt file generation Stefan
2020-11-16 9:32 ` Danny Milosavljevic
2020-11-16 10:38 ` Stefan
2020-11-16 14:01 ` Danny Milosavljevic
2020-11-29 19:04 ` Stefan
2020-12-13 13:06 ` Stefan
2020-12-28 19:24 ` Stefan
2021-03-27 16:40 ` Stefan
2021-03-27 16:47 ` Léo Le Bouter via Guix-patches via
2021-03-27 19:43 ` Stefan
2021-03-27 19:51 ` Léo Le Bouter via Guix-patches via
2021-03-27 22:03 ` Stefan
2021-05-06 21:12 ` bug#44543: " Stefan
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).