Hi! The question of building custom Linux kernel modules was recently brought up in bug #35758 (packaging CDEmu).
I'll summarize: a typical Makefile to build a kernel module looks like this: --8<---------------cut here---------------start------------->8--- VHBA_VERSION := 20170610 KERNELRELEASE ?= $(shell uname -r) KDIR ?= /lib/modules/$(KERNELRELEASE)/build PWD ?= $(shell pwd) obj-m := vhba.o ccflags-y := -DVHBA_VERSION=\"$(VHBA_VERSION)\" -Werror default: modules install: modules_install modules modules_install clean: $(MAKE) -C $(KDIR) M=$(PWD) $@ --8<---------------cut here---------------end--------------->8--- The only thing we need, beside a C compiler, is this KDIR, which on Guix _could_ be found at /gnu/store/…-linux-libre-5.0.1/lib/modules/5.0.1/build Sadly, for us it's a dangling link to /tmp/guix-build-linux-libre-5.0.1.drv-0/linux-5.0.1. I presume that the answer is simple: replace the link with the folder. But that would eat up significantly more disk space. So we could replace the link with a link to a new "build" output of the linux-libre package, which would contain this "build" folder. Thoughts? -- Pierre Neidhardt https://ambrevar.xyz/
signature.asc
Description: PGP signature