Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make file not working #20

Open
sahilsoni1 opened this issue Dec 3, 2020 · 1 comment
Open

make file not working #20

sahilsoni1 opened this issue Dec 3, 2020 · 1 comment

Comments

@sahilsoni1
Copy link

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

@Doom4535
Copy link

Doom4535 commented Jun 4, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants