Help - Search - Members - Calendar
Full Version: Compiling 2.0.38 Kernel
Linuxhelp > Support > Technical Support
Sidla
Hi,

I'm fairly new at this so I'm probably doing something stupid. I'm trying to compile a linux 2.0.38 kernel for use with an embedded distribution of Linux called ETLinux. For some reason I can't get it to work. Here is what I've tried to do:

1. Extracted the source files
2. Entered the 'linux' directory
3. make mrproper
4. make menuconfig (I also tried 'make xconfig' and 'make config' but it made no difference)
5. make dep
6. make zImage (Tried 'make bzImage' too)

Now according to my reference book (Linux Complete), there should be a file called zImage in the 'arch/i386/boot' directory. However, after many attempts this file fails to appear. What am I doing wrong?

Thanks in advance,
Sid.
Termina
May I ask why you're using 2.0.38 instead of, say 2.4.25?

(Curious)
chrisw
you didnt happen to notice the "embedded" part of his question?

what kind of errors are you getting? can you post them here...we can take a look at them....for looking at the steps you have done...i believe you missed a few..thats why you are running into trouble.
Termina
No idea what that means, thus my "curious" statement.

I did not mean to say that that was what was wrong, I was honestly curious as to what 2.0.x was.
chrisw
its the 2.0.x version of kernels...they are smaller than the ones now so they are usually used for embedded systems...like using linux on pdas.....controllers for appliances....etc......everything has to fit on such a small device or use very low memory/space.....no problem...sure you didnt know.....
Termina
That was 36 .'s

wink.gif

Oh, cool, thanks. =-)
Sidla
QUOTE (chrisw @ Mar 31 2004, 03:01 PM)
what kind of errors are you getting? can you post them here...we can take a look at them....for looking at the steps you have done...i believe you missed a few..thats why you are running into trouble.

Can't answer this straight away because the machine I'm working on is locked away in my office. I'll take a look tomorrow and get back to you. I have to say that I didn't notice any significant error messages though.

What steps do you think I've missed anyway? According to my reference book and the ETLinux documentation I've done all that is required.

Thanks for the feedback though, I'll return with any error that I notice tomorrow, no matter how insignificant they may seem.
hughesjr
Did you have any errors with the make zImage command ... or did it complete properly?
Sidla
I'm assuming it didn't complete properly, otherwise my kernel would be there, but since I've never tried to do this before I don't know what normally happens.

After I type 'make zImage' it reels off a load of text, then finishes by throwing a load of:
CODE
init/main.c:xxx:8:Warning: extra tokens at end of #endif directive"

Then it finishes with:
CODE
make: ***[init/main.o] Error 1
Robert83
Hi,

I think this works also for you're ETLinux

1.cd /usr/src/linux-your_kernel_version_which_you_want_to_compile/
2.make mrproper
3.cd /boot
4.cp config-your_current_kernel_version /usr/src/linux-your_kernel_version_which_you_want_to_compile/.config
5.cd /usr/src/linux-your_kernel_version_which_you_want_to_compile/
6.modify you're make file [so that it does not contain that 'custom' after the kernel ver [for example 9.0.1Custom , make it only 9.0.1 , this IS ONLY EXAMPLE].
7.make oldconfig
8.make dep
9.make bzImage
10.make modules
11.make modules install
12.cp /i386/boot/bzImage /boot/vmlinuz-your_new_kernel_version_here
13.cp System.map /boot/System.map-your_new_kernel_version_here

14. I think you'll need to modify you're grub menu.lst file
CODE
title New Linux Kernel (2.0.38)
    root (hd0,0)
    kernel /vmlinuz-2.0.38 ro root=LABEL=/
    initrd /initrd-2.0.38.img
title Old Linux Kernel (version)
    root (hd0,0)
    kernel /vmlinuz-(version) ro root=LABEL=/
    initrd /initrd-(version).img


I think this should work for you to, it works for me on whitebox, fedora, red hat .
You can overwrite the old kernel System.map and vmlinuz files but I DON'T RECCOMEND IT, since if you did something wrong, you're system may not boot up at all...

