G-Virus
Posts: 7
Joined: Mon Feb 15, 2016 2:31 pm
Location: Saint-Petersburg, Russian Federation

Differences between a Generic Linux Kernel and a Raspberry Kernel

Thu Nov 02, 2017 12:14 am

Hello everyone. Could you guys tell me what the differences between the generic linux kernel which can be dowloaded from kernel.org and the official raspberry kernel? For example, can I use a default config file from the raspberry's kernel with the generic kernel?

Thanks in advance

User avatar
The Traveler
Posts: 55
Joined: Sat Oct 21, 2017 3:48 pm

Re: Differences between a Generic Linux Kernel and a Raspberry Kernel

Thu Nov 02, 2017 12:49 am

Kernels are compiled for different architectures and different capabilities. A kernel contains code that tells it how to interact with hardware, address memory, handle I/O and a number of other things. Config files are specific to the kernel they produce so you really don't want to try and use a config from one kernel to another.

Here's a starting point: https://www.linuxhint.com/linux-kernel- ... beginners/

Cheers.
"Your Google-fu is weak Grasshopper. It is not the answer that enlightens, but the research.”

User avatar
DougieLawson
Posts: 30169
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Differences between a Generic Linux Kernel and a Raspberry Kernel

Thu Nov 02, 2017 12:51 am

What differences would you like?
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

G-Virus
Posts: 7
Joined: Mon Feb 15, 2016 2:31 pm
Location: Saint-Petersburg, Russian Federation

Re: Differences between a Generic Linux Kernel and a Raspberry Kernel

Thu Nov 02, 2017 11:33 am

The Traveler wrote:
Thu Nov 02, 2017 12:49 am
Kernels are compiled for different architectures and different capabilities. A kernel contains code that tells it how to interact with hardware, address memory, handle I/O and a number of other things. Config files are specific to the kernel they produce so you really don't want to try and use a config from one kernel to another.

Here's a starting point: https://www.linuxhint.com/linux-kernel- ... beginners/

Cheers.
Thank you for the link. I just thought the kernels from kernel.org also contains #ifdef ARM ... #endif sections to specify hardware differences, because we can set ARCH variable and use toolchain so the kernel will be built for ARM architecture.

swahren
Posts: 11
Joined: Mon Sep 19, 2016 5:24 pm
Location: Germany

Re: Differences between a Generic Linux Kernel and a Raspberry Kernel

Sat Nov 11, 2017 2:19 pm

G-Virus wrote:
Thu Nov 02, 2017 12:14 am
Hello everyone. Could you guys tell me what the differences between the generic linux kernel which can be dowloaded from kernel.org and the official raspberry kernel?
In short:
Raspberry Kernel = Official kernel + several improvements

It's possible to use a Raspberry Pi with the generic Linux kernel, but there are currently some missing features (Bluetooth, devicetree overlay) and boards (both Compute Modules, Sense hat). Also the Raspberry Pi kernel uses optimized drivers which will never be accepted for the upstream Kernel like the dwc_otg or the BCM2835 MMC driver.
G-Virus wrote:
Thu Nov 02, 2017 12:14 am
For example, can I use a default config file from the raspberry's kernel with the generic kernel?
No, please following these instructions.

feelslikeautumn
Posts: 97
Joined: Wed Aug 09, 2017 9:51 pm

Re: Differences between a Generic Linux Kernel and a Raspberry Kernel

Sat Nov 11, 2017 3:35 pm

Why does a generic kernel fail to load (no progression from rainbow screen) when using the pi bootloader, but works via e.g. grub2?

swahren
Posts: 11
Joined: Mon Sep 19, 2016 5:24 pm
Location: Germany

Re: Differences between a Generic Linux Kernel and a Raspberry Kernel

Mon Nov 13, 2017 8:20 pm

This should work, maybe you need to specify the upstream device tree blob in the config.txt.

nimish
Posts: 1
Joined: Sat Sep 17, 2016 10:39 pm

Re: Differences between a Generic Linux Kernel and a Raspberry Kernel

Tue Nov 14, 2017 12:27 am

swahren wrote:
Sat Nov 11, 2017 2:19 pm

It's possible to use a Raspberry Pi with the generic Linux kernel, but there are currently some missing features (Bluetooth, devicetree overlay) and boards (both Compute Modules, Sense hat). Also the Raspberry Pi kernel uses optimized drivers which will never be accepted for the upstream Kernel like the dwc_otg or the BCM2835 MMC driver.
Hmm, someone tried to get the bcm2835-sdhost driver into the mainline kernel but the main issue is that the existing driver is quite out of date. They dropped the thread a year ago as far as I can tell, but the maintainer was helping them with code reviews, so it's not like it couldn't be done.

swahren
Posts: 11
Joined: Mon Sep 19, 2016 5:24 pm
Location: Germany

Re: Differences between a Generic Linux Kernel and a Raspberry Kernel

Tue Nov 14, 2017 8:26 pm

nimish wrote:
Tue Nov 14, 2017 12:27 am
Hmm, someone tried to get the bcm2835-sdhost driver into the mainline kernel but the main issue is that the existing driver is quite out of date.
There are multiple MMC drivers, which could be very confusing. Which driver is quite out of date (sdhci-bcm2835 or bcm2835 aka sdhost)?

sdhci-bcm2835 has been dropped in favor for sdhci-iproc (Linux 4.7). The sdhost has been merged in 4.12.
nimish wrote:
Tue Nov 14, 2017 12:27 am
They dropped the thread a year ago as far as I can tell, but the maintainer was helping them with code reviews, so it's not like it couldn't be done.
There is no need for another MMC driver since both interfaces are supported now. The only disadvantage is the missing DMA support in sdhci-iproc.

Return to “Linux Kernel”

Who is online

Users browsing this forum: No registered users and 2 guests