summaryrefslogtreecommitdiffstats
path: root/yocto-poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check')
-rw-r--r--yocto-poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf2
-rw-r--r--yocto-poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh15
2 files changed, 17 insertions, 0 deletions
diff --git a/yocto-poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf b/yocto-poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf
new file mode 100644
index 000000000..74d33c871
--- /dev/null
+++ b/yocto-poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf
@@ -0,0 +1,2 @@
+# Mimic modprobe's install funcitonality with busybox's modprobe
+install gma500_gfx dmesg | grep gma500_gfx_checked || { /etc/modprobe.d/gma500-gfx-check.sh || modprobe gma500_gfx; }
diff --git a/yocto-poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh b/yocto-poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh
new file mode 100644
index 000000000..75cda99f5
--- /dev/null
+++ b/yocto-poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Check for devices we wish to avoid gma500_gfx for
+DEVICES="0x8119 0x4108"
+
+# Checked flag to avoid infinite modprobe
+echo "gma500_gfx_checked" >> /dev/kmsg;
+
+for DEVICE in $DEVICES; do
+ if udevadm trigger --subsystem-match=pci --verbose --attr-match=device=$DEVICE | grep "pci" >> /dev/null ; then
+ echo "Found $DEVICE, avoiding gma500_gfx module" >> /dev/kmsg;
+ exit 0
+ fi
+done
+exit 1
OpenPOWER on IntegriCloud