How to modify driver.

Hello,

I have been able to build Volumio from source using the scripts and description provided in the gitlab repository. Everything seems to work and I have enabled a Hifiberry digi+ pro, which is working well. I need to modify the hifiberry driver for a custom dac that I am designing. After the build process, I do not see the kernel source, so I can’t insert my modified driver. I scanned through the build files but don’t see where the kernel is pulled from. Can anyone point this out? Also, I presume the easiest way to to do this is to fork the kernel repository to my own server, modify the driver and then build off that? Are there any instructions for developing custom drivers that I have missed?

To get the kernel sources type

volumio kernelsource

And you ll get a ready to use kernel modules compilation environment

Thanks, that worked well.

I am trying to mount the fs in ubuntu so I can more easily edit the files. When I use SSHFS, it only seems to mount 1 directory with rpi-linux.tar.gz and Module7.symvers in it. Is there any way to mount the whole thing?

Also, when I am done with the modifications, what are the steps to recompile so I can test them? Is a recompile of the entire kernel necessary or are the drivers activated during runtime?

I figured out how to mount the entire filesystem. Was able to make my changes. What do I need to do to make them take effect?

I did more research and was able to do a make of the kernel. I then did make install, but it does not look like the kernel image in the boot directory was over-written with the new one. Any idea what I am doing wrong?

Looks like there are some errors with the config? Anyone know how to fix this. My steps to re-create this are simply volumio kernelsource/make/make install

/bin/bash ./arch/arm/boot/install.sh “4.14.71-v7”
arch/arm/boot/Image System.map “/boot”
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.14.71-v7 /boot/vmlinuz-4.14.71-v7
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.14.71-v7 /boot/vmlinuz-4.14.71-v7
update-initramfs: Generating /boot/initrd.img-4.14.71-v7
WARNING: missing /lib/modules/4.14.71-v7
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.14.71-v7: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_UcN2JP/lib/modules/4.14.71-v7/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_UcN2JP/lib/modules/4.14.71-v7/modules.builtin: No such file or directory

Can anyone help me with this?