0

Starting from an image ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img.xz (https://wiki.ubuntu.com/ARM/RaspberryPi) I'm trying to add the ad525x_dpot I2C driver which was not enabled during the build of the kernel.

I've taken ad525x_dpot.c, ad525x_dpot.h, ad525x_dpot-i2c.c from the corresponding linux source to make a DKMS package.

dkms.conf:

PACKAGE_NAME="ad525x_dpot"
PACKAGE_VERSION="0.10"
MAKE[0]="make all KVERSION=$kernelver"
CLEAN="make clean"
BUILT_MODULE_NAME[0]="ad525x_dpot"
DEST_MODULE_LOCATION[0]="/kernel/drivers/misc"
AUTOINSTALL="yes"

Makefile:

obj-m := ad525x_dpot.o ad525x_dpot-i2c.o
KVERSION := $(shell uname -r)

all:
    $(MAKE) -C /lib/modules/$(KVERSION)/build M=$(PWD) modules

clean:
    $(MAKE) -C /lib/modules/$(KVERSION)/build M=$(PWD) clean

The module ad525x_dpot can be loaded by modprobe and it shows in lsmod but not in /sys/bus/i2c/drivers. There are some warnings in syslog.

ad525x_dpot: loading out-of-tree module taints kernel.
ad525x_dpot: module verification failed: signature and/or required key missing - tainting kernel

Why doesn't it show in /sys/bus/i2c/drivers?

I've tried to load a similar kernel module ad799x that comes with the kernel. It appears in /sys/bus/i2c/drivers/ad799x (no devices are defined to use the ad799x, so it's not related to the device tree or the board config).

0

Had to split ad525x_dpot.o and ad525x_dpot-i2c.o into two DKMS packages to have two separate kernel modules.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.