CaptainMidnight
Posts: 32
Joined: Sun Nov 03, 2019 4:32 pm

[SOLVED] Building default Raspbian Buster kernel from github - missing kernel PPS support

Sat Jan 18, 2020 8:27 pm

I'm getting lost looking at the process of building a custom kerenl (for both self education and possible customisation to create a custom kernel build without unwanted components). I've been able to successfully create my own RPi4 kernel but seem to be missing some kernel functionality in the default build - before I've even started to remove unwanted included modules?

Using the official kernel building guide found here https://www.raspberrypi.org/documentati ... uilding.md with all the defaults as listed for a RPi4 generates a Raspbian Buster kernel build version of 4.19.95-v7l+.

The current Raspbian Buster lite kernel build version is 4.19.75-v7l+ as found on any up-to-date RPi4 install.

With a known working Raspbian Buster lite RPi4 NTP system, PPS functionality is already built into the kernel (4.19.75-v7l+), if this kernel image is replaced with the default newly built kernel image (4.19.95-v7l+) and the system is rebooted, the updated build appears to no longer contains PPS kernel support - as the NTP server no longer lists pps devices installed in the dmesg output.

Q. Is there anything or any reason why I shouldn't have used the default base branch of the github kernel source to make my first kernel?

Q. How do I determine which branch of the github would make the currently deployed kernel (4.19.75-v7l+) as this already has PPS support built in?

.... any pointers in the right direction or further learning would be appreciated as I just can't see the word for the trees at the moment :mrgreen:
Last edited by CaptainMidnight on Sun Jan 19, 2020 7:43 pm, edited 1 time in total.
"Never get out of the boat." Absolutely goddamn right!
Unless you were goin' all the way...

Kendek
Posts: 143
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: Building default Raspbian Buster kernel from github - missing kernel PPS support

Sat Jan 18, 2020 9:22 pm

Compare the bcm2711_defconfigs:

4.19.75 / 4.19.95

CONFIG_PPS=m

You need to load the module before using it:

Code: Select all

modprobe pps_core

CaptainMidnight
Posts: 32
Joined: Sun Nov 03, 2019 4:32 pm

Re: Building default Raspbian Buster kernel from github - missing kernel PPS support

Sat Jan 18, 2020 10:01 pm

Please excuse my current ignorance, but how do I see the 4.19.75 defconfigs?

... and in loading the module is that before/during the kernel build - that's what I'm assuming as only the compiled kernel image is the difference between a working pps configuration.

You have certainly given me avenues to pursue.

As I'm quite new to github repositories, is there a specific branch that is the base for the actual live Buster kernel i.e. 4.19.75?

I really appreciate the insight you have given so far Kendek.
"Never get out of the boat." Absolutely goddamn right!
Unless you were goin' all the way...

CaptainMidnight
Posts: 32
Joined: Sun Nov 03, 2019 4:32 pm

Re: Building default Raspbian Buster kernel from github - missing kernel PPS support

Sun Jan 19, 2020 7:12 am

Kendek wrote:
Sat Jan 18, 2020 9:22 pm
Compare the bcm2711_defconfigs:

4.19.75 / 4.19.95

CONFIG_PPS=m

You need to load the module before using it:

Code: Select all

modprobe pps_core
Hi after a bit more understanding of the github repositories looking at your statement, indeed both branches have pps listed as a module.

But this doesn't explain why rebuilding the kernel and placing it into a known working system breaks the pps functionality?

If I use 'lsmod' to list the modules on the system while running the newly built kernel nothing shows up - meaning my kernel appears somehow incomplete - I believe it's this issue with the kernel build process I currently don't understand / have incorrectly completed?
"Never get out of the boat." Absolutely goddamn right!
Unless you were goin' all the way...

CaptainMidnight
Posts: 32
Joined: Sun Nov 03, 2019 4:32 pm

Re: Building default Raspbian Buster kernel from github - missing kernel PPS support

Sun Jan 19, 2020 7:31 am

Argh!!!!

Right, I now understand (I think), when using the rebuilt kernel - the fact that it's newer - makes the module directory structure break in the original working system.

Hence working system booted using new kernel can't correctly reference the existing module directory as the directory structure is labeled with reference to the original build number and not the now different new kernel build number.......

Great stuff, so if I now rebuild the kernel using the original build version branch theoretically this should create a kernel that matches my original system directory structure

...... or

I could just copy the module directory to the expected new location.

(........ off to test further hahahaha)

(edit: no bad idea, just rebuild the kernel using the correct branch doh!)
"Never get out of the boat." Absolutely goddamn right!
Unless you were goin' all the way...

CaptainMidnight
Posts: 32
Joined: Sun Nov 03, 2019 4:32 pm

Re: Building default Raspbian Buster kernel from github - missing kernel PPS support

Sun Jan 19, 2020 6:52 pm

.... redefined my questions in a new post to simplify my ultimate goals.

https://www.raspberrypi.org/forums/view ... 9&t=262420
"Never get out of the boat." Absolutely goddamn right!
Unless you were goin' all the way...

Return to “Advanced users”