Missing kernel module(s) in A10-OLinuXino-bionic-minimal-20201008 img

Started by simona, October 24, 2020, 10:04:41 PM

Previous topic - Next topic

simona

Hi,

I have a Dallas ds2482 chip connected to the i2c bus, but the kernel module for this does not seem to be included in the .img file.

Is there a .deb package that provides these (less used) modules for this kernel or do I need to compile the module manually or re-compile the kernel with the missing modules included? If so, is there a 'how-to' that hints how to do this for the Olimex kernel?

I have linux-headers installed, but do I also need the kernel source for 5.8.12?

I've compiled Linux kernels in the past (a long time ago!), but is there a simpler way to build just the module I need for the current kernel?

Any help is welcome. Thanks!

simona

So I've got a bit further with this and built the module, but it won't load.

Any ideas what I've done wrong? Here what I did:

wget https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.8.12.tar.gz
tar -zxvf linux-5.8.12.tar.gz
cd linux-5.8.12

make mrproper
cp /usr/src/linux-headers-5.8.12-olimex/Module.symvers .
cp /boot/config-5.8.12-olimex .
make menuconfig # Enable ds2482 module in
                # Device Drivers/Dallas's 1-wire support/1-wire Bus Masters
                # and save config to .config
make prepare
make modules_prepare
make M=scripts/mod
make M=drivers/w1/masters modules

sudo insmod drivers/w1/masters/ds2482.ko
insmod: ERROR: could not insert module drivers/w1/masters/ds2482.ko: Invalid module format


thanks

simona

after more experimenting I got this to work. Does it look right to those in the know?

wget https://github.com/OLIMEX/linux-olimex-release-20201007-v5.8.12.zip
unzip linux-olimex-release-20201007-v5.8.12.zip
cd linux-olimex-release-20201007-v5.8.12
cp /usr/src/linux-headers-5.8.12-olimex/Module.symvers .
cp /boot/config-5.8.12-olimex .

export LOCALVERSION=-olimex
make olinuxino_defconfig
make menuconfig # Enable ds2482 module in
                # Device Drivers/Dallas's 1-wire support/1-wire Bus Masters
                # and save config to .config
make prepare
make modules_prepare
make M=drivers/w1/masters modules

# test the module:
sudo insmod drivers/w1/masters/ds2482.ko
# yay! it works
sudo cp -v drivers/w1/masters/*.ko /lib/modules/5.8.12-olimex/kernel/drivers/w1/masters/
sudo rmmod ds2482
sudo depmod -a
sudo modprobe ds2482

I hope this helps others.
thanks

Chris

Thanks for the helpful post, I would also be interested in the actual olimex kernel and driver compiling, but AFAIK there are still essential drivers missing (e.g. NAND support). Don't you have any limitations of such kind?