GaryH1
Posts: 16
Joined: Tue Nov 20, 2018 5:19 pm

Raspbian 4.19.75 kernels [Solved]

Thu Oct 10, 2019 11:27 pm

I notice that in /lib/modules there are now 4 directories:
4.19.75+
4.19.75-v7+
4.19.75-v7l+
4.19.75-v8+
I know the original 4.19.75+ kernel is for the early single processor Pis (armv6l) and the 4.19.75-v7+ is for the multi-core processors (armv7l). What are the other two used for (I presume one is for 64-bit) and what are the corresponding codes reported by uname -m associated with them? Thanks in advance for any information/clarification!
Last edited by GaryH1 on Fri Oct 11, 2019 11:32 pm, edited 1 time in total.

fbe
Posts: 644
Joined: Thu Aug 17, 2017 9:08 pm

Re: Raspbian 4.19.75 kernels

Thu Oct 10, 2019 11:38 pm

4.19.75-v7+ runs on my Raspberry Pi3
4.19.75-v7l+ runs on my Raspberry Pi4
4.19.75-v8+ runs on my Raspberry Pi3 and on my Raspberry Pi4 if I add arm_64bit=1 to /boot/config.txt

GaryH1
Posts: 16
Joined: Tue Nov 20, 2018 5:19 pm

Re: Raspbian 4.19.75 kernels

Thu Oct 10, 2019 11:50 pm

Thanks very much for the very quick reply! if it's possible, what does the 4B report when you run uname -m in 32-bit mode and also in 64-bit mode?

User avatar
DougieLawson
Posts: 39539
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Raspbian 4.19.75 kernels

Fri Oct 11, 2019 11:08 am

It reports 4.19.nn-V8+ from uname -r

So a cd /lib/modules/$(uname -r) command gets you to the modules directory that's in use.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

GaryH1
Posts: 16
Joined: Tue Nov 20, 2018 5:19 pm

Re: Raspbian 4.19.75 kernels

Fri Oct 11, 2019 1:39 pm

Thanks Dougie for that. What I'm trying to do is to match the output of uname -m to it's appropriate kernel version. It's actually in a Bash script I've written that performs various system updates. At the end it compares what's in /lib/modules/ with the output of uname -r. This is so that if there is a newer kernel downloaded than the one currently running it will prompt me to reboot the system to complete the update.

The way I currently do it is if the output of uname -m is armv6l then it looks at the 4.19.xx+ directory, if it's armv7l it looks at the 4.19.xx-v7+ directory. I don't (currently) have a 4b or a Pi running a 64-bit os so I can't actually get the output of uname -m on those systems to see what I need to test against to direct the script to one of the remaining 2 directories. Hope that makes sense!

User avatar
DougieLawson
Posts: 39539
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Raspbian 4.19.75 kernels

Fri Oct 11, 2019 2:28 pm

This awk program splits uname -r "4.19.75-v7+" into "75" and "v7+". That should work on a RPi4B (I'll test it when I've got one of those).

Code: Select all

uname -r | awk '{split($0,a,/\./); if (a[4] != "") split(a[4],b,/-/); else split(a[3],b,/-/); print b[1]; print b[2]}'
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

GaryH1
Posts: 16
Joined: Tue Nov 20, 2018 5:19 pm

Re: Raspbian 4.19.75 kernels

Fri Oct 11, 2019 3:04 pm

Thanks for that but it's actually the output of uname -m, the "machine name" that I need to know, i.e. on my 3B+ it outputs armv7l. I'm interested to know what that produces on a 4B and also a machine running a 64-bit os as I haven't got either of those to run it on.

User avatar
rpdom
Posts: 17406
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Raspbian 4.19.75 kernels

Fri Oct 11, 2019 3:13 pm

GaryH1 wrote:
Fri Oct 11, 2019 3:04 pm
Thanks for that but it's actually the output of uname -m, the "machine name" that I need to know, i.e. on my 3B+ it outputs armv7l. I'm interested to know what that produces on a 4B and also a machine running a 64-bit os as I haven't got either of those to run it on.
On my Pi4B running 32-bit Raspbian I get armv7l. I don't have it running 64-bit yet. Also, I'm still running the 4.19.66-v7l+ kernel.
Unreadable squiggle

fbe
Posts: 644
Joined: Thu Aug 17, 2017 9:08 pm

Re: Raspbian 4.19.75 kernels

Fri Oct 11, 2019 7:42 pm

Output of uname -rm:
Raspberry Pi 3B: 4.19.75-v7+ armv7l
Raspberry Pi 4B: 4.19.75-v7l+ armv7l
Raspberry Pi 3B/4B with arm_64bit=1: 4.19.75-v8+ aarch64

GaryH1
Posts: 16
Joined: Tue Nov 20, 2018 5:19 pm

Re: Raspbian 4.19.75 kernels

Fri Oct 11, 2019 11:16 pm

Thanks for the info guys - that's a great help. I like the uname -rm option, hadn't occurred to me to use that!

Return to “General discussion”