Skip to content

UCSMA-Project/ucsma-raspi-gpio

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Common issues in compilation

Kernel headers for the running kernel version does not exist

Error message

make: *** /lib/modules/$(uname -r)/build: No such file or directory.  Stop.
make: *** [all] Error 2

Resolution

This is becuase your recent rpi-update updated the firmware to a version with a "too-new" kernel version, and command apt-get install raspberrypi-kernel-headers installs an older kernel header.

You need to first look into the /lib/modules directory and find which version has the correct, full kernel headers:

cd /lib/modules
find ./ -name build

then downgrade the firmware to the one with that kernel version with the build directory (in this example, version 5.10.63):

sudo rpi-update 64132d67d3e083076661628203a02d27bf13203c

Note that the hash specifies the firmware version, which can be found here at: https://github.com/Hexxeh/rpi-firmware/commits.

Deprecated dependencies

If you see deprecated dependencies, e.g.

/home/pi/ucsma/ucsma-raspi-gpio/gpio_timeline.c:31:19: error: field 'time' has incomplete type
   struct timespec time;
                   ^~~~

it might not be a good idea to just downgrade the firmware and the kernel (which is possible using the rpi-update COMMIT_HASH command mentioned above). This is becuase although you can downgrade the firmware and the running kernel, it is difficult to find a matching kernel headers to build your modules (raspberrypi-kernel-headers only keeps the most recent headers in the apt repository). Also it would be beneficial to keep this repo compatible with the latest kernel version available on the Raspberry Pi.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 97.8%
  • Makefile 2.2%