How to build and install a cloned GitHub library?

I've used git clone to make a local copy of a GitHub repository containing a video driver I'd like to use. The local copy contains all of the source for the program; but as a newbie to Ubuntu, I've no idea of what tools or steps are involved in compiling and installing the driver.

I'd really appreciate if anyone could provide a step-by-step guide?


Solution 1:

I still think a newcomer to this shouldn't go to compile drivers themselves, so understand that this is a process where lots can go wrong and you do this at your own risk.

To begin with, you want to install the proper tools for that. To do so, open a terminal (ctrl+alt+t):

sudo apt-get install build-essential autogen automake make xutils-dev autoconf libtool autoconf-2.64 automake xorg-server-devel xorg-server-utils xorg-util-macros 
git clone https://github.com/mmind/xf86-video-armsoc.git
cd xf86-video-armsoc/

Now you should be set to compile your driver. First run the command sh autogen.sh - this will create the neccesary files and configure them.

Then you run

./configure --with-drmmode=pl111

or

./configure --with-drmmode=exynos

depending on which driver you want to build.

If the configuration process stops in an error, check the last lines which dependencies are missing and install them. Easiest way to find those is running

apt-cache search <name>

In most cases you will get a fairly long list and have to go through it to find the proper package names to install. This is done then with

sudo apt-get install <packagename>

Re-run the configure as often as you need until it ends with no errors.

Now that you have configured your build you can use the command make to compile your driver followed by sudo make install to install it.