Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

X Acceleration on Cubox-i4 pro

Need help with peripherals or devices?
Post Reply
Message
Author
ljones0
Posts: 84
Joined: 2013-03-30 22:51

X Acceleration on Cubox-i4 pro

#1 Post by ljones0 »

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

sgosnell
Posts: 975
Joined: 2011-03-14 01:49

Re: X Acceleration on Cubox-i4 pro

#2 Post by sgosnell »

Try the SolidRun forums. http://forum.solid-run.com/linux-on-cub ... gboard-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.
Take my advice, I'm not using it.

ljones0
Posts: 84
Joined: 2013-03-30 22:51

Re: X Acceleration on Cubox-i4 pro

#3 Post by ljones0 »

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

sgosnell
Posts: 975
Joined: 2011-03-14 01:49

Re: X Acceleration on Cubox-i4 pro

#4 Post by sgosnell »

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.
Take my advice, I'm not using it.

ljones0
Posts: 84
Joined: 2013-03-30 22:51

Re: X Acceleration on Cubox-i4 pro

#5 Post by ljones0 »

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: 84
Joined: 2013-03-30 22:51

Re: X Acceleration on Cubox-i4 pro

#6 Post by ljones0 »

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

Post Reply