找回密码
 
查看: 3182|回复: 7

Compile libva step by step on Ubuntu 13.04 ...

[复制链接]
OS: Ubuntu 13.04 32 bit
CPU: Ivy bridge i7 3770

Prerequirements:

Install these staffs first:
sudo apt-get install autoconf automake libtool hwdata
sudo apt-get install xorg-dev
sudo apt-get install libgl1-mesa-dev
sudo apt-get install libdrm-dev

If you are using Fedora, the package names should be these:
                - xorg-x11-server-Xorg
                - xorg-x11-server-sdk
                - libXvMC-devel
                - mesa-libGL-devel
                - libdrm-devel

Source code repositories
                1) X.org 2D driver
                The Intel driver for X.org is available from the public X.org git repository:
git://anongit.freedesktop.org/git/xorg/driver/xf86-video-intel
                The release tarball can be downloaded from http://xorg.freedesktop.org/archive/individual/driver/
                2) Mesa 3D GL driver
                The GL drivers are available from the public Mesa git repository:
git://anongit.freedesktop.org/git/mesa/mesa
                3) DRM and AGPGART kernel module
                The DRM and AGPGART kernel modules are available from the Linux kernel.
                The latest Intel code is maintained at the public drm intel kernel git repository:
git://people.freedesktop.org/~danvet/drm-intel
                4) LIBDRM userland DRM module
                The LIBDRM modules are available from the public DRM git repository :
git://anongit.freedesktop.org/git/mesa/drm
                5) LIBVA and VA-DRIVER-INTEL
                The VAAPI library and Intel driver are available from their public git repositories:
git://anongit.freedesktop.org/vaapi/libvagit://anongit.freedesktop.org/vaapi/intel-driver
                For information on using VAAPI, supported hardware matrix and latest releases, please see this page.

                If these packages are available, building should be as simple as: $ ./autogen $ make $ sudo -c "make install"
                Note: Depending on your distribution, you may need extra flags, like:
                --prefix=
                --exec-prefix=
                --libdir=
                --sysconfdir=
                etc., depending on where your X server is installed (see ./configure --help for details).


Whole stack building:

1. Compile kernel 3.8.2
  • Download : https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.8.2.tar.gz
  • Extract the kernel and put it in /usr/src.
  • Locate to the new kernel directory: cd /usr/src/linux-3.8.2
  • Backup the original config: cp ../linux-headers-3.8.0-19-generic/.config .
  • make menuconfig
  • apt-get install kernel-package
  • make-kpkg --initrd --append-to-version -01 kernel_image  kernel_headers -jN [N means run how many thread to compile]
  • Install new kernel image & firmware: dpkg -i xxxx
  • reboot OS: shutdown -r now
2. Compile libdrm
3. xf86-video-intel - 2.21.3
  • If you install xorg in another directory (referred to as $XORG_DIR), instead of overriding the xorg shipped in your Linux distribution, you need to set two macros at first:
  1. export PKG_CONFIG_PATH=${XORG_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH
  2. export ACLOCAL="aclocal -I ${XORG_DIR}/share/aclocal"
复制代码
Of course, if you install xserver to another directory, you need compile all xorg modules. As for the detailed guide about xserver and xorg module compilation, refer to Xorg Modular Developers' Guide.
Note: You might need to use the latest Xorg and xserver release to sync with the latest intel driver.
Compiling the 2D driver is simple:
  1. cd
  2. $DOWN_ROOT/xf86-video-intel
  3. ./autogen.sh --prefix=${XORG_DIR}
  4. make
  5. && make install
复制代码
  • Then the2D driver library file (intel_drv.so) will be installed to $XORG_DIR/lib/xorg/modules/drivers/.
  • ./configure --prefix=/usr --enable-dri=yes --enable-sna=no --enable-uxa=yes --enable-xaa=yes --enable-dga=yes --enable-async-swap=yes
4. Xorg 2D driver
Download Mesa - 9.1: ftp://freedesktop.org/pub/mesa/9.1/

5. Xserver - 1.13.2.902
Download Xserver - 1.13.2.902: ftp://ftp.x.org/pub/individual/x ... r-1.13.2.902.tar.gz

6. Cairo - 1.12.14
Download Cairo - 1.12.14: http://cairographics.org/news/cairo-1.12.14/

7. Libva - 1.1.1
Download Libva - 1.1.1: http://www.freedesktop.org/softw ... libva-1.1.1.tar.bz2

8. vaapi intel-driver - 1.0.20
Download vaapi intel-driver - 1.0.20: http://www.freedesktop.org/softw ... iver-1.0.20.tar.bz2
 楼主| jackyhwei 发表于 | 显示全部楼层
--------------------------------------------------
xcb-proto-1.8
--------------------------------------------------
./autogen.sh --prefix=/usr
sudo make install

--------------------------------------------------
libxcb-1.9
--------------------------------------------------
sudo apt-get install xsltproc
./autogen.sh --prefix=/usr
make install

--------------------------------------------------
Mesa 1.9
--------------------------------------------------
./configure --prefix=/usr --with-gallium-drivers=i915,swrast --with-dri-drivers=swrast,i915,i965 --enable-glx=yes --enable-gl=yes --enable-xlib=yes --enable-xlib-xrender=yes --enable-xcb=yes --enable-xlib-xcb=yes --enable-directfb=yes
make install

--------------------------------------------------
xf86-video-intel
--------------------------------------------------
./configure --prefix=/usr --enable-dri=yes --enable-sna=no --enable-uxa=yes --enable-xaa=yes --enable-dga=yes --enable-async-swap=yes

--------------------------------------------------
xorg-server
--------------------------------------------------
sudo apt-get install libssl-dev
./configure --prefix=/usr
make install

--------------------------------------------------
libva 1.1.1
--------------------------------------------------
./configure --prefix=/usr
make install


--------------------------------------------------
libva-intel-driver
--------------------------------------------------

GMT,

Powered by Discuz!

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表