Compiling Kernel
G'Day; I'm trying to learn to compile a kernel and all goes well until I get to "stage 2" then I get the following error;;
Building modules, stage 2. MODPOST 3400 modules ERROR: "__modver_version_show" [drivers/staging/rts5139/rts5139.ko] undefined! ERROR: "handle_edge_irq" [drivers/gpio/gpio-pch.ko] undefined! ERROR: "irq_to_desc" [drivers/gpio/gpio-pch.ko] undefined! make[2]: *** [__modpost] Error 1 make[1]: *** [modules] Error 2 make[1]: Leaving directory `/home/miykel/Downloads/3.4/linux-3.4.o-3.2' make: *** [debian/stamp/build/kernel] Error 2 Can anyone help please Regards Miykle |
You have possibly an inconsistent .config file.
Try reusing the .config of a working kernel (shipped with your distribution) then run Code:
make oldconfig |
Member response
Hi,
You should look at: https://help.ubuntu.com/community/Kernel/Compile Several good links and justification/cautions for compiling a kernel for Ubuntu. |
G'Day and thanks for the replies guy's. I've tried every option I've found and been supplied from forums but nothing makes any difference, I always end up at the same error message, even tried different methods nothing seems to work just end up at the same place....very frustrating.
Thanks Again regards Miykel |
What kernel version are you building? I just built and installed 3.3.5 with gcc-4.5.2 and it went off without a hitch.
The command line i usually use is "make && make modules && make modules_install&& make install" make sure to back up your lilo.conf and /boot directory so you can boot from a cd and restore them if need be. If you are building a version that came with your distro, that sometimes doesnt work as well as getting the source off kernel.org and starting clean. If you do need to restore your lilo.conf, dont forget to run lilo after you restore it. |
G'Day and thanks fogpipe,
The distro is Ubuntu 12.10 1. kernel 3.4.0-2 from mainline 2. Kernel 3.3.0 liquorix I'm trying to compile 3.4.0-2.6 generic from mainline I wonder if having more than 1 kernel installed has anything to do with it. ???? Regards miykel |
Quote:
To understand your problem, please provide : - the exact steps you followed (which commands you did issue, in what order) - the .config file you are using (renamed e.g. as config.txt). PS you should type "make menuconfig" (or "make gconfig", "make xconfig", whatever) before "make". Preferably, as I said before, reuse the .config from your running kernel before all that first, e.g. Code:
zcat /proc/config.gz > /path_to_your_new_kernel_directory |
Thanks for the interest guys I certainly appreciate it, tried to post the config file but it's to big.
What I have been doing is ; 1 Extract tar.gz to /usr/src 2 cd /usr/src/ubuntu-quantal 3 copy/paste current kernel config file from /boot to /usr/src/ubuntu-quantal/usr as a template for make oldconfig 4 sudo make oldconfig....run ok 5 sudo make make run ok until it reached stage 2 then received error messages tracked down the gpio but no .ko files The kernel I got from mainline repository, tried several methods but all end up at the same point. Hope this is helpful Kind Regards Miykle |
Step 3, you should put then current kernel config file in the directory created by the extraction at step 2 and name it ".config", e.g.
Code:
mv linux-3.4.tar.bz2 /somewhere |
Member response
Hi,
Quote:
|
Where are you getting the kernel source code you are using? Its not some distro specific thing is it?
Because alot of distros pee on the kernel a bit, i guess because just linux isnt good enough for them. |
Thanks again guys;
@ Didier; I left out a step (damn) after; 3 copy/paste current kernel config file from /boot to /usr/src/ubuntu-quantal/usr as a template for make oldconfig I did cd /usr/src/ubuntu-Quantal/usr Then make oldconfig. This was a sugestion I got from searching online so the make would use the config file as a template for the new one without influence from any other config file in /boot Seemed to make sense at the time, but it could be a red herring @ Fogpipe; I get the tar.gz friom the launchpad/mainline repository, I assume that is the best place from what I've read. Postbin........... http://pastebin.com/4PiGCvHS Kind Regards Miykle |
Quote:
Code:
cp /boot/configxxx /usr/src/ubuntu-quantal/usr Code:
cp /boot/configxxx /usr/src/ubuntu-quantal/usr/.config |
G'Day I didn't move the file by terminal I just copied the config file from /boot and pasted it into ubuntu-quantal/usr
but first chown.....ubuntu-quantal/usr to allow me to paste into it then cd /usr/src/ubuntu-quanatl/usr then ran sudo make oldconfig. one thing though I can never find where the oldconfig is stored after it makes it although the terminal says it has done it ???? ( scarey when the terminal refers to it's self in the first person...Hal revisited...lol. ) I hope this helps Regards Miykel |
Miykle,
to compile the kernel you should do everything using the terminal. The way you have copied the file it was certainly not renamed .config in the process, hence "make oldconfig" didn't consider it. In short do what follows (I suppose that configxxx is the name of your current config file and you already stored the new kernel source file, named linux-3.4-02.tar.bz2, in /usr/src; else adapt the commands accordingly) - open a terminal - become root typing "sudo su" - then type in sequence: Code:
cd /usr/src/ Then continue typing in sequence: Code:
make Waiting to hear from you. |
Well there you go simple when you know how; just the know how that takes an expert, can't thank you enough for persisting with me.
I'm sorry I couldn't reply earlier, I had to go to town, 60 Km round trip, then try the things you said, which worked fine. will purge the kernel and all documents related to it then do it again for practice, then the next step is to learn to modify the kernel to suite me needs that should be worth a laugh or two ...lol. I really enjoy Linux because it can be tailored to suite your needs, a real peoples OS. I'll be getting back on the road tomorrow, I retired to the highway, heading north for the winter, so I won't have my PC for a while until I go to ground somewhere and hook up to mains power again, will post to let you know how I got on with the next kernel. If I wanted to make .deb packages would this code do it ?? code; make-kpkg clean (or just rm -rf ./debian) $Get_Root make-kpkg --revision=3:2.0.custom kernel_image Kind Regards and many blessings Miykel |
I'm happy you succeeded.
For your question about .deb package, sorry I know nothing about Debian packages, but hopefully some other people will answer you. Best regards |
that's ok mate, something for the future,
How's this for irony, just learned to compile the kernel and the next dist-upgrade the kernel was upgraded, from the ppa's, from 4.3.0-2.6 to 4.3.0-2.7 damn...blast...gotta laugh. Regards Miykel |
Not solved then, solved now....
I just ran into this same exact error message while compiling kernel 3.7.1. I knew it wasn't any of the above answers since I had successfully compiled kernels 4 or 5 times now. What happened it that I had been using SUDO to get root privileges and not a genuine root shell with su. So, I switched to su - "make " etc and the problem is now resolved. I am not certain this is precisely the cause of the original posters problem, but it seemed like the thread was left in suspence. So, I hope this might help someone. :)
|
Quote:
OOPS.. I apologize. I honestly did not see there was a second page of the thread where it was resolved. I keep doing that on here. Excuse me! Sorry to revive this... |
All times are GMT -5. The time now is 07:29 PM. |