Install LXR (LinuxCrossReference) and start to read kernel

Source: Internet
Author: User
Install LXR (LinuxCrossReference) and start to read kernel-general Linux technology-Linux programming and kernel information. The following is a detailed description. I borrowed a linux kernel Analysis book from the library the day before yesterday to start reading kernel. This section describes some code reading tools and I think LXR is a good choice.

I went to the LXR website and checked the new kernel and some other source code reading links. However, it is too inconvenient to read them online. I decided to install one on my own. After comparing two different versions of the lxr software package, we finally decided to install the old version, which does not need to install the database (although mysql is installed on my computer, it is too troublesome, it also conflicts with mysql keywords on the Internet ). Installation is very convenient, but you need to configure the makefile file before installation to specify the perl location and the file installation location.

After the installation is complete, the trouble is to configure lxr. conf. Many of these paths must be replaced with the current installed path (simply use the text editor replacement function), and then specify the baseurl, which must be included in the http folder, because many of the jumps are relative jumps, I started to break localhost into loaclhost, and the links on the web page cannot be used.

Of course, you also need to modify the http server configuration and add the http folder in lxr to the server path. To execute the perl file, you need to create. htaccess under the http folder, which is described in the INSTALL file of the installation package.

The most annoying thing is to add the source code folder. The INSTALL file is not described in detail. You need to create a new file named versions in the source folder, and then add the version number to the folder, create a directory named by version number under the source folder and put the source code here. Change the folder name of the source code to linux (of course, this name can be found in lxr. conf ). Enter the folder named by version 1, use genxref in the bin folder to create the source code index, and run ../bin/genxref linux/

Also, if you need to use the search function (you can search for file content), you need to install glimpse. The installation is very simple. After the installation is complete, you need to specify its path in the lxr. conf configuration file. Run glimpseindex-H. linux in the created folder named after the version number.

In this way, you can use the freetext search function.
Related Article

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: 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.