[U-Boot] Zynq Zybo booting with mainline U-Boot

Michal Simek monstr at monstr.eu
Tue Feb 3 11:08:39 CET 2015


Hi Simon and Masahiro,

On 02/03/2015 08:32 AM, Masahiro Yamada wrote:
> Hi Simon,
> 
> 
> On Mon, 2 Feb 2015 22:00:25 -0700
> Simon Glass <sjg at chromium.org> wrote:
> 
>> Hi,
>>
>> I have one of boards and would like to get mainline U-Boot booting on it.
>>
>> I have followed the instructions for creating a BOOT.BIN file comprised of:
>>
>> - boot.elf
>> - .bit file
>> - u-boot.elf
>>
>> and putting it on a a micro-SD card.
>>
>> This works OK with the diligent master branch from github. I can boot normally.
>>
>> However this is 2013.10. Mainline U-Boot uses device tree so
>> presumably the elf file does not work. I expect we need to use
>> u-boot-dtb.bin.

I think the best what you can do is simple disable CONFIG_OF_CONTROL
from mainline u-boot and do not use now.
This is what I do in xilinx tree but OF_CONTROL is also working fine
but needs some setup.

>>
>> However since this is not an elf file I'm not sure how to build the
>> image using the 'Create Zynq Boot Image' tool.
>>
>> I don't see any instructions in REAME.zynq about how to create an SD card.
>>
>> Any pointers please?
>>
> 
> 
> I have a Zynq ZC706 board.
> 
> The follwing is what I tried to run u-boot mainline.
> 
> 
> I hope it will work for Zybo board, too.

Zybo will be just the same.

> 
> 
> [1] If you are using Xilinx hardware tool (Vivado or ISE)
>     you can generate  ps7_init.[ch] or ps7_init_gpl.[ch].
> 
>     Copy the C file and the header into borad/xilinx/zynq directory
> 
> 
> [2] Build
> 
>     make zynq_zybo_defconfig  && make
> 
> 
> [3] Download the python script to generate boot.bin
> 
>    git clone git://github.com/Xilinx/u-boot-xlnx.git
> 
>     Copy  tools/zynq-boot-bin.py   to  ~/bin  or somewhere you like


In future I want to move this script to be the part of mkimage
but it has low priority now.



> [4] Generate boot.bin
> 
> zynq-boot-bin.py -o boot.bin -u u-boot/spl/u-boot-spl.bin
> 
> 
> [5] Copy  boot.bin and u-boot-dtb.img  to your SD card
> 
> 
> 
> 
> Please give it a try.
> 
> The problem about the instruction above is FPAG bit file is not loaded.

yes - but if you use xilinx tree I have also added support for loading
bitstream by SPL. I just haven't sent it to mainline yet.
But you can simple load bitstream in full u-boot which is fully supported
in mainline.


> Another way instead of [4] might be:
> 
> 
> Describe foo.bif as follows
> 
> image:
> {
>         [bootloader]fsbl.elf
>         fpga.bit
>         [load=0x04000000,startup=0x04000000]u-boot/u-boot-dtb.bin
> }
> 
> and 
> $ bootgen -image foo.bif -w on -o boot.bin
> 

yes - this should also work.

> I have not working on Zynq these days.

why not? :-)

> I hope Michal can support us.

Simon: Let me know if you need any my help on this.
I have zybo here that I can try it.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150203/21a7f832/attachment.sig>


More information about the U-Boot mailing list