0

I need to install a tool in Raspberry pi 3B+ that needs kernel version 4.14. To install the tool, I need to install some kernel patches and need the headers for the installed kernel. On running

uname -a

I get the version, 4.14.50-v7+. When I check the directory /var/modules there are 4 directories, 4.14.50+, 4.14.50-v7+,4.19.66+, 4.19.66-v7+. But the 'build' directory exists only inside 4.19.66+. I need the build directory for 4.14.50-v7+. How can I get it? Also to add, running

sudo apt install raspberrypi-kernel-headers

says, already the newest version.

se7en
  • 13
  • 4
  • The latest version of RPiOS ships with kernel version 5.10.17, so you should probably upgrade. Either way, the kernel should be backwards compatible. If you have a tool that requires 4.14, it should work on any later version like 4.19 or 5.10. If that's not the case, you should probably find a better tool. – tttapa Jun 07 '21 at 11:37
  • Is there a way I can use rpi-update to switch to version: 4.19.66? I tried with the hash specified here. But it says invalid hash. – se7en Jun 07 '21 at 11:57
  • Or rather here – se7en Jun 07 '21 at 12:11
  • @tttapa Linux kernel development has not prioritized backward compatibility (at least internally, there is some attempt to do so with the userspace ABI) and it often isn't; this is widely recognized by all involved: https://unix.stackexchange.com/a/605111/25985 – goldilocks Jun 07 '21 at 14:15
  • You can't apply patches to the kernel without building it, so there's not much point in trying to get the exact right headers for any particular unpatched version. The 4.14(.114) Pi specific source is here: https://github.com/raspberrypi/linux/tree/rpi-4.14.y – goldilocks Jun 07 '21 at 14:22
  • In my earlier comment, I had mentioned that the hash provided here didn't work. I tried again after a day and it worked somehow. There was no error in the text input, so I have no explanation why it failed earlier. I have patched the version and successfully installed the tool. Thank you very much @tttapa, @goldilocks♦. – se7en Jun 08 '21 at 16:26
  • can can get headers by updating the kernel. please check my answer here – M.Hefny Mar 21 '22 at 23:44

0 Answers0