im8mn: Loading U-Boot via serial download mode

Marek Vasut marex at denx.de
Thu Apr 21 11:10:30 CEST 2022


On 4/21/22 10:56, Tommaso Merciai wrote:
> On Thu, Apr 21, 2022 at 08:53:57AM +0200, Michael Nazzareno Trimarchi wrote:
>> Hi
>>
>> On Wed, Apr 20, 2022 at 11:29 PM Adam Ford <aford173 at gmail.com> wrote:
>>>
>>> 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.
>>>
>>
>> This was the code posted to address it
>>
>> https://www.mail-archive.com/u-boot@lists.denx.de/msg430587.html
>>
>> If I remember
> 
> Hi All,
> Right, patchset can be found here
> 
> https://patchwork.ozlabs.org/project/uboot/list/?series=283787&state=%2A&archive=both

Please re-read comments in 4/4 about how this breaks every single board 
except the mn/mp evk and how to implement it properly without duplication.


More information about the U-Boot mailing list