I am having trouble compiling the Raspbian kernel from source.
I used the instructions here: https://www.raspberrypi.org/documentation/linux/kernel/building.md.
I am cross compiling on Ubuntu 16.04 64 bit, and compiling for the Raspberry Pi 2. I have followed all the necessary steps according to the guide.
At the moment, I did not change anything in the kernel source (I want to change out the rtlwifi drivers later like this, but for now, I just want to see if I can compile a kernel.)
The compiling worked, and I uploaded the new kernel to the SD card, also according to the instructions. The RPI boots to the desktop screen, but no peripherals are working. I can SSH into the Pi, but keyboard / mouse are not working. I assume this is a kernel issue, as this is the only thing I have changed since I installed a completely working Raspbian (via the SD card image).
I have seen an error message during start up:
Failed to load kernel modules.
And then it suggests I should check
systemctl status systemd-modules-load.service
systemd-modules-load.service - Load Kernel Modules Loaded: loaded (/lib/systemd/system/systemd-modules-load.service; static; ven Active: failed (Result: exit-code) since Thu 2016-11-03 17:16:42 UTC; 1 years Docs: man:systemd-modules-load.service(8) man:modules-load.d(5) Process: 110 ExecStart=/lib/systemd/systemd-modules-load (code=exited, status= Main PID: 110 (code=exited, status=1/FAILURE) Warning: Journal has been rotated since unit was started. Log output is incomple
Any advice on where I am going wrong? Or any ideas on how to debug? Thanks a lot!
EDIT: Thanks to @Gerhard, I realised the command that I install the modules were wrong. It was a simple typo - copy and paste is your friend!
Here is the script then in its working form for whoever would like to use it:
export KERNEL=kernel7 lsblk sudo mount /dev/sdc1 mnt/fat32 sudo mount /dev/sdc2 mnt/ext4 sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=mnt/ext4 modules_install sudo cp mnt/fat32/$KERNEL.img mnt/fat32/$KERNEL-backup.img sudo cp arch/arm/boot/zImage mnt/fat32/$KERNEL.img sudo cp arch/arm/boot/dts/*.dtb mnt/fat32 sudo cp arch/arm/boot/dts/overlays/*.dtb* mnt/fat32/overlays/ sudo cp arch/arm/boot/dts/overlays/README mnt/fat32/overlays/ sudo umount mnt/fat32 sudo umount mnt/ext4