Author |
Message |
shrkbait
|
Posted: Mon Dec 01, 2003 1:32 pm |
|
Joined: Mon Nov 24, 2003 4:23 pm
Posts: 38
|
Has anyone compiled the kernel w/ KnoppMyth (/usr/src/kernel-source-2.4.21-xfs)
Can anyone confirm the original packaged .config is the one for the default kernel?
I need to compile Local APIC out as it seems to be fixing peoples freezing problems.
I just don't want to mess around too much for no reason.
|
|
Top |
|
|
cesman
|
Posted: Mon Dec 01, 2003 2:50 pm |
|
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location:
Fontana, Ca
|
shrkbait wrote: Can anyone confirm the original packaged .config is the one for the default kernel?
Default kernel from kernel.org or the default kernel for KnoppMyth? It is the default kernel for KnoppMyth. You'll also find a copy under /boot/
cesman
|
|
Top |
|
|
shrkbait
|
Posted: Mon Dec 01, 2003 9:35 pm |
|
Joined: Mon Nov 24, 2003 4:23 pm
Posts: 38
|
I am NOT making good progress here. Has anyone else turned APIC (Local APIC) off at the kernel level??? I have compiled and booted and crashed an easy 30 times now trying different things.
I have had make bzImage fail, make modules, and make modules_install fail. The modules_install had a whole lot of sound driver and things with undefined references.
Question: Are the diff files in /usr/src needed or are the in there already?
Going back to the original .config always gets me back, thankfully. What makes this hard, is that disabling LAPIC is not just an option in menuconfig. You need to Put your processor as (at least) 586 or PPro (686). Then you have the option. JUST doing those few steps gives a build error. If you go into the original .config file, and unset LAPIC, you get compile errors too. Also, running make oldconfig blows that hand edit away.
I searched the other boards looking for how to do this and no one has step by step instructions. Any help is appreciated.
If I am not mistaken, getting this WILL fix the nForce2 freezes..
|
|
Top |
|
|
cesman
|
Posted: Tue Dec 02, 2003 1:36 am |
|
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location:
Fontana, Ca
|
shrkbait wrote: Question: Are the diff files in /usr/src needed or are the in there already?
Already there.
cesman
|
|
Top |
|
|
shrkbait
|
Posted: Tue Dec 02, 2003 9:55 am |
|
Joined: Mon Nov 24, 2003 4:23 pm
Posts: 38
|
cesman, can you tell me what commands you run after compiling to kernel to get the drivers to work?
I have noticed that 'make modules_install' fails right on the virgin source. The final command of 'depmod -ae -F System.map' gives a bunch of missing dependencies on things like snd_*, alsa, and a couple other things that look myth specific. I have basically been running the following commands after getting the .config file like I want it.
make dep && make bzImage && make modules && make modules_install && make install
install-nvidia.sh
install-nvnet.sh
The modules_install command does fail every time though.
Do get an option in menuconfig for Local APIC, I need to switch my processor type to Athlon (which I have, going to x686 will do it too). Solely making this change gives a compile error in the DRM section. I go back to menuconfig char devices and turn off this (do we use it???). That lets me compile everything. I hack my way through the above commands and finally get to run lilo. The boot then panics on off all things errors ext3.o. I think in some previous test I had made ext3 static, and not a module, and had an error further down the line.
If anyone sees a link anywhere on steps to getting Local APIC turned off, please send the link!!
|
|
Top |
|
|
cesman
|
Posted: Tue Dec 02, 2003 11:47 am |
|
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location:
Fontana, Ca
|
I use the same commands you stated to compile the kernel. When I first attempted to compile the kernel, I did get some errors, but nothing like you've stated. If you get errors related to DRM:
Quote: Either compile in 386 compatibiility mode, or remove the additional __cmpxchg function from the drm sources (which is only needed if your processor does not support this opcode anyways).
Regards -Klaus Knopper
cesman
|
|
Top |
|
|
BugRoger
|
Posted: Sat Dec 06, 2003 7:26 am |
|
Joined: Sat Dec 06, 2003 7:10 am
Posts: 6
Location:
Berlin, Germany
|
I experienced the *exact* same problems as shrkbait. I'm running Knoppmyth on a Shuttle SN45g with Nforce2 chipset and it's very unstable. Sometimes I don't even get to the command prompt. I tried a lot of different boot options but that didn't help. I'm also under the impression that we need to disable Local APIC and Generic IDE support. I managed to compile a kernel in compatibility mode but then I get errors about ext3.0 and the kernel panics.
Now I just found your post about removing the __cmpxchg function, which is a problem for me too. Could you please elaborate how to do that?
|
|
Top |
|
|
mgordon
|
Posted: Tue Dec 09, 2003 5:25 am |
|
Joined: Tue Oct 28, 2003 1:25 pm
Posts: 125
|
I executed the following to recompile out APIC:
make menuconfig
make dep
make clean
make bzImage
copied bzImage to boot directory and modified lilo, to boot old image and new image.
next I did the following:
make modules
make modules_install
everything compilied but my new image took a kernel panic and my old image hung @ boot time.
What am I missing?
I plan on reinstalling my system tonight and retrying compile.
Thanks,
Mike G.
|
|
Top |
|
|
BugRoger
|
Posted: Tue Dec 09, 2003 6:17 am |
|
Joined: Sat Dec 06, 2003 7:10 am
Posts: 6
Location:
Berlin, Germany
|
mgordon: remove the initrd.gz from lilo.conf and compile ext3 and jfs support into your kernel.
I finally got it to work. It's rocksolid now. I will write what I did when I'm back from work...
|
|
Top |
|
|
mgordon
|
Posted: Tue Dec 09, 2003 6:38 am |
|
Joined: Tue Oct 28, 2003 1:25 pm
Posts: 125
|
Excellent!
Thanks.
Mike G.
|
|
Top |
|
|
mgordon
|
Posted: Wed Dec 10, 2003 9:38 am |
|
Joined: Tue Oct 28, 2003 1:25 pm
Posts: 125
|
Ok - I reinstalled MythTv and I currently have my MythBox up and running again.
Before I go any further I want to recompile my kernel w/o APIC support. Please review my steps for correctness and provided any feedback. I don't really want to create another MythBrick. Thanks.
I plan on executing the following:
make menuconfig - modify configuration to remove APIC. Also does menuconfig take the .config file that is packaged with the kernel or do I have to explicitly load this file into menuconfig? The reason I as is that when I built the new kernel last time it seemed that ext3 was not compiled in. I will make sure that I will verify the config file before executing the make(We learn from our mistakes).
make dep
make bzImage
make modules
make modules_install
make install - (is this required?, What does it do?) or do I just copy the bzImage to the boot directory?
Modify lilo based on BugRogers suggestions and to allow the original to load by default and the new kernel to load on demand.
Thanks again
|
|
Top |
|
|
Xsecrets
|
Posted: Wed Dec 10, 2003 9:49 am |
|
Joined: Mon Oct 06, 2003 10:38 am
Posts: 4978
Location:
Nashville, TN
|
menuconfig uses or creates a .config in the kernel source directory, but this is not the config of the current running kernel. you need to pull the current config from the /boot directory and copy it into your kernel source directory and I think there maybe some oldconfig comand to run, I'm not too sure I've never had much luck with doing anything but a new config that I created. also the running config may not have ext3 compiled in as it is using initrd which will allow ext3 to be compiled as a module and loaded before the real system boot (well that's a lousy explanation, but don't feel like diging into the details right now.) you can do your own initrd, but that is another set of commands to do that.
|
|
Top |
|
|
mgordon
|
Posted: Wed Dec 10, 2003 10:06 am |
|
Joined: Tue Oct 28, 2003 1:25 pm
Posts: 125
|
Ah - so that's how I created a MythBrick.
I will use the .config from the boot and make sure that ext3, as well as jfs, is compiled into the kernel.
Other than the .config is there anything else I need to know to successfully compile the kernel?
Also do I use "make install" or just copy the bzImage to the boot directory?
Thanks for you patience and help.
Mike G.
|
|
Top |
|
|
BugRoger
|
Posted: Wed Dec 10, 2003 2:32 pm |
|
Joined: Sat Dec 06, 2003 7:10 am
Posts: 6
Location:
Berlin, Germany
|
Ok. Here is what I did... I'm not particulary experienced in compiling new kernels but this guide helped a lot. I recommend to follow it for making your new kernel: Creating custom kernels with Debian's kernel-package system. It's only shortcoming is that it doens't mention that initrd stuff. Could have save me some headache. If you want to know where the kernel panic came from do a search for mkinitrd. You don't have to worry about that if you don't compile filesystem support as module.
First I tried many different things and did a lot of research but I couldn't get 2.4.21 to work properly with my nforce2 board. I finally tried to compile a 2.4.22 kernel since nforce support is already included. I took me another 5 kernel bricks to get it right but now works flawlessly.
- apt-get install kernel-sources-2.4.22
- do the symbolic link stuff and copy /boot/config-2.4.21-xfs to /usr/src/linux
- make oldconfig
- make menuconfig and check the following options:
Processor type and features Disable Symmetric multi-processing support and leave Local APIC support on uniprocessors disabled as well. Change processor type to Athlon.
General setup Disable power management and ACPI support just to be sure. If everything works you can turn it on again.
IDE, ATA and ATAPI Block devices Disable Generic IDE support. Make sure AMD nvidia support is compiled into the kernel.
Character Devices Compile /dev/agpgart (AGP Support) as module(!) and disable everything but NVIDIA chipset support. <-- This seems to be very important. Also enable Direct Rendering Manager (XFree86 DRI support).
File systems Compile ext3 and JFS into your kernel. Not as module. Saves you some headache with that initrd stuff.
- Now go through all menu points again and disable all modules that you're sure you don't need. The help text often provides useful hints for that. Leave most of the stuff that is already compiled into the kernel.
- Finally save your configuration and compile kernel and modules. Install kernel, edit lilo.conf, run lilo. Make sure you don't specify the old initrd.gz image for the new kernel because that will give you kernel panics. Restart with new kernel.
There will still be some module declarations in modules.conf that you haven't compiled yet. This is why you will still see some errors during your first boot. You have to install/clean up those after the restart. - After the restart. Install the nvnet-drivers with install-nvnet. Run netcardconfig.
- Do NOT install those Nvidia nforce drivers. They are already incorporated into 2.4.22.
- Once you got your network running again get the alsa-drivers. Got to http://www.alsa-project.org and download alsa-driver, alsa-lib and alsa-utils. I used version 0.9.8. Follow the Alsa NVIDIA guide for installing the drivers. Don't forget to unmute the channels.
- Finally you might have to recompile/reinstall your video card drivers again.
I hope this short overview helps...
Michael
|
|
Top |
|
|
Dale
|
Posted: Wed Dec 10, 2003 4:55 pm |
|
|
Site Admin |
Joined: Fri Oct 31, 2003 11:40 pm
Posts: 357
Location:
Irvine, Ca
|
I don't understand this thread. Can't you just boot using the noapic boot option?
|
|
Top |
|
|