LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-08-2011, 06:22 AM   #1
Candyguitar
LQ Newbie
 
Registered: Sep 2006
Distribution: Ubuntu 10.10
Posts: 1

Rep: Reputation: 0
Problem building own Linux kernel patch


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.
 
Old 01-08-2011, 02:56 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
If I were you I wouldn't start from there at all.
I think you're trying to single out one directory and fart about with that and then just build it on it's own. I would untar afresh, build for the box, and then try your directory stuff if you like.

Finally, why not patch the source manually or otherwise, and you can make clean, make, grab a coffee and have a kernel waiting for you. That's twenty minutes and a few cpu cycles wasted, but quick compared to asking us and reading guides.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with linux kernel patch urvek Linux - Kernel 1 09-06-2007 06:05 PM
kernel 2.6.11 patch problem SPo2 Fedora 2 03-02-2006 09:16 AM
Building a kernel RPM with applying a patch barisdemiray Programming 1 08-04-2004 06:50 AM
debian-patch-debianlogo w/2.6.5 kernel-patch-lpp Outabux Debian 11 05-20-2004 01:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 02:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration