VIAS3UniChromeLinux display driver source code compilation guide-vivi Finishing

Source: Internet
Author: User
VIAS3UniChromeLinux: driver source code compilation guide-vivi organization-Linux general technology-Linux programming and kernel information. See the following for details. 1. Summary

This manual describes how to compile VIA UniChrome family Linux in Fedora Core Linux 4/5/6 to display the driver source code, mpeg2/4 hardware videos, and overlay hardware videos. Other releases only support 2D, TV-OUT, mpeg2/4 for hardware videos, and overlay for hardware videos. This information and source code file provide "as is" to suit various situations.

2. installation environment (kernel 2.6.X)
2.1 Xorg sdk rpm/DEB software package, Xorg source code package.
Fedora Core Linux 4.0: xorg-x11-6.8.2-31.src.rpm
Fedora Core Linux 5.0: xorg-x11-server-sdk-1.0.1-8.i386.rpm
Fedora Core Linux 6.0: xorg-x11-server-sdk-1.1.1-47.fc6.i386.rpm
2.2 3D Mesa source file rpm or patch package for Installing via dri library.
Fedora Core Linux 5.0: mesa-6.4.2-6.src.rpm
Fedora Core Linux 6.0: mesa-6.5.1-7.fc6.src.rpm
2.3 VIA unichrome family display driver version: 4.1.0072.
The driver's source code contains three file directories:
Via (header file, 2D XServer and V41 driver source file)
VIA-WMILIB (mpeg dynamic link object code)
3D (via drm/AGP/DRI source file and Fedora Linux Core 4/5/6 3D DRI dynamic link object code)
Utility (VIA/S3G TV public Monitor)

3. follow the steps below to compile the Xorg Source: (only for Xorg <7.0)
* This step is only for Fedora Core Linux 4.
# Rpm-ivh xorg-x11-6.8.2-31.src.rpm
# Cd/usr/src/redhat/SPECS
# Rpmbuild-bc xorg-x11.spec
# Cd/usr/src/redhat/BUILD/xorg-x11-6.8.2/
# Mv xc // usr/src/
Tip: According to your system conditions, the installation takes one to two hours.

4. Prepare the kernel source for the VIA display driver or re-build the kernel (AGP ).
* The sample is default kernel in Fedora Core Linux 5.
# Rpm-ivh kernel-2.6.15-1.2054_FC5.src.rpm
# Cd/usr/src/redhat/SPECS/
# Rpmbuild-bp kernel-2.6.spec -- target = i686
# Mv/usr/src/redhat/BUILD/kernel-2.6.15/linux-2.6.15.i686/usr/src/
# Ln-sf/usr/src/linux-2.6.15.i686/usr/src/linux
* The sample is default kernel in Fedora Core Linux 6.
# Rpm-ivh kernel-2.6.18-1.2798.fc6.src.rpm
# Cd/usr/src/redhat/SPECS/
# Rpmbuild-bp kernel-2.6.spec.
# Mv/usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i386/usr/src/
# Ln-sf/usr/src/linux-2.6.18.i386/usr/src/linux
Note: the installation process may take 10 to 15 minutes based on the system conditions.

5. Modify the "makefile" file to suit your system kernel version.
# Vi/usr/src/linux/Makefile (make sure the "EXTRAVERSION" value
In Makefile is the same as OS kernel version "# uname-r ".
E.g. "EXTRAVERSION =-1.2054_FC5" in FC5,
"EXTRAVERSION =-1.2798.fc6" in FC6)
# Make modules_prepare (configure the run time settings of kernel source
By this command in/usr/src/linux folder)

6. Use a script to build the CLE266CN400CN-CX700CN800 driver and select the type of version 72 and CPU. The driver's binary file will be created in/CLE266CN400CN-

CX700CN800XORG40072 folder.
# Tar zxvf CLE266CN400CN-CX700CN800XORG40072-kernel-src _ [date]. tgz
# Cd CLE266CN400CN-CX700CN800XORG40072-kernel-src _ [date]/src
#./Makedriver drm (Other distributions only build 2D/MPEG driver
Without the "drm" parameter)

