X Acceleration on Cubox-i4 pro

Getting your soundcard to work, using Debian on non-i386 hardware, etc

X Acceleration on Cubox-i4 pro

Postby ljones0 » 2016-06-17 21:02

Hello all!

Was wondering - has anyone got 2d x acceleration for the cubox i4pro working in debian at all yet?

First of all - some background. Lots of trees, a river, the sky. I'm from the UK so lots of clouds and rain :-) Only joking. The device I've managed to get debian stretch onto is the cubox i4 pro. It's a small arm based device which looks like a small black cube; it uses a micro SD card to boot from.

Here's how I managed to get the cubox i4pro to boot debian;

(note: On my normal desktop PC the micro sd card came in as /dev/sde).

- Downloaded "debian-testing-armhf-netinst.iso

- Wipe off the boot/partition sector of the sd card
Code: Select all
dd if=/dev/zero of=/dev/sde bs=1M count=4


- Went through lots of websearching and found the following commands to write the debian installer (which in the latest version of debian supports cubox i4pro via the serial/usb port);
Code: Select all
wget http://d-i.debian.org/daily-images/armhf/daily/netboot/SD-card-images/firmware.MX6_Cubox-i.img.gz
wget http://d-i.debian.org/daily-images/armhf/daily/netboot/SD-card-images/partition.img.gz
zcat firmware.MX6_Cubox-i.img.gz partition.img.gz > /dev/sde
sync


Then mounted the iso file I downloaded and extracted the SPL an u-boot.img files (Needed to boot!) on another PC;
Code: Select all
$ mkdir /tmp/0
$ mount debian-testing-armhf-netinst.iso /tmp/0 -o loop
$ cd /tmp/0/install/u-boot/MX6_Cubox-i/
$ cp SPL.gz /media/ramdisk
$ cp u-boot.img.gz /media/ramdisk
$ cd /media/ramdisk
$ gzip -d u-boot.img.gz
$ gzip -d SPL.gz
$ dd if=SPL of=/dev/sde bs=1K seek=1
$ dd if=u-boot.img of=/dev/sde bs=1K seek=69


That then booted the debian installer on the cubox i4pro; I was then able to install debian via the usb/serial port attached to another device. I just needed to do
Code: Select all
$ su root
$ screen /dev/ttyUSB0 115200


in order to see what was happening.

After install I had to do the dd commands a second time in order to make the newly debian install bootable (on another machine);

Code: Select all
$ dd if=SPL of=/dev/sde bs=1K seek=1
$ dd if=u-boot.img of=/dev/sde bs=1K seek=69


That got a bootable system though to get X up and running I also needed to do an apt-get install firmware-linux-free.

Snag is though the X server seems to be using the framebuffer. But I note that debian stretch/ARM is using kernel 4.6, and the driver for the video chipset the cubox-i4pro uses has been in the kernel since version 4.5. It's etnaviv.

But I'm confused. Is etna_viv really "in" the debian kernel 4.6? Would I need to download and build this - it is an xorg video driver called amarda which also uses etnaviv but dosen't seem to be in debian. And then there's etnaviv-mesa - is that needed as well? *confused!

KDE even ran on this device. But window resizing/moving/scrolling etc was sloooooooow because of only the fb driver being used.

I hope all the above with regards to installation works for others - apologies for any mistakes!

ljones
ljones0
 
Posts: 69
Joined: 2013-03-30 22:51

Re: X Acceleration on Cubox-i4 pro

Postby sgosnell » 2016-06-17 21:27

Try the SolidRun forums. http://forum.solid-run.com/linux-on-cubox-i-and-hummingboard-f8/ The Cubox-i requires Vivante video drivers, and AFAIK they have not been added to Debian, they're proprietary binary blobs. You can get an image from the SolidRun site for Debian that has the necessary drivers. I tossed my Cubox-i in a drawer long ago, it's not ready for prime-time and was a waste of money for me.
sgosnell
 
Posts: 715
Joined: 2011-03-14 01:49

Re: X Acceleration on Cubox-i4 pro

Postby ljones0 » 2016-06-17 21:59

Will give that a go - though as far as I know, etnaviv is the open source version of the vivante drivers. In theroy they should work, though I have no idea on how X and the kernel and its drivers "hang together".

>I tossed my Cubox-i in a drawer long ago, it's not ready for prime-time and was a waste of money for me.

That's pretty much what I did as well. Mine's been sat in a cardboard box full of other stuff for months, then before that sitting gathering dust in a drawer. I feel like it was a bit of a waste of money too. In much more recent times I saved up and went for the Fitlet PC. It was expensive but it's small, has lots of ports, is AMD/X86 based and works pretty well (*lots* faster than the cubox, no slow video drivers, sound works, etc).

By and large I'm just retrying the cubox here and was hoping more progress had been made with it. But I agree with you -- it's not ready for the primetime!

ljones
ljones0
 
Posts: 69
Joined: 2013-03-30 22:51

Re: X Acceleration on Cubox-i4 pro

Postby sgosnell » 2016-06-18 01:22

I'm running an Asus Chromebox. It was cheap, but it works well. I added RAM and a larger SSD, converted it to Debian, and I'm happy with it. It does all I need.
sgosnell
 
Posts: 715
Joined: 2011-03-14 01:49

Re: X Acceleration on Cubox-i4 pro

Postby ljones0 » 2017-06-11 13:08

Thought I'd post an "update" on what I've found out about this. And almost a year later! I still have the cubox btw, though it never gets used! Hopefully this information might help someone else however.

Firstly, some links;

http://forum.solid-run.com/linux-on-cub ... t2936.html

https://github.com/etnaviv/etna_viv

https://github.com/xobs/xserver-xorg-video-armada

https://groups.google.com/forum/#!topic ... 3K49IQrIEA

http://git.arm.linux.org.uk/cgit/xf86-v ... able-devel

From what I can gather recent kernels have some sort of support possibly for video/x acceleration although it would need for one or both of those drivers to be compiled, along with mesa (which may or may not need to be patched, I do not know). From what I can gather etna_viv is the 3d driver and xserver-xorg-video-armada is the xorg/2D driver.

How to compile these drivers? No idea. Can you just "get away" with compiling the driver or do you need to compile an entirely new kernel along with the driver or even with mesa for 3d? Err....pass don't know on that one.

I know this dosen't seem like a particularly helpful post but that's all I know about x acceleration on cubox. So for now it is back to the bottom of the drawer for the cubox.

I did try to compile the driver once but did not get very far. I got the following before I had to give up:

Code: Select all
make[2]: Entering directory /root/Downloads/xf86-video-armada/src
 CC armada_drm_xv.lo
In file included from armada_drm_xv.c:28:0:
../common/fourcc.h:4:28: fatal error: drm/drm_fourcc.h: No such file or directory
 #include <drm/drm_fourcc.h>

compiliation terminated


From memory I had all the development files (xorg, kernel files, libdrm) installed and I found a copy of fourcc.h in /usr/include/xorg/fourcc.h and also in /root/Downloads/xf86-video-armada/common/fourcc.h but I don't know why it couldn't find it or where a copy should be or where it is trying to look for that file. I did try following the build instructions from here btw if anyone wants to know how I tried to do this.

that's pretty much all I know.

ljones
ljones0
 
Posts: 69
Joined: 2013-03-30 22:51

Re: X Acceleration on Cubox-i4 pro

Postby ljones0 » 2018-04-28 21:30

Thought I'd put an update here after trying all this again. I am not sure btw if the kernel source/includes are needed or not.

However I did find this patch which stops that fourcc error message. I tried using that patch and it managed to compile the driver.

ljones
ljones0
 
Posts: 69
Joined: 2013-03-30 22:51


Return to Hardware

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable