Created
February 23, 2020 13:04
-
-
Save hongkongkiwi/9d8691dae803f254e6591b9b8a29616b to your computer and use it in GitHub Desktop.
Build Raspberry Pi Kernel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###################### | |
### Kernel headers ### | |
###################### | |
#To build this module from source, I did the following on my RPI2. | |
#Install build tools: | |
sudo -s | |
apt install build-essential bc git wget | |
#Get kernel source code | |
cd /usr/src | |
git clone --depth 1 https://github.com/raspberrypi/linux.git | |
ln -s linux $(uname -r) | |
ln -s /usr/src/linux /lib/modules/$(uname -r)/build | |
#Prepare linux build headers | |
cd linux | |
wget -O Module.symvers https://raw.githubusercontent.com/raspberrypi/firmware/master/extra/Module7.symvers | |
KERNEL=kernel7 # or the right one depending on your Raspberry Pi model. | |
make bcm2709_defconfig # or the right one depending on your Raspberry model. | |
make prepare | |
make modules_prepare |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment