Archive:Building restricted drivers for XBMCbuntu
Introduction
The simpler approach to build and install the restricted drivers is to run the driver installer on XBMCLive. The installer will take care of all installations and modify the config files accordingly.
However, this requires that a full build environment has to be available on the system, while the default XBMCLive build does not have the required packages for sake of being as much compact as possible.
As several users have experienced, a full build environment requires around 1 GB of space, and the XBMCLive permanent storage file can be filled up quite easily.
The following procedures are intended to tackle this issue; it has side effects and limitations but once you have a fully working build environment it does not have major disadvantages (IMHO).
Building NVIDIA video drivers
- Method 1: build drivers on XBMCLive
- Method 2: build drivers in MIC
Building ATI/AMD video drivers
- Method 1: build drivers on XBMCLive
- Method 2: build drivers in MIC
Assuming you have created a target in MIC for the creation of the XBMCLive image, you need to create a new target having all the necessary development tools ON THE SAME PLATFORM, so that the build target has the same system components as the XBMCLive target.
Once done, copy the driver installer script onto the target and perform the following steps in a chrooted terminal on the build target:
mkdir Files sh ./ati-driver-installer-9-1-x86.x86_64.run --buildpkg Ubuntu/intrepid dpkg-deb -x fglrx-amdcccle_8.573-0ubuntu1_i386.deb Files dpkg-deb -x fglrx-kernel-source_8.573-0ubuntu1_i386.deb Files dpkg-deb -x fglrx-modaliases_8.573-0ubuntu1_i386.deb Files dpkg-deb -x libamdxvba1_8.573-0ubuntu1_i386.deb Files dpkg-deb -x xorg-driver-fglrx_8.573-0ubuntu1_i386.deb Files dpkg-deb -x xorg-driver-fglrx-dev_8.573-0ubuntu1_i386.deb Files
You have now all the files needed in the "Files" directory, minus the kernel module. In order to create the kernel module we are going to build it manually:
cd ./Files pushd . cd usr/src/fglrx-8.573/ make popd mkdir lib mkdir modules mkdir 2.6.27-11-generic mkdir updates mkdir dkms mv usr/src/fglrx-8.573/2.6.x/fglrx.ko lib/modules/2.6.27-11-generic/updates/dkms
You can now create a new loopfile of a reasonable size (80 MB should work) with:
dd if=/dev/zero of=restrictedDrivers.amd.img bs=1M count=80 mkfs.ext3 restrictedDrivers.amd.img -F
and populate it by mounting the image file and copying all the files above:
mkdir Image mount -o loop restrictedDrivers.amd.img Image cp -R Files/* Image umount Image
There is however a final step, ie. having the new module automatically loaded. For this we need to have an updated modules.dep inside the restrictedDrivers.amd.img. My way of doing it is to boot XBMCLive with AMD drivers in safe mode, run a "sudo depmod -a" and copy the resulting /lib/modules/2.6.2X-yy-generic/modules.dep over to the same location in build environment again, and reiterate the population of the .img file.