diff options
Diffstat (limited to 'poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check')
-rw-r--r-- | poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf | 2 | ||||
-rw-r--r-- | poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf b/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/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/poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh b/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/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 |