Re: [meta-xilinx] Add fsbl.elf in boot.bin

2017-10-12 Thread yohan.boyer

>>No need to call it, its already hooked up by default.

>>http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/zynq_gem.c;h=f6bbcdc48eded15e2ed78d842c37b1b6ad46bea9;hb=HEAD#l591
>>http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/zynq_gem.c;h=f6bbcdc48eded15e2ed78d842c37b1b6ad46bea9;hb=HEAD#l670

>>Make sure you have those config options (linked in my previous email) setup 
>>correctly for your target, as well as having the bitstream loaded and it 
>>should setup the mac address when u-boot probes the ethernet device.
>Ok I understand the flow. 
>Bitstream is loaded before u-boot for sure.
>Since I'm using the u-boot from meta-xilinx, I should have the config options 
>set correctly right ?
>The only things I have to do actually is to attach correctly a PS i2c to EMIO, 
>then to pin N18 and N17 on zybo ?
>I will check this part tonigh !

Actually, looking into u-boot_2016.03 (this is this uboot version in morty by 
default right ?) it seems the zynq_zybo.h is different.
http://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/zynq_zybo.h;h=0882fe36bd82ef68b9515c0c265fc4015d673496;hb=df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa

And the commit in poky for u-boot point to this revision 
df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa.
So I need to upgrade the revision I guess. 
Maybe the best things to do is to upgrade my build from morty to pyro . It uses 
the new u-boot version 2017.01.
I'll try it I think.

Regards,
Yohan


-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] Add fsbl.elf in boot.bin

2017-10-11 Thread yohan.boyer

>No need to call it, its already hooked up by default.

>http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/zynq_gem.c;h=f6bbcdc48eded15e2ed78d842c37b1b6ad46bea9;hb=HEAD#l591
>http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/zynq_gem.c;h=f6bbcdc48eded15e2ed78d842c37b1b6ad46bea9;hb=HEAD#l670

>Make sure you have those config options (linked in my previous email) setup 
>correctly for your target, as well as having the bitstream loaded and it 
>should setup the mac address when u-boot probes the ethernet device.
Ok I understand the flow. 
Bitstream is loaded before u-boot for sure.
Since I'm using the u-boot from meta-xilinx, I should have the config options 
set correctly right ?
The only things I have to do actually is to attach correctly a PS i2c to EMIO, 
then to pin N18 and N17 on zybo ?
I will check this part tonigh !

>>>If you need FSBL then you will need meta-xilinx-tools, or you will need to 
>>>do it manually.
>> Understood. So what FSBL is for ?

>FSBL is supported by Xilinx, you can spam their support if you have issues :).
Right for sure ;p

>Regards,
>Nathan

Regards,
Yohan

-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] Add fsbl.elf in boot.bin

2017-10-11 Thread Nathan Rossi
On 11 October 2017 at 19:10,   wrote:
> On 11 October 2017 at 00:52,   wrote:
>>> Hello ,
>>>
>>>I'm working on zybo board, with meta-xilinx (morty) + my own layer to
>>>use my own design.
>>>
>>> I wonder to have unique MAC address on each board. There is a register
>>> with unique MAC address on each zybo. My wish is to read this address
>>> before boot in u-boot, and so have this address set in u-boot, then in 
>>> kernel.
>
>>I assume you are referring to the I2C EEPROM attached via the PL? You will 
>>need to at least connect this to the EMIO I2C of the PS to access it.
> This part is done yes.
>
>>> I'm not sure to know how to do that, I think I need to read it in fsbl
>>> with fsbl_hook ?
>
>>U-Boot can already read and setup the MAC from an I2C device, no need to deal 
>>with FSBL.
> Very nice !
>
>>The config to point at the I2C device is already configured by default for 
>>the Zybo.
>>http://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/zynq_zybo.h;h=808967cee331dd78380dc61e60f72c6643ea9e36;hb=HEAD#l17
>
>>The code that does the ethaddr setup.
>>http://git.denx.de/?p=u-boot.git;a=blob;f=board/xilinx/zynq/board.c;h=90ef542458a9c7a19e64be1c031282fe5f5cf3f6;hb=HEAD#l119
> Ok, where can I call this function ? I'm not sure to know exactly how is 
> working u-boot :s

No need to call it, its already hooked up by default.

http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/zynq_gem.c;h=f6bbcdc48eded15e2ed78d842c37b1b6ad46bea9;hb=HEAD#l591
http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/zynq_gem.c;h=f6bbcdc48eded15e2ed78d842c37b1b6ad46bea9;hb=HEAD#l670

Make sure you have those config options (linked in my previous email)
setup correctly for your target, as well as having the bitstream
loaded and it should setup the mac address when u-boot probes the
ethernet device.

>
>>> So I'll have a fsbl.elf, but is there an easy way to add this .elf to
>>> boot.bin set in meta-xilinx ?
>
>>No, not in meta-xilinx. The bootgen tool which is required for FSBL images is 
>>only available from the Xilinx tools, and only meta-xilinx-tools integrates 
>>with them.
> Ok.
>
>>> What I understood from meta-xilinx is : we include the u-boot.elf
>>> through SPL_BINARY into boot.bin ? How can I add also my fsbl.elf ?
>
>>In meta-xilinx the generated boot.bin only contains U-Boot SPL (full U-Boot 
>>is loaded from the boot device from the u-boot.img file).
> Ok.
>
>>> I’ve also seen this topic :
>>> https://lists.yoctoproject.org/pipermail/meta-xilinx/2017-April/002702
>>> .html
>>>
>>> But it seems it uses meta-xilinx-tools layer. Does I really need to
>>> use it, or there is an other way, I mean, other way than generated the
>>> full boot.bin from SDK (is this way correct ?) ?
>
>>If you need FSBL then you will need meta-xilinx-tools, or you will need to do 
>>it manually.
> Understood. So what FSBL is for ?

FSBL is supported by Xilinx, you can spam their support if you have issues :).

Regards,
Nathan

>
>>> Then, once I have this MAC address, how can I set it into uboot, then
>>> into kernel ?
>
>>See above regarding U-Boot loading it from I2C.
>
>>Regards,
>>Nathan
>
> Regards,
> Yohan
>
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] Add fsbl.elf in boot.bin

2017-10-11 Thread yohan.boyer
On 11 October 2017 at 00:52,   wrote:
>> Hello ,
>>
>>I'm working on zybo board, with meta-xilinx (morty) + my own layer to 
>>use my own design.
>>
>> I wonder to have unique MAC address on each board. There is a register 
>> with unique MAC address on each zybo. My wish is to read this address 
>> before boot in u-boot, and so have this address set in u-boot, then in 
>> kernel.

>I assume you are referring to the I2C EEPROM attached via the PL? You will 
>need to at least connect this to the EMIO I2C of the PS to access it.
This part is done yes.

>> I'm not sure to know how to do that, I think I need to read it in fsbl 
>> with fsbl_hook ?

>U-Boot can already read and setup the MAC from an I2C device, no need to deal 
>with FSBL.
Very nice !

>The config to point at the I2C device is already configured by default for the 
>Zybo.
>http://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/zynq_zybo.h;h=808967cee331dd78380dc61e60f72c6643ea9e36;hb=HEAD#l17

>The code that does the ethaddr setup.
>http://git.denx.de/?p=u-boot.git;a=blob;f=board/xilinx/zynq/board.c;h=90ef542458a9c7a19e64be1c031282fe5f5cf3f6;hb=HEAD#l119
Ok, where can I call this function ? I'm not sure to know exactly how is 
working u-boot :s

>> So I'll have a fsbl.elf, but is there an easy way to add this .elf to 
>> boot.bin set in meta-xilinx ?

>No, not in meta-xilinx. The bootgen tool which is required for FSBL images is 
>only available from the Xilinx tools, and only meta-xilinx-tools integrates 
>with them.
Ok.

>> What I understood from meta-xilinx is : we include the u-boot.elf 
>> through SPL_BINARY into boot.bin ? How can I add also my fsbl.elf ?

>In meta-xilinx the generated boot.bin only contains U-Boot SPL (full U-Boot is 
>loaded from the boot device from the u-boot.img file).
Ok.

>> I’ve also seen this topic :
>> https://lists.yoctoproject.org/pipermail/meta-xilinx/2017-April/002702
>> .html
>>
>> But it seems it uses meta-xilinx-tools layer. Does I really need to 
>> use it, or there is an other way, I mean, other way than generated the 
>> full boot.bin from SDK (is this way correct ?) ?

>If you need FSBL then you will need meta-xilinx-tools, or you will need to do 
>it manually.
Understood. So what FSBL is for ?

>> Then, once I have this MAC address, how can I set it into uboot, then 
>> into kernel ?

>See above regarding U-Boot loading it from I2C.

>Regards,
>Nathan

Regards,
Yohan

-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] Add fsbl.elf in boot.bin

2017-10-11 Thread Nathan Rossi
On 11 October 2017 at 00:52,   wrote:
> Hello ,
>
>
>
> I'm working on zybo board, with meta-xilinx (morty) + my own layer to use my
> own design.
>
> I wonder to have unique MAC address on each board. There is a register with
> unique MAC address on each zybo. My wish is to read this address before boot
> in u-boot, and so have this address set in u-boot, then in kernel.

I assume you are referring to the I2C EEPROM attached via the PL? You
will need to at least connect this to the EMIO I2C of the PS to access
it.

>
> I'm not sure to know how to do that, I think I need to read it in fsbl with
> fsbl_hook ?

U-Boot can already read and setup the MAC from an I2C device, no need
to deal with FSBL.

The config to point at the I2C device is already configured by default
for the Zybo.
http://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/zynq_zybo.h;h=808967cee331dd78380dc61e60f72c6643ea9e36;hb=HEAD#l17

The code that does the ethaddr setup.
http://git.denx.de/?p=u-boot.git;a=blob;f=board/xilinx/zynq/board.c;h=90ef542458a9c7a19e64be1c031282fe5f5cf3f6;hb=HEAD#l119

>
> So I'll have a fsbl.elf, but is there an easy way to add this .elf to
> boot.bin set in meta-xilinx ?

No, not in meta-xilinx. The bootgen tool which is required for FSBL
images is only available from the Xilinx tools, and only
meta-xilinx-tools integrates with them.

>
> What I understood from meta-xilinx is : we include the u-boot.elf through
> SPL_BINARY into boot.bin ? How can I add also my fsbl.elf ?

In meta-xilinx the generated boot.bin only contains U-Boot SPL (full
U-Boot is loaded from the boot device from the u-boot.img file).

>
>
>
> I’ve also seen this topic :
> https://lists.yoctoproject.org/pipermail/meta-xilinx/2017-April/002702.html
>
> But it seems it uses meta-xilinx-tools layer. Does I really need to use it,
> or there is an other way, I mean, other way than generated the full boot.bin
> from SDK (is this way correct ?) ?

If you need FSBL then you will need meta-xilinx-tools, or you will
need to do it manually.

>
>
>
> Then, once I have this MAC address, how can I set it into uboot, then into
> kernel ?

See above regarding U-Boot loading it from I2C.

Regards,
Nathan
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx