# Compiling linux 2.0.x(40)?

## tecknojunky

When I type make menuconfig, I get this:

```
rm -f include/asm

( cd include ; ln -sf asm-i386 asm)

make -C scripts/lxdialog all

make[1]: Entering directory `/mnt/hdb/2/usr/src/linux-2.0.39/scripts/lxdialog'

gcc -O2 -Wall -fomit-frame-pointer -DLOCALE  -DCURSES_LOC="<ncurses.h>"   -c -o lxdialog.o lxdialog.c

lxdialog.c: Dans la fonction « main »:

lxdialog.c:126: error: affectation of read-only location

make[1]: *** [lxdialog.o] Erreur 1

make[1]: Leaving directory `/mnt/hdb/2/usr/src/linux-2.0.39/scripts/lxdialog'

make: *** [menuconfig] Erreur 2

```

EDIT:

I ssh with a GUI environment and have been able to use make xconfig.  I stumbled on another problem with make dep, for which I google a solution by using the mkdep.c from the 2.4 kernel.

Now, doing make bzImage will flop right at main.c

How the heck do you build an older kernel, I ask?

----------

## NeddySeagoon

tecknojunky,

linux-2.0.39 is history, why are you building that and what on?

----------

## treibholz

AFAIK is the recommended compiler for kernel 2.0.x gcc 2.72, but you should be able to read that in /usr/src/linux/README.

I think I once tried to compile a late 2.0.x on a Debian woody, where I could apt-get this second compiler, but I don't know whether it worked or not. I use 2.2 now on my 386sx16, which I can't compile with gcc 3.x, too. 2.4 doesn't want to boot with 5MB RAM. And 2.6 I don't even want to try  :Smile: 

