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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have currently kernel 3.8 that I am using for beaglebone black. I see that there are a lot of files that beaglebone doesn't use and funtions with same names, that makes it difficult to search.
Is there a way to get rid of all this unnecessary files?
If you build your own custom kernel on the device there's make localmodconfig. Which will create a .config with only the modules for the hardware you have. Caveat, and only the filesystems currently available on attached storage things.
The longer answer is that the kernel build procedure only builds the ones called for by the configuration. The others are/will be checked to see if they are needed.
I have currently kernel 3.8 that I am using for beaglebone black. I see that there are a lot of files that beaglebone doesn't use and funtions with same names, that makes it difficult to search.
Is there a way to get rid of all this unnecessary files?
Read this first, there are related helpful links in it, and this one too. There are many sources and guides available in the internet.
Just remember - once you start deleting things from the kernel distribution you then responsible for all maintenance afterward. You won't be able to add patches very well afterward.
There are many config, .c and .h files for other architecture such as mips, powerpc. If I am building for BBB, I don't want to see them in my kernel workspace because many functions have same name in those files. What I wish to do this is I don't have any hardware debugger or any sort of method to step in the code so I have to find the files manually and guess how booting is happening and document it.
So the scenario I am looking for is
write the configuration and parse all the useful files for BBB to another directory with this configuration and then build. So I can have one untouched kernel and one another directory named as kernel-BBB inside(or outside) it.
If there is a solution in some scripting language, I just need a small example. Rest I can figure it out.
The files in the /arch directory apply to different processor architectures. The names are identical because they are "the same files" for different types of CPUs. Only one of them applies to your system.
As my Spanish friend would say: "¡No joda!"
Don't mess around with the content or the arrangement of the kernel source files. Yeah, there are a whole lot of 'em, delicately arranged.
Last edited by sundialsvcs; 07-26-2016 at 07:51 AM.
Ok.
So its a complex task basically and same files may be used at different architectures using #define at build time.
I can close this discussion.
thanks to all.
Exactly: there are a set of "very(!) low-level Linux modules" which are written more-or-less in architecture-specific assembly code," meant to be processed by an also architecture-specific compiler. (These modules are, so to speak, "where the rubber meets the road.") One, and only one, of these alternatives will actually be used when compiling Linux for a ("your ...") particular architecture.
BTW: I happen to find these modules quite fascinating. They are the secret of why "Linux" is now available for overtwenty(!) entirely-different architectures ... "and yet, it works the same."
That is, if I may say, "a truly astonishing(!) Software Engineering Achievement!" But ... such is Linux.
Last edited by sundialsvcs; 07-26-2016 at 06:30 PM.
Exactly: there are a set of "very(!) low-level Linux modules" which are written more-or-less in architecture-specific assembly code," meant to be processed by an also architecture-specific compiler. (These modules are, so to speak, "where the rubber meets the road.") One, and only one, of these alternatives will actually be used when compiling Linux for a ("your ...") particular architecture.
BTW: I happen to find these modules quite fascinating. They are the secret of why "Linux" is now available for overtwenty(!) entirely-different architectures ... "and yet, it works the same."
That is, if I may say, "a truly astonishing(!) Software Engineering Achievement!" But ... such is Linux.
As an extension to that is the GNU C compiler - which is used on all 20+ architectures... and can be used for the purpose of cross compiling from one architecture targeting another.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.