Linux driver common FAQ

Q:How to confirm that the board is properly recognized?

A:
If you are in the state before installing the driver, check out the /proc/pci file.
If you are in the state after installing the driver and starting the driver, you can check if the I/O address and IRQ are displayed in the board list in the configuration.
Alternatively, you can check /proc/ioports or /proc/interrupts to confirm if the I/O address and IRQ are displayed.
Also, if you execute the initialization function and the return value is Normality completion, you can judge that it is recognized properly.

Q:The board is recognized, but it does not work properly.

A:
If there is a Plug & Play OS setting in the BIOS settings, check that it is No.
If the Plug & Play OS is Yes, the BIOS may not configure the PCI bus board properly.
You may still see the board in /proc/pci even if the BIOS has not properly configured the PCI bus board.

Q:When starting the application, there will be an error that there is no shared library.

A:
The installation may not complete properly. Please install with root privileges.
The shared library doesn't work just by copying it to /usr/lib.
To enable the shared library, copy the file to create a symbolic link and then run the ldconfig command.
See the install part of csmc/library/Makefile for more information.

Q:How to manage the shared library by putting it in /usr/local/lib?

A:
Rewrite /etc/ld.so.conf and execute ldconfig, or add the LD_LIBRARY_PATH setting in the shell startup script (such as bash).
The description depends on the shell used.
For more information, use the man command.
(Example).bash_profile
LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH

Q:The driver make failed.

A-1:
Check the Driver Specifications to confirm that the architecture and distribution are compatible.

A-2:
The Linux kernel header is required to make the driver.
Please install the kernel header in advance.

A-3:
When "Raspberry Pi OS May 2023 32bit" is installed on "Raspberry Pi 4 Model B", the OS default setting is 64bit mode.
Therefore, error may occur during make, or, depending on the device driver, device driver may not work properly even if no error occurs during make.
The operation confirmation performed by our company is carried out in 32bit mode.
To operate in 32bit mode, you need to add "arm_64bit=0" to "/boot/config.txt" file and reboot OS.

Please refer https://www.raspberrypi.com/documentation/computers/config_txt.html#arm_64bit to know more details.

Q:Driver loading fails.

A:
If Secure Boot is enabled in the BIOS settings of the PC, the driver may fail to load.
If the following error is displayed when executing the setup tool or the driver start script, please disable Secure Boot and try again.

Example of error when executing setup tool


Example of error when executing driver start script