Correctly install mali and fbturbo driver:

- add correct xorg config
- For mali-sunxi driver to work it also need library files from sunxi-mali-dev
  package. Adding sunxi-mali-dev to XSERVER force the installation of
  the -dev
This commit is contained in:
Raoul Hecky 2013-10-29 22:38:45 +01:00
parent 2352ee9620
commit 51fe9392f2
7 changed files with 48 additions and 40 deletions

View File

@ -4,6 +4,7 @@
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
XSERVER = "xserver-xorg \ XSERVER = "xserver-xorg \
xf86-video-fbturbo \
xf86-input-evdev \ xf86-input-evdev \
xf86-input-mouse \ xf86-input-mouse \
xf86-input-keyboard" xf86-input-keyboard"
@ -12,6 +13,7 @@ XSERVER = "xserver-xorg \
GUI_MACHINE_CLASS = "bigscreen" GUI_MACHINE_CLASS = "bigscreen"
require conf/machine/include/tune-cortexa8.inc require conf/machine/include/tune-cortexa8.inc
require conf/machine/include/sunxi-mali.inc
PREFERRED_PROVIDER_virtual/kernel = "linux" PREFERRED_PROVIDER_virtual/kernel = "linux"
PREFERRED_VERSION_linux-libc-headers = "3.0.8" PREFERRED_VERSION_linux-libc-headers = "3.0.8"

View File

@ -0,0 +1,9 @@
PREFERRED_PROVIDER_virtual/mesa ?= "mesa-gl"
PREFERRED_PROVIDER_virtual/libgl ?= "mesa-gl"
PREFERRED_PROVIDER_virtual/libgles1 ?= "sunxi-mali"
PREFERRED_PROVIDER_virtual/libgles2 ?= "sunxi-mali"
PREFERRED_PROVIDER_virtual/egl ?= "sunxi-mali"
XSERVER += "sunxi-mali \
sunxi-mali-dev"

View File

@ -4,7 +4,7 @@
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
XSERVER = "xserver-xorg \ XSERVER = "xserver-xorg \
xf86-video-sunxifb \ xf86-video-fbturbo \
xf86-input-evdev \ xf86-input-evdev \
xf86-input-mouse \ xf86-input-mouse \
xf86-input-keyboard" xf86-input-keyboard"
@ -13,6 +13,7 @@ XSERVER = "xserver-xorg \
GUI_MACHINE_CLASS = "bigscreen" GUI_MACHINE_CLASS = "bigscreen"
require conf/machine/include/tune-cortexa8.inc require conf/machine/include/tune-cortexa8.inc
require conf/machine/include/sunxi-mali.inc
PREFERRED_PROVIDER_virtual/kernel = "linux" PREFERRED_PROVIDER_virtual/kernel = "linux"
PREFERRED_VERSION_linux-libc-headers = "3.0.8" PREFERRED_VERSION_linux-libc-headers = "3.0.8"

View File

@ -1,7 +1,7 @@
DESCRIPTION = "libGLES for the A10/A13 Allwinner processor with Mali 400 (X11)" DESCRIPTION = "libGLES for the A10/A13 Allwinner processor with Mali 400 (X11)"
LICENSE = "proprietary-binary" LICENSE = "proprietary-binary"
INC_PR = "r2" INC_PR = "r3"
LIC_FILES_CHKSUM = "file://README;md5=a103ac69c166fcd98a67a9917dd7affd" LIC_FILES_CHKSUM = "file://README;md5=a103ac69c166fcd98a67a9917dd7affd"
@ -30,17 +30,20 @@ do_configure() {
} }
do_install() { do_install() {
mkdir -p ${D}${libdir} install -d ${D}${libdir}
mkdir -p {$D}{includedir} install -d ${D}${includedir}
make libdir=${D}${libdir}/ includedir=${D}${includedir}/ install
make libdir=${D}${libdir}/ includedir=${D}${includedir}/ install -C include make libdir=${D}${libdir}/ includedir=${D}${includedir}/ install
# Fix .so name and create symlinks, binary package provides .so wich can't be included directly in package make libdir=${D}${libdir}/ includedir=${D}${includedir}/ install -C include
rm ${D}${libdir}/libEGL.so.1.4
ln -sf libMali.so.3 ${D}${libdir}/libEGL.so.1.4 # Fix .so name and create symlinks, binary package provides .so wich can't be included directly in package
rm ${D}${libdir}/libGLESv1_CM.so.1.1
ln -sf libMali.so.3 ${D}${libdir}/libGLESv1_CM.so.1.1 mv ${D}${libdir}/libMali.so ${D}${libdir}/libMali.so.3
rm ${D}${libdir}/libGLESv2.so.2.0 ln -sf libMali.so.3 ${D}${libdir}/libMali.so
ln -sf libMali.so.3 ${D}${libdir}/libGLESv2.so.2.0
mv ${D}${libdir}/libMali.so ${D}${libdir}/libMali.so.3 for flib in libEGL.so.1.4 libGLESv1_CM.so.1.1 libGLESv2.so.2.0 ; do
ln -sf libMali.so.3.0 ${D}${libdir}/libMali.so rm ${D}${libdir}/$flib
ln -sf libMali.so.3 ${D}${libdir}/$flib
done
} }

View File

@ -0,0 +1,7 @@
Section "Device"
Identifier "Allwinner A10/A13 FBDEV"
Driver "fbturbo"
Option "fbdev" "/dev/fb0"
Option "SwapbuffersWait" "false"
EndSection

View File

@ -2,12 +2,13 @@ require recipes-graphics/xorg-driver/xorg-driver-video.inc
DESCRIPTION = "X.Org X server -- A10/A13 display driver" DESCRIPTION = "X.Org X server -- A10/A13 display driver"
PR = "1" PR = "2"
LICENSE = "MIT-X" LICENSE = "MIT-X"
LIC_FILES_CHKSUM = "file://COPYING;md5=f91dc3ee5ce59eb4b528e67e98a31266" LIC_FILES_CHKSUM = "file://COPYING;md5=f91dc3ee5ce59eb4b528e67e98a31266"
SRC_URI = "git://github.com/ssvb/xf86-video-fbturbo.git;protocol=http;branch=master" SRC_URI = "git://github.com/ssvb/xf86-video-fbturbo.git;protocol=http;branch=master \
file://20-fbturbo.conf"
SRCREV_pn-${PN} = "fed3148bad26186dd04707cdac67809a666f1742" SRCREV_pn-${PN} = "fed3148bad26186dd04707cdac67809a666f1742"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
@ -15,3 +16,10 @@ S = "${WORKDIR}/git"
CFLAGS += " -I${STAGING_INCDIR}/xorg " CFLAGS += " -I${STAGING_INCDIR}/xorg "
DEPENDS += "sunxi-mali" DEPENDS += "sunxi-mali"
FILES_${PN} += "${datadir}/X11/xorg.conf.d/20-fbturbo.conf"
do_install_append() {
install -d ${D}${datadir}/X11/xorg.conf.d
install -m 0644 ${WORKDIR}/20-fbturbo.conf ${D}${datadir}/X11/xorg.conf.d
}

View File

@ -1,22 +0,0 @@
Section "Device"
Identifier "Generic Fbdev Driver"
Driver "fbdev"
EndSection
Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
EndSection
Section "Screen"
Identifier "Default Screen"
Device "Generic Fbdev Driver"
Monitor "Generic Monitor"
DefaultDepth 24
EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
EndSection