Difference between revisions of "Cubox-i"

From Bashlinux
Jump to: navigation, search
(Created page with "__NOTOC__ Prefered Linux Distribution: Debian == Image setup == === How to setup an image === * Extract the image # unxz <image name>.img.xz * Transfer the image # dd bs=4k...")
 
(Hpw to enable OpenGL suport)
 
Line 21: Line 21:
 
Otherwise the best higher resolution will be choosen.
 
Otherwise the best higher resolution will be choosen.
  
=== Hpw to enable OpenGL suport ===
+
=== How to enable OpenGL suport ===
 
Kind of message like this
 
Kind of message like this
 
   libEGL warning: DRI2: failed to authenticate
 
   libEGL warning: DRI2: failed to authenticate

Latest revision as of 18:31, 6 July 2016

Prefered Linux Distribution: Debian

Image setup

How to setup an image

  • Extract the image
# unxz <image name>.img.xz
  • Transfer the image
# dd bs=4k conv=fsync if=<image name>.img of=/dev/sdb

OS Setup

DVI Support

How to enable HDMI Support

The default imagest doesn't support HDMI-DVI converters
REFERENCE: http://boundarydevices.com/dvi-support-on-i-mx6-boards

  • In order so setup a fixed resolution, add to >uEnv.txt
video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32

Otherwise the best higher resolution will be choosen.

How to enable OpenGL suport

Kind of message like this

 libEGL warning: DRI2: failed to authenticate
 [ error ] ofAppGLFWWindow: 65544: X11: RandR gamma ramp support seems broken
 X Error of failed request:  BadMatch (invalid parameter attributes)
   Major opcode of failed request:  72 (X_PutImage)
   Serial number of failed request:  120
   Current serial number in output stream:  121

Can be solved updating all the mesa packages to the same version

# apt-get install libopenvg1-mesa libgl1-mesa-dri libgl1-mesa-dev libgbm1

How to build Mesa video drivers on a new kernel

Reference: http://www.solid-run.com/community/viewtopic.php?f=8&t=851

  • Get the latest open source driver
# git clone https://github.com/laanwj/etna_viv
  • Build the driver
 # cd etna_viv
 # export GCABI=imx6_v4_1_0
 # make
  • Get the mesa fork for the library generated above: libetnaviv.a
 # git clone https://github.com/laanwj/mesa
  • Install dependencies to build the mesa driver
# apt-get -y install x11proto-dri3-dev x11proto-present-dev
  • Configure the mesa driver
  • First pass to try to trick the intel drivers
 # cd mesa
 #./autogen.sh --with-driver=dri INTEL_CFLAGS=disable INTEL_LIBS=disable
  • Second pass to enable etnaviv
# cat > build.sh << EOF
  export ETNAVIV_BASE="/mnt/build/kernel/video/etna_viv/"
  export ETNAVIV_LIB="${ETNAVIV_BASE}/src/etnaviv" # important!
  export ETNAVIV_INC="${ETNAVIV_BASE}/src" # important!

  export CFLAGS="-I${ETNAVIV_INC}"
  export CXXFLAGS="-I${ETNAVIV_INC}"
  export LDFLAGS="-L${ETNAVIV_LIB}"

  export ETNA_LIBS="-letnaviv" # important!

  ./configure --prefix=/usr --with-driver=dri \
   --enable-gles2 --enable-gles1 --disable-glx --enable-egl --enable-dri \
   --with-gallium-drivers=swrast,etna --with-egl-platforms=fbdev \
   --enable-gallium-egl --with-dri-drivers=
 EOF
 # bash build.sh
  • Build the mesa driver
 # make
  • Install the mesa driver
 # sudo make install
  • Build kernel module
 # cd /lib/modules/3.14.14+/build
 # make modules_prepare
 # cd /mnt/build/kernel/video/etna_viv/kernel_drivers/imx6_v4_0_0
 # make -C /lib/modules/`uname -r`/build M=$PWD

How to build Xorg video drivers

  • Setup the dependencies
# git clone git://ftp.arm.linux.org.uk/~rmk/libdrm-armada.git/
# cd libdrm-armada
# autoreconf --install
# ./configure --prefix=/usr
# make & sudo make install
  • Get the sources
# git clone http://ftp.arm.linux.org.uk/cgit/xf86-video-armada.git
  • Build the driver
# cd xf86-video-armada

# export ETNAVIV_BASE="/mnt/build/kernel/video/etna_viv"
# export ETNAVIV_LIB="${ETNAVIV_BASE}/src/etnaviv"
# export ETNAVIV_INC="${ETNAVIV_BASE}/src"

# ./autogeh.sh --with-etnaviv-include=$ETNAVIV_INC --with-etnaviv-lib=$ETNAVIV_LIB --with-libgal-include=$ETNAVIV_INC/include_imx6_v4_1_0 --with-libgal-lib=/usr/lib
# make