All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel via buildroot <buildroot@buildroot.org>
To: Fiona Klute <fiona.klute@gmx.de>
Cc: "Yann E . MORIN" <yann.morin.1998@free.fr>,
	"José Mendes" <jp.baltazar.mendes@gmail.com>,
	"Martin Bark" <martin@barkynet.com>,
	"Julien Grossholtz" <julien.grossholtz@openest.io>,
	"buildroot@buildroot.org" <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH next v2 3/3] configs/raspberrypicm4io_64_uboot_defconfig: new defconfig
Date: Tue, 3 Sep 2024 13:29:01 +0000	[thread overview]
Message-ID: <ZtcPGjS9gktPuNNK@ryzen.lan> (raw)
In-Reply-To: <98537c50-9e0c-4bee-97af-4e4815c310e4@gmx.de>

On Tue, Sep 03, 2024 at 03:10:19PM +0200, Fiona Klute wrote:
> Am 03.09.24 um 13:08 schrieb Niklas Cassel:
> > On Sat, Aug 31, 2024 at 09:01:26PM +0200, Fiona Klute via buildroot wrote:
> > > From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de>
> > > 
> > > The new config deviates from the existing
> > > configs/raspberrypicm4io_64_defconfig only as far as necessary to
> > > demonstrate booting through U-Boot instead of having the firmware load
> > > the kernel directly. The sample boot script loads the kernel from the
> > > rootfs and uses the device tree provided by the firmware.
> > > 
> > > Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
> > > ---
> > > The config I'm usually using is a bit different, including using a
> > > mainline kernel (which seems strongly preferable to me), but for
> > > defconfig maintenance staying close to the other RPi defconfigs is
> > > probably easiest.
> > > 
> > >   board/raspberrypi/boot.scr.in                 |  9 +++
> > >   .../raspberrypi/config_cm4io_64bit_uboot.txt  | 23 +++++++
> > >   board/raspberrypi/readme.txt                  |  4 ++
> > >   configs/raspberrypicm4io_64_uboot_defconfig   | 60 +++++++++++++++++++
> > >   4 files changed, 96 insertions(+)
> > >   create mode 100644 board/raspberrypi/boot.scr.in
> > >   create mode 100644 board/raspberrypi/config_cm4io_64bit_uboot.txt
> > >   create mode 100644 configs/raspberrypicm4io_64_uboot_defconfig
> > > 
> > > diff --git a/board/raspberrypi/boot.scr.in b/board/raspberrypi/boot.scr.in
> > > new file mode 100644
> > > index 0000000000..a5c986ef99
> > > --- /dev/null
> > > +++ b/board/raspberrypi/boot.scr.in
> > > @@ -0,0 +1,9 @@
> > > +# Please note that this is only a sample, we recommend you to change
> > > +# it to fit your needs. You should override this file using
> > > +# BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE.
> > > +
> > > +# load kernel from the root partition
> > > +load mmc 0:2 ${kernel_addr_r} boot/Image
> > > +env set bootargs "root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyAMA0,115200"
> > > +# boot using the FDT provided by firmware
> > > +booti ${kernel_addr_r} - ${fdt_addr}
> > 
> > Hello Fiona,
> > 
> > While I'm not a u-boot expert, I am slightly surprised to see a new
> > buildroot defconfig use boot.scr instead of extlinux.conf.
> > 
> > extlinux.conf is the default configuration format in u-boot:
> > https://github.com/u-boot/u-boot/blob/v2024.10-rc4/doc/develop/distro.rst?plain=1#L69-L71
> > 
> > Even though boot.scr still seems to be supported for backwards-compatibility:
> > https://github.com/u-boot/u-boot/blob/v2024.10-rc4/doc/develop/distro.rst?plain=1#L367-L368
> > 
> > See e.g. this buildroot commit that converted rock5b from boot.scr to
> > extlinux.conf:
> > https://github.com/buildroot/buildroot/commit/b7dbdd3d775b8e94664c6f37b11afc8a6a352e35
> > 
> > I don't see anthing exotic in your boot.scr that wouldn't work with
> > extlinux.conf.
> 
> AFAIK things like configuring watchdogs and handling A/B boot slot
> selection (with RAUC integration) aren't possible with extlinux.conf,
> and a menu isn't going to be much help in a headless system. If there is
> a better way than boot.scr to handle those I'd very much like to read
> about it.

My point was just that the boot.scr.in that you have above could easily be
replaced by a extlinux.conf instead.

I hear your argument that certain features (like watchdog an A/B boot slot)
is not possible with extlinux.conf.

But if you want your example to be minimal... isn't extlinux.conf enough/
exactly what you want? (extlinux.conf is definitely simpler for a beginner
to understand, compared to a boot.scr or a .its file.)

Your comment in boot.scr.in itself says that if you want something more fancy,
you should provide your own config.

Anyway, I'm just providing a suggestion. Feel free to ignore :)

Another suggestion is for your new defconfig to use the upstream kernel
instead of the downstream kernel. A person running u-boot has already taken
the step to use the "upstream" way of booting. It is far more likely that
such a person also wants to use the upstream kernel (rather than the
downstream kernel).


Kind regards,
Niklas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-09-03 13:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-31 19:01 [Buildroot] [PATCH next v2 0/3] U-Boot on RPi boards Fiona Klute via buildroot
2024-08-31 19:01 ` [Buildroot] [PATCH next v2 1/3] board/raspberrypi: Support boot.scr for U-Boot Fiona Klute via buildroot
2024-08-31 19:01 ` [Buildroot] [PATCH next v2 2/3] board/raspberrypi: allow non-matching globs for DTBs Fiona Klute via buildroot
2024-08-31 19:01 ` [Buildroot] [PATCH next v2 3/3] configs/raspberrypicm4io_64_uboot_defconfig: new defconfig Fiona Klute via buildroot
2024-09-03 11:08   ` Niklas Cassel via buildroot
2024-09-03 13:10     ` Fiona Klute via buildroot
2024-09-03 13:29       ` Niklas Cassel via buildroot [this message]
2024-09-04 18:52         ` Fiona Klute via buildroot
     [not found]   ` <D7JTJDZQ286V.32BNGSIJOMVCI@gmail.com>
2025-02-05 18:07     ` Fiona Klute via buildroot
2025-02-07 10:14       ` Gaël PORTAY
2025-02-07 17:23         ` Fiona Klute via buildroot

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

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

  git send-email \
    --in-reply-to=ZtcPGjS9gktPuNNK@ryzen.lan \
    --to=buildroot@buildroot.org \
    --cc=Niklas.Cassel@wdc.com \
    --cc=fiona.klute@gmx.de \
    --cc=jp.baltazar.mendes@gmail.com \
    --cc=julien.grossholtz@openest.io \
    --cc=martin@barkynet.com \
    --cc=yann.morin.1998@free.fr \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.