LoRa icon indicating copy to clipboard operation
LoRa copied to clipboard

make file not working

Open sahilsoni1 opened this issue 4 years ago • 1 comments

make make -C /lib/modules/5.4.51-v7l+/build M=/home/pi/sahilsoni/lora/LoRa/LoRa modules make[1]: *** /lib/modules/5.4.51-v7l+/build: No such file or directory. Stop. make: *** [Makefile:8: all] Error 2

sahilsoni1 avatar Dec 03 '20 12:12 sahilsoni1

I'm assuming this is from a build on a raspberry pi? Do you have the correct kernel headers installed?

  1. Reboot to ensure the current kernel is the installed kernel
systemctl reboot
  1. If you might upgrade in the future/aren't trying to stick to a specific kernel version, upgrade to the latest kernel and reboot (we want to obtain the correct kernel headers and build against your installed kernel)
sudo apt update && sudo apt upgrade
systemctl reboot

Obtain RPi Kernel Source

Install RPi-Source utility program to get the kernel source

# Dependencies
sudo apt install git bc bison flex libssl-dev
sudo apt install libncurses5-dev
# Download and install
sudo wget https://raw.githubusercontent.com/RPi-Distro/rpi-source/master/rpi-source -O /usr/local/bin/rpi-source && sudo chmod +x /usr/local/bin/rpi-source && /usr/local/bin/rpi-source -q --tag-update

Obtain the Kernel:

mkdir -p ~/RPiKernel
rpi-source -d ~/RPiKernel

Doom4535 avatar Jun 04 '21 22:06 Doom4535