nathanrossi / meta-parallella

Yocto layer to support the Parallella board from Adapteva
MIT License
20 stars 8 forks source link

latest version of parallella is not supported #3

Closed peteasa closed 8 years ago

peteasa commented 8 years ago

You may not have seen the announcement https://www.parallella.org/2016/04/11/major-parallella-sdk-release-2016-3/

I am starting to look at what is needed to bring meta-parallella up to date with kernel 4.4 and latest stock sdk plus latest oh based bit bin file.

Please let me know if you can help with this.

nathanrossi commented 8 years ago

Hi @peteasa, it is on my to do list to refresh this layer and bring it up to speed with the released 'krogoth' Yocto/OE release and the Parallella SDK release. However I am currently occupied by getting the meta-xilinx layer released, but I should able to start on updating this layer within the next week or two.

I did notice that there is no updated "hdmi" FPGA design, so not sure whether there is overlap with the new kernel/esdk and old elink design?

peteasa commented 8 years ago

Hi @nathanrossi & @olajep,

Couple of things that I have spotted with supporting Parallella SDK Release (2016.3) with a yocto build:

@olajep the bitstream in pubuntu is not released in git repository that contains a License file. This gave me a bitbake error when trying to get the yocto build working.

@olajep The eSDK is not released from the ftp site http://ftp.parallella.org/esdk/ ie is not available as a zip. Again this causes me some problems with loading the eSDK in the yocto build.

@nathanrossi I have create an HDMI version of the bit bin files, but the ADI drivers needed may not yet be in the official parallella-linux release, I only proved the HDMI version with the ADI kernel.

My present temp workround for these issues is to copy the bitstream files to my github https://github.com/peteasa/examples.git I also plan to zip up the sdk and do something similar if Ola and the team are too busy with "the brain" to help at the moment.

olajep commented 8 years ago

Hi,

@peteasa Great to see this happening!

@olajep the bitstream in pubuntu is not released in git repository that contains a License file. This gave me a bitbake error when trying to get the yocto build working.

I added a LICENSE file to the pubuntu git repo , is that sufficient?

@olajep The eSDK is not released from the ftp site http://ftp.parallella.org/esdk/ ie is not available as a zip. Again this causes me some problems with loading the eSDK in the yocto build.

Do you need it with the Epiphany toolchain (e-gcc, e-ld, ...) built for ARM, x86_64 or both? I was under the impression that you already build the epiphany toolchain in yocto, no?

// Ola

peteasa commented 8 years ago

Hi Ola,

Well I have now got a build and will try it out! ... The license file may not have been necessary because I may be able to work round using SHA1 values anyway thanks for the addition.

In the meta-parallella layer the eSDK is copied from the web site and placed into the root file system. I think that the compilers and everything needed for epiphany eSDK are required. I seem to recall that all the example build scripts expect the compilers in a particular place on the filesystem.. bit of a bind. but that is the way it was configured. The result is you can build epiphany code on the parallella target.

In the meta-epiphany layer I build the eSDK from scratch.. it might take me longer to get that up to date.. the idea of building from scratch is that the eSDK then becomes available not only on the root filesystem but also in the yocto SDK. I put the epiphany cross compilers in the usual /usr/bin locations, So with meta-epiphany one can build on the build machine and copy and use epiphany elf files on the target OR build and use on the target. So this is a bit more flexible, but takes more to get going in yocto!

Peter

peteasa commented 8 years ago

@olajep I have almost sorted a version of the meta-parallella with the latest kernel 4.4. However to get this to work for everyone I still need the eSDK tar.gz file available from http://downloads.parallella.org/esdk/esdk.2016.3_linux_${DOWNLOAD_ARCH}.tar.gz. For now I am using a local copy of this file that I created from the pubuntu SD card image in /opt/adapteva/esdk.2016.3:

tar -zcf ./esdk.2016.3_linux_armv7l.tar.gz esdk.2016.3

Would it be possible to create this tar.gz file and get is saved on the http://downloads.parallella.org/esdk/ site as an official release? The file will contain all the eSDK files and epiphany / host compilers.

olajep commented 8 years ago

@peteasa

There will be a esdk 2016.3.1 release soon to address some bugs. Will wait until then to create a esdk tarball. Sorry for any inconvenience.

// Ola

On 2016-05-08 22:08, peteasa wrote:

@olajep https://github.com/olajep I have almost sorted a version of the meta-parallella with the latest kernel 4.4. However to get this to work for everyone I still need the eSDK tar.gz file available from http://downloads.parallella.org/esdk/esdk.2016.3_linux_${DOWNLOAD_ARCH}.tar.gz http://downloads.parallella.org/esdk/esdk.2016.3_linux_%24%7BDOWNLOAD_ARCH%7D.tar.gz. For now I am using a local copy of this file that I created from the pubuntu SD card image in /opt/adapteva/esdk.2016.3:

|tar -zcf ./esdk.2016.3_linux_armv7l.tar.gz esdk.2016.3|

Would it be possible to create this tar.gz file and get is saved on the http://downloads.parallella.org/esdk/ site as an official release? The file will contain all the eSDK files and epiphany / host compilers.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/nathanrossi/meta-parallella/issues/3#issuecomment-217743131

olajep commented 8 years ago

@peteasa Here: ftp://ftp.parallella.org/esdk/esdk.2016.3.1_linux_armv7l.tar.gz

forum post: https://parallella.org/forums/viewtopic.php?f=48&t=3682

finally!!! :)

peteasa commented 8 years ago

Hi @olajep, @nathanrossi,

I have tested this and it all seems to work. Yocto version is jethro. On the target I compiled and ran the hello world and the mailbox applications and checked that the fpga interrupt count incremented. Note not yet on Yocto version krogoth but at least its a start.

@nathanrossi: I got a number of QA warnings about libraries in the wrong location. Also I have not yet used the epiphany elf machine id for packaging epiphany code. I also find that I have to re-create the epiphany SDK so that epiphany-examples (https://github.com/adapteva/epiphany-examples) will build on the target. I added links rather than copied files. Let me know what you think if you have time.

nathanrossi commented 8 years ago

@peteasa I've had a look at your pull request, looks good. I tried it on krogoth and it builds fine (apart from the QA warning). It does boot fine, and e-gcc/etc work well on the target. But the elink interface seems to have some issues (i2c regulator never probes) but that might be because I am booting with u-boot-spl (instead of the fsbl+u-boot that comes pre-programmed), I will investigate :).

nathanrossi commented 8 years ago

So just updating this.

I have been working on various pieces of this layer in a branch nrossi/updates. This includes things like:

I was working on getting the HDMI support working, but I haven't been able to get it working correctly. I am able to get the axi-hdmi-tx core outputting with the ADV7511 using the colorpattern mode but was not able to get the framebuffer working correctly. @peteasa I was using your design to do this since the 'oh' repository does not contain any support for the HDMI output at the moment. I tried porting across the current drivers for axi-hdmi-tx, axi-vdma and adv7511/3 from the adi kernel, it seems there is still quite of bit of code for the HDMI support that is needed. For now at least I am going to leave the HDMI stuff, I am not sure how used or useful it is for people that are trying to use the meta-parallella layer?

@olajep I suspect you might be interested in the U-Boot+SPL support. I have been using this for a little while now and it works well for booting SPL from the QSPI flash and then loading U-Boot from the SD card. I plan to get the boot flow working better and booting the kernel/dts/bitstream from a fitimage (and auto-selecting 7010/20 bitstreams). I am interested to hear your opinions on the topic.

peteasa commented 8 years ago

@nathanrossi I built the oh version of the oh fpga with analog devices inc hdl_2015_r2 libraries so the 2015_R2 linux-analogdevicesinc drivers will likely be the best match. My testing has been with the v3.19 kernel from linux-analogdevicesinc branch 2015_R1 and that works.. but my plan is to move to v4.x kernel and patch the drivers into the parallella-linux kernel. I have not yet checked the differences between the 2015_R1 and 2015_R2 drivers. Also the oh fpga seems to have moved on quite a bit. My version is based on a version of oh in March prior to mio and edma register map changes

Not easy to guess at what people want. Quite a few people are content with the ubuntu distribution. I am guessing that those that want hdmi and ubuntu have got used to using headless and have given up waiting for the hdmi part to work. I get a steady trickle of interest in the yocto environment and try to keep my releases supporting hdmi but it is quite difficult for one person to keep up to date with the changes.

I would like to keep control over the device tree because I plan to add bits to the fpga. Not sure how easy this will be now that you plan to move to the kernel device tree.

I like the idea of loading U-Boot from the SD card, that would make it a lot easier to take control over more of the system. Does this result in the things like the fabric clocks being configured from U-Boot that is loaded from the SD card and if so how do the regulators gets configured? At the moment the regulators are configured via I2C and I thought that the fabric and I2C had to be sorted early in the boot process so that the correct voltages are set. But then perhaps in your design all of that is done from the U-Boot loaded from the SD card so what happens if something goes wrong with the U-Boot, what are the regulator voltages for the FPGA GPIO banks?

peteasa commented 8 years ago

@nathanrossi I am now working with the v4.4 kernel. My hdmi monitor locks onto the hdmi signal and the hdmi sound works so that is progress..

Update: USB also working now.. Update: HDMI fully working - well I displayed a good picture with fim and sound works so that is good enough for me.

peteasa commented 8 years ago

@nathanrossi: Having experimented with the HDMI version I pushed the patches and changes that I made to:

  1. USB changes https://github.com/peteasa/meta-parallella/tree/usbupdates
  2. HDMI changes https://github.com/peteasa/meta-parallella/tree/hdmiupdates

Next step would be to take a branch off updates and try to apply similar changes. I am guessing that I would also need to clone parallella-linux and make changes to the device tree etc.

@olajep: is there a plan to catchup parallella-linux from linux-analogdevicesinc so that the latest adi drivers are in the parallella-linux version of the kernel?

Update: just to clarify I am using linux-analogdevicesinc branch 2016_R1 fe07ae73916d16457f02b572a3050544c26a5078 and parallella-linux branch parallella-linux-2016.3 eb7c3a109b494e7f27387d119882b7a127759ada

nathanrossi commented 8 years ago

So thanks to @peteasa and his work on the HDMI support (see #7).

This means that everything that was previously available has been updated. I have tested the nrossi/updates branch against master OE and krogoth both working great. As such I have now merged the branch into master and created a krogoth branch, however for the moment I will keep the krogoth branch tracking the master branch (but targeting the krogoth OE release).