cd peak-linux-driver-8.11.0
make clean
make
make -C driver clean
make -C lib clean
make -C test clean
make -C libpcanbasic clean
make -C driver all
make -C test all
make -C libpcanbasic all
sudo make install
sudo modprobe pcan
ls -l /dev/pcan*
errors
Makefile:129: *** "Unable to automatically find the Kernel headers. These are mandatory to build the pcan driver. Please set the KERNEL_LOCATION variable to the root directory of your own built Kernel."。 停止。
make[1]: 离开目录“/home/ubuntu/tools/peak-linux-driver-8.11.0/driver”
Makefile:72: recipe for target 'all' failed
solution
gedit /home/ubuntu/tools/peak-linux-driver-8.11.0/driver/Makefile
# please modify only here if your kernel path is elsewhere located
#KERNEL_LOCATION = $(DKMS_KERNEL_DIR)
KERNEL_LOCATION = /usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9