summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--builder/dnbd3-qcow2-rootfs/kernel_modules/Makefile15
2 files changed, 16 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index b770329f..d018fd03 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
dracut
-builder/dnbd3-qcow2-rootfs/kernel_modules
+builder/dnbd3-qcow2-rootfs/kernel_modules/*
!builder/dnbd3-qcow2-rootfs/kernel_modules/Makefile
diff --git a/builder/dnbd3-qcow2-rootfs/kernel_modules/Makefile b/builder/dnbd3-qcow2-rootfs/kernel_modules/Makefile
new file mode 100644
index 00000000..ca0423f5
--- /dev/null
+++ b/builder/dnbd3-qcow2-rootfs/kernel_modules/Makefile
@@ -0,0 +1,15 @@
+obj-m += nbd.o
+
+all: build
+
+build: update
+ make --directory /lib/modules/$(shell uname -r)/build M=$(PWD) modules
+
+install:
+ make --directory /lib/modules/$(shell uname -r)/build M=$(PWD) modules_install
+
+clean:
+ make --directory /lib/modules/$(shell uname -r)/build M=$(PWD) clean
+
+update:
+ curl --location --remote-name https://raw.githubusercontent.com/torvalds/linux/master/drivers/block/nbd.c