Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5363

Beginners • Finding out the linux kernel commit for insalled OS

$
0
0
The following is the proposed approach to obtain the most suitable kernel commit for performing linux kernel cross-compilation.

1. Suppose I have the entire commit history obtained by executing the command git clone https://github.com/raspberrypi/linux.git.

2. On the Raspberry Pi I get information about the build date of the linux kernel: uname -a.
The output of this command gives the following information:
Linux raspberrypi 6.6.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64 GNU/Linux.
From here I get the build date: 2024-03-07.

3. At https://github.com/raspberrypi/rpi-firm ... its/stable find the commit closest to the date 2024-03-07. On the commit page click Browse files, find and open the file "git_hash". Get the desired kernel hash <hash> from this file.

4. Now I can use the figured out hash of the commit to switch to it on the host machine for subsequent cross compilation: git checkout <hash>.

Have I described the approach correctly? Or maybe I missed something or made a mistake?

Statistics: Posted by alexCC — Fri Mar 22, 2024 4:41 pm



Viewing all articles
Browse latest Browse all 5363

Trending Articles