[meta-xilinx] mainline u-boot on zedboard

Nathan Rossi nathan at nathanrossi.com
Mon Jan 18 04:43:25 PST 2016


On Mon, Jan 18, 2016 at 9:35 PM,  <gmane at reliableembeddedsystems.com> wrote:
> Hi,
>
> On 2016-01-11 02:08, Nathan Rossi wrote:
>>
>>
>> You will need to modify zynq-common.h to enable it.
>>
>> diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
>> index 0ab6083..a844062 100644
>> --- a/include/configs/zynq-common.h
>> +++ b/include/configs/zynq-common.h
>> @@ -199,6 +199,8 @@
>>  #ifndef CONFIG_ENV_IS_NOWHERE
>>  # ifndef CONFIG_SYS_NO_FLASH
>>  #  define CONFIG_ENV_IS_IN_FLASH
>> +# elif defined(CONFIG_ZYNQ_QSPI)
>> +#  define CONFIG_ENV_IS_IN_SPI_FLASH
>>  # elif defined(CONFIG_SYS_NO_FLASH)
>>  #  define CONFIG_ENV_IS_NOWHERE
>>  # endif
>>
>> This will use the QSPI flash if available for storing the environment.
>> After this saveenv/etc. will work. I quickly tested on a Zybo (I don't
>> have a Zedboard) and it works quite well albeit slowing the boot a bit
>> (~1 second or so).
>
>
> I tried this on a zedboard with v2016.01 and it "kind of worked".
> What I mean is, it saved all my environment, but it looks like I need to set
> modeboot for it to pick up my uenvcmd.
>
> => set modeboot 'uenvcmd'
> => saveenv
> Saving Environment to SPI Flash...
> SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB,
> total 32 MiB
> Erasing SPI flash...Writing to SPI flash...done
> => print modeboot
> modeboot=uenvcmd
> => boot
>
> works
>
> ... but ..
>
> after a reboot I noticed that modeboot did not keep the value I wanted which
> most likely means that it was not poperly stored in the SPI flash:
>
> Hit any key to stop autoboot:  0
> =>
> =>
> =>
> => printe modeboot
> modeboot=sdboot
> =>
>
> so I tried:
>
> =>
> => setenv bootcmd 'run uenvcmd'
> => saveenv
> Saving Environment to SPI Flash...
> SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB,
> total 32 MiB
> Erasing SPI flash...Writing to SPI flash...done
> => boot
>
> ... which did the trick for me ...
>
> Since I guess you want to choose between norboot/sdboot/jtagboot/usbboot via
> the modeboot variable you might want to check why it's not saved in the SPI
> flash.

modeboot is a special environment variable that the zynq
'board_late_init' function sets based on the SLCR status. It is set
after the environment is loaded so its impossible to override via the
saved environment itself. But as you discovered 'bootcmd' is the
actual command that u-boot runs automatically.

Regards,
Nathan

>
> Regards,
>
> Robert
>



More information about the meta-xilinx mailing list