im8mn: Loading U-Boot via serial download mode

Adam Ford aford173 at gmail.com
Wed Apr 20 23:29:04 CEST 2022


On Wed, Apr 20, 2022 at 3:16 PM Fabio Estevam <festevam at gmail.com> wrote:
>
> Hi Michael,
>
> On Wed, Apr 20, 2022 at 4:53 PM Michael Nazzareno Trimarchi
> <michael at amarulasolutions.com> wrote:
>
> >> Set CONFIG_ENV_IS_NOWHERE=y and rebuild.  It will likely boot.
> >
> >
> > That code should be dropped because it's really buggy. We already sent several patches. I prefer some registered mechanism and not those board, arch etc function definition.
>
> Just to confirm: you are saying adding CONFIG_ENV_IS_NOWHERE=y is not
> an acceptable solution and that a
> a better solution needs to be implemented, correct?
>
> Care to point to previous patches that were sent to address this issue?

This problem is the code in arch/arm/mach-imx/imx8m/soc.c:

#if defined(CONFIG_IMX8MN) || defined(CONFIG_IMX8MP)
struct rom_api *g_rom_api = (struct rom_api *)0x980;

enum boot_device get_boot_device(void)
<snip>

get_boot_device() assumes that all users want the environmental
variables to be stored in a different location depending on the boot
device.  When booting from USB, none of the environmental variable
locations are given, so nowhere is the only option.

There is another issue where some people want their environmental
variables in the same place all the time regardless of what the boot
device was.  This code also breaks that functionality.
For some reason it's only applied to 8MN and 8MP, so only their
environment settings are affected and not 8MQ or 8MM.

When I build, I just delete the function, so my environment is where I
want it.  It's far from ideal, but there doesn't seem to be consensus.

adam

>
> Thanks


More information about the U-Boot mailing list