Messages in this thread Patch in this message |  | | Subject | Re: Very old kernel. | From | cpg@aladdin ... | Date | Tue, 16 Oct 2001 13:08:25 +0200 |
| |
On 10/16/2001 03:39:06 AM MST Kirill Ratkin wrote: > >Hi. Do anybody know how to compile old kernel? (I need >to compile 2.0.35 verion). I make config and make dep, >when I do it I see error (during make dep). I found >this problem as bus error in mkdep binary. I tried to >take config scripts from 2.4.x kernel and it's ok but >when I tried to compile I saw many error connected >with asm statement and function type prefixes (like >__constant_memcopy). I wouldn't like to install old >gcc and old binutils. Are there ways to compile old >kernel with new dev. tools? > >Regards,
I did the following change to mkdep.c of the 2.0.39 kernel to compile it. It's some time ago, it was a problem with mmap, iirc.
regards, chris
--- mkdep.c.org Tue Oct 8 18:33:56 1996 +++ mkdep.c Wed Feb 7 15:24:36 2001 @@ -229,6 +229,8 @@ int pagesizem1 = getpagesize()-1; int fd = open(filename, O_RDONLY); struct stat st; +// printf("pagesize: %d\n",pagesizem1); +// exit (1);
if (fd < 0) { perror("mkdep: open"); @@ -236,6 +238,7 @@ } fstat(fd, &st); mapsize = st.st_size + 2*sizeof(unsigned long); +#if 0 mapsize = (mapsize+pagesizem1) & ~pagesizem1; map = mmap(NULL, mapsize, PROT_READ, MAP_PRIVATE, fd, 0); if (-1 == (long)map) { @@ -243,9 +246,20 @@ close(fd); return; } - close(fd); state_machine(map); munmap(map, mapsize); +#else + map = malloc(mapsize); + if (! map) { + perror("mkdep: malloc"); + close(fd); + return; + } + read (fd,map,st.st_size); + state_machine(map); + free(map); +#endif + close(fd); if (hasdep) puts(command); } @@ -254,6 +268,7 @@ { int len; char * hpath; +return(0);
hpath = getenv("HPATH"); if (!hpath)
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |