[poky] [PATCH] gma500-gfx-check: Fixes infinite calling to modprobe gma500_gfx

Alejandro Hernandez alejandro.hernandez at linux.intel.com
Mon Feb 15 19:07:29 PST 2016


The previous script caused an infinite call to modprobe gma500_gfx on certain
situations, this fixes a typo and uses a new flag to avoid the infinite loop

Signed-off-by: Alejandro Hernandez <alejandro.hernandez at linux.intel.com>
---
 .../gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf           | 2 +-
 .../recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

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
index 69f109e..74d33c8 100644
--- 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
@@ -1,2 +1,2 @@
 # Mimic modprobe's install funcitonality with busybox's modprobe
-install gma500_gfx lsmod | grep gma || { gma500_gfx_check.sh || modprobe gma500_gfx; }
+install gma500_gfx dmesg | grep gma500_gfx_checked || { /etc/modprobe.d/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
index 0c7b3aa..75cda99 100644
--- 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
@@ -2,6 +2,10 @@
 
 # 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;
-- 
2.6.2



More information about the poky mailing list