LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 03-06-2021, 07:48 AM   #1
SamGearhart172450
LQ Newbie
 
Registered: Jan 2021
Location: Denver
Distribution: Debian Buster
Posts: 25

Rep: Reputation: Disabled
Having an Absolutely AWFUL TIME doing this!!!!


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?????
 
Old 03-06-2021, 08:03 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
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.

I just see that you probably run Debian. Instructions for Debian.

Last edited by berndbausch; 03-06-2021 at 08:06 AM.
 
Old 03-06-2021, 08:08 AM   #3
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,617

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
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.
 
Old 03-06-2021, 08:58 AM   #4
SamGearhart172450
LQ Newbie
 
Registered: Jan 2021
Location: Denver
Distribution: Debian Buster
Posts: 25

Original Poster
Rep: Reputation: Disabled
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????
 
Old 03-06-2021, 09:02 AM   #5
SamGearhart172450
LQ Newbie
 
Registered: Jan 2021
Location: Denver
Distribution: Debian Buster
Posts: 25

Original Poster
Rep: Reputation: Disabled
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.
 
Old 03-06-2021, 09:05 AM   #6
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,307
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Which distro is this for? The specifics will depend on the particular version of the distro as well.
 
Old 03-06-2021, 09:28 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
I am guessing Pi OS. My suggestion would be to try recompiling the kernel from the official source.

https://www.raspberrypi.org/document...el/building.md
 
Old 03-06-2021, 09:40 AM   #8
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Try having a look here:
https://intestinate.com/pilfs/beyond.html#kernelbuild
 
Old 03-06-2021, 10:47 AM   #9
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by SamGearhart172450 View Post
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.
 
Old 03-06-2021, 11:54 AM   #10
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by SamGearhart172450 View Post
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.
 
Old 03-07-2021, 10:17 AM   #11
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,617

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Quote:
Originally Posted by berndbausch View Post
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.
 
Old 03-07-2021, 10:29 AM   #12
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
While I agree with wpeckham in post #3, we actually do have our own guide here for building the kernel,

https://wiki.linuxquestions.org/wiki...n_Linux_kernel

Surprised nobody has mentioned it yet

Last edited by jsbjsb001; 03-07-2021 at 10:31 AM. Reason: grammer
 
1 members found this post helpful.
Old 03-07-2021, 10:42 AM   #13
SamGearhart172450
LQ Newbie
 
Registered: Jan 2021
Location: Denver
Distribution: Debian Buster
Posts: 25

Original Poster
Rep: Reputation: Disabled
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.
 
Old 03-07-2021, 10:58 AM   #14
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,617

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Quote:
Originally Posted by SamGearhart172450 View Post
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.
 
Old 03-07-2021, 11:39 AM   #15
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by SamGearhart172450 View Post
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on rsync script, not doing what it should be doing... JockVSJock Programming 5 01-03-2010 02:07 PM
Have awful time dnloading from linux site and where to put it once it does so it work freshcoconut LinuxQuestions.org Member Intro 1 11-22-2007 09:18 AM
Etrem not doing what it was doing? mrsolo Linux - Software 2 09-26-2004 12:32 PM
wine hanging...having an awful time with it. coopns Linux - Newbie 1 06-19-2004 02:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration