I have found a kernel module which I want to install to my Arch systems (raspberry pi both ermv6/7)
I have edited the Makefile so that when I 'make' the module from theMakefile, it will build the *.ko files and the *.dtbo. If I manually copy them to the correct directories, the module will work. What I want to do is get the PKGBUILD to actually create a package so I can install and uninstall to multiple RPis. I have made a PKGBUILD from scratch which mostly gets through the build (it builds all the components) but fails in the package construction. It complains after this command:
make DESTDIR="${pkgdir}/" modules_install
I get this:
$this->bbcode_second_pass_code('', '
cp cool_module.ko.gz /lib/modules/4.19.27-1-ARCH/kernel/sound/soc/codecs/
cp: cannot create regular file '/lib/modules/4.19.27-1-ARCH/kernel/sound/soc/codecs/cool_module.ko.gz': Permission denied
make: *** [Makefile:23: modules_install] Error 1
==> ERROR: A failure occurred in package().
Aborting...')
how do I deal with this. I am trying to create a package with 3 files, 2 *.ko.gzs and a *.dtbo. I have not found a concise page explaining this. I have built and installed many programs, but this is my first attempt at a kernel module. Any guidance would be helpful. An example of a PKGBUILD for a module built for RPI which actually installs after installation would be helpful as well.
Regards,
Gearhead