jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 29300
Joined: Sat Jul 30, 2011 7:41 pm

Re: Why does RpiOS use Ubuntu's kernel?

Mon Jul 26, 2021 8:48 pm

anatomy wrote:
Mon Jul 26, 2021 8:13 pm
jamesh wrote:
Mon Jul 26, 2021 6:12 pm

When posting it's always good to get your facts right first, before launching off on a crusade.
That's true of all parties though. Several people were misinterpreting what I was saying and doing. For instance, someone thought I was cross-compiling even though I wasn't and never said I was.
I've checked the thread, there was only one mention of cross compiling, and that didn't say it thought that is what you were doing.

But anyway, all parties do need to ensure they are working to the facts.

As to the problem, not sure why you are getting crashes, but I would be inclined to cross compile, if you have a device that can, when you want the 64bit kernel as AIUI those instructions do work correctly. As mentioned above, this is still a beta kernel so is subject to change and is not guaranteed to be stable.

As for local compiles for 64bit, the instructions will be updated when the official 64 bit kernel is released, maybe earlier if time allows.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Working in the Applications Team.

M_P
Posts: 94
Joined: Sun Jan 06, 2013 5:40 pm

Re: Why does RpiOS use Ubuntu's kernel? [IT DOESN'T]

Tue Jul 27, 2021 12:04 am

anatomy wrote:
Mon Jul 26, 2021 4:33 pm
I'm just curious... How hard would it be provide your own kernel?
I've seen the kernel spontaneously reboot and I was surprised that you folks don't provide your own.
Doesn't providing a stable kernel fall under your responsibility to provide a stable product in general?
Here's a potentially helpful guide.

RULES FOR WANDERING INTO A ROOM AND MAKING A STATEMENT
#1: Take a moment to make sure you're wearing pants
#2: If you forget #1 and someone points it out, do not insist that you are, in fact, wearing pants
#3: If several other people point it out, do not insist that their pants are wrong because there is no such company as "Made in Thailand" or "DO NOT BLEACH".
#4: If a professional tailor, seamstress, designer, etc comes up to you and points out that you are not wearing pants, do not question the validity of their opinion without looking down and making sure that you are actually wearing pants.
#5: If you aren't wearing pants, do not change the subject to how pants are made in an attempt to shore up your pants-less position.

Failure to follow those rules may leave you standing without pants in a room full of people. Anyway...
Somehow it never manages to load all the drivers, particularly Wifi.
Are you looking for help with your rebooting/wifi problems? If so, I suggest burning a fresh SD card with the latest 32-bit Raspberry Pi OS (and the stock kernel), disconnect any devices you may have connected to the USB or GPIO ports, and make sure your Pi is receiving clean 5V power from its power supply. If that doesn't help, try another power supply - most of the problems that folks have with reboots and other odd behavious are because the power sags or is noisy when the current draw changes, which are good signs of a power supply that can't keep up or a poor quality (or overly long) USB cable.

anatomy
Posts: 38
Joined: Thu Jul 22, 2021 5:42 pm

Re: Why does RpiOS use Ubuntu's kernel?

Tue Jul 27, 2021 1:27 am

jamesh wrote:
Mon Jul 26, 2021 8:48 pm
I've checked the thread, there was only one mention of cross compiling, and that didn't say it thought that is what you were doing.
I counted 3 before. One was subsequently removed. Now there are two.
jamesh wrote:
Mon Jul 26, 2021 8:48 pm
As to the problem, not sure why you are getting crashes, but I would be inclined to cross compile, if you have a device that can, when you want the 64bit kernel as AIUI those instructions do work correctly.
The zImage makefile target is not supported. You should update the document to say Image.gz ...

trejan
Posts: 3586
Joined: Tue Jul 02, 2019 2:28 pm

Re: Why does RpiOS use Ubuntu's kernel?

Tue Jul 27, 2021 1:55 am

I see from your other thread that you've worked out why the modules weren't being installed.
anatomy wrote:
Tue Jul 27, 2021 1:27 am
The zImage makefile target is not supported. You should update the document to say Image.gz ...
Okay. Got it now. I only ever compile 32-bit kernels on the Pi itself as I'm not using the beta on those installs. If I need a 64-bit kernel then I use a PC. As mentioned by 6by9 earlier, the local compile instructions are only meant for 32-bit because its beta. The Image vs zImage and the arm vs arm64 changes are only mentioned in the cross compile section.

I was going to submit a change to the docs but it needs more than just duplicating the instructions. There would need to more steps for getting the Raspberry Pi OS 64-bit beta installed etc...

If anybody has the 64-bit beta OS and wants to compile their own 64-bit kernel on the Pi itself then they need to run:

Code: Select all

make -j4 Image modules dtbs
sudo make modules_install
sudo cp arch/arm64/boot/dts/broadcom/*.dtb /boot/
sudo cp arch/arm64/boot/dts/overlays/*.dtb* /boot/overlays/
sudo cp arch/arm64/boot/dts/overlays/README /boot/overlays/
sudo cp arch/arm64/boot/Image /boot/$KERNEL.img

fanoush
Posts: 799
Joined: Mon Feb 27, 2012 2:37 pm

Re: Why does RpiOS use Ubuntu's kernel?

Tue Jul 27, 2021 8:16 am

anatomy wrote:
Mon Jul 26, 2021 8:13 pm
Several people were misinterpreting what I was saying
You said

"Why does RpiOS use Ubuntu's kernel? .... How hard would it be provide your own kernel? .... I was surprised that you folks don't provide your own."

To me this means you really think that they do not provide their own kernel (because it is hard?) and rely on "Ubuntu" to do it for them. Is that misinterpretation of what you said?

And you came to that conclusion despite 10 years of their history of maintaining and building linux kernel for 4 generations of Raspberry devices each having multiple variants of boards (A,B,+,CM). That's quite a massive amount of linux kernel work.
anatomy wrote:
Mon Jul 26, 2021 8:13 pm
and doing. For instance, someone thought I was cross-compiling even though I wasn't and never said I was.
People tried to be helpful and tried to guess 1. what your real issue may be and 2. what you may possibly did in different way than others. And that was only because you completely failed to provide that information yourself right from the start! Instead of false statements you could have used the title and body of your first post to describe your issue and steps to reproduce it.

anatomy
Posts: 38
Joined: Thu Jul 22, 2021 5:42 pm

Re: Why does RpiOS use Ubuntu's kernel?

Thu Jul 29, 2021 1:41 pm

trejan wrote:
Tue Jul 27, 2021 1:55 am

Code: Select all

make -j4 Image modules dtbs
sudo make modules_install
sudo cp arch/arm64/boot/dts/broadcom/*.dtb /boot/
sudo cp arch/arm64/boot/dts/overlays/*.dtb* /boot/overlays/
sudo cp arch/arm64/boot/dts/overlays/README /boot/overlays/
sudo cp arch/arm64/boot/Image /boot/$KERNEL.img
Yes that it what worked for me.
It's always important to have correct documentation because not having it just wastes people's time.

Of course, getting back to the original question, it's still not clear why a kernel for a Debian distro is being compiled on an Ubuntu system. That sort of suggests a lack of faith in Debian on Rpi developers' part. One should always fully commit to the technology one is promoting.

M_P
Posts: 94
Joined: Sun Jan 06, 2013 5:40 pm

Re: Why does RpiOS use Ubuntu's kernel?

Thu Jul 29, 2021 3:41 pm

anatomy wrote:
Thu Jul 29, 2021 1:41 pm
Of course, getting back to the original question, it's still not clear why a kernel for a Debian distro is being compiled on an Ubuntu system. That sort of suggests a lack of faith in Debian on Rpi developers' part. One should always fully commit to the technology one is promoting.
That wasn't your original question. Your original question was
Why does RpiOS use Ubuntu's kernel?

It was answered very quickly, and your initial disbelief at the answer and subsequent posts indicate that you don't understand (or have chosen to understand only parts of) the following:
- What various kernel-related messages mean,
- The relationship and/or difference between Debian, Ubuntu, and Raspberry Pi OS,
- What "beta" means when talking about software, and
- The advantages and disadvantages of cross-compiling.

I don't believe that's an exhaustive list.

It sounds like you're genuinely interested in some of this stuff and that's great... but you really need to start asking your questions like questions instead of wording them like accusations and conspiracy theories. For example:
it's still not clear why a kernel for a Debian distro is being compiled on an Ubuntu system
That's fair. You may not understand the advantages of cross-compiling yet, but okay, that's fair - the kernel is being built on another machine. However:
That sort of suggests a lack of faith in Debian on Rpi developers' part. One should always fully commit to the technology one is promoting
This is pure conjecture on your part, and does nothing to further your understanding of the technology or getting forum members to engage with you in a helpful way.

The physicist Wolfgang Pauli is rumoured to have said something that I think fits here. I'm paraphrasing but hopefully you'll get the idea:
"You're not right... you're not even wrong."

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 29300
Joined: Sat Jul 30, 2011 7:41 pm

Re: Why does RpiOS use Ubuntu's kernel? [IT DOESN'T]

Thu Jul 29, 2021 3:47 pm

Ubuntu is a very popular Linux distro, lots of people use it - I do, quite a few others in the office do. It's also a derivative of Debian, just like Raspberry Pi OS.

Whatever distro we build our kernel on is fairly irrelevant. It's just a build machine. I think we might have a server somewhere that runs Debian, but again, on the whole Raspberry Pi kernel building process is distro agnostic.

You can build the Pi kernel on a Pi, or Ubuntu, or Debian, or whatever, the end result is the same (except for that one line that tell you what it was built on!)
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Working in the Applications Team.

Return to “General discussion”