Newsgroup: it.comp.os.linux.iniziare
Titolo: kernel [lungo per esperti]

Anzitutto grazie davvero a quelli che mi risponderanno per l'ennesima volta
perchè adesso è un po' che stufo la gente su questo NG...
Seguendo quello che mi è stato detto e quello che ho trovato sugli how to
del kernel ho riprovato a ricompilare il mio kernel partendo dai sorgenti
che ho trovato su 
www.kernel.org
 (linux-2.4.18.tar.gz 30Mb circa), solo che:
Mi loggo come root:
- Dopo aver lanciato tar zxf linux-2.4.18.tar.gz ho questo errore (dopo un
momento in cui vengo scopattati i files)
 linux/drivers/net/tokenring/smctr.h
 linux/drivers/net/tokenring/smctr_firmware.h
 linux/drivers/net/tokenring/tmspci.c
 linux/drivers/net/tokenring/abyss.h
 linux/drivers/net/tokenring/madgemc.c
 tar: Skipping to next header
 tar: Archive contains obsolescent base-64 headers
 gzip: stdin: invalid compressed data--format violated
 tar: Child returned status 1
 tar: Error exit delayed from previous errors
Mi fate capire per favore da cosa dipende? Eppure anche da kunqueror riesco
a entrare nel file e vederne il contenuto...
Inoltre come mai lanciando il comando "tar zxf linux-2.4.18.tar.gz" è
abbastanza veloce mentre da konqueror se copio/incollo ci tiene una vita?
- Faccio partire make clean ma restituisce
[root@localhost src]# cd linux
[root@localhost linux]# make clean
Makefile:244: arch/i386/Makefile: No such file or directory
make: *** No rule to make target `arch/i386/Makefile'.  Stop.
 -
Mi accorgo che inoltre manca la cartella ducumentation e alcune altre che
invece nella directory /usr/src/linux-2.4.18-3 ci sono (è la directory dove
c'è il kernel che viene compilato all'installazione
Quindi mi viene l'idea (malsana?)di copiare la vecchia cartella
linux-2.4.18-3 (127 Mb di roba) in /usr/src/linux , scompattare di nuovo i
sorgenti in modo che tutto quello
 che manca nei sorgenti venga completato:
 * make clean  funziona
 * make xconfig  funziona
 * make dep   funziona
 * make   NON funziona e restituisce (dopo un po che è tutto OK)
make[3]: Entering directory `/usr/src/linux/drivers/block'
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -Wno-tri
graphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpre
ferred-stack-boundary=2 -march=i686 -malign-functions=4    -DKBUILD_BASENAME
=ll_rw_blk  -DEXPORT_SYMTAB -c ll_rw_blk.c
ll_rw_blk.c: In function `blk_queue_bounce_limit':
ll_rw_blk.c:283: `BLK_BOUNCE_HIGH' undeclared (first use in this function)
ll_rw_blk.c:283: (Each undeclared identifier is reported only once
ll_rw_blk.c:283: for each function it appears in.)
ll_rw_blk.c:286: `BLK_BOUNCE_ANY' undeclared (first use in this function)
ll_rw_blk.c:292: structure has no member named `bounce_pfn'
ll_rw_blk.c: In function `blk_seg_merge_ok':
ll_rw_blk.c:302: warning: implicit declaration of function `BH_CONTIG'
ll_rw_blk.c:305: warning: implicit declaration of function `BH_PHYS_4G'
ll_rw_blk.c: In function `blk_init_free_list':
ll_rw_blk.c:421: structure has no member named `wait_for_requests'
ll_rw_blk.c:422: structure has no member named `wait_for_requests'
ll_rw_blk.c: In function `blk_init_queue':
ll_rw_blk.c:464: incompatible types in assignment
ll_rw_blk.c:484: `BLK_BOUNCE_HIGH' undeclared (first use in this function)
ll_rw_blk.c: In function `get_request':
ll_rw_blk.c:497: warning: implicit declaration of function `blkdev_free_rq'
ll_rw_blk.c:497: warning: assignment makes pointer from integer without a
cast
ll_rw_blk.c: In function `__get_request_wait':
ll_rw_blk.c:574: structure has no member named `wait_for_requests'
ll_rw_blk.c:583: structure has no member named `wait_for_requests'
ll_rw_blk.c: In function `disk_round_stats':
ll_rw_blk.c:671: structure has no member named `aveq'
ll_rw_blk.c:671: structure has no member named `ios_in_flight'
ll_rw_blk.c:671: structure has no member named `last_queue_change'
ll_rw_blk.c:672: structure has no member named `last_queue_change'
ll_rw_blk.c:674: structure has no member named `ios_in_flight'
ll_rw_blk.c:675: structure has no member named `io_ticks'
ll_rw_blk.c:675: structure has no member named `last_idle_time'
ll_rw_blk.c:676: structure has no member named `last_idle_time'
ll_rw_blk.c: In function `down_ios':
ll_rw_blk.c:683: structure has no member named `ios_in_flight'
ll_rw_blk.c: In function `up_ios':
ll_rw_blk.c:689: structure has no member named `ios_in_flight'
ll_rw_blk.c: In function `account_io_start':
ll_rw_blk.c:698: structure has no member named `rd_merges'
ll_rw_blk.c:699: structure has no member named `rd_sectors'
ll_rw_blk.c:703: structure has no member named `wr_merges'
ll_rw_blk.c:704: structure has no member named `wr_sectors'
ll_rw_blk.c: In function `account_io_end':
ll_rw_blk.c:714: structure has no member named `start_time'
ll_rw_blk.c:717: structure has no member named `rd_ticks'
ll_rw_blk.c:718: structure has no member named `rd_ios'
ll_rw_blk.c:721: structure has no member named `wr_ticks'
ll_rw_blk.c:722: structure has no member named `wr_ios'
ll_rw_blk.c: In function `blkdev_release_request':
ll_rw_blk.c:792: structure has no member named `wait_for_requests'
ll_rw_blk.c:793: structure has no member named `wait_for_requests'
ll_rw_blk.c: In function `__make_request':
ll_rw_blk.c:906: warning: implicit declaration of function
`blk_queue_bounce'
ll_rw_blk.c:906: warning: assignment makes pointer from integer without a
cast
ll_rw_blk.c:962: structure has no member named `hard_cur_sectors'
ll_rw_blk.c:1021: structure has no member named `hard_cur_sectors'
ll_rw_blk.c:1029: structure has no member named `start_time'
ll_rw_blk.c: In function `end_that_request_first':
ll_rw_blk.c:1360: structure has no member named `hard_cur_sectors'
ll_rw_blk.c: In function `blk_dev_init':
ll_rw_blk.c:1421: `max_pfn' undeclared (first use in this function)
make[3]: *** [ll_rw_blk.o] Error 1
make[3]: Leaving directory `/usr/src/linux/drivers/block'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux/drivers/block'
make[1]: *** [_subdir_block] Error 2
make[1]: Leaving directory `/usr/src/linux/drivers'
make: *** [_dir_drivers] Error 2
Tanto per vedere cosa succede faccio anche il passo successivo
 * make bzImage strano caso NON funziona e restituisce un errore simile
all'altro
 make[3]: Entering directory `/usr/src/linux/drivers/block'
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -Wno-tri
graphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpre
ferred-stack-boundary=2 -march=i686 -malign-functions=4    -DKBUILD_BASENAME
=ll_rw_blk  -DEXPORT_SYMTAB -c ll_rw_blk.c
ll_rw_blk.c: In function `blk_queue_bounce_limit':
ll_rw_blk.c:283: `BLK_BOUNCE_HIGH' undeclared (first use in this function)
ll_rw_blk.c:283: (Each undeclared identifier is reported only once
ll_rw_blk.c:283: for each function it appears in.)
ll_rw_blk.c:286: `BLK_BOUNCE_ANY' undeclared (first use in this function)
ll_rw_blk.c:292: structure has no member named `bounce_pfn'
ll_rw_blk.c: In function `blk_seg_merge_ok':
ll_rw_blk.c:302: warning: implicit declaration of function `BH_CONTIG'
ll_rw_blk.c:305: warning: implicit declaration of function `BH_PHYS_4G'
ll_rw_blk.c: In function `blk_init_free_list':
ll_rw_blk.c:421: structure has no member named `wait_for_requests'
ll_rw_blk.c:422: structure has no member named `wait_for_requests'
ll_rw_blk.c: In function `blk_init_queue':
ll_rw_blk.c:464: incompatible types in assignment
ll_rw_blk.c:484: `BLK_BOUNCE_HIGH' undeclared (first use in this function)
ll_rw_blk.c: In function `get_request':
ll_rw_blk.c:497: warning: implicit declaration of function `blkdev_free_rq'
ll_rw_blk.c:497: warning: assignment makes pointer from integer without a
cast
ll_rw_blk.c: In function `__get_request_wait':
ll_rw_blk.c:574: structure has no member named `wait_for_requests'
ll_rw_blk.c:583: structure has no member named `wait_for_requests'
ll_rw_blk.c: In function `disk_round_stats':
ll_rw_blk.c:671: structure has no member named `aveq'
ll_rw_blk.c:671: structure has no member named `ios_in_flight'
ll_rw_blk.c:671: structure has no member named `last_queue_change'
ll_rw_blk.c:672: structure has no member named `last_queue_change'
ll_rw_blk.c:674: structure has no member named `ios_in_flight'
ll_rw_blk.c:675: structure has no member named `io_ticks'
ll_rw_blk.c:675: structure has no member named `last_idle_time'
ll_rw_blk.c:676: structure has no member named `last_idle_time'
ll_rw_blk.c: In function `down_ios':
ll_rw_blk.c:683: structure has no member named `ios_in_flight'
ll_rw_blk.c: In function `up_ios':
ll_rw_blk.c:689: structure has no member named `ios_in_flight'
ll_rw_blk.c: In function `account_io_start':
ll_rw_blk.c:698: structure has no member named `rd_merges'
ll_rw_blk.c:699: structure has no member named `rd_sectors'
ll_rw_blk.c:703: structure has no member named `wr_merges'
ll_rw_blk.c:704: structure has no member named `wr_sectors'
ll_rw_blk.c: In function `account_io_end':
ll_rw_blk.c:714: structure has no member named `start_time'
ll_rw_blk.c:717: structure has no member named `rd_ticks'
ll_rw_blk.c:718: structure has no member named `rd_ios'
ll_rw_blk.c:721: structure has no member named `wr_ticks'
ll_rw_blk.c:722: structure has no member named `wr_ios'
ll_rw_blk.c: In function `blkdev_release_request':
ll_rw_blk.c:792: structure has no member named `wait_for_requests'
ll_rw_blk.c:793: structure has no member named `wait_for_requests'
ll_rw_blk.c: In function `__make_request':
ll_rw_blk.c:906: warning: implicit declaration of function
`blk_queue_bounce'
ll_rw_blk.c:906: warning: assignment makes pointer from integer without a
cast
ll_rw_blk.c:962: structure has no member named `hard_cur_sectors'
ll_rw_blk.c:1021: structure has no member named `hard_cur_sectors'
ll_rw_blk.c:1029: structure has no member named `start_time'
ll_rw_blk.c: In function `end_that_request_first':
ll_rw_blk.c:1360: structure has no member named `hard_cur_sectors'
ll_rw_blk.c: In function `blk_dev_init':
ll_rw_blk.c:1421: `max_pfn' undeclared (first use in this function)
make[3]: *** [ll_rw_blk.o] Error 1
make[3]: Leaving directory `/usr/src/linux/drivers/block'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux/drivers/block'
make[1]: *** [_subdir_block] Error 2
make[1]: Leaving directory `/usr/src/linux/drivers'
make: *** [_dir_drivers] Error 2
leggendo su 
www.linuxnewbie.org/nhf/intel/compiling/kernel2.4upgrade.html
 ho
trovato questo passaggio:
         3. I unpacked the tarball with the following command:
         'tar xvzf linux-2.4.0.tar.gz'
         4. That resulted in a new directory in /root called 'linux'. I cd'd
into there and ran:
         'make mrproper'
         This is per the instructions in the README that came with the
kernel.
         5. I downloaded an updated gcc from
http://www.redhat.com/support/errata/RHBA-2000-132.html
. This appears to be
newer than what the README             recommended. The file
'gcc-2.96-69.i386.rpm' appeared in /root. I installed it as per the
instructions on the URL above where I downloaded gcc from.
         'rpm -Fvh gcc-2.96-69.i386.rpm'
         6. I verified the installation took effect:
         'gcc --version'
         7. Next, I went to 
http://www.kernel.org
 and grabbed util-linux
2.10o, as recommended in the Changes file (I had 2.10m). I installed it
         './configure'
          'make'
          'make install'
         all seemed to go well. I verified my version was 2.10o
         'fdformat --version'
         8. I also downloaded modutils-2.4.0, which was in rpm format at
kernel.org
. I downloaded and installed it:
         'rpm -Fvh modutils-2.4.0.i386.rpm'
         and verified the version:
         'insmod -V' <---this output looks like default 'USAGE' output, but
the first line of all this is the version.
         9. I did the same for 'ksymoops-2.4.0-1.i386.rpm' and
'e2fsprogs-1.19-0.i386.rpm'. ksymoops did not upgrade using the rpm -Fvh
procedure. I did rpm -            ivh and it said 'conflicts with file from
package kernel-utils-2.2.16-22'. I skipped it and moved on. Hope it works :)
         10. Had to go to
ftp://rawhide.redhat.com/pub/rawhide/i386/RedHat/RPMS/
 to get the updated
'mkinitrd' recommended in the 'CHANGES' file.
Downloaded the rpm and did:
         'rpm -Fvh mkinitrd-2.9-1.i386.rpm'
         verified the version after upgrading - all's well.
Tutta roba che io non ho fatto...probabilmente non è questo il mio problema
attuale perchè mi si incasina prima pero' è meglio saperlo subito che la
prossima volta non sbaglio almeno..
che c***o c'è (o NON c'è) nella directory /drivers/block che combina casino?
da dove posso scaricarmi tutte le directory che mancano (/documentation e
/arch tra le altre)?
ho per caso dimenticato qualche passo essenziale e non me ne sono reso
conto?
Devo scaricare qualche aggiornamento di qualche applicazione che in red hat
7.3 (ho installato quasi tutto) non c'è?
So di essere una paranoia ma sono fatto cosi' :-)
Tra un po lascio perdere perchè sto buttando una cifra di tempo nel cesso...
Grazie ancora.
Gufo

7.3 (ho installato quasi tutto) non c'č?
Non direi, dato che la RedHat 7.3 usa gia` di suo un kernel 2.4 :)
--
Ikitt