I was following
TuxRadar's guide to hacking the Linux kernel, and having followed all the previous steps, I got stuck here:
Quote:
And of course you should build the file to verify that you did not break anything:
$ make drivers/staging/comedi/drivers/ni_labpc.o
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CC [M] drivers/staging/comedi/drivers/ni_labpc.o
|
My failed attempt to build using that command replaces both instances of "drivers/staging/comedi/drivers/ni_labpc.o" with "drivers/staging/keucr/init.c". I realised afterwards that "include/linux/version.h" doesn't exist anymore, and neither does "include/generated/utsrelease.h".
I have actually patched the kernel before using this guide, but that was last year, and Google searching, checking the documentation and kernelnewbies.org for updated instructions proved fruitless. The one thing I thought might work is this command shown at 17:37 in
this video:
Code:
$ make M=drivers/staging/[DIRECTORY]
My attempt failed with this output:
Code:
$ make M=drivers/staging/keucr
ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.
WARNING: Symbol version dump /home/candyguitar/Documents/Programming/projects/linux/linux-2.6/Module.symvers
is missing; modules will have no dependencies and modversions.
Building modules, stage 2.
/home/candyguitar/Documents/Programming/projects/linux/linux-2.6/scripts/Makefile.modpost:42: include/config/auto.conf: No such file or directory
make[1]: *** No rule to make target `include/config/auto.conf'. Stop.
make: *** [modules] Error 2
Running 'make oldconfig && make prepare' didn't help either; I just held down enter to accept all the defaults, and then tried the previous 2 make commands again. In both cases, they failed:
Code:
$ make drivers/staging/keucr/init.c CHK include/linux/version.h CHK include/generated/utsrelease.h CALL scripts/checksyscalls.sh CC [M] drivers/staging/keucr/init.c
make: Nothing to be done for `drivers/staging/keucr/init.c'.
make: *** No rule to make target `CHK'. Stop.
Code:
$ make M=drivers/staging/keucr
WARNING: Symbol version dump /home/candyguitar/Documents/Programming/projects/linux/linux-2.6/Module.symvers
is missing; modules will have no dependencies and modversions.
Building modules, stage 2.
MODPOST 0 modules
/bin/sh: scripts/mod/modpost: not found
make[1]: *** [__modpost] Error 127
make: *** [modules] Error 2
Have I done anything wrong, or is it that TuxRadar.com's tutorial is now out-of-date? I presume I've got the source for version 2.6.37, since I only got it from the Git repository yesterday.