Quantcast
Channel: Active questions tagged kernel-modules - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 1184

Build and install kernel module into a defined /lib/module/*kernel directory

$
0
0

I had problems with my distribution's kernel, so I built a kernel (same version) to build my modules. My modules would be compatible. However, if I install the modules, the script creates a new directory in /lib/modules/ instead of writing into the module directory of the kernel. This looks somehow like this:

/lib/modules/old_kernel/lib/modules/new_kernel

Is there a way to write into a fixed path like /lib/modules/old_kernel/TARGET1. So far overiding the install pathes only led to very weird behavior. E.g.: /lib/modules/old_kernel/lib/modules/new_kernel/TARGET1

obj-m += rcio_core.oobj-m += rcio_spi.oobj-m += rcio_adc.oobj-m += rcio_pwm.oobj-m += rcio_rcin.oobj-m += rcio_status.occflags-y := -std=gnu99KVERSION ?= $(shell uname -r)KERNEL_SOURCE ?= /lib/modules/$(KVERSION)/buildall:  $(MAKE) -C $(KERNEL_SOURCE) M=$(PWD) modules  /usr/local/bin/dtc -@ -I dts -O dtb rcio-overlay.dts -o rcio-overlay.dtb  cp rcio-overlay.dtb /boot/overlaysinstall:$(MAKE) -C $(KERNEL_SOURCE) M=$(PWD) modules_installclean:  $(MAKE) -C $(KERNEL_SOURCE) M=$(PWD) clean  $(RM) rcio-overlay.dtb

Viewing all articles
Browse latest Browse all 1184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>