[U-Boot] [PATCH 5/5] ls2080ardb: Convert to distro boot

York Sun york.sun at nxp.com
Fri May 13 19:05:57 CEST 2016


On 05/13/2016 10:03 AM, Alexander Graf wrote:
> 
> 
>> Am 13.05.2016 um 18:21 schrieb York Sun <york.sun at nxp.com>:
>>
>>> On 05/13/2016 07:32 AM, Alexander Graf wrote:
>>>
>>>> Am 13.05.2016 um 16:26 schrieb Stuart Yoder <stuart.yoder at nxp.com>:
>>>>
>>>>
>>>>
>>>>> -----Original Message-----
>>>>> From: Alexander Graf [mailto:agraf at suse.de]
>>>>> Sent: Friday, May 13, 2016 7:22 AM
>>>>> To: u-boot at lists.denx.de
>>>>> Cc: Stuart Yoder <stuart.yoder at nxp.com>; york sun <york.sun at nxp.com>
>>>>> Subject: [PATCH 5/5] ls2080ardb: Convert to distro boot
>>>>>
>>>>> Most new systems in U-Boot these days make use of the generic "distro"
>>>>> framework which allows a user to have U-Boot scan for a bootable OS
>>>>> on all available media types.
>>>>>
>>>>> This patch converts the LS2080ARDB board to use that framework instead
>>>>> of booting from a hard coded flash offset.
>>>>>
>>>>> Signed-off-by: Alexander Graf <agraf at suse.de>
>>>>>
>>>>> ---
>>>>>
>>>>> This obviously means that we can no longer boot from said offset. Is
>>>>> that a reasonable thing to do or should I put the bootm back into the
>>>>> default boot command and only do distro boot if it fails?
>>>>
>>>> To date all armv8 FSL/NXP sdk releases, field engineers, etc have been using
>>>> bootm.  I'm a little concerned about changing the default boot command
>>>> right now...as I assume things will unexpectedly appear to just stop
>>>> working.  Or, is booting from the NOR flash one of the distro boot
>>>> "media" types?
>>>
>>> The problem with boot from NOR is that we have no source of information on what lies where. So distro boot can't have it in its target list, as you have to know magical offsets.
>>>
>>> We could put the magical bootm after tge distro list, but that would mean that field engineers get pxe boot with long timeouts first and then their NOR bootm booted.
>>>
>>> So the only option left that I can see is to always try magical offset NOR bootm and do distro boot if it fails. Then just tell people to write zeros to the NOR kernel offset and they get distro boot automatically.
>>
>> Alex,
>>
>> I suggest to attempt current boot method before moving on to other sources. I
>> presume booting from NOR would check the image header first. If the image is
>> valid, go ahead to boot it. Otherwise, move on.
> 
> Ok, will do.
> 
>>
>> Beside, it would be helpful to define a list and order of boot source.
> 
> That's what the patch does, no? See the BOOT_TARGET_DEVICES define. It's probably incomplete, but describes the boot order and boot sources.
> 

Yes I saw it. Would it be possible to use environmental variable for this
purpose, so users can specify the list and order? If it is too complicated, we
can live with the macro and recompile as needed.

York



More information about the U-Boot mailing list