unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Léo Le Bouter via Guix-patches via" <guix-patches@gnu.org>
To: Stefan <stefan-guix@vodafonemail.de>
Cc: Danny Milosavljevic <dannym@scratchpost.org>,
	44543@debbugs.gnu.org, Mathieu Othacehe <othacehe@gnu.org>
Subject: [bug#44543] [PATCH] gnu: raspberry-pi: Add helpers for config.txt file generation.
Date: Sat, 27 Mar 2021 20:51:10 +0100	[thread overview]
Message-ID: <832c926ec211cab21f63ed9578c67662db7426cf.camel@zaclys.net> (raw)
In-Reply-To: <9537F85E-03CA-4784-85BD-0637C7A16F31@vodafonemail.de>

[-- 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 --]

  reply	other threads:[~2021-03-27 19:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-03-27 22:03                     ` Stefan
2021-05-06 21:12                       ` bug#44543: " Stefan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=832c926ec211cab21f63ed9578c67662db7426cf.camel@zaclys.net \
    --to=guix-patches@gnu.org \
    --cc=44543@debbugs.gnu.org \
    --cc=dannym@scratchpost.org \
    --cc=lle-bout@zaclys.net \
    --cc=othacehe@gnu.org \
    --cc=stefan-guix@vodafonemail.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).