Download, Build, Install, and Configure the MB8629x X11 Drivers
Author
This document was written by Nick Ivanter (nick {at} emcraft {dot} com).
Availability:
The MB8629x X11 Drivers are available as Free Software under
GPL.
You can either download and run the binary modules from the DENX
FTP server,
or you can download the full source tree from the DENX
git
repository and rebuild everything from scratch.
#Hardware Setup
Hardware Setup
For correct operation of the Coral-P card with the Linux X11 drivers the jumpers on the card must be set as documented in
Installing a Coral-P PCI Evaluation Board.
Quick Installation:
- Download the following files from the DENX FTP server:
- Install the files on a
Debian GNU/Linux
system as follows:
# cp mb86290_drv.o /usr/X11R6/lib/modules/drivers/
# cp libmb86290_fb.a /usr/X11R6/lib/modules/
# cp XF86Config-4 /etc/X11/
# cp zvideo /usr/local/bin/
# chmod 0755 /usr/local/bin/zvideo
Source Download:
Please use the following command to clone the git repository of the MB8629x X11 Driver source code:
git-clone git://git.denx.de/x11_mb8629x.git
Building:
To build the drivers you must have the
XFree86
sources.
The procedures of getting and unpacking these can vary
dependent on the type of OS which you are running.
If you use Debian Linux you can perform the following steps
to get and unpack the
XFree86
sources:
- (as
"root"
) Make sure your package database is up to date:
# apt-get update
- (as normal user) Go to your chosen build directory:
$ cd Coral-P
- Get XFree86 sources:
$ apt-get source xserver-xfree86
- Go to the directory where the package sources has been downloaded;
the name of this directory depends on the version of
XFree86
, for
example:
$ cd xfree86-4.3.0.dfsg.1
- Create the build tree (unpack the package):
$ debian/rules setup
The directory 'build-tree'
will be created and the package will
be unpacked in it.
- Go to
'build-tree'
directory and copy the contents of the
'x11_mb8629x'
CVS tree on top of the 'xc'
directory
in the Debian XFree86
build tree.
- Go to the
'xc'
directory in the build tree.
- Set the
KERNELSRC
variable of
programs/Xserver/hw/xfree86/drivers/mb86290/Imakefile
to point to actual location of the MPC5200 Linux kernel sources.
- Comment out the line
'$(MAKE_CMD) $(MFLAGS) $(WORLDOPTS) World'
in the top-level Makefile in the 'xc' directory.
The line is located near the end of the 'World'
in the following context:
$(MAKE_CMD) $(MFLAGS) Makefiles
$(MAKE_CMD) $(MFLAGS) BOOTSTRAPSUBDIRS= clean
$(MAKE_CMD) $(MFLAGS) includes
$(MAKE_CMD) $(MFLAGS) depend
# $(MAKE_CMD) $(MFLAGS) $(WORLDOPTS) World
@echo ""
@date
@echo ""
@$(RM) $(VERSPROG)
@$(CC) $(VERSINC) -o $(VERSPROG) $(VERSSRC)
@echo Full build of XFree86`$(VERSPROG)` complete.
@$(RM) $(VERSPROG)
@echo ""
- Finally, to build the driver, execute the following commands:
make World
(cd config/util; make)
(cd programs/Xserver/hw/xfree86/drivers/mb86290; make)
(cd programs/Xserver/mb86290_fb; make)
Installation:
Just copy two modules to the directory with X11 modules:
-
# cp programs/Xserver/hw/xfree86/drivers/mb86290/mb86290_drv.o
/usr/X11R6/lib/modules/drivers/
-
# cp programs/Xserver/mb86290_fb/libmb86290_fb.a /usr/X11R6/lib/modules/
Configuring Xserver:
Now you have to edit the
/etc/X11/XF86Config-4
file as follows:
- Add a new device section, something like:
Section "Device"
Identifier "MB86290 card"
Driver "mb86290"
Option "Accel" "true"
EndSection
- Modify the screen section; the device string has to look like this:
Device "MB86290 card"
If there are 'DefaultDepth'
or 'DefaultFbBpp'
options - delete them.
There must be only one display subsection, and it has to look like this:
SubSection "Display"
Depth 15
Modes "1024x768"
EndSubSection
Video Application:
If you followed the instructions above to build the X11 driver, you can proceed to
build the demo video application as follows:
$ cd xfree86-4.3.0.dfsg.1/build-tree/zvideo
$ make
# cp zvideo /usr/local/bin/
There are some known limitations of the video capture software which you
need to be aware of:
- The video picture cannot be scaled down in one direction (for
instance, horizontally) and at the same time scaled up in the other
direction (for instance, vertically). It can be either scaled down in both
directions (i.e. made smaller), or scaled up (i.e. made bigger).
- The video picture cannot be overlapped by other windows. If this
happens, the video driver stops displaying video in the window.
- A scaled up in vertical direction video picture is of a bad quality.
These limitations are actually due to limitations of the MB86295 hardware.
We don't believe that they can be overcome in software.