[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] armel: Check whether fb0 has a sysfs driver



---
 .../S40framebuffer-module-linux-armel              |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

        Hey,

 I was seeing some busybox output (Usage: basename FILE [SUFFIX] etc.)
 when starting d-i under QEMU emulating armel+vexpress.  Turns out that
 under vexpress kernels, /sys/class/graphics/fb0 has a dev file which
 contains "29:0" but no device symlink to the platform device entry (nor
 any matching platform device) which I can see for instance on OMAP.
 I'm not entirely sure whether it's a linux bug or not, but it seems
 we'd be better off checking whether the node exists before readlink-ing
 across it.

 I've confirmed that this change silences the error message.

 From a quick look at the actual fb driver causing this, it seems that
 it's CONFIG_FB_ARMCLCD / linux/drivers/video/amba-clcd.c / "ARM
 PrimeCell PL110 support" which can indeed be built as a module; not
 sure how to detect this or have it register a platform device though.

   Cheers,

diff --git a/src/lib/debian-installer-startup.d/S40framebuffer-module-linux-armel b/src/lib/debian-installer-startup.d/S40framebuffer-module-linux-armel
index 0989d02..da6a052 100644
--- a/src/lib/debian-installer-startup.d/S40framebuffer-module-linux-armel
+++ b/src/lib/debian-installer-startup.d/S40framebuffer-module-linux-armel
@@ -9,7 +9,7 @@ if [ -n "$TERM_FRAMEBUFFER_TRY" ] && \
 	if [ -d /sys/class/graphics/fb0 ]; then
 		if [ "$(cat /sys/class/graphics/fb0/name)" = "udlfb" ]; then
 			register-module -i udlfb
-		else
+		elif [ -e /sys/class/graphics/fb0/device/driver ]; then
 			driver=$(basename $(readlink /sys/class/graphics/fb0/device/driver))
 			register-module -i "$driver"
 		fi
-- 
1.7.5.4


Reply to: