Koozali.org: home of the SME Server

Howto compile a kernel

Mike

Howto compile a kernel
« on: June 14, 2003, 02:28:49 AM »
Hi all

I have never patched or upgraded a kernel but am forced to do so because the VIA VT8235 chipset of my new Elitegroup K7VMM+ motherboard, is not supported by the 2.4.18-5 kernel of the SME and I am having some problems with it.
I have to patch kernel 2.4.18-5 with the VIA patch or upgrade to 2.4.20 as that kernel does support the VIA VT8235 chipset.
Have installed the next RPM´s also in this order.
- cpp-2.96-113.i386.rpm
- kernel-headers-2.2.19-6.2.1.i386.rpm
- glibc-devel-2.2.5-40.i386.rpm
- gcc-2.96-113.i386.rpm
- modutils-2.4.18-3.7x.src.rpm (appearently necessary with kernel 2.4.20+)

Beside that I have tried many kernel´s with there kernel-headers always installing it again on a freshly installed SME testserver.
Appearently I do not have to install make´ because when I try to install make-3.79.1-8 than he says that it already has been installed as I can see in the update system-advanced options.
I have copied /boot/config-2.4.18-5 to /usr/src/linux which is a softlink (~linux) to the source and renamed it to .config
Then I go to: cd /usr/src/linux
When I try to use the make commands, make clean, make mrproper, make config, make dep, I get the next message:
make: *** No rule to make target clean. Stop

It does that with any kernel/kernel-headers combination.

What am I missing here?

Charlie Brady

How to not compile a kernel (Re: Howto compile a kernel)
« Reply #1 on: June 14, 2003, 03:24:12 AM »
Mike wrote:

> SME and I am having some problems with it.
> I have to patch kernel 2.4.18-5 with the VIA patch or upgrade
> to 2.4.20 as that kernel does support the VIA VT8235 chipset.

(step 1 - check emergency boot floppy)

RH=http://ftp.redhat.com/pub/redhat/linux/updates/7.3/en/os/i686/
rpm -iv $RH/kernel-2.4.20-18.7.i686.rpm
# check /etc/lilo.conf
/sbin/e-smith/signal-event reboot

Charlie

Mike

Re: How to not compile a kernel (Re: Howto compile a kernel)
« Reply #2 on: June 14, 2003, 04:39:39 AM »
Hey Charlie, many thanks

It´s a real short answer but I think I understand most of it.
Making a hardcopy of this and are reinstalling my testmachine now and I will give it a go.

Again many thanks.

Mike

Re: How to not compile a kernel (Re: Howto compile a kernel)
« Reply #3 on: June 14, 2003, 01:06:13 PM »
O.K., Charlie that would work if I would not get any dependecy errors.
It appears that there are a lot of dependency errors all comming from /lib/modules/2.4.18-5/
I typed the last one down here but they are all in the same following format:

depmod:     sys_sched_yield_Rabfb229
depmod: *** Unsolved symbols in /lib/modules/2.4.18-5/kernel/net/wanrouter/wanrouter.o
depmod:     do_BUG_R577f4bff

I just need to figure out how to redirect the output to a logfile so I can read back which files I should upgrade.
Going to do that today.

Any additional info is highly appreciated.

Mike

Re: How to not compile a kernel (Re: Howto compile a kernel)
« Reply #4 on: June 14, 2003, 03:14:03 PM »
Appearently the install of the kernel looks at /lib/modules/2.4.18-5 while
/lib/modules/2.4.20-18.7 also exists.
I renamed /lib/modules/2.4.18-5 to /lib/modules/2.4.18-5.old
and
renamed /lib/modules/2.4.20-18.7 to /lib/modules/2.4.18-5
Then I retried rpm -iv kernel-2.4.20-18.7.i686.rpm
I just get 1 depmod message:

depmod: *** Unresolved symbols in /lib/modules/2.4.18-5-e-smith/kernel/drivers/net/ppp.generic.o

the complete directory structure of /lib/modules/2.4.18-5-e-smith is empty exept for /lib/modules/2.4.18-5-e-smith/kernel/drivers/net/
It shows ppp_generic.o and ppp_mppe.o

Checking it out now and I will get back to you on that.

Charlie Brady

Re: How to not compile a kernel (Re: Howto compile a kernel)
« Reply #5 on: June 14, 2003, 09:13:38 PM »
Mike wrote:

> Appearently the install of the kernel looks at
> /lib/modules/2.4.18-5 while
> /lib/modules/2.4.20-18.7 also exists.

Yes, it does that, but it's harmless.

> I renamed /lib/modules/2.4.18-5 to /lib/modules/2.4.18-5.old
> and
> renamed /lib/modules/2.4.20-18.7 to /lib/modules/2.4.18-5

That, on the other hand, is not harmless. Reverse your actions. Then as long as lilo.conf is OK, and "/sbin/lilo -v" runs without errors, you will be able to reboot and choose the new kernel.

C.

Mike

Re: How to not compile a kernel (Re: Howto compile a kernel)
« Reply #6 on: June 15, 2003, 01:35:43 AM »
O.K. the big moment has arrived.
I have got a dual boot on my SME.
1 to kernel-2.4.20-18.7 and 2 on kernel-2.4.18-5
It does not boot without problems thow with kernel-2.4.20-18.7.
2 things go wrong.
Quota management and http-admin fail to start.
I am investigating it now.
Charlie, considering your previous tips, I would say you have been testing with it too.
Are there some things you can already tell me about these 2 problems?
I will make a description shortly on how  to create a SME dual boot for other users who want to experiment with it.

Charlei I could not have done it without you, but then, that was probably already clear to you.

A big Thanks is in place

Mike

kam

Re: How to not compile a kernel (Re: Howto compile a kernel)
« Reply #7 on: October 07, 2003, 02:02:56 PM »
Charlie Brady wrote:

> That, on the other hand, is not harmless. Reverse your
> actions. Then as long as lilo.conf is OK, and "/sbin/lilo -v"
> runs without errors, you will be able to reboot and choose
> the new kernel.

Hello, everybody
I am trying to upgrade the kernel of my SME 5.6, following your suggestions, but have a trouble.
I downloaded the last kernel from redhat.com (http://ftp.redhat.com/pub/redhat/linux/updates/7.3/en/os/i686/kernel-2.4.20-20.7.i686.rpm)
It failed dependencies on modutils and I installed it (from i386 folder).
The kernel rpm reports the same error messages as mentioned above in this thread. After that I replaced in lilo.conf "2.4.18-5" strings with "2.4.20-20.7" (I don't want dual boot), run lilo, and rebooted. Except failstart of quotas and http-admin, it not found cdrom and tape drive, because I think they point to the old kernel.
I didn't rename any forlder and I didn't install kernel twise. Excuse me, but I don't understant what actions to reverse. Do I need to rename folder of old kernel? Before or after installing the kernel rpm?
Please help. The new kernel is very important because it enables DMA.

Thanks in advance.
Kamelia