From: Pierre Neidhardt <mail@ambrevar.xyz>
To: Guix-devel <guix-devel@gnu.org>
Subject: Building custom kernel modules (e.g. VHBA for CDEmu)
Date: Mon, 25 Mar 2019 09:42:03 +0100 [thread overview]
Message-ID: <87lg13cplw.fsf@bababa.i-did-not-set--mail-host-address--so-tickle-me> (raw)
[-- Attachment #1: Type: text/plain, Size: 1247 bytes --]
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/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
next reply other threads:[~2019-03-25 8:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-25 8:42 Pierre Neidhardt [this message]
2019-04-03 7:49 ` Building custom kernel modules (e.g. VHBA for CDEmu) Chris Marusich
2019-04-03 8:09 ` Pierre Neidhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lg13cplw.fsf@bababa.i-did-not-set--mail-host-address--so-tickle-me \
--to=mail@ambrevar.xyz \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.