Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to compile a custom kernel for my new Debian setup, but I keep running into problems. I've config'd and compiled the thing a dozen times but keep getting the same errors. dmesg gives the errors such as this several times during bootup:
It also disables irq 16. And when I finally log in I have no sound or ethernet access. Previous compile attempts had IRQ 157 and 161 instead, but the result was the same. One time I got it working, but I had forgotten to enable DMA for disks, and when I went back to compile it in again, I somehow broke it even worse than before, and I can't for the life of me remember what I did that one time.
The source I'm using is the Debian kernel source package linux-source-2.6.16.12, which is exactly the same version as the stock kernel I'm running now. And since everything works under the stock kernel, I know the problem isn't with the source itself.
I know I've either disabled something that should be enabled, or vice versa. But I just can't figure out what I'm doing wrong. I'm tearing my hair out here. I need another set of eyes to look at the thing.
The motherboard is a Gigabyte GA7N-400-Pro2 (stats here), and lspci outputs the following:
As far as I can tell, I've compiled in every driver necessary for the above items (excluding the Haupage video card which needs ivtv). If I'm missing something I don't know what it is.
I'll post my config in the next post. The board is complaining this is too long.
Distribution: kubuntu, yoper, redhat, fedora core, debian, knoppix, Suse, madrake, DSL, my own
Posts: 3
Rep:
try .config
Hello, since you're compiling the exact same version of the stock kernel you're running now, maybe it'd be better to copy your current config first and try compiling/installing/running it before you re-configure it to your liking.
In other words:
1. Copy your current config to the kernel source tree.
# cd /path/to/your/kernel
# make oldconfig
# make
# make modules_install
# make install
3. If this works ok, then you can start re-configuring it to your liking but I suggest to pay attention to what you changed so can you can always go back to the last config that works when problems come your way.
But since I'm already starting with the same exact config file and source as the stock kernel, all I'd be doing is recreating the kernel I'm running now. I suppose I could do it as sort of a test of the source, but I'm pretty sure that that's not where the problem lies.
I took the current config and only disabled things I was pretty sure I don't need. I also moved the main modules into the kernel itself. Other than that, the actual changes I made were very few. But somewhere along the way I changed something I shouldn't have, and I have no idea what it is. That's why I'm asking others to look it over. I wouldn't be surprised if I was just overlooking something obvious because I'm too close to the problem.
And yes, I'll be sure to pay closer attention to the changes I make in the future, once I can figure out what I shouldn't be changing.
I tried a couple more times. I even started over from the beginning again with the current working config, trying as hard as I can not to eliminate necessary functions. But in the end I just keep getting the same problems. What the heck could I be doing wrong? It's gotta be something that looks unimportant, but which my system depends on to configure irq's correctly. But for the life of me I can't find it.
search function. lspci (or whatver command it is) gives you system info if you have access to it (if not, chroot in through a LiveCD and use that to work on your config. May not be pretty, but its effective), and then start searching for things. I'd suggect avoiding a search for Intel, as I think that scrolls alot.
I had trouble with my sound card working, and had to finally / AC'97, and lo' and behold, there it was. The path to the option was at the bottom of the list (sometimes you have to check something to find the ACTUAL option you're looking for), but yeah, you should compile one like oyur original, and then after that I think somewhere is a HOWTO on booting into 2 kernels (one default, other optional), which would be great for a way to test your kernel without having to worry too much about your system not working.
Good idea, except I've already done all of that. I've enabled all the modules I could find relating to my lspci output (posted in my first post), as well as looking at lsmod and enabling everything currently running in my working kernel. I even enabled things that are probably not related, but kind of look like something I might need. And I double-checked everything three or four times. So unless I'm missing something or made a mistake somewhere, it SHOULD be working. That's why I posted everything here; I've simply run out of things I know how to do.
You know, the biggest problem in kernel compiles is simply that there are too many options to choose from, and not enough info about them. Sure, there's a little blurb about each one, but most of them don't give you enough to make an informed choice. There's often no way to determine which options are necessary and which are optional for your system. Even just matching a module name to the kernel config option can be a chore. I really wish there was some centralized knowledge list, perhaps a wiki or something, where you could look up a module and get a detailed explanation of what it is, what it does, what issues it might have, what kinds of systems need it and what kind don't. That would be so useful.
At this point I'm just hunting blind. My only other choice is simply to start enabling things wholesale, which would defeat the whole purpose for rolling my own.
I had a problem with hardware not working when I ran the system: turns out I was missing a package.
Yeah, the Kernel config menu needs to be reworks into something a bit more intuitive, but for the moment it works, albeit a bit rough around the edges. A good shellscript to configure it for your hardware automatically would be a wonder of scripting, but currently such a thing would be difficult to do since the kernel configmenu seems to change some with each release.
Check packages and see if that may be a problem. If not, then I have no clue what coudl be wrong.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.