User Mode Linux - Installing a module error

Posted by Zach on Stack Overflow See other posts from Stack Overflow or by Zach
Published on 2010-03-21T20:39:10Z Indexed on 2010/03/21 20:41 UTC
Read the original article Hit count: 343

I am trying to run 'make' on a module in User Mode Linux to install a simple makefile. Here is my make file:


obj-m := hello.o

KDIR := /lib/modules/$(shell uname -r)/build PWD := $(shell pwd)

default:

$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

When I run this in User Mode Linux I get the following error:

make[1]: Entering directory /lib/modules/2.6.28/build' make[1]: *** No rule to make targetmodules'. Stop. make[1]: Leaving directory `/lib/modules/2.6.28/build' make: * [default] Error 2

The problem is that no files are present under /lib/modules/. There's no directory for 2.6.28 or build. From what I've read, these should be symlinks to /usr/src, but under /usr/src, I don't see any files under that either.

© Stack Overflow or respective owner

Related posts about linux-kernel

Related posts about kernel-programming