Sincerely
Robert B
hughesjr
OK ... it is definately bombing out during the make zImage stage....

What Linux OS are you trying to build the new kernel on?
Sidla
Cheers for the suggestion Robert, I tried it but it didn't work. sad.gif

Dunno if it's definately bombing out during the make zImage stage, how can I tell?

I'm on Mandrake Linux.
Robert83
Hi,

what linux os are you using to build the kernel?

Sincerely
Robert B
Sidla
QUOTE (Robert83 @ Apr 1 2004, 03:05 PM)
Hi,

what linux os are you using to build the kernel?

Sincerely
Robert B

I'm on Mandrake, not certain of the version but it's a recent release.

Also, I don't know if this has any significance, but 'make menuconfig' doesn't work, only 'make config' or 'make xconfig' appear to work properly.
Robert83
Hi,

If your using Mandrak 10 Comunity,...than it might be the cause of that make bzImage thing...it's still not final.



Could you try compiling on some other linux distros? like Whitebox, or Red Hat, Fedora?

or what if If you give me the link to the kernel...and I'll try compiling it for you, and if it works...I'll send it to you in a e-mail smile.gif ? what do you say?

Sincerely
Robert B
Robert83
Hi,

also please send me your config file for your kernel, this way I won't have to go on that config again...

Sincerely
Robert B
Sidla
Mandrake is the only disro I have available at the mo, and I don't have enough time to download a different distro and install it.

The 2.0.38 kernel can be found here: ftp://ftp.kernel.org/pub/linux/kernel/v2....x-2.0.38.tar.gz

I don't have my config file with me, if you really need it then I'll send it to you tomorrow. I have been accepting all the default configuration options.

If you manage to get something working I will PM you my email address for you to send it to.

Cheers biggrin.gif
hughesjr
I tried to compile the 2.0.38 kernel with all my distros and I can't (I tried with gcc 2.9.6, gcc 3.2.3 and gcc 3.3.2). I will see if I can get an older linux version to install and see if I can compile it...
Robert83
Hi,

me to, Fedora , Whitebox no Chance,...I was reading a little bit about this problem, and found out that it's because of the assamebler, ...you would need an older asm to be succesfull, I've just installed my oldest distro , Red Hat 8 ...well I wonder what will happen.

No luck with Red Hat 8 either, I'm sorry but I'm not able to do this kernel compiling , since I don't have any older distros then Red Hat 8.2....never thought that a distro with a 2.0.x kernel would be very useful now.


Sincerly
Robert B
Sidla
You're joking?? sad.gif

Which idiot didn't think about the backward compatability when they designed newer kernels? mad.gif

Do you know what the problem is specificaly? Is it to do with the gcc compiler?
hughesjr
Basically what you need to compile that version of the kernel is a distro with the glibc, gcc, and make from 1998-1999. (gcc of 2.7.2 or 2.6.8).

It's not a matter of someone being an idoit, It's a matter of changing hardware ... windows 3.1 won't install newer PCs and Windows XP won't install on 386 machines ... because the hardware is different. On newer machines, you need newer kernel drivers and newer compilers ... things compiled with gcc 2.7.2 using a glibc from 1998 won't run on a machine with a glibc from 2004 .... just like software compiled for Windows XP won't run on Windows 3.1.

I have a version of redhat 5.2 for x86, but I can't get it to install on any of my current hardware (the kernel panics on bootup). I have an Old server at work (dual pentium pro 200) that I might be able to install the redhat 5.2 on. If I can, I will try to get the kernel (with the patches from ETLinux).
hughesjr
What embeded device are you trying to compile the kernel for ... what is the processor and speed?
Sidla
It will basically be a crappy old PC, with the processor underclocked so it uses as small amount of power as possible. The hardware will be minimal, all I'm really interested in is just a serial port, hard drive (which may be replaced by some flash memory if I manage to get it working ok) and obviously some memory which will be kept as low as possible.

The PC I'm working on is a host PC, to enable me to compile my kernel and trasfer everything to the target device.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.