But what do you want to do with his old kernel-tree? (I'm just interested.)

regards

Treibholz

----------

## rush_ad

old school linux. change your pc.

----------

## DaMouse

 *rush_ad wrote:*   

> old school linux. change your pc.

 

Why should he? if he likes it let him have it, you sound like a microsoft marketting salesman

-DaMouse

PS I might try it myself   :Twisted Evil: 

----------

## piffle

An archive of old gcc releases can be found here. (all the way back go gcc 1.2.1!) I personally never used anything older that 2.6.3 for anything real (back when I was an undergraduate).  On the other hand, not too long ago, for fun, I tried to see what the oldest version I could even just get to build was.  I don't remember how far back I got, but it was certainly older than 2.7.2 so you should be fine if that's what you need to get this kernel built.

I seem to remember building 2.0.x kernels (at the time) with a 2.8.x compiler but I could just be getting senile. . .

----------

## tecknojunky

 *NeddySeagoon wrote:*   

> tecknojunky,
> 
> linux-2.0.39 is history, why are you building that and what on?

 

I'm working on a single floppy project.  The project has been around for quite a while to the point where we lost a few of the sources for the banaries we haves.  

Anyhow, the current kernel used is the 2.0 series because it produces a small kernel.  I'm on a learning process.  I do have Slackware 3.9 in vmware and I could compile it with egcs that's on that system, but I would not learn anything.

Beside, I would also like to be able to use portage on uClibc (I know, I know, someone else is also working on this), and I'd like to know what's needed for all the kernels (>=2.0 that is).

But my primary aim, for now, is recreate the current projects component from sources and have a good framework for it, which Gentoo provides.

Thanks all for the help.

So far, I have emerged gcc-2.95 because since it was the oldest in the Portage tree, I thought it was sufficient to build the 2.0.40 kernel.  Oddly, the 2.0.40 ebuild obviously does not have good DEPENDS entries if gcc-2.7.2.3 is the highest gcc that compiles succesfully that kernel.  So I'm really wondering what is that kernel doing in Portage.

Further, it would seem there is also a limit on glibc.  I stumble on something, with Google, that mentionned that it would work with only libc5  :Sad: 

----------

## tecknojunky

 *piffle wrote:*   

> An archive of old gcc releases can be found here. (all the way back go gcc 1.2.1!)

 Thanks for that link.  There are also a version of gcc-2.7.2 on kernel.org's ftp.

 *piffle wrote:*   

> I don't remember how far back I got, but it was certainly older than 2.7.2 so you should be fine if that's what you need to get this kernel built.

 Is there any ebuilds for 2.7.2?

 *piffle wrote:*   

> I seem to remember building 2.0.x kernels (at the time) with a 2.8.x compiler but I could just be getting senile. . .

 I too saw a few stuffs on the net about that.  Many where old mailling list discussing about patches for the kernel to get it to build on gcc-2.8.  Weather those patches are still laying around and if they work is unclear for me at this point.

----------

## piffle

 *Quote:*   

> Is there any ebuilds for 2.7.2? 

 

Not that I am aware of.  You'll have to install 2.95 from an ebuild and then compile 2.8.x or 2.7.x by hand from that.  The old gcc's were a little harder to build, too.  I forget when you stopped having to create symlinks to arch-specific files by hand, and do the several stages separately, but it was somewhere around 2.7.x. Not impossible, just pay attention to the top level README or INSTALL file.

----------

## DaMouse

I used 2.4.x last time i tried a single floppy disk cause of its SATA support, what exactly do you need on it? busybox is good  :Smile: 

-DaMouse

----------

## tecknojunky

 *DaMouse wrote:*   

> what exactly do you need on it? busybox is good 

 Basically, everything that's currently inside the Freesco Router floppy.  The main goal is to obtain a framework and if it's based on Portage it would be the cherry on the sunday   :Cool: 

So far, I have succesfully build all the chaintools makefile from uClibc's buildroot and it's all against the 2.0.40 headers (i think)  :Confused:  Now I actually have to build the kernel.  Once I have the road maps for both of those, I will test this pseudo root filesystem on a couple of hardwares.  When everything works, I'd like to see and try what the Embedded Gentoo guys came up with.

----------

## DaMouse

I'll try and make 2.0.40 compile with gcc 3.4.x when i get back, i left it downloading before i went to school.

-DaMouse

----------

## DaMouse

After a little work on both 2.0.x and 2.2.x with gcc 3.4.x i think you'd probably be better with 2.4.x or an older gcc to be honest, its alot of work.

-DaMouse

----------

## piffle

Bah.  Don't let him discourage you.  Building older gcc's will be a little more work, but it's hardly like scaling a mountain.  The build system for 2.8.3 is fine, and maybe you can use that.  If not, 2.7.2 is only a little more involved.  I built it on SunOS and Solaris and HP-UX and AIX way back when; you just have to read and follow the instructions and you'll be fine.

----------

## DaMouse

Oh sorry, my bad typing, i was thinking about it at the same time as typing so i think it fluttered.. I meant that editing 2.0.x or 2.2.x is hard work and gcc 2.x would be easier  :Smile: 

-DaMouse

----------

## piffle

Oh yes, I'd certainly agree with that.  Getting 2.0.x to compile under gcc 3.4 would be a frustrating exercise, to say the least.

----------

## DaMouse

I tried, it is VERY frustrating... i'd advise everyone to move to 2.4.x or higher just to save themselves having to stab themselves in the eye repeatedly

-DaMouse

----------

## tecknojunky

 *DaMouse wrote:*   

> I tried, it is VERY frustrating... i'd advise everyone to move to 2.4.x or higher just to save themselves having to stab themselves in the eye repeatedly
> 
> -DaMouse

 2.4 kernels are too big for a single floppy system.

I started to toy with gcc 2.7.2 and it does seem to have a mind of it's own.  I have tried building it with gcc-2.95 but it is complaining.  But I did a quick try, just to see.  I haven't done any in-depth analysis of why and what it is complaining about

----------

## piffle

You may have to compile 2.8.1 with 2.95 and then 2.7.2 with 2.8.1.

----------

## tecknojunky

 *piffle wrote:*   

> You may have to compile 2.8.1 with 2.95 and then 2.7.2 with 2.8.1.

 Eeeechh!  :Confused:  It means I have to literaly roll back in time and ompile each version with the very next version, until I reach 2.7.2?  :Shocked:  This is going to take a long time  :Sad: 

----------

