Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am using Fedora 11 and recently I compiled kernel 2.6.32.8. I was trying to make some change in the kernel and I have included #include<linux/mmzone.h. file . But when I tried to compile it gives "No such file or directory". I checked that this file is not in /usr/include/linux but it is there in /usr/src/linux-2.6.32.8/include/linux. I getting same error for some other header file too.
I have not idea what to do it to make. I do not want to give full path. Suggest what to do.
I have created a new directory in "/usr/src/linux-2.6.32.8/lib/new". In this directory my header file is there which is using the header files
<asm/types.h>, <linux/init.h>, <linux/kmemtrace.h> etc ...
Last edited by ravishekhar.82; 02-23-2010 at 06:57 AM.
I still dont understand what you are trying to do. When you unpack kernel tarball you get linux-2.6.x.x directory with lots of stuff in it. Makefile then expects to find files in exactly same position as they were unpacked. So if you move some of the files or modified them the build process will ultimately fail. You need to modify makefile accordingly. That if work for Linux gurus which I am definitely not.
So please indicate what exactly you want to do and maybe someone will be able to help.
When there is a header file say <linux/xyz.h> then how system finds the header file.
My problem is that this header file <linux/xyz.h> is not in original /usr/include/linux but it is present at /usr/src/linux-2.6.32.8/include/linux. I want header files to be taken from the new location too.
In which all files I have to make changes. Do I have to create certain rule for this.
Which headers are included is influenced by parameters during compilation. Parameter -I followed by path specify, where gcc looks for header files before it searches standard path.
So check your makefile. If it contains -I./include parameter then it first searches "/usr/src/linux-2.6.32.8/include" and then "/usr/include"
But I am sure kernel developers are not stupid and included this parameter into compilation process, so the headers provided alongside with kernel are used.
Since the linux kernel is based on Makefiles, that's what you should be looking at. As someone else said above. I can't say much more without knowing what are you exactly doing and what exact changes did you do to the kernel source tree.
However, instead of modifying the well probed and studied kernel tree structure, I'd rather suggest you to copy the full tree to a given alternate location, and work on that separate tree, instead of doing overly complicated things or nesting trees like I think you are doing. That will also allow you to easily make a diff later if you want to make a patch.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.