henryyy
Posts: 1
Joined: Thu Oct 17, 2019 12:30 am

Building older version kernel for Raspbian GNU/Linux 10

Thu Oct 17, 2019 1:18 am

Hi, I'm currently facing a kernel-version problem on my RasPi 3 b+ (with OS Raspbian GNU/Linux 10)

By default, the kernel version is 4.19.75-v7+. (I assumed it is 4.19.75-v7+ because I checked it before building the kernel)

However, the driver I need to install has only been tested on kernel version 4.4.26 or older ones. The driver is called SocketCAN, which can help me bring up the CAN interface on RasPi.

Then I follow the kernel building instruction on this page: https://www.raspberrypi.org/documentati ... uilding.md

To build older version kernel, I choose the source branch rpi-4.4.y instead of rpi-4.19.y (default version?) or rpi-4.18.y (on the webpage). The 4.4.y source file was successfully downloaded to /lib/modules and the building process was successful (only some warnings popped out, guess it's because older kernel version working on latest OS)

But when I was trying to compile SocketCAN driver, system kept looking for kernel 4.19.75-v7+ directory and failed to compile. In addition, I checked out the kernel version by using "uname -a" & "dmesg" and it still told me the kernel version is 4.19.75-v7+.

So, how can I build an older version of kernel under OS Raspbian GNU/Linux 10?
Or is there any configuration setting that I missed?

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

Re: Building older version kernel for Raspbian GNU/Linux 10

Thu Oct 17, 2019 6:58 am

First thing to do, you need to make sure that the rpi-4.4.y kernel you compiled is working on your Pi with Raspbian Buster. After the system has successfully booted with this kernel and it seems everything is working fine, you can compile and install the SocketCAN kernel module.

fruitoftheloom
Posts: 22556
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Building older version kernel for Raspbian GNU/Linux 10

Thu Oct 17, 2019 7:18 am

henryyy wrote:
Thu Oct 17, 2019 1:18 am
Hi, I'm currently facing a kernel-version problem on my RasPi 3 b+ (with OS Raspbian GNU/Linux 10)

By default, the kernel version is 4.19.75-v7+. (I assumed it is 4.19.75-v7+ because I checked it before building the kernel)

However, the driver I need to install has only been tested on kernel version 4.4.26 or older ones. The driver is called SocketCAN, which can help me bring up the CAN interface on RasPi.

Then I follow the kernel building instruction on this page: https://www.raspberrypi.org/documentati ... uilding.md

To build older version kernel, I choose the source branch rpi-4.4.y instead of rpi-4.19.y (default version?) or rpi-4.18.y (on the webpage). The 4.4.y source file was successfully downloaded to /lib/modules and the building process was successful (only some warnings popped out, guess it's because older kernel version working on latest OS)

But when I was trying to compile SocketCAN driver, system kept looking for kernel 4.19.75-v7+ directory and failed to compile. In addition, I checked out the kernel version by using "uname -a" & "dmesg" and it still told me the kernel version is 4.19.75-v7+.

So, how can I build an older version of kernel under OS Raspbian GNU/Linux 10?
Or is there any configuration setting that I missed?

Kernel 4.4.x dates back to 2016/17 so pre-dates Raspbian Stretch / Buster and also the RPi 3B+


You should find an alternative to whatever you are trying to achieve:

https://en.wikipedia.org/wiki/SocketCAN


Debian provide a Package in the Buster Repositories, maybe it is in the Raspbian Buster Repositories ??

https://packages.debian.org/buster/can-utils

https://github.com/linux-can/can-utils/ ... /README.md
Rather than negativity think outside the box !

Asus ChromeBox 3 Celeron is my other computer.

Return to “Advanced users”