Newsgroup: it.comp.os.linux.sys
Titolo: errore ricompilazione kernel(lunghino..)

Ciao a tutti.
Non avendo niente di meglio da fare, ho pensato di rifarmi il floppy di
avvio, considerando anche l'affidabilità che hanno 'sti cosi.
Dunque: 
cd /usr/src/linux
make dep clean bzdisk
Questo senza aver modificato nulla dall'ultima ricompilazione.
Ad un certo punto....
--snip--
make[1]: Entering directory `/usr/src/linux-2.2.13.SuSE/mm'
make all_targets
make[2]: Entering directory `/usr/src/linux-2.2.13.SuSE/mm'
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2
-fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce
-m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686   -c
-o bigmem.o bigmem.c
bigmem.c:13: parse error before `0'
bigmem.c:15: parse error before `struct'
bigmem.c:25: warning: type defaults to `int' in declaration of
`regular_page'
bigmem.c:25: initializer element is not constant
bigmem.c:25: warning: data definition has no type or storage class
bigmem.c:26: parse error before `if'
bigmem.c:29: warning: type defaults to `int' in declaration of `vaddr'
bigmem.c:29: conflicting types for `vaddr'
bigmem.c:23: previous declaration of `vaddr'
bigmem.c:29: `page' undeclared here (not in a function)
bigmem.c:29: initializer element is not constant
bigmem.c:29: warning: data definition has no type or storage class
bigmem.c:30: parse error before `('
bigmem.c:35: parse error before `('
bigmem.c:35: warning: type defaults to `int' in declaration of
`__free_pages'
bigmem.c:35: warning: function declaration isn't a prototype
bigmem.c:35: conflicting types for `__free_pages'
/usr/src/linux/include/linux/mm.h:285: previous declaration of
`__free_pages'
bigmem.c:37: warning: type defaults to `int' in declaration of `page'
bigmem.c:37: warning: initialization makes integer from pointer without
a cast
bigmem.c:37: initializer element is not constant
bigmem.c:37: warning: data definition has no type or storage class
bigmem.c:38: parse error before `}'
bigmem.c:42: parse error before `struct'
bigmem.c:48: warning: type defaults to `int' in declaration of `kaddr'
bigmem.c:48: initializer element is not constant
bigmem.c:48: warning: data definition has no type or storage class
bigmem.c:49: parse error before `if'
bigmem.c:53: warning: type defaults to `int' in declaration of
`bigmem_page'
bigmem.c:53: warning: initialization makes integer from pointer without
a cast
bigmem.c:53: initializer element is not constant
bigmem.c:53: warning: data definition has no type or storage class
bigmem.c:54: parse error before `if'
bigmem.c:58: warning: type defaults to `int' in declaration of `vaddr'
bigmem.c:58: redefinition of `vaddr'
bigmem.c:29: `vaddr' previously defined here
bigmem.c:58: initializer element is not constant
bigmem.c:58: warning: data definition has no type or storage class
bigmem.c:59: parse error before `('
bigmem.c:68: parse error before `('
bigmem.c:68: warning: type defaults to `int' in declaration of
`__free_pages'
bigmem.c:68: warning: function declaration isn't a prototype
bigmem.c:70: warning: type defaults to `int' in declaration of `page'
bigmem.c:70: redefinition of `page'
bigmem.c:37: `page' previously defined here
bigmem.c:70: initializer element is not constant
bigmem.c:70: warning: data definition has no type or storage class
bigmem.c:71: parse error before `}'
bigmem.c:78: syntax error before `{'
bigmem.c:82: parse error before `('
bigmem.c:82: warning: type defaults to `int' in declaration of
`free_pages'
bigmem.c:82: warning: function declaration isn't a prototype
bigmem.c:82: conflicting types for `free_pages'
/usr/src/linux/include/linux/mm.h:283: previous declaration of
`free_pages'
make[2]: *** [bigmem.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.2.13.SuSE/mm'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/usr/src/linux-2.2.13.SuSE/mm'
make: *** [_dir_mm] Error 2
Ho provato 3 volte ma sempre con lo stesso errore e ribadisco che ho già
ricompilato il kernel (questo..) diverse volte e non ho mai avuto
problemi.
Disabilitando il supporto "bigmemory", la ricompilazione si è conclusa
con successo ma non capisco il perchè dell'errore.
Visto che l'errore dovrebbe (almeno credo..) stare in bigmem.c, eccolo..
/*
 * BIGMEM common code and variables.
 *
 * (C) 1999 Andrea Arcangeli, SuSE GmbH, 
and...@suse.de
 *          Gerhard Wichert, Siemens AG, 
Gerhard...@pdb.siemens.de
 */
#include <linux/mm.h>
#include <linux/pagemap.h>
#include <linux/bigmem.h>
unsigned long bigmem_mapnr;
int nr_free_bigpages = 0;
struct page * prepare_bigmem_swapout(struct page * page)
{
	/* if this is a bigmem page so it can't be swapped out directly
	   otherwise the b_data buffer addresses will break
	   the lowlevel device drivers. */
	if (PageBIGMEM(page))
	{
		unsigned long regular_page;
		unsigned long vaddr;
		regular_page = __get_free_page(GFP_ATOMIC);
		if (!regular_page)
			return NULL;
		vaddr = kmap(page_address(page), KM_READ);
		copy_page(regular_page, vaddr);
		kunmap(vaddr, KM_READ);
		/* ok, we can just forget about our bigmem page since 
		   we stored its data into the new regular_page. */
		__free_page(page);
		page = MAP_NR(regular_page) + mem_map;
	}
	return page;
}
struct page * replace_with_bigmem(struct page * page)
{
	if (!PageBIGMEM(page) && nr_free_bigpages)
	{
		unsigned long kaddr;
		kaddr = __get_free_page(GFP_ATOMIC|GFP_BIGMEM);
		if (kaddr)
		{
			struct page * bigmem_page;
			bigmem_page = MAP_NR(kaddr) + mem_map;
			if (PageBIGMEM(bigmem_page))
			{
				unsigned long vaddr;
				vaddr = kmap(kaddr, KM_WRITE);
				copy_page(vaddr, page_address(page));
				kunmap(vaddr, KM_WRITE);
				/* Preserve the caching of the swap_entry. */
				bigmem_page->offset = page->offset;
				/* We can just forget the old page since 
				   we stored its data into the new
				   bigmem_page. */
				__free_page(page);
				page = bigmem_page;
			}
		}
	}
	return page;
}
unsigned long prepare_bigmem_shm_swapin(unsigned long page)
{
	if (!PageBIGMEM(&mem_map[MAP_NR(page)]))
		return page;
	free_page(page);
	/* no need to clear the page since it will be rewrited by the
	   swapin. */
	return __get_free_page(GFP_ATOMIC);
}
Grazie a chi mi risponderà.
Ciao.
-- 
*** Per E-mail rimuovi ModE dall'indirizzo ***
             *** ICQ 33500725 ***
           *** Powered by Linux ***

con successo ma non capisco il perchè dell'errore.
Perche` usi bigmem? Hai 4Gb di memoria?
-- 
Lorenzo
"Given enough eyeballs, all bugs are shallow", Linus'Law
(per rispondere via email fai un rot13 dell'indirizzo)
(apply a rot13 to reply)