Debian Squeeze on i.MX51 ARM Cortex-A8 with dual monitors
Published on February 12, 2011
Named after the aliens in the Toy Story series of movies, the latest release of Debian is a very slick piece of work.Nicely done, folks!We recently had a customer request to put together a dual-monitor configuration for an existing GTK application and Debian's latest made the job almost painless.Initial installation was simple and followed much the same path as described in our earlier blog posts:
- Install Debian. In this case, we used the Versatile Netboot image as our starting point.
- Install X-Windows and Fluxbox. This part went almost exactly as with Lenny.
- Add touch support.
This step was easier in Squeeze because thetslib
patch is no longer needed and we now had Rick Soza's tip to make device mapping easier. - Rotate the displays into portrait mode. This step matched our previous comment.
- Configure dual monitors.
The final step in the process (Configuring dual monitors) was the trickiest part of the process, but it all boils down to proper configuration of xorg.conf
. The following is what we came up with:
Section "Monitor"
Identifier "HDMI Monitor"
EndSection
Section "Monitor"
Identifier "LCD Monitor"
EndSection
Section "Device"
Identifier "LCD"
Option "UseFBDev" "true"
Driver "fbdev"
Option "fbdev" "/dev/fb1"
Option "Rotate" "CCW"
EndSection
Section "Device"
Identifier "HDMI"
Option "UseFBDev" "true"
Driver "fbdev"
Option "fbdev" "/dev/fb0"
Option "Rotate" "CCW"
EndSection
Section "Screen"
Identifier "LCD Screen"
Device "LCD"
Monitor "LCD Monitor"
EndSection
Section "Screen"
Identifier "HDMI Screen"
Device "HDMI"
Monitor "HDMI Monitor"
EndSection
Section "InputClass"
Identifier "Freescale PMIC 4-wire touchscreen"
MatchProduct "mxc_ts"
MatchDevicePath "/dev/input/event*"
Driver "tslib"
Option "ScreenNumber" "0"
Option "Width" "800"
Option "Height" "480"
Option "Rotate" "CCW"
Option "TslibDevice" "/dev/input/tslib"
Option "CorePointer"
EndSection
Section "ServerLayout"
Identifier "server"
Screen "LCD Screen"
Screen "HDMI Screen" RightOf "LCD Screen"
EndSection
If you read this carefully, there are one each of the Monitor
, Device
, and Screen
sections for the two displays. Since we configured this for one output to HDMI and the other to a native 7" LCD screen, I named them such.The Device
section is used to point at the display device itself.The ServerLayout
section ties them together into a single virtual surface, although this really only applies to the mouse. The touch screen is tied to Screen 0 through the ScreenNumber
parameter.If you're putting together your own rotated screen, don't forget to use the fbcon=rotate:3
kernel command-line argument to rotate Tux and any console boot messages.