Finally I see!

Forum about Parallella boot process, linux kernel, distros, SD-cards, etc.

Finally I see!

Postby claudio4parallella » Mon Sep 04, 2017 4:33 pm

Wow!
may be useful for others who are going to buy from digikey or amazon.com the last Parallellas .

At the end, after some attempts with different images, having tested Parabuntu-2016.11.1-hdmi-z7010, then previous recent versions, tha last attempt with

Ubuntu14.04-hdmi-z7010-2014.06.11 with esdk 5.13.9.10

was finally fully working .

SO, I finally had a chance to see on my HDMI monitor what I never saw from parallella-examples :

para-para
aobech
mandelbrot
....

and I discovered a full Ubuntu/Linaro version is available with this version of img for Parallella (15Gb of space).

The gap or price paied is that the sdk is at old version if compared with last Adapteva img.

But I could have all the examples working even if with different SD cards.

May be the problem is COPRTHR 1.6 not working with last image ?
claudio4parallella
 
Posts: 60
Joined: Thu Aug 10, 2017 3:48 pm

Re: Finally I see!

Postby MatthiasP » Wed Aug 29, 2018 12:51 pm

Hi claudio4parallella and everyone,
I started my master thesis on the parallella - hopefully not to late to hop on the train :D

I encountered also a problem with these "native hdmi" examples, which tries to directly write to the frame buffer /dev/fb0
Currently I investigate why they do not work, but using the latest image from the github releases (2016.11 7020 with hdmi) and executing as root (not parallella) in a tty it worked for aobech, but not for mandelbrot.
For my purpose (image processing debugging) this is sufficient, but executing as root makes me goosebumps. Probably it is a read permission issue with the shared libraries.

I looked at the Makefile and recognised if one "make" the aobech project , that it is without direct frame buffer writing . Instead, the coprocessor operates in a separate buffer and the arm is copying it to the /dev/fb0. If you uncomment the added compiler flag in the Makefile, it does not work, like the mandelbrot example. The board hang up, so maybe the smem address of the frame buffer is faulty? Has anyone a guess?

Does anybody know, what is wrong with these examples?

Many greetings from Germany,
Matthias
MatthiasP
 
Posts: 3
Joined: Tue Aug 28, 2018 2:54 pm

Re: Finally I see!

Postby olajep » Thu Aug 30, 2018 1:08 pm

Hi MatthiasP,

Welcome to the Parallella community!

MatthiasP wrote:but using the latest image from the github releases (2016.11 7020 with hdmi)

Please use 2016.11.1
From the ChangeLog
https://github.com/parallella/parabuntu ... -2016.11.1
Code: Select all
Changelog since 2016.11
Prevent faulty Epiphany programs from accessing kernel memory (regression not present in earlier releases)

This is likely the reason why the board hangs when you try to directly write to the framebuffer from the Epiphany.

MatthiasP wrote: and executing as root (not parallella) in a tty it worked for aobech, but not for mandelbrot.
For my purpose (image processing debugging) this is sufficient, but executing as root makes me goosebumps. Probably it is a read permission issue with the shared libraries.

Don't have access to a Parallella board right now but this should work:
Code: Select all
$ ls -l /dev/fb0
crw-rw----. 1 root video 29, 0 21 aug 10.35 /dev/fb0
$ sudo adduser parallella video
Log out and log in again


MatthiasP wrote:I looked at the Makefile and recognised if one "make" the aobech project , that it is without direct frame buffer writing . Instead, the coprocessor operates in a separate buffer and the arm is copying it to the /dev/fb0. If you uncomment the added compiler flag in the Makefile, it does not work, like the mandelbrot example. The board hang up, so maybe the smem address of the frame buffer is faulty? Has anyone a guess?

Does anybody know, what is wrong with these examples?


From the parallella-examples commit log:
https://github.com/parallella/parallell ... 2e11047bc6
Code: Select all
aobench: Use intermediate framebuffer on host

Current versions of the OH FPGA elink (+ epiphany kernel driver) does
not support dynamic mapping of memory regions, which is required for
direct access to the framebuffer from epiphany.


So until that is fixed you have to resort to indirect copying.

Cheers,
Ola
_start = 266470723;
olajep
 
Posts: 138
Joined: Mon Dec 17, 2012 3:24 am
Location: Sweden

Re: Finally I see!

Postby MatthiasP » Mon Sep 10, 2018 11:13 pm

Hi Ola ,

thank you for the fast response! I damaged my daugherboard and had to fix it, so it took me some time to answer.
olajep wrote:Please use 2016.11.1

Jep - sorry this was my bad. I did use the parabuntu 2016.11.1 hdmi z7020 image in the first place. But to ensure it is not because of that, I
  • reinstalled img to micro sd card and setup environment (static ip, nameserver, etc)
  • checked out the latest version of the parallella-examples git repo
  • got the latest package of the esdk and installed it under /opt/adapteva
  • recompiled the original fpga bitstream and the one with my modification (just added dma's, diff io_buffers and test pattern generator) + generate suitable devicetree files
  • tested the default and compiled bitstreams
In every combination the mandelbrot example did not work and the aobench behaved like previously described (hang up if used with direct write to frame buffer).
olajep wrote:From the parallella-examples commit log:
https://github.com/parallella/parallell ... 2e11047bc6

Code: Select all
aobench: Use intermediate framebuffer on host

Current versions of the OH FPGA elink (+ epiphany kernel driver) does
not support dynamic mapping of memory regions, which is required for
direct access to the framebuffer from epiphany.


Ah ok so I will have a look at the fpga dma to offload the write back to the framebuffer - thank you very much! And I will adopt the technique to look at the change logs previous to ask again :P
I noticed that the board does only hang up at/after the last frame to render. And afterwards I have to unplug the board and the hdmi cable to get the hdmi running again, so eventually the ADI HDMI portion in the fpga is buggy.

And one further sidenote:
olajep wrote:
MatthiasP wrote:
and executing as root (not parallella) in a tty it worked for aobech, but not for mandelbrot.
For my purpose (image processing debugging) this is sufficient, but executing as root makes me goosebumps. Probably it is a read permission issue with the shared libraries.

Don't have access to a Parallella board right now but this should work:

Code: Select all
$ ls -l /dev/fb0
crw-rw----. 1 root video 29, 0 21 aug 10.35 /dev/fb0
$ sudo adduser parallella video
Log out and log in again

user parallella was member of group video already in the original image, but I hide necessary info so that you to give me advice:
My board has a malfunctioning usb port. If I attach a Mouse with or without a USB Hub, llibusb fails to initialize. There is already a forum contribution on that - relating to voltage feedback to the usb phy...
So I decided to use x2x with ssh -X to use my mouse and keyboard from the desktop/laptop when running in the xserver session on the parallella and use chvt and openvt to do what CTR+Alt+F1-F12 and keyboard would do.
To use openvt the user must have access to /dev/tty# and therefore I needed sudo. But I forgot to pass the -E option (to pass user variables like the lib search paths) to sudo, so the run.sh script of aobench set the according environment variables but they never were used to look up the epiphany libs. That explains, why it worked when using root but not sudo.

So let me summarize:
  • direct framebuffer access is not possible
  • indirect access works with aobench
  • board crash is propably related to elink issues / analog devices driver
  • root shell issues were caused by myself

I think you anserwed all my questions for now, so thank you for that one again! Feel free to comment, I would gladly accept your wisdom. :) (Is that even correct English?)

Cheers,
Matthias
MatthiasP
 
Posts: 3
Joined: Tue Aug 28, 2018 2:54 pm


Return to Linux/U-Boot

Who is online

Users browsing this forum: No registered users and 4 guests