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 - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 08-05-2009, 11:42 PM   #1
moekad
Member
 
Registered: Feb 2009
Posts: 64

Rep: Reputation: 15
kernel 2.6.30


hey need help
can't compile with new kernel 2.6-30
give me :
root@kad:/home/kad/Desktop# cd microdia
root@kad:/home/kad/Desktop/microdia# make
make -C /lib/modules/2.6.30/build SUBDIRS=/home/kad/Desktop/microdia modules
make[1]: Entering directory `/usr/src/linux-2.6.30'
CC [M] /home/kad/Desktop/microdia/microdia-usb.o
In file included from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/kad/Desktop/microdia/microdia-usb.c:28:
include/linux/mmzone.h:18:26: error: linux/bounds.h: No such file or directory
include/linux/mmzone.h:256:5: warning: "MAX_NR_ZONES" is not defined
In file included from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/kad/Desktop/microdia/microdia-usb.c:28:
include/linux/mmzone.h:290: error: ‘MAX_NR_ZONES’ undeclared here (not in a function)
make[2]: *** [/home/kad/Desktop/microdia/microdia-usb.o] Error 1
make[1]: *** [_module_/home/kad/Desktop/microdia] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.30'
make: *** [driver] Error 2

how i can fix this issue!
many sources the same error
i install ctags and libv4l libv4l-dev libv4l-0 the same error
is 2.6-30 not good kernel ?
i decompress my kernel at : /usr/src
i'm using ubuntu
when i compile it i copy the default ubuntu and copy config to new kernel and i use make menuconfig and load alternative configuration then i save and i do make modules then make modules_install then make bzImage and after that make clean then i copy arch/x86/bzImage to /boot and config grub and initrd , finally i reboot.
after that can't compile any source

Thanks for your help
 
Old 08-06-2009, 04:31 AM   #2
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
When you decompressed the new kernel in /usr/src, did you remove the old /usr/src/linux symlink, and add a new symlink? otherwise this symlink will point to the old kernel. When using the new, it will look for sources as /usr/src/linux

Try removing the old symlink

Quote:
rm -rf /usr/src/linux
Then create a new symlink to the new kernel

Quote:
cd /usr/src
ln -s linux-2.6.30 linux
 
Old 08-06-2009, 07:45 AM   #3
moekad
Member
 
Registered: Feb 2009
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by fotoguy View Post
When you decompressed the new kernel in /usr/src, did you remove the old /usr/src/linux symlink, and add a new symlink? otherwise this symlink will point to the old kernel. When using the new, it will look for sources as /usr/src/linux

Try removing the old symlink



Then create a new symlink to the new kernel
hey thx
i did make oldconfig && make prepare
and it work but i need help when i do update, i receive update from old kernel how i can enforce synaptic to update to my new kernel?
what steps should i do ?
Thanks again =)
 
Old 08-07-2009, 01:51 AM   #4
Refractor
Member
 
Registered: Oct 2008
Location: Rousse, Bulgaria
Distribution: Debian
Posts: 91

Rep: Reputation: 25
AFAIK synaptic will get updates for precompiled kernels for your OS and not a custom built one (but then, I may be wrong).
 
Old 08-07-2009, 03:12 AM   #5
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
Quote:
Originally Posted by moekad View Post
hey thx
i did make oldconfig && make prepare
and it work but i need help when i do update, i receive update from old kernel how i can enforce synaptic to update to my new kernel?
what steps should i do ?
Thanks again =)
What updates are you referring too? kernel patches, or software packages?
 
Old 08-07-2009, 11:38 AM   #6
moekad
Member
 
Registered: Feb 2009
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by fotoguy View Post
What updates are you referring too? kernel patches, or software packages?
Software Packages
 
Old 08-07-2009, 11:44 AM   #7
karamarisan
Member
 
Registered: Jul 2009
Location: Illinois, US
Distribution: Fedora 11
Posts: 374

Rep: Reputation: 55
No update required then. They aren't tied to versions of the kernel, at least nowhere near that specifically. If you were compiling 2.2 or 2.8, you might have a problem, but I'm honestly not sure which of those is less likely.
 
Old 08-07-2009, 03:47 PM   #8
mushroomboy
Member
 
Registered: Jan 2006
Distribution: Debian Testing ALWAYS!!!
Posts: 363

Rep: Reputation: 43
If you used synaptic to install the kernel and it's headers you shouldn't need to change the links to /usr/src/linux it should all be done automatically. I've never had to change that unless I built a kernel myself in Debian, and anymore they have the most updated kernels in the repo (if you use kernel-archive.buildserver.net) and all should be well. If your having problems building the program try switching to the 2.6.26 kernel, a lot of things were changed after that kernel.
 
Old 08-07-2009, 07:33 PM   #9
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
Ok with software packages through synaptic, they will be compiled for the kernels that they release, this won't be a problem, it just means they won't be optimized for you custom built kernel.

I think the problem might be caused by running 'make clean' at the end of you kernel build. You should never run this command when building kernels, this command does more than remove modified files during the build process. And in the future when you go back and have to compile a new program, or have to build a new module for new hardware, it needs to look for modified kernel header files, which now don't exist since you ran 'make clean'.

The steps I have always used for build a kernel is

Quote:
make mrproper
make or make oldconfig
make modules_install
Then copied the kernel over manually to /boot then adjusted my boot manager to suit.
 
  


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
Interacting with (the mailing list) linux-kernel@vger.kernel.org - some basics? GrapefruiTgirl Linux - Kernel 4 04-03-2009 12:56 PM
LXer: Howto: build Linux kernel module against installed kernel w/o full kernel source tree LXer Syndicated Linux News 0 09-03-2006 08:21 PM
Kernel 2.4 in Zipslack (Waring: unable to open an initial console | Kernel Panic...) kurtamos Linux - General 2 05-10-2006 12:58 PM
Kernel-Patch Debian Logo 2.6.2 not correctly working for custom kernel 2.6.11 smp deepclutch Debian 3 06-27-2005 03:59 AM
kernel panic: try passing init= option to kernel...installation with Red Hat 9 kergen Linux - Hardware 1 09-30-2004 03:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 02:09 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