CM4IO-FAN

From Waveshare Wiki
Jump to: navigation, search

How to Troubleshooting CM4IO-FAN Compilation

Note: Only for bullseye 64-bit system, 32-bit bullseye system will change to 64-bit after the upgrade, but the software still is 32-bit, so the upgrade up through 32-bit is not available.

  • If you fail to find the kernel header file according to the tutorial, you can use the following commands to install the kernel header file:
sudo apt install raspberrypi-kernel-headers
  • Check whether the actual kernel version is the same as the downloaded header file:
uname -r
ls /usr/src
  • If you find they are different, you should upgrade the kernel to the newest version and then reboot. Then, check whether the actual kernel version is the same as the downloaded header file.
sudo apt upgrade
sudo reboot
  • If they are the same, you can continue to compile. If they are different, you need to remove the header file and reinstall it.
sudo apt remove raspberrypi-kernel-headers
sudo apt install raspberrypi-kernel-headers
  • Check it again. You need to reinstall the official Raspberry Pi system if they are different and the software package cannot be removed to the newest kernel header file.
  • After reinstalling, remove "sudo apt update", otherwise you will fail to download the header file that is applicable to the actual kernel version.
  • For example:
    • If you face the following, you need to upgrade the kernel: sudo apt upgrade
    • Reboot after upgrading: sudo reboot
    • CM4IO-FAN01.jpg
    • Modify the "dkms.conf" file if the following occurs:
    • sudo nano /var/lib/dkms/cm4io-fan/0.2.0/source/dkms.conf
    • CM4IO-FAN02.jpg
    • Comment out: BUILD_EXCLUSIVE_KERNEL="^5.([1-9][0-9])..*"
    • Then save (Ctrl + s) and exit (Ctrl + x).
    • CM4IO-FAN03.jpg
    • This is a bug of the Raspberry Pi system, because the kernel is updated, but the software library is not updated, it will cause the downloaded kernel header file to be different from the actual kernel version, then you need to compile the kernel to the kernel version that is consistent with the kernel header file.
    • You should not use "sudo apt upgrade" in the 32-bit bullseye as it will upgrade to a 64-bit system, and the downloaded software is 32-bit and is not compatible.
    • The current official system (32-bit/64-bit bullseye system) can compile according to the Wiki if you do not update or upgrade it after the default installation.