globiboulga666
Posts: 12
Joined: Sun Jun 17, 2018 6:38 pm

Vanilla 4.14.67 and Raspberry Pi Kernel 4.14.67

Tue Sep 04, 2018 7:39 pm

Hi everybody,

For those who don't want to read everything, my questions are at the bottom.

Why my questions :
I'm in the process of understanding kernel adaptation to different boards or SoC. So my best bet is to play with RPi3 :) And Orange Pi2 :oops: but without any decent support, this will only be for testing my knowledges.

(then I'll later be in the process of understanding how Android HAL and HIDL are done - even if I'm not planning to do it myself in the future, I need a crystal clear understanding of what it means and implies).

My level of understanding :
I've already reached some steps : I've already played with buildroot and successfully customized settings of the 64bits kernel for the RPi3 using "make menuconfig", (also on Debian few month ago, in order to add GPIO sysfs and driver into some pico-ITX board in the past, that exists into the Linux Kernel available drivers code but wasn't enabled into the standard Debian kernel builds).

What I believe to know about existing differences :
As far as I understand, for each SoC, in addition of choosing a compatible architecture, there is functionalities that aren't into the mainline/vanilla kernel that could be added to the Kernel sources before building it, or after. CPU architecture can also be tuned : instead of using "generic x86_64" you can use the one that contains all of your last generation AMD CPU instructions for example, that would be used inside your Kernel instead of "being ignored for better compatibility".

Also, I believe I understood that, for drivers, what is the only available choice on Windows, can also be done one Linux : drivers can be loaded after the Kernel has been loaded to memory, using "insmod", or "/etc/modules". There is only one thing that is requiered : the kernel must be able to work enough, without those modules, to access the disk/partition that contains those modules, and load them (if not, game over - they should be statically included).

As the Kernel is perpetually changing, those Loadable Kernel Modules should be compiled against the currently used kernel, using "Kernel Headers", and then, they can be loaded at startup using "insmod", or "/etc/modules".

About drivers whose code is inside the Linux source code, make menuconfig also gives the possibility to disable, or enable them, with sometimes, the choice to build it into separated modules or permanently loaded modules.

Innocent question
Does it means that almost any system using Linux would be able to use the one and only one same build of the kernel ? (of course it must be some variants about CPU architectures and available instructions, and some isolated particular cases)
EDIT : obviously yes, in the personal computers world at least.

All my questions :
  • Can someone correct me if I'm wrong into what I believe I understood ?
  • What are the differences between Vanilla Kernel 4.14.67 and current Raspberry Pi Kernel 4.14.67 ? Is there a list ?
  • Is it possible to put all of those differences into a "patch" that can be applied into the current vanilla kernel before building it ?
  • If so, would it be possible for this patch to be applied on a previous or future Linux vanilla release ?
  • Would it be possible to apply it on Android 4.14 kernel ?
  • Are those differences into Kernel Modules only ?
  • If so, is it possible to build it only as "Loadable Kernel Modules"
  • Are "proprietary firmwares" a kind of plugins for Kernel Modules ? Or just binary blobs that should be sent to the hardware ?

Thank you (very, very) much in advance

globiboulga666
Posts: 12
Joined: Sun Jun 17, 2018 6:38 pm

Re: Vanilla 4.14.67 and Raspberry Pi Kernel 4.14.67

Thu Sep 06, 2018 9:46 am

I managed to compare with "Meld" the differences between the standard Kernel and the RPi Kernel, I saw lot of new files and some modified files

Is it possible to create a patch from these differences ?
Is it the good way for placing the RPi Kernel additions into any Kernel ?

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

Re: Vanilla 4.14.67 and Raspberry Pi Kernel 4.14.67

Sat Sep 15, 2018 1:57 pm

globiboulga666 wrote:
Tue Sep 04, 2018 7:39 pm
What are the differences between Vanilla Kernel 4.14.67 and current Raspberry Pi Kernel 4.14.67 ? Is there a list ?
There is no complete list, because developers are lazy and don't waste their time with such documentation :D

But can look at this to get an idea of the differences.

Btw it doesn't make sense to compare Vanilla 4.14.67 and the Foundation Kernel 4.14.67. New features in Vanilla has been added until 4.14rc1, after that there are only bugfixes, while the Foundation uses the 4.14 branch for new features.
globiboulga666 wrote:
Tue Sep 04, 2018 7:39 pm
Is it possible to put all of those differences into a "patch" that can be applied into the current vanilla kernel before building it ?
If so, would it be possible for this patch to be applied on a previous or future Linux vanilla release ?
No. The Foundation usually rebase their patches on top of every major Kernel release, which isn't that trivial. So you don't need to do this.
globiboulga666 wrote:
Tue Sep 04, 2018 7:39 pm
Are those differences into Kernel Modules only ?
If you mean the drivers: no, there are also changes in Device tree sources and some ARM related stuff.
globiboulga666 wrote:
Tue Sep 04, 2018 7:39 pm
Are "proprietary firmwares" a kind of plugins for Kernel Modules ? Or just binary blobs that should be sent to the hardware ?
Latter one

Return to “Linux Kernel”