[meta-xilinx] [U-BOOT PATCH] zynq_common: Add uEnv.txt boot environment load support

Philip Balister philip at balister.org
Wed Sep 4 04:47:38 PDT 2013


On 09/04/2013 02:58 AM, Michal Simek wrote:
> On 09/04/2013 07:21 AM, Nathan Rossi wrote:
>>> -----Original Message-----
>>> From: Michal Simek [mailto:michal.simek at xilinx.com]
>>> Sent: Wednesday, September 04, 2013 2:42 PM
>>> To: Philip Balister
>>> Cc: Michal Simek; Nathan Rossi; git; meta-xilinx at yoctoproject.org;
>>> Jagannadha Sutradharudu Teki
>>> Subject: Re: [U-BOOT PATCH] zynq_common: Add uEnv.txt boot environment
>>> load support
>>>
>>> On 09/03/2013 09:43 PM, Philip Balister wrote:
>>>> On 09/02/2013 03:40 AM, Michal Simek wrote:
>>>>> Hi,
>>>>>
>>>>> On 08/30/2013 08:13 AM, Nathan Rossi wrote:
>>>>>> Add support for using a uEnv.txt file for loading and or modifying the
>>>>>> existing boot environment during a Zynq "sdboot". If the environment
>>>>>> fails to load during the "sdboot" continue booting from SD normally.
>>>>>>
>>>>>> This uEnv.txt and bootenv/uenv default environment variables are based
>>>>>> on the implementation used in omap3_beagle.h.
>>>>>>
>>>>>> Signed-off-by: Nathan Rossi <nathan.rossi at xilinx.com>
>>>>>> ---
>>>>>> Hi All,
>>>>>>
>>>>>> This is a feature that has been requested by some users of the meta-
>>> xilinx
>>>>>> layer. It is the additional of an optional 'uEnv.txt' boot environment
>>> file
>>>>>> which allows the modification of the SD boot. It is very useful for
>>> development
>>>>>> purposes and also in production environments. (There are also some
>>> specific
>>>>>> development boards that would greatly benefit from this, specifcally
>>> the
>>>>>> Parallella board which cannot directly boot from SD card due to its
>>> use of SD_1
>>>>>> instead of SD_0, this would make boot environment modifications
>>> significantly
>>>>>> easier)
>>>>>>
>>>>>> Philip has done an initial implementation of this feature see:
>>>>>> https://github.com/balister/meta-
>>> xilinx/commit/8b66cb1edb65c34c332888e907aec4333422af6b#L1R1
>>>>>>
>>>>>> However I would like to see this accepted into the u-boot-xlnx for the
>>> next
>>>>>> release. So I have reworked Philip's initial implementation (based on
>>> some
>>>>>> comments from Michal).
>>>>>>
>>>>>> When this is accepted into the master-next branch of u-boot-xlnx I
>>> will backport
>>>>>> it for use in the Yocto meta-xilinx layer.
>>>>>>
>>>>>> Regards,
>>>>>> Nathan
>>>>>> ---
>>>>>>  include/configs/zynq_common.h |   28 ++++++++++++++++++++++------
>>>>>>  1 file changed, 22 insertions(+), 6 deletions(-)
>>>>>
>>>>> Applied to the master-next.
>>>>
>>>> I built u-boot-2013.07 + this patch and it failed to ru the commands
>>>> from the uEnv.txt file until I increased the value of SYS_MAXARGS.
>>>>
>>>
>>> Nathan: Have you tested that patch?
>>>
>>> Thanks,
>>> Michal
>>>
>>>
>>
>> Hi Michal,
>>
>> Yes I tested the patch, however I did not test long environment variables which appears to be the issue that Philip has. This is the uEnv.txt he is using. https://github.com/balister/meta-xilinx/blob/boot-bin-1/recipes-bsp/u-boot/u-boot-xlnx/zedboard-zynq7/uEnv.txt-sd-boot
>>
>> Which is not an issue with the uEnv commands, but merely an issue with environment variables in u-boot in general. Other platforms that use the uEnv.txt implementation tend to increase the CONFIG_SYS_MAXARGS definition to a value above the default but not all do.
>>
>> omap3_beagle (which increases it to 32)
>> http://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/omap3_beagle.h;h=c1245e7b841e1c633b217ba0daf933abe363df0f;hb=HEAD#l324
>> omap3_mvblx.h (which sets it to 16)
>> http://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/omap3_mvblx.h;h=0c88419f245eff14a7b8cd2b3244fec6d05fc088;hb=HEAD#l220
>>
>> Is 'CONFIG_SYS_MAXARGS' something that u-boot-xlnx would want to have increased, or does it affect the expectations of U-Boot to significantly?
> 
> ok - Let's increase this value to 32.
> Philip is 32 enough for your purpose?

I arrived at this value empirically :) Let's stick with this and get
more to test. I'm not sure how much more people will try to customize
the boot. I had to adjust the zedboard kernel args to include rootwait
and I can't remember if that is in the version I pushed. People may also
need to set the screen size.

Philip


> 
> Thanks,
> Michal
> 
> 
> 
> 



More information about the meta-xilinx mailing list