Skip to content

Commit

Permalink
Create initial BSP layer for IFC6410
Browse files Browse the repository at this point in the history
- create meta-qualcomm OE layer
- add README and license file
- create machine configuration for ifc6410, using the 3.4+freedreno kernel
- configure freedreno in mesa, and create xf86-video-freedreno recipe

This has been tested with distro-less OE-core on IFC6410

meta = "master:6bc3696d8451a23d743daf03ee98c4ba54ce4551"

Using the following extra configuration in local.conf:

DISTRO_FEATURES_append = " opengl"
CORE_IMAGE_EXTRA_INSTALL += "mesa-demos"
VIRTUAL-RUNTIME_graphical_init_manager = ""

glxgears was tested using the GPU firmware from the Inforce BSP v1.5 release.

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
  • Loading branch information
ndechesne committed Jul 22, 2014
0 parents commit afd2f11
Show file tree
Hide file tree
Showing 10 changed files with 655 additions and 0 deletions.
17 changes: 17 additions & 0 deletions COPYING.MIT
@@ -0,0 +1,17 @@
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
23 changes: 23 additions & 0 deletions README
@@ -0,0 +1,23 @@
The OpenEmbedded layer for Qualcomm based platforms

This layer depends on:

URI: git://github.com/openembedded/oe-core.git
layers: meta
branch: master
revision: HEAD

If you want to contribute changes, please send patches or pull requests to
linaro-dev@lists.linaro.org.

When creating patches, please use something like:

git format-patch -s --subject-prefix='meta-qualcomm][PATCH' origin

When sending patches, please use something like:

git send-email --to linaro-dev@lists.linaro.org <generated patch>

You can discuss about this layer, on #linaro on FreeNode IRC network.

Main layer maintainers: Nicolas Dechesne <nicolas.dechesne@linaro.org>
11 changes: 11 additions & 0 deletions conf/layer.conf
@@ -0,0 +1,11 @@
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"

# We have a packages directory, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"

BBFILE_COLLECTIONS += "qualcomm"
BBFILE_PATTERN_qualcomm := "^${LAYERDIR}/"
BBFILE_PRIORITY_qualcomm = "5"

31 changes: 31 additions & 0 deletions conf/machine/ifc6410.conf
@@ -0,0 +1,31 @@
#@TYPE: Machine
#@NAME: ifc6410
#@DESCRIPTION: Inforce IFC6410, with Qualcomm Snapdragon 600 APQ8064

require conf/machine/include/tune-cortexa8.inc

XSERVER = " \
xserver-xorg \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'xserver-xorg-extension-glx', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-msm', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'xserver-xorg-extension-dri', '', d)} \
xserver-xorg-module-exa \
xf86-input-mouse \
xf86-input-keyboard \
xf86-input-evdev \
xf86-video-freedreno \
"

# features
MACHINE_FEATURES = "alsa kernel26 screen usb keyboard wifi ext2 ext3"

PREFERRED_PROVIDER_virtual/egl ?= "mesa"
PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
PREFERRED_PROVIDER_virtual/kernel = "linux-linaro-lt-freedreno"

KERNEL_IMAGETYPE = "zImage"

SERIAL_CONSOLE = "115200 ttyHSL0"
4 changes: 4 additions & 0 deletions recipes-graphics/mesa/mesa_10.%.bbappend
@@ -0,0 +1,4 @@
# Enable freedreno driver
GALLIUMDRIVERS_append = ",freedreno"

PACKAGECONFIG_append = " gallium gallium-egl"
10 changes: 10 additions & 0 deletions recipes-graphics/xorg-driver/files/freedreno.conf
@@ -0,0 +1,10 @@
Section "Device"
Identifier "Video Device"
Driver "freedreno"
EndSection

Section "Screen"
Identifier "Screen"
Device "Video Device"
DefaultDepth 24
EndSection
19 changes: 19 additions & 0 deletions recipes-graphics/xorg-driver/xf86-video-freedreno_1.1.0.bb
@@ -0,0 +1,19 @@
require recipes-graphics/xorg-driver/xorg-driver-video.inc

SUMMARY = "X.Org driver for Adreno mobile GPUs"

#FIXME:
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

DEPENDS += "virtual/libx11 drm libpciaccess pixman"

SRC_URI[md5sum] = "085642246f217ecd9d03c8699526a653"
SRC_URI[sha256sum] = "7ac0a972d4a5610a1ca32ae0aee2733db907fd017c1c8b9c4c0482540bb985cf"

# add custom xorg.conf file
SRC_URI += "file://freedreno.conf"
FILES_${PN} += "${datadir}/X11/xorg.conf.d"
do_install_append () {
install -d ${D}/${datadir}/X11/xorg.conf.d
install -m 0644 ${WORKDIR}/freedreno.conf ${D}/${datadir}/X11/xorg.conf.d
}
45 changes: 45 additions & 0 deletions recipes-kernel/linux/linux-linaro-lt-freedreno.inc
@@ -0,0 +1,45 @@
# Copyright (C) 2014 Linaro
# Copyright (C) 2012, 2013 O.S. Systems Software LTDA.
# Released under the MIT license (see COPYING.MIT for the terms)

DESCRIPTION = "Linux kernel for MSM platforms"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"

inherit kernel

# Put a local version until we have a true SRCREV to point to
LOCALVERSION ?= "+yocto"
SCMVERSION ?= "y"

SRC_URI = "git://git.linaro.org/landing-teams/working/qualcomm/kernel.git;branch=${SRCBRANCH};protocol=https \
file://defconfig \
"

S = "${WORKDIR}/git"

kernel_conf_variable() {
CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
if test "$2" = "n"
then
echo "# CONFIG_$1 is not set" >> ${S}/.config
else
echo "CONFIG_$1=$2" >> ${S}/.config
fi
}

do_configure_prepend() {
echo "" > ${S}/.config
CONF_SED_SCRIPT=""

kernel_conf_variable LOCALVERSION "\"${LOCALVERSION}\""
kernel_conf_variable LOCALVERSION_AUTO y

sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${S}/.config'

if [ "${SCMVERSION}" = "y" ]; then
# Add GIT revision to the local version
head=`git rev-parse --verify --short HEAD 2> /dev/null`
printf "%s%s" +g $head > ${S}/.scmversion
fi
}

0 comments on commit afd2f11

Please sign in to comment.