From 51fe9392f2f9fc838db085f6a4791d8fc05cbf68 Mon Sep 17 00:00:00 2001 From: Raoul Hecky Date: Tue, 29 Oct 2013 22:38:45 +0100 Subject: [PATCH] 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 --- conf/machine/cubieboard.conf | 2 ++ conf/machine/include/sunxi-mali.inc | 9 ++++++ conf/machine/mele.conf | 3 +- recipes-graphics/libgles/sunxi-mali_git.bb | 31 ++++++++++--------- .../xf86-video-fbturbo/20-fbturbo.conf | 7 +++++ ...nxifb_git.bb => xf86-video-fbturbo_git.bb} | 14 +++++++-- .../xserver-xf86-config/xorg.conf | 22 ------------- 7 files changed, 48 insertions(+), 40 deletions(-) create mode 100644 conf/machine/include/sunxi-mali.inc create mode 100644 recipes-graphics/xorg-xserver/xf86-video-fbturbo/20-fbturbo.conf rename recipes-graphics/xorg-xserver/{xf86-video-sunxifb_git.bb => xf86-video-fbturbo_git.bb} (57%) delete mode 100644 recipes-graphics/xorg-xserver/xserver-xf86-config/xorg.conf diff --git a/conf/machine/cubieboard.conf b/conf/machine/cubieboard.conf index ae63576..e26f055 100644 --- a/conf/machine/cubieboard.conf +++ b/conf/machine/cubieboard.conf @@ -4,6 +4,7 @@ PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" XSERVER = "xserver-xorg \ + xf86-video-fbturbo \ xf86-input-evdev \ xf86-input-mouse \ xf86-input-keyboard" @@ -12,6 +13,7 @@ XSERVER = "xserver-xorg \ GUI_MACHINE_CLASS = "bigscreen" require conf/machine/include/tune-cortexa8.inc +require conf/machine/include/sunxi-mali.inc PREFERRED_PROVIDER_virtual/kernel = "linux" PREFERRED_VERSION_linux-libc-headers = "3.0.8" diff --git a/conf/machine/include/sunxi-mali.inc b/conf/machine/include/sunxi-mali.inc new file mode 100644 index 0000000..07b8ce3 --- /dev/null +++ b/conf/machine/include/sunxi-mali.inc @@ -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" + diff --git a/conf/machine/mele.conf b/conf/machine/mele.conf index 0f08c00..79550b8 100644 --- a/conf/machine/mele.conf +++ b/conf/machine/mele.conf @@ -4,7 +4,7 @@ PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" XSERVER = "xserver-xorg \ - xf86-video-sunxifb \ + xf86-video-fbturbo \ xf86-input-evdev \ xf86-input-mouse \ xf86-input-keyboard" @@ -13,6 +13,7 @@ XSERVER = "xserver-xorg \ GUI_MACHINE_CLASS = "bigscreen" require conf/machine/include/tune-cortexa8.inc +require conf/machine/include/sunxi-mali.inc PREFERRED_PROVIDER_virtual/kernel = "linux" PREFERRED_VERSION_linux-libc-headers = "3.0.8" diff --git a/recipes-graphics/libgles/sunxi-mali_git.bb b/recipes-graphics/libgles/sunxi-mali_git.bb index 0fa8d15..d75971c 100644 --- a/recipes-graphics/libgles/sunxi-mali_git.bb +++ b/recipes-graphics/libgles/sunxi-mali_git.bb @@ -1,7 +1,7 @@ DESCRIPTION = "libGLES for the A10/A13 Allwinner processor with Mali 400 (X11)" LICENSE = "proprietary-binary" -INC_PR = "r2" +INC_PR = "r3" LIC_FILES_CHKSUM = "file://README;md5=a103ac69c166fcd98a67a9917dd7affd" @@ -30,17 +30,20 @@ do_configure() { } do_install() { - mkdir -p ${D}${libdir} - mkdir -p {$D}{includedir} - make libdir=${D}${libdir}/ includedir=${D}${includedir}/ install - make libdir=${D}${libdir}/ includedir=${D}${includedir}/ install -C include - # Fix .so name and create symlinks, binary package provides .so wich can't be included directly in package - rm ${D}${libdir}/libEGL.so.1.4 - ln -sf libMali.so.3 ${D}${libdir}/libEGL.so.1.4 - rm ${D}${libdir}/libGLESv1_CM.so.1.1 - ln -sf libMali.so.3 ${D}${libdir}/libGLESv1_CM.so.1.1 - rm ${D}${libdir}/libGLESv2.so.2.0 - ln -sf libMali.so.3 ${D}${libdir}/libGLESv2.so.2.0 - mv ${D}${libdir}/libMali.so ${D}${libdir}/libMali.so.3 - ln -sf libMali.so.3.0 ${D}${libdir}/libMali.so + install -d ${D}${libdir} + install -d ${D}${includedir} + + make libdir=${D}${libdir}/ includedir=${D}${includedir}/ install + make libdir=${D}${libdir}/ includedir=${D}${includedir}/ install -C include + + # Fix .so name and create symlinks, binary package provides .so wich can't be included directly in package + + mv ${D}${libdir}/libMali.so ${D}${libdir}/libMali.so.3 + ln -sf libMali.so.3 ${D}${libdir}/libMali.so + + for flib in libEGL.so.1.4 libGLESv1_CM.so.1.1 libGLESv2.so.2.0 ; do + rm ${D}${libdir}/$flib + ln -sf libMali.so.3 ${D}${libdir}/$flib + done } + diff --git a/recipes-graphics/xorg-xserver/xf86-video-fbturbo/20-fbturbo.conf b/recipes-graphics/xorg-xserver/xf86-video-fbturbo/20-fbturbo.conf new file mode 100644 index 0000000..5fbf885 --- /dev/null +++ b/recipes-graphics/xorg-xserver/xf86-video-fbturbo/20-fbturbo.conf @@ -0,0 +1,7 @@ +Section "Device" + Identifier "Allwinner A10/A13 FBDEV" + Driver "fbturbo" + Option "fbdev" "/dev/fb0" + + Option "SwapbuffersWait" "false" +EndSection diff --git a/recipes-graphics/xorg-xserver/xf86-video-sunxifb_git.bb b/recipes-graphics/xorg-xserver/xf86-video-fbturbo_git.bb similarity index 57% rename from recipes-graphics/xorg-xserver/xf86-video-sunxifb_git.bb rename to recipes-graphics/xorg-xserver/xf86-video-fbturbo_git.bb index 5dd654c..90083e4 100644 --- a/recipes-graphics/xorg-xserver/xf86-video-sunxifb_git.bb +++ b/recipes-graphics/xorg-xserver/xf86-video-fbturbo_git.bb @@ -2,16 +2,24 @@ require recipes-graphics/xorg-driver/xorg-driver-video.inc DESCRIPTION = "X.Org X server -- A10/A13 display driver" -PR = "1" +PR = "2" LICENSE = "MIT-X" 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" S = "${WORKDIR}/git" CFLAGS += " -I${STAGING_INCDIR}/xorg " -DEPENDS += "sunxi-mali" \ No newline at end of file +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 +} diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config/xorg.conf b/recipes-graphics/xorg-xserver/xserver-xf86-config/xorg.conf deleted file mode 100644 index 671abcb..0000000 --- a/recipes-graphics/xorg-xserver/xserver-xf86-config/xorg.conf +++ /dev/null @@ -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