/usr/src updating #git pull, how to get the patch level installed?

Hello,
I have searching a long time, but have nothing found in the man pages and with Google.

Before updating everything, I can do
git branch. It shows me:
* releng/13.1
But I have uname -r --> 13.1-RELEASE-p3; that means version 13.1 with patch level 3

With what git command can I identify, which patch level are in the sources of /usr/src ?

And with what git command can I identify, which patch level are actual in the online sources before I do an update of my local /usr/src sources?
Thanks!
 
But I have uname -r --> 13.1-RELEASE-p3; that means version 13.1 with patch level 3
Code:
dice@case:~ % freebsd-version -urk
13.1-RELEASE-p3
13.1-RELEASE-p3
13.1-RELEASE-p5
P4 and p5 solved issues in userland only. So the kernel hasn't been updated (it didn't need to be patched).

If you build from source, the kernel would get rebuild and would show p5 too. This version string is baked into the kernel at compile time.
 
Code:
dice@case:~ % freebsd-version -urk
13.1-RELEASE-p3
13.1-RELEASE-p3
13.1-RELEASE-p5
P4 and p5 solved issues in userland only. So the kernel hasn't been updated (it didn't need to be patched).

If you build from source, the kernel would get rebuild and would show p5 too. This version string is baked into the kernel at compile time.
I think this is not correct. I have done a
freebsd-update fetch and it has shown me also kernel files *.ko to update. But I have this output not saved to show you.
 
Here you see a commit where the patch level is bumped. Inspecting the version in sys/conf/newvers.sh will give you the patch level of the checked-out tree.
I suppose there is no single git command to get this information, because of the kind how the repository keeps branch information? Am I right?
 
These are dynamically loadable kernel modules.
Not 'the kernel'
Will that change the files from /boot/kernel into /boot/kernel.old or just exchange the *.ko files in /boot/kernel directory?
Can this *.ko files are very different, if I has build an own kernel with make buildkernel installkernel?
 
As far as i know when you do make installkernel ,
1./boot/kernel.old is removed
2./boot/kernel is renamed to /boot/kernel.old
3.The new kernel is installed in /boot/kernel

The bootloader loads /boot/kernel by default.
 
Exactly.
My point about the kernel modules are they may be patched by freebsd-update and kernel patch level would stay the same. The modules are auxiliary files..
 
I have it now installed with freebsd-update install. Result:
the installed and running kernel has: 13.1-RELEASE-p3.
the userland has 13.1-RELEASE-p5

freebsd-version -ukr
13.1-RELEASE-p3
13.1-RELEASE-p3
13.1-RELEASE-p5
/boot/kernel is go to /boot/kernel.old

I think I will now update the /usr/src tree and will build and install a new /kernel
 
As far as i know when you do make installkernel ,
1./boot/kernel.old is removed
2./boot/kernel is renamed to /boot/kernel.old
3.The new kernel is installed in /boot/kernel

The bootloader loads /boot/kernel by default.
before reboot you can test the new kernel. mv /boot/kernel /boot/kernel.tst and . mv /boot/kernel.old /boot/kernel and then:
nextboot -k /boot/kernel.tst
or another solution if there are boot problems with a new kernel (without the movings above):
On the console, if the loader start press [Space], an then the command
OK#boot kernel.old //OK# it's the Bootloader-Prompt
 
I think me to remember that I had read that kernel and the userland should be in sync
They are. There have been no changes in the kernel between p3 and p5. All you're doing by recompiling the kernel is changing the version string. That's why the kernel isn't included with the updates, because it's only a cosmetic change.

Being 'in sync' refers to not running a 13.1 kernel and a 13.0 userland or some other weird version combination.
 
They are. There have been no changes in the kernel between p3 and p5. All you're doing by recompiling the kernel is changing the version string. That's why the kernel isn't included with the updates, because it's only a cosmetic change.
I think I confused /boot/kernel directory with the file /boot/kernel/kernel. I think all what is in /kernel/* is the FreeBSD kernel. Some things a complied with the main file "kernel" and the others are kernel modules what can dynamically load after.
 
Some things a complied with the main file "kernel" and the others are kernel modules what can dynamically load after.
The kernel config mostly defines which modules are statically compiled in. But even if it's statically in the kernel there would still be a module in /boot/kernel/, /boot/kernel/kernel is the actual kernel, everything else in that directory are all the modules.
 
If your /usr/src is on the releng/13.1 git branch just do git pull. If you want to see what changed, do git diff releng/13.1^ releng/13.1. If you want to revert to the same sources as what your kernel was built from, look at the commit-hash in uname -v and do git checkout <commithash-in-uname>
 
Back
Top