[SOLVED] Having an Absolutely AWFUL TIME doing this!!!!
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.
Ladies and Gentleman,
I have a Raspberry Pi 400 that is running the 5.10.17-v7l+ version kernel.
I have been trying to build and compile the 5.11.3 version from kernel.org and have tried following almost EVERY youtube video that shows how to do it yet I STILL cannot do it!!!
Something always comes up that precludes me from being able to do it. Either a command that doesn't work or a file/folder that is not contained on my computer or something else that does not line up with my machine. It is just iver and over and over again and it is driving me to the point the i'm about to throw both of my machines in the trash. It shouldn't be this difficult to perform tasks like this. Maybe I'm just stupid but I'd love to be able to perform this task without it making it sooooo frustrating and making one feel like a complete moronic loser.
What the hell am I doing wrong here and if one can...could you please direct me to a forum, video, something that has GOOD instrauctions and doesn;t assume you are an NSA-grade hacker?????
Personally, I think instructions like compiling a kernel should be written, not filmed.
You don't say what particular problems you have, or what distro you use, so I need to be generic. A Google search gave me plenty of results, such as on Linux.com. Or the Archlinux wiki, which is known for high quality instructions.
Building a custom kernel for ANY platform is never a Newbie task.
Have you experience building kernels for other platforms?
Have yoou access to the config file for the compile of the OLD kernel? (The one that works.)
Why do you need a different kernel than the ones available for ARM that are working and well supported? (In other words, what is the REAL problem that you expect this to solve?)
Most people with experience do a cross-compile on a different platform in a build environment created just for that purpose. The reason is largely that the compile goes a LOT faster on a platform with greater power and resources. Like, in some cases a DAY faster.
When I put this command in, I get this: pi@raspberrypi:~ $ cp /boot/config-$(uname -r) .config
cp: cannot stat '/boot/config-5.10.17-v7l+': No such file or directory
When I put this in, I get this: pi@raspberrypi:~ $ make menuconfig
make: *** No rule to make target 'menuconfig'. Stop.
It just doesn't end with this. And I get other errors also. I think I'm just going to erase the disk, reinstall the OS, and start all over again as I must have corrupted the disk somehow for it to not recognize the make menuconfig command.
I was trying to do this build/compile thing the other day and the make menuconfig DID work and brought up a screen that allowed me to configure the 64 bit kernel. Now nothing happens when I try to do this. What gives here????
No I do not have experience doing this. I would like to do it just because I want to complete the task. On Youtube, it is made to look simple and I'm frustrated that I cannot do this. Whether I need to do it or not matters none to me. I would just like a step by step guide that actually works for me or point me in the direction so I can researh it myself. But every website i pull up gives different directions, and none of them work for me as I keep coming up against a file that doesn't exist or a command that is not recognized, or nothing happens when i hit the enter button. It is quite frustrating and it is something that anyone who has a linux system should be able to do.
No I do not have experience doing this. I would like to do it just because I want to complete the task. On Youtube, it is made to look simple and I'm frustrated that I cannot do this. Whether I need to do it or not matters none to me. I would just like a step by step guide that actually works for me or point me in the direction so I can researh it myself.
In my experience, very few you tube videos actually get into the deep details of configuring software for compiling. They list what worked for them, and often a trimmed down version of that.
Quote:
But every website i pull up gives different directions, and none of them work for me as I keep coming up against a file that doesn't exist or a command that is not recognized, or nothing happens when i hit the enter button. It is quite frustrating and it is something that anyone who has a linux system should be able to do.
In reality, those who wish to learn to compile a kernel usually do. The great majority of users (probably 99+%) never see the need and use the kernel as provided by their distro.
When you get a message about a file missing the first and only solution is to find out what is missing and why. It might be a typo, it might be the path used for that file, or it may be something else.
The message about a command missing or unrecognized is also caused by one of only a few things. A typo, the command not installed, or lack of permissions to execute that file (possibly not in the users $PATH).
In both those cases it is up to the user to look at what was typed and fix it. Expecting us to read your mind, see your screen, and know how to fix the problem is unreasonable when careful analysis of the message on the screen and the command typed will usually tell you the answer.
OTOH, if you really need assistance then we need a lot more detail.
Distro, Where you downloaded the source code you are compiling, exactly what you have done to this point (including commands and responses -- preferably exactly as seen on your screen), and anything else that might be pertinent.
When I put this command in, I get this: pi@raspberrypi:~ $ cp /boot/config-$(uname -r) .config
cp: cannot stat '/boot/config-5.10.17-v7l+': No such file or directory
What do you have in /boot?
Quote:
When I put this in, I get this: pi@raspberrypi:~ $ make menuconfig
make: *** No rule to make target 'menuconfig'. Stop.
In which directory are you when you do this? Is there a Makefile in this directory? I have to say, if you are unable to solve this problem, you need to learn about the Linux command line and about compiling C programs first.
You can't compile the kernel by slavishly entering the exact commands you find somewhere on youtube. You need to be ready for some flexibility, since not all distros are alike,
Last edited by berndbausch; 03-06-2021 at 11:57 AM.
You can't compile the kernel by slavishly entering the exact commands you find somewhere on youtube. You need to be ready for some flexibility, since not all distros are alike,
And, If I might add, different RELEASES or versions of a distro will differ, and thus slightly change the process.
If you do have a kernel config file in /boot it will help. If not, you might have to see if the kernel build (or dev) package for that ditro can be easily downloaded to your RPi to support the build.
Thanks for the direction. I'm getting further along with each effort i put forth. I think like the gentleman said earlier....if you want to figure it out, you will, and that seems to be the way things are going to work which is fine. I can see though, why linux or any of the distributions have never caught on with the public at large. Not that they would need to learn alot of this stuff but I'm thinking alot would and would not want the feeling of havin g to go back to school essentially to learn the system. I guess there's something for everybody though right. I have a desire to figure this computer stuff out as it has become my new hobby.
Thanks again for the direction.
Thanks for the direction. I'm getting further along with each effort i put forth. I think like the gentleman said earlier....if you want to figure it out, you will, and that seems to be the way things are going to work which is fine. I can see though, why linux or any of the distributions have never caught on with the public at large. Not that they would need to learn alot of this stuff but I'm thinking alot would and would not want the feeling of havin g to go back to school essentially to learn the system. I guess there's something for everybody though right. I have a desire to figure this computer stuff out as it has become my new hobby.
Thanks again for the direction.
Recompiling a kernel has not been "normal" since around 1997 in either the Linux or BSD worlds. Great effort on the part of Kernel developers and distribution maintainers (and the REPO teams themselves) to make sure that most people using those particular distributions never HAD to compile anything if they did not want to do so. (With great credit to certain "special" distributions that require nearly EVERYTHING to be compiled ALL the time turining up problems NO ONE ELSE would find!)
At least with Linux kernels the sources are readily available and documentation covers the process quite well. That does not mean it is simple or static.By comparison though, I can count on my fingers the number of people I know who have successfully compiled a working kernel for Windows without getting past the thumbs! MANY of us, especially the "old guard" that were around UNIX development pre-Linux have compiled kernels.
You have embarked upon a great and wonderful adventure! Welcome to the jungle.
When I put this command in, I get this: pi@raspberrypi:~ $ cp /boot/config-$(uname -r) .config
cp: cannot stat '/boot/config-5.10.17-v7l+': No such file or directory
That is because the file isn't supposed to be there. For ARM, the configuration is contained in a module, so you do a "sudo insmod configs", which installs the module in /proc that contains the compressed configuration.
Now, once the module in loaded the build system SHOULD be able to find it (most architectures have it in /boot, but because ARM is using a UEFI boot, it doesn't put it there - note, I don't have any other system that uses a UEFI boot so I don't know how they handle it).
You can then do a "zcat /proc/config.gz >./config"
If this fixes the "can't find" error, don't forget to remove the module with a "sudo rmmod configs" after finishing to release the memory occupied by the module.
Quote:
When I put this in, I get this: pi@raspberrypi:~ $ make menuconfig
make: *** No rule to make target 'menuconfig'. Stop.
It just doesn't end with this. And I get other errors also. I think I'm just going to erase the disk, reinstall the OS, and start all over again as I must have corrupted the disk somehow for it to not recognize the make menuconfig command.
I was trying to do this build/compile thing the other day and the make menuconfig DID work and brought up a screen that allowed me to configure the 64 bit kernel. Now nothing happens when I try to do this. What gives here????
Not sure there, unless there is some program development tools missing.
Last edited by jpollard; 03-07-2021 at 01:13 PM.
Reason: fixed some command errors done while typing (modprobe isn't the right command, and
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.