7. manually compile the 3D Mesa source and some via dri patches. Check that the default mesa source package rpm is ready. You need to download the meas library and compile it.
* The sample is in Fedora Core Linux 5 (MesaLib 6.4.2 ).
# Cp/usr/bin/makedepend/usr/X11R6/bin/(Need "makedepend" binary tool)
# Rpm-ivh mesa-6.4.2-6.src.rpm
# Cd/usr/src/redhat/SPECS
# Rpmbuild-bc mesa. spec
# Cd/usr/src/redhat/BUILD/Mesa-6.4.2/src/mesa/drivers/dri
# Cp-a [Driver-Package-Name]/src/3D/DRI_FC5
# Cd
# Make
# Cp-a via_dri.so/CLE266CN400CN-CX700CN800XORG40072/XServer (Replace
The pre-compiled via_dri.so code)
Note: This process takes 10 to 15 minutes.

8. if you want to use the AGP features (high performance) of CN700, CX700 (M/M2), VX700 (M/M2), VN800 and CN800 IGPs ), then you need to re-build the kernel source and install the via agpgart Fedora Core Linux 4/5/6 patch. The "makedriver" script copies some new AGP files for the kernel source code tree. If you skip this step, the VIA driver uses the PCI feature.

The sample is in Fedora Core Linux 5.
# Cd/usr/src/linux
# Make; make modules_install
# Cp arch/i386/boot/bzImage/boot/vmlinuz-2.6.15-1.2054_FC5_VIA
# Cd/boot/
# Mkinitrd initrd-2.6.15-1.2054_FC5_VIA.img 2.6.15-1.2054 _ FC5
Note: This process takes 1 to 2 hours.
Make sure that your IDE (DMA) function works properly on the VT8237A/vt88.0/CX700 (M/M2)/VX700 (M/M2) chip. If not, install the IDE driver patch before rebuilding the kernel.

Restart the computer and the new kernel will be created. Run the "dmesg" command to check the support of the agpgart module of CN700/CX700 (M/M2)/CN800/VN800/VX700 (M/M2) on the X Window terminal.
# Dmesg | grep agpgart
Agpgart: Detected VIA CX700 chipset
Agpgart: AGP aperture is 128 M @ 0x80000000
Agpgart: Found an AGP3.5 compliant device at :00:00. 0.
Apggart: X tried to set rate = x12. Setting to AGP3 x8 mode.
Agpgart: Putting AGP V3 device at. 0 into 8x mode
Agpgart: Putting AGP V3 device at. 0 into 8x mode

9. Confirm that "via_drv.so", "libddmpeg. so", "via_v4l_drv.ko", "via. ko", "via_dri.so", and "Utility" already exists. Use the "install" script to install these

Driver and VIA/S3G TV display.
#./Vinstall (select 1. VMI-ONLY path or 2. V4L path)
Run the "lsmod" command to check whether the module is successfully loaded.
If you see the "via" and "via_v41_drv" modules, the V4L driver path is loaded successfully. If you choose a VMI-ONLY, there is only one module named ".
Note: In Fedora Core Linux 4, the "videodev. ko" driver is available.
It will replace the system's default videodev driver.
VMI-ONLY path is a non-kernel dependency way to enable the VIA 2D/3D/
Hw mpeg/TV features.
Other releases only have two binary codes (via_drv.so and libddmpeg. so)

10. Install the libraries recovery package dependent on the DRI package.
* This step is only for Fedora Core Linux 4.
# Tar zxvf DRI-Xorg.tgz
# Cd DRI
#./Minstall

Appendix: Fedora Core Linux 4.0 dependency packages:
Bash-3.0-31.i386.rpm
Bison-2.0-6.i386.rpm
Cpp-4.0.0-8.i386.rpm
Expat-devel-1.95.8-6.i386.rpm
Flex-2.5.4a-34.i386.rpm
Fontconfig-devel-2.2.3-13.i386.rpm
Freetype-devel-2.1.9-2.i386.rpm
Gcc-4.0.0-8.i386.rpm
Glibc-devel-2.3.5-10.i386.rpm
Kernel-2.6.11-1.1369_FC4.src.rpm
Libstdc ++ 4.0.0-8. i386.rpm
Libpng-devel-1.2.8-2.i386.rpm
Ncurses-devel-5.4-17.i386.rpm
Pam-devel-0.79-8.i386.rpm
Rpm-4.4.1-21.i386.rpm
Rpm-build-4.4.1-21.i386.rpm
Xorg-x11-devel-6.8.2-31.i386.rpm
Xorg-x11-libs-6.8.2-31.i386.rpm
Zlib-devel-1.2.2.2-3.i386.rpm
Fedora Core Linux 5.0 dependency packages:
Bash-3.1-6.2
Bison-2.1-1.2.1
Cpp-4.1.0-3
Expat-1.95.8-8.2
Flex-2.5.4a-37.4
Fontconfig-devel-2.3.94-1
Freetype-devel-2.1.10-5.2.1
Gcc-4.1.0-3
Glibc-devel-2.4-4
Kernel-2.6.15-1.2054_FC5.src.rpm
Libstdc ++ 4.1.0-3
Libpng-devel-1.2.8-2.2.1
Ncurses-devel-5.5-19
Pam-devel-0.99.3.0-2
Rpm-4.4.2-15.2
Rpm-build-4.4.2-15.2
Xorg-x11-server-sdk-1.0.1-8
Zlib-devel-1.2.3-1.2.1

Imake-1.0.1-3
Mesa-libGLU-6.4.2-6
Mesa-libGLU-devel-6.4.2-6
Freeglut-devel-2.4.0-4
LibXp-devel-1.0.0-2.2
Openmotif-2.3.0-0.1.9.2
Openmotif-devel-2.3.0-0.1.9.2
Mesa-6.4.2-6.src.rpm (MesaLib 6.4.2 source package)
Fedora Core Linux 6.0 dependency packages:
Bash-3.1-16.1
Bison-2.3-2.1
Cpp-4.1.1-30
Expat-1.95.8-8.2.1
Flex-2.5.4a-41.fc6
Fontconfig-devel-2.4.1-3.fc6
Freetype-devel-2.2.1-10.fc6
Gcc-4.1.1-30
Glibc-devel-2.5-3
Kernel-2.6.18-1.2798.fc6.src.rpm
Libstdc ++ 4.1.1-30
Libpng-devel-1.2.10-7
Ncurses-devel-5.5-24.20060715
Pam-devel-0.99.6.2-3.fc6
Rpm-4.4.2-32
Rps-build-4.4.2-32
Xorg-x11-server-sdk-1.1.1-47.fc6
Zlib-devel-1.2.3-3

Imake-1.0.2-3
Mesa-libGLU-6.5.1-7.fc6
Mesa-libGLU-devel-6.5.1-7.fc6
Mesa-6.5.1-7.fc6.src.rpm (MesaLib 6.5.1 source package)
Note: after the operating system is installed, Run "rpm-qa | grep gcc" (rpm base) or "dpkg-l | grep gcc" (deb base) command to check whether the above software packages are installed.

4. Installation Materials
4.1 do not install programs in the CD directory.

(Note: Do not run the installer in the cd Mount directory)

In this case, the CD cannot be released when changing the CD. Run the following command to install the CD:

Wine/media/cdrom0/setup.exe

4.2 "wine eject" is required"

If you need to replace the CD chip when installing the program, but the system says you cannot exit the CD, open a new terminal and enter:

Wine eject d:

4.3 install InstallShield bug Patches

This patch can solve some CD installation problems.

4.4 use uninstaller

Run the "uninstaller" command to uninstall the installed program. Do not use the uninstall shortcut created by the program in the menu, because they sometimes cannot work normally, but uninstaller can.

4.5 install the. msi file

Some windows Installation programs are installed Using msi, so use the following command to install them:

Wine msiexec/I install. msi

Or

Wine start install. msi

4.6 do not install DirectX

Wine has its own DirectX library. installing Microsoft DirectX will damage wine's DirectX library and Wine.

However, d3dx9 _ #. dll and d3dx10_33.dll can be copied and used from Windows, which may be helpful when starting some games. However, to use these dll files, you need Microsoft's authorization certificate.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.