On 23-08-17 22:46, Manjukumar Harthikote Matha wrote:
Hi Mike,



Kind regards,

Mike Looijmans
System Expert

TOPIC Products
Materiaalweg 4, NL-5681 RJ Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: [email protected]
Website: www.topicproducts.com

Please consider the environment before printing this e-mail



-----Original Message-----
From: [email protected] [mailto:meta-xilinx-
[email protected]] On Behalf Of Mike Looijmans
Sent: Tuesday, August 22, 2017 11:02 PM
To: Manjukumar Harthikote Matha <[email protected]>; Giordon Stark
<[email protected]>; Jean-Francois Dagenais <[email protected]>
Cc: [email protected]
Subject: Re: [meta-xilinx] How to boot the ZynqMP?

I managed to get it booting with some manual work.

- The meta-xilinx overlay delivers the ATF and PMU firmware.
- My own layer delivers u-boot and kernel and devicetree for my own board

The FSBL I've manually built using Vivado/SDK. The trick to get that working 
was that
Vivado version >= 2017.1 was required. It doesn't work (any more) with the 2016
versions. I installed 2017.2 and only then the FSBL was able to load the PMU and
ATF. Apparently there's a dependency there.

So all that is left is to automate the process of generating fsbl and boot.bin.

I'm pretty sure this can be done using just u-boot, since u-boot has support 
for ATF
loading and, as I gather from various commits, the PMU as well. It can also 
create a
boot.bin without the aid of bootgen. It provides the first-stage loader as well.
However, it seems to a well-kept secret how to actually integrate the PMU. I can
generate a bootloader this way, but I don't know where to put the ATF and PMU. I
suspect they're to be stored in a FIT image.

So for now I'm stuck with the much less streamlined FSBL flow.


On 22-08-17 20:25, Manjukumar Harthikote Matha wrote:
Hi Giordon,

meta-xilinx-tools with xsct in your path would enable the same way ,
instead of using the Vivado GUI to generate fsbl/pmu/boot.bin

http://www.wiki.xilinx.com/Using+meta-xilinx-tools+layer


So how does one use this layer to just generate the FSBL and boot.bin?

Basically on dependencies,
https://github.com/Xilinx/meta-xilinx-tools/blob/master/conf/machine/include/machine-xilinx-zynqmp.inc

The dependency is to build boot.bin once this layer is included by the above 
file.
Boot.bin defines dependencies for zynqmp as
https://github.com/Xilinx/meta-xilinx-tools/blob/master/conf/machine/include/machine-xilinx-zynqmp.inc#L10

Meaning boot.bin has dependencies on fsbl, bitstream (if it exists), pmu 
firmware, atf and u-boot to be built and will create a bif file according to 
these settings

Each of these BIF_PARTITION_ATTR is associated with additional attributed. For 
example :
https://github.com/Xilinx/meta-xilinx-tools/blob/master/conf/machine/include/machine-xilinx-zynqmp.inc#L14-L16
BIF_PARTITION_ATTR[fsbl] ?= "bootloader"
This defines the attrition attribute in the bif
BIF_PARTITION_IMAGE[fsbl] ?= "${DEPLOY_DIR_IMAGE}/fsbl-${MACHINE}.elf"
This defines where to find the binary generated
BIF_PARTITION_DEPENDS[fsbl] ?= "virtual/fsbl"
This defines which recipe it depends on to build the required binary

This would translate as [bootlader] fsbl.elf in the bif file at the end

Similarly we have defined the attributes required for bitstream, pmu, atf and 
u-boot

The bif file will be compiled using the bootgen  by xilinx-bootbin.bbclass
https://github.com/Xilinx/meta-xilinx-tools/blob/master/classes/xilinx-bootbin.bbclass#L77

Below provides the information regarding how fsbl builds using the HDF and xsct:

bif partition attributes the need to build virtual/fsbl
virtual/fsbl is provided by 
https://github.com/Xilinx/meta-xilinx-tools/blob/master/recipes-bsp/fsbl/fsbl_git.bb#L6

This recipe depends on HDF being provided and xsct in the path.

https://github.com/Xilinx/meta-xilinx-tools/blob/master/recipes-bsp/fsbl/fsbl_git.bb#L8
https://github.com/Xilinx/meta-xilinx-tools/blob/master/classes/xsctapp.bbclass#L1
https://github.com/Xilinx/meta-xilinx-tools/blob/master/classes/xsctbase.bbclass#L48

xsctbase looks for xsct using
https://github.com/Xilinx/meta-xilinx-tools/blob/master/classes/xsctbase.bbclass#L1
similary depends on hdf
https://github.com/Xilinx/meta-xilinx-tools/blob/34e96ca0dfd2cfe101d07bc6db06fc9ae1629ce4/classes/xsctbase.bbclass#L22


If I have my own board, and my own machine.conf in my own bitbake layer, what do I need to do to build a "boot.bin" for that in a scripted flow?


--
_______________________________________________
meta-xilinx mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-xilinx

Reply via email to