Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel via buildroot <buildroot@buildroot.org>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Niklas Cassel <cassel@kernel.org>,
	Damien Le Moal <dlemoal@kernel.org>,
	Kilian Zinnecker <kilian.zinnecker@mail.de>,
	Niklas Cassel via buildroot <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH 2/2] configs/rock5b_defconfig: enable uboot-env on the SD card
Date: Thu, 3 Oct 2024 20:29:24 +0000	[thread overview]
Message-ID: <Zv7-oGt7awRaUxVO@ryzen.lan> (raw)
In-Reply-To: <Zv6f6eMFxAUl5EuI@ryzen.lan>

On Thu, Oct 03, 2024 at 03:45:13PM +0200, Niklas Cassel wrote:
> 
> Second approach:
> 
> I tried to create an empty partition:
> 	partition uboot-env {
> 		offset = 16M
> 		size = 64K
> 	}
> 
> Then I can see that uboot uses the default environment:
> Loading Environment from MMC... *** Warning - bad CRC, using default environment
> 
> However, it then continues trying to PXE boot.
> 
> It doesn't try to boot using extlinux from mmc partition 2.
> 
> Looking at why, it seems that it doesn't even find the boot flow.
> 
> 
> $ bootflow scan mmc
> $ bootflow list
> <nothing>
> 
> If I don't have the uboot-env partition:
> 
> $ bootflow scan mmc
> $ bootflow list
> Showing all bootflows
> Seq  Method       State   Uclass    Part  Name                      Filename
> ---  -----------  ------  --------  ----  ------------------------  ----------------
>   0  extlinux     ready   mmc          1  mmc@fe2c0000.bootdev.part /boot/extlinux/extlinux.conf
> ---  -----------  ------  --------  ----  ------------------------  ----------------
> (1 bootflow, 1 valid)
> 
> 
> So for some reason, bootflow does not find the extlinux if it is not on
> partition 1... I've looked at the bootflow code in uboot, an it appears
> to be able to scan multiple partitions on a device, so I'm not sure why
> it is not working.

I found out why uboot bootflow scan did not find this partition:
The partition was not marked bootable.

Apparently uboot doesn't care about the partition being marked bootable
if it is the first partition, but if it is not on the first partition,
it has to be marked bootable.

Will submit a V2 with this approach, as it is much cleaner.


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

  reply	other threads:[~2024-10-03 20:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-09 18:21 [Buildroot] [PATCH 0/2] rock5b quality of life improvements Niklas Cassel via buildroot
2024-09-09 18:21 ` [Buildroot] [PATCH 1/2] configs/rock5b: enable mdev to enable automatic module loading Niklas Cassel via buildroot
2024-09-14 20:15   ` Thomas Petazzoni via buildroot
2024-09-09 18:21 ` [Buildroot] [PATCH 2/2] configs/rock5b_defconfig: enable uboot-env on the SD card Niklas Cassel via buildroot
2024-09-14 20:20   ` Thomas Petazzoni via buildroot
2024-09-17  8:35     ` Niklas Cassel via buildroot
2024-09-17  8:46       ` Niklas Cassel via buildroot
2024-09-25 20:26       ` Thomas Petazzoni via buildroot
2024-10-03 13:45         ` Niklas Cassel via buildroot
2024-10-03 20:29           ` Niklas Cassel via buildroot [this message]
2024-10-03 13:49         ` Niklas Cassel 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=Zv7-oGt7awRaUxVO@ryzen.lan \
    --to=buildroot@buildroot.org \
    --cc=Niklas.Cassel@wdc.com \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=kilian.zinnecker@mail.de \
    --cc=thomas.petazzoni@bootlin.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox