Re: [meta-xilinx] [PATCH V5 0/3] Add support for Xilinx's QEMU

2016-10-11 Thread Nathan Rossi
On Tue, Oct 4, 2016 at 3:46 AM, Alistair Francis
 wrote:
> This patch series adds support to build Xilinx's QEMU and device trees
> which allows users to use the Xilinx fork of QEMU which has much better
> support for Xilinx products.
>
> This patch series is missing support for the run script, I'll start working
> on that now.
>
> This series has been rebased on Nathan's next-wip-v2 branch.
>
> Alistair Francis (3):
>   qemu: Build Xilinx's QEMU
>   qemu-devicetrees: Build the Xilinx QEMU device trees
>   zynqmp: Update the machines to take advantage of Xilinx's QEMU

Applied.

Thanks,
Nathan

>
>  conf/machine/ep108-zynqmp.conf  |  4 ++
>  conf/machine/zcu102-zynqmp.conf |  4 ++
>  recipes-devtools/qemu/qemu-devicetrees_2.2.5.bb | 33 +++
>  recipes-devtools/qemu/qemu-xilinx_2.2.5.bb  | 54 
> +
>  4 files changed, 95 insertions(+)
>  create mode 100644 recipes-devtools/qemu/qemu-devicetrees_2.2.5.bb
>  create mode 100644 recipes-devtools/qemu/qemu-xilinx_2.2.5.bb
>
> --
> 2.7.4
>
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] FSBL.elf and BOOT.BIN using bitbake and SDCard booting

2016-10-11 Thread Giordon Stark
Hi,

Adding u-boot-dtb.img changes nothing according to the engineers working on
the board. They still see the same error message previously quoted.

Something else must be off?

Giordon

On Tue, Oct 11, 2016 at 12:00 AM Nathan Rossi 
wrote:

> On Tue, Oct 11, 2016 at 1:17 PM, Giordon Stark  wrote:
>
> > On Mon, Oct 10, 2016 at 9:59 PM Nathan Rossi 
> wrote:
>
> >>
>
> >> On Tue, Oct 11, 2016 at 12:15 PM, Giordon Stark 
> wrote:
>
> >>
>
> >> > Thanks, some elaboration below!
>
> >>
>
> >> >
>
> >>
>
> >> > On Mon, Oct 10, 2016 at 8:58 PM Nathan Rossi 
>
> >> > wrote:
>
> >>
>
> >> >>
>
> >>
>
> >> >> On Tue, Oct 11, 2016 at 9:49 AM, Giordon Stark 
>
> >> >> wrote:
>
> >>
>
> >> >>
>
> >>
>
> >> >> > Hi,
>
> >>
>
> >> >>
>
> >>
>
> >> >> >
>
> >>
>
> >> >>
>
> >>
>
> >> >> > I am using bitbake to build on top of a custom machine [eg: using
> my
>
> >>
>
> >> >>
>
> >>
>
> >> >> > devicetree] and then generating the following files which I renamed
>
> >> >> > into
>
> >>
>
> >> >> > a
>
> >>
>
> >> >>
>
> >>
>
> >> >> > format appropriate for meta-xilinx
>
> >>
>
> >> >>
>
> >>
>
> >> >> >
>
> >>
>
> >> >>
>
> >>
>
> >> >> > -rwxr-xr-x 1 kratsg  59K Oct  5 17:31 BOOT.BIN
>
> >>
>
> >> >>
>
> >>
>
> >> >> > -rw-r--r-- 1 kratsg  22K Oct  5 17:30 devicetree.dtb
>
> >>
>
> >> >>
>
> >>
>
> >> >> > -rw-r--r-- 1 kratsg 3.2M Oct  5 17:30 uImage
>
> >>
>
> >> >>
>
> >>
>
> >> >> > -rw-r--r-- 1 kratsg  26M Oct  5 17:15 uramdisk.image.gz
>
> >>
>
> >> >>
>
> >>
>
> >> >> > -rwxr-xr-x 1 kratsg 2.4M Oct  5 17:30 u-boot.elf
>
> >>
>
> >> >>
>
> >>
>
> >> >> >
>
> >>
>
> >> >>
>
> >>
>
> >> >> > The machine is defined here:
>
> >>
>
> >> >>
>
> >>
>
> >> >> >
>
> >>
>
> >> >> >
>
> >> >> >
> https://github.com/kratsg/meta-l1calo/blob/master/conf/machine/gfex-prototype2.conf
>
> >>
>
> >> >>
>
> >>
>
> >> >> >
>
> >>
>
> >> >>
>
> >>
>
> >> >> > The image I make (bitbake zynq-base) is defined here:
>
> >>
>
> >> >>
>
> >>
>
> >> >> >
>
> >>
>
> >> >> >
>
> >> >> >
> https://github.com/kratsg/meta-l1calo/blob/master/recipes-core/images/zynq-base.bb
>
> >>
>
> >> >>
>
> >>
>
> >> >> >
>
> >>
>
> >> >>
>
> >>
>
> >> >> > So i'm hoping this is relatively straightforward. Now I get a
> little
>
> >>
>
> >> >>
>
> >>
>
> >> >> > confused about actually booting this on the board using the SD
> Card.
>
> >>
>
> >> >>
>
> >>
>
> >> >> > According to the docs
>
> >>
>
> >> >>
>
> >>
>
> >> >> > (
> https://github.com/Xilinx/meta-xilinx/blob/master/docs/BOOT.sdcard)
>
> >> >> > it
>
> >>
>
> >> >>
>
> >>
>
> >> >> > seems that I need to only use four files generated from bitbake:
>
> >>
>
> >> >>
>
> >>
>
> >> >> > devicetree.dtb, uImage, uramdisk.image.gz, and u-boot.elf; and then
>
> >> >> > use
>
> >>
>
> >> >> > the
>
> >>
>
> >> >>
>
> >>
>
> >> >> > Xilinx SDK to create an FSBL.elf, use the u-boot.elf from bitbake,
>
> >> >> > and
>
> >>
>
> >> >>
>
> >>
>
> >> >> > create a boot image (BOOT.BIN). Why isn't this able to be done
> using
>
> >>
>
> >> >>
>
> >>
>
> >> >> > bitbake? When I try everything without using the Xilinx SDK, I see
>
> >> >> > the
>
> >>
>
> >> >> > error
>
> >>
>
> >> >>
>
> >>
>
> >> >> > message [1].
>
> >>
>
> >> >>
>
> >>
>
> >> >>
>
> >>
>
> >> >>
>
> >>
>
> >> >> Those docs are a bit old, for the last release I re-wrote the
>
> >>
>
> >> >>
>
> >>
>
> >> >> documentation as README.booting.md in the root of meta-xilinx.
>
> >>
>
> >> >>
>
> >>
>
> >> >>
>
> >>
>
> >> >>
>
> >>
>
> >> >>
>
> >>
>
> >> >>
>
> >> >>
> https://github.com/Xilinx/meta-xilinx/blob/master/README.booting.md#loading-via-sd
>
> >>
>
> >> >>
>
> >>
>
> >> >>
>
> >>
>
> >> >
>
> >>
>
> >> > Awesome, I was not aware that the docs were rewritten. I didn't even
>
> >> > realize
>
> >>
>
> >> > there was a README.booting.md at the top level. Perhaps that can be
>
> >>
>
> >> > clarified somewhere?
>
> >>
>
> >>
>
> >>
>
> >> It is mentioned in the README, maybe removing the old docs will remove
>
> >>
>
> >> any confusion?
>
> >
>
> >
>
> > That might be best! Or perhaps move that new README.booting into the docs
>
> > directory to replace?
>
> >
>
> >>
>
> >>
>
> >>
>
> >>
>
> >> >
>
> >>
>
> >> >>
>
> >>
>
> >> >>
>
> >>
>
> >> >> Also I am not sure about your question regarding boot.bin generation.
>
> >>
>
> >> >>
>
> >>
>
> >> >> But if you machine provides the ps7_init_gpl* files (your machine is
>
> >>
>
> >> >>
>
> >>
>
> >> >> including zc706, so they are available) it is able to build
> u-boot-spl
>
> >>
>
> >> >>
>
> >>
>
> >> >> (which does the same job as FSBL) and wrap that in the boot.bin
> format
>
> >>
>
> >> >>
>
> >>
>
> >> >> for use. If you need FSBL specifically then that is a separate issue.
>
> >>
>
> >> >
>
> >>
>
> >> >
>
> >>
>
> >> > For right now, we are using a custom board with a ZC706. We'll move to
>
> >> > the
>
> >>
>
> >> > Zynq+ in the next generation (as well as bump up 

Re: [meta-xilinx] [PATCH] arm-trusted-firmware: Use constants for memory addresses

2016-10-11 Thread Nathan Rossi
On Sat, Oct 1, 2016 at 1:47 AM, Manjukumar Harthikote Matha
 wrote:
>
>
>> -Original Message-
>> From: Mike Looijmans [mailto:mike.looijm...@topic.nl]
>> Sent: Friday, September 30, 2016 12:32 AM
>> To: Nathan Rossi
>> Cc: Manjukumar Harthikote Matha; meta-xilinx@yoctoproject.org
>> Subject: Re: [meta-xilinx] [PATCH] arm-trusted-firmware: Use constants for 
>> memory
>> addresses
>>
>> On 29-09-16 16:22, Nathan Rossi wrote:
>> > On Thu, Sep 29, 2016 at 7:46 PM, Mike Looijmans 
>> wrote:
>> >> On 28-09-16 17:20, Nathan Rossi wrote:
>> >>>
>> >>> On Wed, Sep 28, 2016 at 10:50 AM, Manjukumar Harthikote Matha
>> >>>  wrote:
>> 
>>  Hi Mike,
>> 
>>  <.>
>> >>>
>> >>>LD[unexport] = "1"
>> >>>
>> >>> +ZYNQMP_ATF_MEM_BASE = "0xfffe5000"
>> >>> +ZYNQMP_ATF_MEM_SIZE ="0x16000"
>> >>
>> >> Maybe reading the load address from elf might help. I think MEM_BASE
>> >> address might change going forward.
>> >>
>> >> For example:
>> >> https://github.com/Xilinx/arm-trusted-
>> firmware/commit/eb4fa652d424b895
>> >> 7a927c6137e2ae3652b0b1bb
>> >>
>> >
>> > This patch was to accommodate that. The current version will load it at
>> > the wrong
>> > location.
>> >
>>  I am looking to see if we can read from the generated elf and populate
>>  the MEM_BASE and MEM_SIZE
>>  With the current patch, I think it will be maintenance burden every
>>  release, trying to mitigate it if possible.
>> >>>
>> >>>
>> >>> The generated bl31.elf is populated with the correct entry point address:
>> >>> Entry point address:   0xfffe5000
>> >>>
>> >>> Which is pointing to bl31_entrypoint,
>> >>>
>> >>> https://github.com/Xilinx/arm-trusted-
>> firmware/blob/eb4fa652d424b8957a927c6137e2ae3652b0b1bb/bl31/bl31.ld.S#L35
>> >>>
>> >>> Which could be used as an alternate source of the address:
>> >>>  625: fffe5000   212 FUNCGLOBAL DEFAULT1
>> >>> bl31_entrypoint
>> >>>
>> >>> My only query is whether the ZYNQ_ATF_MEM_* variables make sense as
>> >>> overrides? Essentially if there is a potential use case when bl31
>> >>> needs to be built to execute in an older/newer environment that
>> >>> differs from the default values (of the current version used)?
>> >>>
>> >>
>> >> What I really wanted is the opposite, get the address from the binary. 
>> >> That
>> >> would solve the "magic number" that you have to put in the recipe. I
>> >> couldn't find a way to do that, so I did the opposite, make sure that both
>> >> code and recipe share the same magic number.
>> >>
>> >> I had no intention of making this "configurable" or so, I just wanted it
>> >> consistent.
>> >>
>> >>
>> >
>> > That makes it simpler then :). I have a sent a patch that does the
>> > dynamic reading from the elf to solve this. If you could please give
>> > it a test and let me know that it works as you expect.
>>
>> Looks fine, and a lot better than what I came up with. Probably won't be able
>> to test today though.

Did you manage to get around to giving it a test Mike? Would like to
have some confirmation that it works in a functional environment
before I merge it :).

>>
>
>
> Whats the patch, is it on mailing list?

Sorry didn't see your query. The patch is here:
https://lists.yoctoproject.org/pipermail/meta-xilinx/2016-September/002083.html

And staged here at the moment:
https://github.com/nathanrossi/meta-xilinx/commit/e3b2e6e6102ad8c2f88cd90788ca6c9de6597b5b

Regards,
Nathan

>
> Thanks
> Manju
>
>
> This email and any attachments are intended for the sole use of the named 
> recipient(s) and contain(s) confidential information that may be proprietary, 
> privileged or copyrighted under applicable law. If you are not the intended 
> recipient, do not read, copy, or forward this email message or any 
> attachments. Delete this email message and any attachments immediately.
>
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


[meta-xilinx] How to make uImage for zynqmp

2016-10-11 Thread Cai, Chuntian (GE Transportation)
Hi Both,

Thanks, I will try use SD card.


-Original Message-
From: Mike Looijmans [mailto:mike.looijm...@topic.nl] 
Sent: Tuesday, October 11, 2016 4:26 PM
To: meta-xilinx@yoctoproject.org
Cc: Nathan Rossi; Cai, Chuntian (GE Transportation)
Subject: EXT: Re: [meta-xilinx] How to make uImage for zynqmp

With a 100+MB rootfs, you might want to consider using SD card or NFS for the 
rootfs. Would save a lot of time...


On 11-10-16 09:53, Nathan Rossi wrote:
> On Tue, Oct 11, 2016 at 5:37 PM, Cai, Chuntian (GE Transportation)
>  wrote:
>>
>> Hi,
>>
>>
>>
>> How to config yocto to include CRC information?
>
> You are mis-reading the error, the CRC check is informing you that the
> ramdisk is corrupt (aka it doesn't match the CRC). This is because
> your ramdisk is 102MB, which will not fit between the memory range
> 0x600 to 0x700 (a 16MB segment). And when you load the dtb at
> 0x700 it will overwrite part of your rootfs image.
>
> Just swap the addresses you are using for the dtb and rootfs, this
> will make sure the rootfs has more than enough space to load into
> memory.
>
> Regards,
> Nathan
>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> 

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: mike.looijm...@topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail





-Original Message-
>> From: Nathan Rossi [mailto:nat...@nathanrossi.com]
>> Sent: Monday, October 10, 2016 6:21 PM
>> To: Mike Looijmans
>> Cc: Cai, Chuntian (GE Transportation); meta-xilinx@yoctoproject.org
>> Subject: EXT: Re: [meta-xilinx] How to make uImage for zynqmp
>>
>>
>>
>> On Mon, Oct 10, 2016 at 8:00 PM, Mike Looijmans  
>> wrote:
>>
>>> On 10-10-16 11:44, Cai, Chuntian (GE Transportation) wrote:
>>

>>
 Hi Nathan
>>

>>
 I am not aware of that uImage is obsoleted for arm64, could you tell
>>
 me how to use booti command to boot linux?
>>

>>
 What address and how to set dtb and rootfs?
>>
>>>
>>
>>>
>>
>>> Ah, now we're getting to the real question.
>>
>>>
>>
>>> Just looking at the u-boot source code reveils how it's done:
>>
>>>
>>
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Xilinx
>>
>>> _u-2Dboot-2Dxlnx_blob_master_include_configs_xilinx-5Fzynqmp.h-23L189&
>>
>>> d=DQIBaQ=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI=Ei3floKgst6Ph
>>
>>> YpovUjTVlWwDEc4CVl_t-gxqM04eQY=P2RIjgA4fo1ZTJDct27dCOVsc2iB2qKhyu6p8
>>
>>> ZytjAk=ErswBjlcqCrJiEJlVzG9bh4U0LNmJ6YNIMrfD-8fing=
>>
>>>
>>
>>> booti $kernel_addr - $fdt_addr
>>
>>>
>>
>>
>>
>> Yep, works the same as the other boot* style commands. The following 
>> addresses should work for zynqmp:
>>
>>
>>
>> tftpboot 0x8 Image
>>
>> tftpboot 0x600 core-image-minimal-ep108-zynqmp.cpio.gz.u-boot
>>
>> tftpboot 0x700 Image-zynqmp-ep108.dtb booti 0x8 0x600 0x700
>>
>>
>>
>> Regards,
>>
>> Nathan
>>
>>
>>
>>>
>>
>>>
>>

>>
>>>
>>
>>> 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: mike.looijm...@topicproducts.com
>>
>>> Website: www.topicproducts.com
>>
>>>
>>
>>> Please consider the environment before printing this e-mail
>>
>>>
>>
>>>
>>
>>>
>>
>>>
>>
>>>
>>
>>> -Original Message-
>>

>>
 From: Nathan Rossi [mailto:nat...@nathanrossi.com]
>>
 Sent: Monday, October 10, 2016 5:31 PM
>>
 To: Cai, Chuntian (GE Transportation)
>>
 Cc: meta-xilinx@yoctoproject.org; Mike Looijmans
>>
 Subject: EXT: Re: [meta-xilinx] How to make uImage for zynqmp
>>

>>
 On Mon, Oct 10, 2016 at 3:46 PM, Mike Looijmans
>>
 
>>
 wrote:
>>
>
>>
> On 09-10-16 03:20, Cai, Chuntian (GE Transportation) wrote:
>>
>
>>
>> I using bitbake build Linux system for zcu102 board.
>>
>>
>>
>> I issue bitbake core-image-x11 , then I can found Image file in the
>>
>> deploy folder, But I could not find uImage, and I want use uImage
>>

>>

>>
 uImage is not a valid target for aarch64/arm64 in the kernel (like it
>>
 is for arm). This is because "uImage" is actually shorthand for
>>
 u-boot wrapped zImage. And arm64 does not have support for zImage,
>>
 thus also does not have a uImage target.
>>

>>
 (arm targets)
>>
 https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/
>>
 arch/arm/Makefile?id=refs/tags/v4.8#n365
>>
 (arm64 targets)
>>

>>
 https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/
>>
 arch/arm64/Makefile?id=refs/tags/v4.8#n135
>>

>>
 ---
>>

>>
 A good question is why do you want to use uImage? If you are not
>>
 aware it is possible to 

[meta-xilinx] How to make uImage for zynqmp

2016-10-11 Thread Cai, Chuntian (GE Transportation)
Hi,



How to config yocto to include CRC information?







[cid:image001.png@01D223D5.5B9B3430]







-Original Message-
From: Nathan Rossi [mailto:nat...@nathanrossi.com]
Sent: Monday, October 10, 2016 6:21 PM
To: Mike Looijmans
Cc: Cai, Chuntian (GE Transportation); meta-xilinx@yoctoproject.org
Subject: EXT: Re: [meta-xilinx] How to make uImage for zynqmp



On Mon, Oct 10, 2016 at 8:00 PM, Mike Looijmans 
> wrote:

> On 10-10-16 11:44, Cai, Chuntian (GE Transportation) wrote:

>>

>> Hi Nathan

>>

>> I am not aware of that uImage is obsoleted for arm64, could you tell

>> me how to use booti command to boot linux?

>>

>> What address and how to set dtb and rootfs?

>

>

> Ah, now we're getting to the real question.

>

> Just looking at the u-boot source code reveils how it's done:

>

> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Xilinx

> _u-2Dboot-2Dxlnx_blob_master_include_configs_xilinx-5Fzynqmp.h-23L189&

> d=DQIBaQ=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI=Ei3floKgst6Ph

> YpovUjTVlWwDEc4CVl_t-gxqM04eQY=P2RIjgA4fo1ZTJDct27dCOVsc2iB2qKhyu6p8

> ZytjAk=ErswBjlcqCrJiEJlVzG9bh4U0LNmJ6YNIMrfD-8fing=

>

> booti $kernel_addr - $fdt_addr

>



Yep, works the same as the other boot* style commands. The following addresses 
should work for zynqmp:



tftpboot 0x8 Image

tftpboot 0x600 core-image-minimal-ep108-zynqmp.cpio.gz.u-boot

tftpboot 0x700 Image-zynqmp-ep108.dtb booti 0x8 0x600 0x700



Regards,

Nathan



>

>

>>

>

> 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: 
> mike.looijm...@topicproducts.com

> Website: www.topicproducts.com

>

> Please consider the environment before printing this e-mail

>

>

>

>

>

> -Original Message-

>>

>> From: Nathan Rossi [mailto:nat...@nathanrossi.com]

>> Sent: Monday, October 10, 2016 5:31 PM

>> To: Cai, Chuntian (GE Transportation)

>> Cc: meta-xilinx@yoctoproject.org; Mike 
>> Looijmans

>> Subject: EXT: Re: [meta-xilinx] How to make uImage for zynqmp

>>

>> On Mon, Oct 10, 2016 at 3:46 PM, Mike Looijmans

>> >

>> wrote:

>>>

>>> On 09-10-16 03:20, Cai, Chuntian (GE Transportation) wrote:

>>>

 I using bitbake build Linux system for zcu102 board.



 I issue bitbake core-image-x11 , then I can found Image file in the

 deploy folder, But I could not find uImage, and I want use uImage

>>

>>

>> uImage is not a valid target for aarch64/arm64 in the kernel (like it

>> is for arm). This is because "uImage" is actually shorthand for

>> u-boot wrapped zImage. And arm64 does not have support for zImage,

>> thus also does not have a uImage target.

>>

>> (arm targets)

>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/

>> arch/arm/Makefile?id=refs/tags/v4.8#n365

>> (arm64 targets)

>>

>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/

>> arch/arm64/Makefile?id=refs/tags/v4.8#n135

>>

>> ---

>>

>> A good question is why do you want to use uImage? If you are not

>> aware it is possible to boot a linux "Image" with the U-Boot "booti"

>> command.

>>

>> However it is possible to wrap the kernel image with mkimage (or a

>> FIT blob if you are prepared to configure the image tree). For

>> wrapping with mkimage the command you will need is similar to:

>>

>> mkimage -A arm64 -O linux -T kernel -C none -a 0x8 -e 0x8 -d

>> Image Image.ub

>>

>> Also if you need mkimage, run the command using the mkimage built by

>> OE from the sysroot relative to the tmp/deploy/images//

>> directory of your build (assuming you are on a x86_64 host):

>>

>> ../../../sysroots/x86_64-linux/usr/bin/mkimage ...

>>





 Could you tell me how to build uImage rather than Image

>>>

>>>

>>>

>>> Just setting KERNEL_IMAGETYPE="uImage" in the kernel recipe or

>>> machine config would do that.

>>>

>>> I think you can even specify multiple types in there.

>>

>>

>> You can, KERNEL_IMAGETYPES += ""

>>

>> Regards,

>> Nathan

>>

>>>

>>>

>>>

>>> 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: 
>>> mike.looijm...@topicproducts.com

>>> Website: www.topicproducts.com

>>>

>>> Please consider the environment before printing this e-mail

>>>

>>>

>>>

>>>

>>>

>>> --

>>> ___

>>> meta-xilinx mailing list

>>> meta-xilinx@yoctoproject.org

>>> 

[meta-xilinx] FSBL.elf and BOOT.BIN using bitbake and SD Booting

2016-10-11 Thread Giordon Stark
Hi,

I am using bitbake to build on top of a custom machine [eg: using my
devicetree] and then generating the following files which I renamed into a
format appropriate for meta-xilinx

-rwxr-xr-x 1 kratsg  59K Oct  5 17:31 BOOT.BIN
-rw-r--r-- 1 kratsg  22K Oct  5 17:30 devicetree.dtb
-rw-r--r-- 1 kratsg 3.2M Oct  5 17:30 uImage
-rw-r--r-- 1 kratsg  26M Oct  5 17:15 uramdisk.image.gz
-rwxr-xr-x 1 kratsg 2.4M Oct  5 17:30 u-boot.elf

The machine is defined here:
https://github.com/kratsg/meta-l1calo/blob/master/conf/machine/gfex-prototype2.conf

The image I make (bitbake zynq-base) is defined here:
https://github.com/kratsg/meta-l1calo/blob/master/recipes-core/images/zynq-base.bb


So i'm hoping this is relatively straightforward. *Now I get a little
confused about actually booting this on the board using the SD Card.* According
to the docs (
https://github.com/Xilinx/meta-xilinx/blob/master/docs/BOOT.sdcard) it
seems that I need to only use four files generated from bitbake:
devicetree.dtb, uImage, uramdisk.image.gz, and u-boot.elf; and then use the
Xilinx SDK to create an FSBL.elf, use the u-boot.elf from bitbake, and
create a boot image (BOOT.BIN). Why isn't this able to be done using
bitbake? When I try everything without using the Xilinx SDK, I see the
error message [1].

My second (*less important*) question is how to get bitbake to generate the
filesystem in the right format? Right now, I have to run

mkimage -A arm -T ramdisk -C gzip -d
zynq-base-gfex-prototype2.cpio.gz.u-boot uramdisk.image.gz

in order to get the correct uramdisk.image.gz . Is there a way to make
bitbake generate the right image so I don't need to run this command so
that u-boot understands my image when booting?

Giordon

[1]
U-Boot SPL 2015.04 (Oct 05 2016 - 13:12:31)
mmc boot
reading fpga.bin
spl_load_image_fat: error reading image fpga.bin, err - -1
spl: error reading image fpga.bin, err - 1
reading system.dtb
spl_load_image_fat_os: error reading image system.dtb, err - -1
reading u-boot-dtb.img
spl_load_image_fat: error reading image u-boot-dtb.img, err - -1
### ERROR ### Please RESET the board ###
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


[meta-xilinx] How To: bitbake embed the dtb file into the u-boot.elf

2016-10-11 Thread Thomas Horton, HCL America
The u-boot.elf from the BSP

Xilinx-ZCU102-2016.2/pre-built/linux/images/u-boot.elf

Has system.dtb embedded into it.

When building from bitbake how can this be configured so my u-boot.elf contains 
the dtb and I don't have to lug around two files?

The sample provided for booting a RAMDISK contains two files BOOT.BIN and 
image.ub.  I can successfully get to this only using the u-boot.elf from the 
pre-built otherwise I have to also load system.dtb to my SD Card.  So 
understanding how to build it into the u-boot.elf from bitbake would be nicer.

Thanks,
Tom


::DISCLAIMER::


The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information 
could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in 
transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on 
the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the 
author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, 
dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written 
consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please 
delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and 
other defects.



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


Re: [meta-xilinx] How to make uImage for zynqmp

2016-10-11 Thread Mike Looijmans
With a 100+MB rootfs, you might want to consider using SD card or NFS for the 
rootfs. Would save a lot of time...



On 11-10-16 09:53, Nathan Rossi wrote:

On Tue, Oct 11, 2016 at 5:37 PM, Cai, Chuntian (GE Transportation)
 wrote:


Hi,



How to config yocto to include CRC information?


You are mis-reading the error, the CRC check is informing you that the
ramdisk is corrupt (aka it doesn't match the CRC). This is because
your ramdisk is 102MB, which will not fit between the memory range
0x600 to 0x700 (a 16MB segment). And when you load the dtb at
0x700 it will overwrite part of your rootfs image.

Just swap the addresses you are using for the dtb and rootfs, this
will make sure the rootfs has more than enough space to load into
memory.

Regards,
Nathan


















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: mike.looijm...@topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail





-Original Message-

From: Nathan Rossi [mailto:nat...@nathanrossi.com]
Sent: Monday, October 10, 2016 6:21 PM
To: Mike Looijmans
Cc: Cai, Chuntian (GE Transportation); meta-xilinx@yoctoproject.org
Subject: EXT: Re: [meta-xilinx] How to make uImage for zynqmp



On Mon, Oct 10, 2016 at 8:00 PM, Mike Looijmans  wrote:


On 10-10-16 11:44, Cai, Chuntian (GE Transportation) wrote:







Hi Nathan







I am not aware of that uImage is obsoleted for arm64, could you tell



me how to use booti command to boot linux?







What address and how to set dtb and rootfs?











Ah, now we're getting to the real question.







Just looking at the u-boot source code reveils how it's done:







https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Xilinx



_u-2Dboot-2Dxlnx_blob_master_include_configs_xilinx-5Fzynqmp.h-23L189&



d=DQIBaQ=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI=Ei3floKgst6Ph



YpovUjTVlWwDEc4CVl_t-gxqM04eQY=P2RIjgA4fo1ZTJDct27dCOVsc2iB2qKhyu6p8



ZytjAk=ErswBjlcqCrJiEJlVzG9bh4U0LNmJ6YNIMrfD-8fing=







booti $kernel_addr - $fdt_addr








Yep, works the same as the other boot* style commands. The following addresses 
should work for zynqmp:



tftpboot 0x8 Image

tftpboot 0x600 core-image-minimal-ep108-zynqmp.cpio.gz.u-boot

tftpboot 0x700 Image-zynqmp-ep108.dtb booti 0x8 0x600 0x700



Regards,

Nathan




















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: mike.looijm...@topicproducts.com



Website: www.topicproducts.com







Please consider the environment before printing this e-mail























-Original Message-







From: Nathan Rossi [mailto:nat...@nathanrossi.com]



Sent: Monday, October 10, 2016 5:31 PM



To: Cai, Chuntian (GE Transportation)



Cc: meta-xilinx@yoctoproject.org; Mike Looijmans



Subject: EXT: Re: [meta-xilinx] How to make uImage for zynqmp







On Mon, Oct 10, 2016 at 3:46 PM, Mike Looijmans







wrote:







On 09-10-16 03:20, Cai, Chuntian (GE Transportation) wrote:







I using bitbake build Linux system for zcu102 board.







I issue bitbake core-image-x11 , then I can found Image file in the



deploy folder, But I could not find uImage, and I want use uImage











uImage is not a valid target for aarch64/arm64 in the kernel (like it



is for arm). This is because "uImage" is actually shorthand for



u-boot wrapped zImage. And arm64 does not have support for zImage,



thus also does not have a uImage target.







(arm targets)



https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/



arch/arm/Makefile?id=refs/tags/v4.8#n365



(arm64 targets)







https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/



arch/arm64/Makefile?id=refs/tags/v4.8#n135







---







A good question is why do you want to use uImage? If you are not



aware it is possible to boot a linux "Image" with the U-Boot "booti"



command.







However it is possible to wrap the kernel image with mkimage (or a



FIT blob if you are prepared to configure the image tree). For



wrapping with mkimage the command you will need is similar to:







mkimage -A arm64 -O linux -T kernel -C none -a 0x8 -e 0x8 -d



Image Image.ub







Also if you need mkimage, run the command using the mkimage built by



OE from the sysroot relative to the tmp/deploy/images//



directory of your build (assuming you are on a x86_64 host):







../../../sysroots/x86_64-linux/usr/bin/mkimage ...















Could you tell me how to build uImage rather than Image















Just setting KERNEL_IMAGETYPE="uImage" in the kernel recipe or



machine config would do that.







I 

Re: [meta-xilinx] How to make uImage for zynqmp

2016-10-11 Thread Nathan Rossi
On Tue, Oct 11, 2016 at 5:37 PM, Cai, Chuntian (GE Transportation)
 wrote:
>
> Hi,
>
>
>
> How to config yocto to include CRC information?

You are mis-reading the error, the CRC check is informing you that the
ramdisk is corrupt (aka it doesn't match the CRC). This is because
your ramdisk is 102MB, which will not fit between the memory range
0x600 to 0x700 (a 16MB segment). And when you load the dtb at
0x700 it will overwrite part of your rootfs image.

Just swap the addresses you are using for the dtb and rootfs, this
will make sure the rootfs has more than enough space to load into
memory.

Regards,
Nathan

>
>
>
>
>
>
>
>
>
>
>
>
>
> -Original Message-
> From: Nathan Rossi [mailto:nat...@nathanrossi.com]
> Sent: Monday, October 10, 2016 6:21 PM
> To: Mike Looijmans
> Cc: Cai, Chuntian (GE Transportation); meta-xilinx@yoctoproject.org
> Subject: EXT: Re: [meta-xilinx] How to make uImage for zynqmp
>
>
>
> On Mon, Oct 10, 2016 at 8:00 PM, Mike Looijmans  
> wrote:
>
> > On 10-10-16 11:44, Cai, Chuntian (GE Transportation) wrote:
>
> >>
>
> >> Hi Nathan
>
> >>
>
> >> I am not aware of that uImage is obsoleted for arm64, could you tell
>
> >> me how to use booti command to boot linux?
>
> >>
>
> >> What address and how to set dtb and rootfs?
>
> >
>
> >
>
> > Ah, now we're getting to the real question.
>
> >
>
> > Just looking at the u-boot source code reveils how it's done:
>
> >
>
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Xilinx
>
> > _u-2Dboot-2Dxlnx_blob_master_include_configs_xilinx-5Fzynqmp.h-23L189&
>
> > d=DQIBaQ=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI=Ei3floKgst6Ph
>
> > YpovUjTVlWwDEc4CVl_t-gxqM04eQY=P2RIjgA4fo1ZTJDct27dCOVsc2iB2qKhyu6p8
>
> > ZytjAk=ErswBjlcqCrJiEJlVzG9bh4U0LNmJ6YNIMrfD-8fing=
>
> >
>
> > booti $kernel_addr - $fdt_addr
>
> >
>
>
>
> Yep, works the same as the other boot* style commands. The following 
> addresses should work for zynqmp:
>
>
>
> tftpboot 0x8 Image
>
> tftpboot 0x600 core-image-minimal-ep108-zynqmp.cpio.gz.u-boot
>
> tftpboot 0x700 Image-zynqmp-ep108.dtb booti 0x8 0x600 0x700
>
>
>
> Regards,
>
> Nathan
>
>
>
> >
>
> >
>
> >>
>
> >
>
> > 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: mike.looijm...@topicproducts.com
>
> > Website: www.topicproducts.com
>
> >
>
> > Please consider the environment before printing this e-mail
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > -Original Message-
>
> >>
>
> >> From: Nathan Rossi [mailto:nat...@nathanrossi.com]
>
> >> Sent: Monday, October 10, 2016 5:31 PM
>
> >> To: Cai, Chuntian (GE Transportation)
>
> >> Cc: meta-xilinx@yoctoproject.org; Mike Looijmans
>
> >> Subject: EXT: Re: [meta-xilinx] How to make uImage for zynqmp
>
> >>
>
> >> On Mon, Oct 10, 2016 at 3:46 PM, Mike Looijmans
>
> >> 
>
> >> wrote:
>
> >>>
>
> >>> On 09-10-16 03:20, Cai, Chuntian (GE Transportation) wrote:
>
> >>>
>
>  I using bitbake build Linux system for zcu102 board.
>
> 
>
>  I issue bitbake core-image-x11 , then I can found Image file in the
>
>  deploy folder, But I could not find uImage, and I want use uImage
>
> >>
>
> >>
>
> >> uImage is not a valid target for aarch64/arm64 in the kernel (like it
>
> >> is for arm). This is because "uImage" is actually shorthand for
>
> >> u-boot wrapped zImage. And arm64 does not have support for zImage,
>
> >> thus also does not have a uImage target.
>
> >>
>
> >> (arm targets)
>
> >> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/
>
> >> arch/arm/Makefile?id=refs/tags/v4.8#n365
>
> >> (arm64 targets)
>
> >>
>
> >> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/
>
> >> arch/arm64/Makefile?id=refs/tags/v4.8#n135
>
> >>
>
> >> ---
>
> >>
>
> >> A good question is why do you want to use uImage? If you are not
>
> >> aware it is possible to boot a linux "Image" with the U-Boot "booti"
>
> >> command.
>
> >>
>
> >> However it is possible to wrap the kernel image with mkimage (or a
>
> >> FIT blob if you are prepared to configure the image tree). For
>
> >> wrapping with mkimage the command you will need is similar to:
>
> >>
>
> >> mkimage -A arm64 -O linux -T kernel -C none -a 0x8 -e 0x8 -d
>
> >> Image Image.ub
>
> >>
>
> >> Also if you need mkimage, run the command using the mkimage built by
>
> >> OE from the sysroot relative to the tmp/deploy/images//
>
> >> directory of your build (assuming you are on a x86_64 host):
>
> >>
>
> >> ../../../sysroots/x86_64-linux/usr/bin/mkimage ...
>
> >>
>
> 
>
> 
>
>  Could you tell me how to build uImage rather than Image
>
> >>>
>
> >>>
>
> >>>
>
> >>> Just setting KERNEL_IMAGETYPE="uImage" in the kernel recipe or
>
> >>> machine config would do that.
>
> >>>
>
> >>> I think you can even 

Re: [meta-xilinx] cross-compiling

2016-10-11 Thread Edward Wingate
Thanks Nathan and Mike, I just installed the SDK from Yocto and the
Linux executables it generates are working fine.


On Tue, Oct 11, 2016 at 12:31 AM, Nathan Rossi  wrote:
> On Tue, Oct 11, 2016 at 5:17 PM, Mike Looijmans  
> wrote:
>> I suspect one of your toolchains is using hard-float ABI and the other
>> soft-float. This will work fine if you don't exchange any floating-point
>> data.
>
> Xilinx changed their default toolchain provided by XSDK to arm hard
> float in a recent version (v2016.1?).
>
> As such meta-xilinx also switched (krogoth and newer) to defaulting to
> hard-float as there was no longer a need to default to soft-fp for
> compatibility. You can read a bit about it here:
>
> https://lists.yoctoproject.org/pipermail/meta-xilinx/2016-February/001466.html
>
>>
>> The solution is to use the same toolchain for everything. Don't use the
>> Yocto toolchain for the rootfs and then the Xilinx toolchain for an
>> executable.
>
> This is definitely recommended, you can build an "SDK" with Yocto if
> you need the toolchain for standalone development.
>
> Some reference links:
> http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#cross-development-toolchain-generation
> http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#sdk-dev-environment
>
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


[meta-xilinx] cross-compiling

2016-10-11 Thread Edward Wingate
I cross-compiled an application to run on Linux on the Zynq-7020.
Trying to execute it gives "No such file or directory" error.

# file app_hello.elf
app_hello.elf: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for
GNU/Linux 4.4.0,
BuildID[sha1]=06498863e79d3eabe670610b2cbb0440272f047e, not stripped

I don't have /lib/ld-linux-armhf.so.3, but I do have
/lib/ld-linux.so.3.  I symlinked ld-linux-armhf.so.3 to ld-linux.so.3
and my application runs fine now.

Where did things go wrong?  Is my Yocto build not properly creating
ld-linux-armhf.so.3?  Or is my application cross-compilation using the
wrong ld-linux?  I'm using Xilinx SDK 2016.2 to cross-compile the
Linux application.

Thanks for any help.

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