Page 1 of 1

RevPi Connect recompiled kernel error with piControl

Posted: 18 Sep 2019, 17:52
by dynamicstudio
Hello,

I'm Roberto, from dynamicstudio GmbH in Poschiavo, Switzerland and I'm new to this forum. We just bought a RevPi connect+ and a DIO to build a small automation station up in the Bernina Pass.

Now, I've got a problem with the piControl module.
A couple of days ago I needed to recompile the kernel (taken from RevolutionPi/linux github) in order to include a custom driver for a touchscreen (Penmount 6000 usb). After compiling the kernel and putting it in to the /boot folder if I do
>> piTest -d
i got the following error "Cannot retrieve device list: No such device"

Now i checked the kernel versions with
>> uname -r
and the version was the same after putting my custom kernel
Of course doing
>> sudo apt install --reinstall raspberrypi-kernel
Solved the problem with piControl but doing that replaced the kernel in which I put the driver for the touchscreen and my touchscreen is no longer working.

Have you got any clue why piControl won't load when using my custom kernel and can I fix this?

Thanks,
Roberto

Re: RevPi Connect recompiled kernel error with piControl

Posted: 19 Sep 2019, 07:06
by dirk
Dear Roberto, this may be the point where the device tree is missing something here. Have a look at the "revpi-factory-reset" tool. You have to configure the device tree according to your device, i.e. RevPi Core, RevPi Connect, etc.

Re: RevPi Connect recompiled kernel error with piControl

Posted: 19 Sep 2019, 12:04
by dynamicstudio
dirk wrote: 19 Sep 2019, 07:06 Dear Roberto, this may be the point where the device tree is missing something here. Have a look at the "revpi-factory-reset" tool. You have to configure the device tree according to your device, i.e. RevPi Core, RevPi Connect, etc.
Hello, and thank you for your reply.

It seems that I can't find any info about revpi-factory-reset. Would you like to give me a link for a tutorial or guide ?

Also when compiling the kernel with my driver, after making the modules with
>> make modules_install
I got the following:
 DEPMOD  4.9.76-rt60-v7+
depmod: WARNING: /lib/modules/4.9.76-rt60-v7+/extra/piControl.ko needs unknown symbol max3191x_get_status
depmod: WARNING: /lib/modules/4.9.76-rt60-v7+/extra/piControl.ko needs unknown symbol preempt_count_add
depmod: WARNING: /lib/modules/4.9.76-rt60-v7+/extra/piControl.ko needs unknown symbol _mutex_lock
depmod: WARNING: /lib/modules/4.9.76-rt60-v7+/extra/piControl.ko needs unknown symbol preempt_schedule
depmod: WARNING: /lib/modules/4.9.76-rt60-v7+/extra/piControl.ko needs unknown symbol preempt_count_sub
depmod: WARNING: /lib/modules/4.9.76-rt60-v7+/extra/piControl.ko needs unknown symbol rt_read_lock
depmod: WARNING: /lib/modules/4.9.76-rt60-v7+/extra/piControl.ko needs unknown symbol _mutex_unlock
depmod: WARNING: /lib/modules/4.9.76-rt60-v7+/extra/piControl.ko needs unknown symbol rt_read_unlock

Another question:
Maybe if something is missing from the kernel I built is because I didn't include it when configuring the build.

I issued the following:
>>KERNEL=kernel7
>>make bcm2709_defconfig
>> make menuconfig --> included my custom driver
>> sudo make -j4 zImage modules dtbs
>> sudo make modules_install

and then copied the entire thing with
>>sudo cp arch/arm/boot/dts/*.dtb /boot/
>>sudo cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/
>>sudo cp arch/arm/boot/dts/overlays/README /boot/overlays/
>>sudo scripts/mkknlimg arch/arm/boot/zImage /boot/$KERNEL.img

Is bcm2709_defconfig the right configuration for my RevPi connect or what ?

Thanks,
Roberto

Re: RevPi Connect recompiled kernel error with piControl

Posted: 20 Sep 2019, 09:18
by dirk
If you login and execute "which revpi-factory-reset" there you go.

Re: RevPi Connect recompiled kernel error with piControl

Posted: 25 Sep 2019, 10:41
by zhan
Hello Roberto,

the bcm2709_defconfig is not the right configuration, you should also git clone RevolutionPi/kernelbakery (https://github.com/RevolutionPi/kernelbakery) and try to follow the instructions in README to build the kernel for Revolution Pi Connect.

Regards
Simon

Re: RevPi Connect recompiled kernel error with piControl

Posted: 28 Sep 2019, 10:40
by dynamicstudio
Hello Simon,
thanks for the tip, I'll try the next week hoping it will work.

Regards,
Roberto

Re: RevPi Connect recompiled kernel error with piControl

Posted: 30 Sep 2019, 08:59
by zhan
Hi Roberto,

you are welcome , and feel free to post here if you have further question about this.

Regrads,
Simon