mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-10 17:54:53 +01:00
Extend kernelPackages using kernelPackagesExtensions by adding a simple "hello world" kernel module. Ensure it is loaded and the "Hello world!" printk appears in dmesg.
16 lines
284 B
Makefile
16 lines
284 B
Makefile
ifneq ($(KERNELRELEASE),)
|
|
# kbuild part of makefile
|
|
obj-m := hello.o
|
|
else
|
|
# normal makefile
|
|
KDIR ?= /lib/modules/`uname -r`/build
|
|
|
|
.PHONY: modules
|
|
modules:
|
|
$(MAKE) -C $(KDIR) M=$$PWD modules
|
|
|
|
.PHONY: modules_install
|
|
modules_install:
|
|
$(MAKE) -C $(KDIR) M=$$PWD modules_install
|
|
endif
|