summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-yocto-bsp/conf/machine/genericx86.conf2
-rw-r--r--meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf2
-rw-r--r--meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh11
-rw-r--r--meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb18
4 files changed, 33 insertions, 0 deletions
diff --git a/meta-yocto-bsp/conf/machine/genericx86.conf b/meta-yocto-bsp/conf/machine/genericx86.conf
index 2642caba54..798b62ec2b 100644
--- a/meta-yocto-bsp/conf/machine/genericx86.conf
+++ b/meta-yocto-bsp/conf/machine/genericx86.conf
@@ -6,3 +6,5 @@
6DEFAULTTUNE ?= "core2-32" 6DEFAULTTUNE ?= "core2-32"
7require conf/machine/include/tune-core2.inc 7require conf/machine/include/tune-core2.inc
8require conf/machine/include/genericx86-common.inc 8require conf/machine/include/genericx86-common.inc
9
10MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "gma500-gfx-check"
diff --git a/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf b/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf
new file mode 100644
index 0000000000..69f109e5fc
--- /dev/null
+++ b/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf
@@ -0,0 +1,2 @@
1# Mimic modprobe's install funcitonality with busybox's modprobe
2install gma500_gfx lsmod | grep gma || { gma500_gfx_check.sh || modprobe gma500_gfx; }
diff --git a/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh b/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh
new file mode 100644
index 0000000000..0c7b3aa14f
--- /dev/null
+++ b/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh
@@ -0,0 +1,11 @@
1#!/bin/sh
2
3# Check for devices we wish to avoid gma500_gfx for
4DEVICES="0x8119 0x4108"
5for DEVICE in $DEVICES; do
6 if udevadm trigger --subsystem-match=pci --verbose --attr-match=device=$DEVICE | grep "pci" >> /dev/null ; then
7 echo "Found $DEVICE, avoiding gma500_gfx module" >> /dev/kmsg;
8 exit 0
9 fi
10done
11exit 1
diff --git a/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb b/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb
new file mode 100644
index 0000000000..00680de890
--- /dev/null
+++ b/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb
@@ -0,0 +1,18 @@
1SUMMARY = "Intel gma500_gfx fix for certain hardware"
2DESCRIPTION = "Avoid inserting gma500_gfx module for certain hardware devices."
3LICENSE="GPLv2"
4LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
5
6SRC_URI = "file://gma500-gfx-check.conf \
7 file://gma500-gfx-check.sh "
8
9do_install(){
10 install -d ${D}${sysconfdir}/modprobe.d/
11 install -m 755 ${WORKDIR}/gma500-gfx-check.sh ${D}${sysconfdir}/modprobe.d/gma500-gfx-check.sh
12 install -m 644 ${WORKDIR}/gma500-gfx-check.conf ${D}${sysconfdir}/modprobe.d/gma500-gfx-check.conf
13}
14
15FILES_${PN}="${sysconfdir}/modprobe.d/gma500-gfx-check.conf \
16 ${sysconfdir}/modprobe.d/gma500-gfx-check.sh"
17
18COMPATIBLE_MACHINE = "genericx86"