OVH Cloud OVH Cloud

Problème de compilation de kernel

5 réponses
Avatar
Nicolas DEFFAYET
Bonjour,

Je n'arrive pas à compiler un kernel sur un serveur Linux Redhat 7.1.

ld -m elf_i386 -T /usr/src/linux-2.4.22/arch/i386/vmlinux.lds -e stext
arch/i386
/kernel/head.o arch/i386/kernel/init_task.o init/main.o init/version.o
init/do_m
ounts.o \
        --start-group \
        arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o
mm/mm.o fs/f
s.o ipc/ipc.o \
         drivers/char/char.o drivers/block/block.o drivers/misc/misc.o
drivers/n
et/net.o drivers/ide/idedriver.o drivers/cdrom/driver.o
drivers/pci/driver.o dri
vers/video/video.o drivers/media/media.o crypto/crypto.o \
        net/network.o \
        grsecurity/grsec.o \
        /usr/src/linux-2.4.22/arch/i386/lib/lib.a
/usr/src/linux-2.4.22/lib/lib.
a /usr/src/linux-2.4.22/arch/i386/lib/lib.a \
        --end-group \
        -o vmlinux
nm vmlinux | grep -v '\(compiled\)\|\(\.o$\)\|\( [aUw]
\)\|\(\.\.ng$\)\|\(LASH[R
L]DI\)' | sort > System.map
make[1]: Entering directory `/usr/src/linux-2.4.22/arch/i386/boot'
gcc -E -D__KERNEL__ -I/usr/src/linux-2.4.22/include -D__BIG_KERNEL__
-traditiona
l -DSVGA_MODE=NORMAL_VGA  bootsect.S -o bbootsect.s
as -o bbootsect.o bbootsect.s
bbootsect.s: Assembler messages:
bbootsect.s:257: Warning: indirect lcall without `*'
ld -m elf_i386 -Ttext 0x0 -s --oformat binary bbootsect.o -o bbootsect
gcc -E -D__KERNEL__ -I/usr/src/linux-2.4.22/include -D__BIG_KERNEL__
-D__ASSEMBL
Y__ -traditional -DSVGA_MODE=NORMAL_VGA  setup.S -o bsetup.s
as -o bsetup.o bsetup.s
bsetup.s: Assembler messages:
bsetup.s:1458: Warning: indirect lcall without `*'
ld -m elf_i386 -Ttext 0x0 -s --oformat binary -e begtext -o bsetup
bsetup.o
make[2]: Entering directory
`/usr/src/linux-2.4.22/arch/i386/boot/compressed'
tmppiggy=_tmp_$$piggy; \
rm -f $tmppiggy $tmppiggy.gz $tmppiggy.lnk; \
objcopy -O binary -R .note -R .comment -S /usr/src/linux-2.4.22/vmlinux
$tmppigg
y; \
gzip -f -9 < $tmppiggy > $tmppiggy.gz; \
echo "SECTIONS { .data : { input_len = .; LONG(input_data_end -
input_data) inpu
t_data = .; *(.data) input_data_end = .; }}" > $tmppiggy.lnk; \
ld -m elf_i386 -r -o piggy.o -b binary $tmppiggy.gz -b elf32-i386 -T
$tmppiggy.l
nk; \
rm -f $tmppiggy $tmppiggy.gz $tmppiggy.lnk
BFD: Warning: Writing section `.text.startup' to huge (ie negative) file
offset
0xc0100000.
BFD: Warning: Writing section `.data' to huge (ie negative) file offset
0xc01000
20.
BFD: Warning: Writing section `.data.cacheline_aligned' to huge (ie
negative) fi
le offset 0xc0115fe0.
BFD: Warning: Writing section `.data.init_task' to huge (ie negative)
file offse
t 0xc0118000.
BFD: Warning: Writing section `.data.page_aligned' to huge (ie negative)
file of
fset 0xc011a000.
BFD: Warning: Writing section `.bss' to huge (ie negative) file offset
0xc011b00
0.
BFD: Warning: Writing section `.data.init' to huge (ie negative) file
offset 0xc
0147000.
BFD: Warning: Writing section `.setup.init' to huge (ie negative) file
offset 0x
c01772a0.
BFD: Warning: Writing section `.initcall.init' to huge (ie negative)
file offset
 0xc01773b8.
BFD: Warning: Writing section `.text.init' to huge (ie negative) file
offset 0xc
0177530.
BFD: Warning: Writing section `.rodata.page_aligned' to huge (ie
negative) file
offset 0xc0564000.
BFD: Warning: Writing section `.rodata' to huge (ie negative) file
offset 0xc056                                            5800.
BFD: Warning: Writing section `__ex_table' to huge (ie negative) file
offset 0xc                                            05adda0.
objcopy: _tmp_20948piggy: File truncated
gcc -D__ASSEMBLY__ -D__KERNEL__ -I/usr/src/linux-2.4.22/include
-traditional -c                                             head.S
gcc -D__KERNEL__ -I/usr/src/linux-2.4.22/include -Wall
-Wstrict-prototypes -Wno-                                           
trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer
-pipe -mpref                                           
erred-stack-boundary=2 -march=i686 -DKBUILD_BASENAME=misc -c misc.c
ld -m elf_i386 -Ttext 0x100000 -e startup_32 -o bvmlinux head.o misc.o
piggy.o
make[2]: Leaving directory
`/usr/src/linux-2.4.22/arch/i386/boot/compressed'
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o tools/build
tools/buil                                            d.c
-I/usr/src/linux-2.4.22/include
objcopy -O binary -R .note -R .comment -S compressed/bvmlinux
compressed/bvmlinu                                            x.out
tools/build -b bbootsect bsetup compressed/bvmlinux.out CURRENT >
bzImage
Root device is (3, 1)
Boot sector 512 bytes.
Setup is 2540 bytes.
System is 13 kB
make[1]: Leaving directory `/usr/src/linux-2.4.22/arch/i386/boot

J'ai mit à jour binutils mais c'est toujours pareil.

Avez-vous une idée d'ou peut venir le problème ?

--
Nicolas DEFFAYET
NDSoftware IP Network: http://www.ip.ndsoftware.net/

5 réponses

Avatar
Sebastien Bricout
On Wed, 08 Oct 2003 23:23:03 +0200, Nicolas DEFFAYET
wrote:

Root device is (3, 1)
Boot sector 512 bytes.
Setup is 2540 bytes.
System is 13 kB
make[1]: Leaving directory `/usr/src/linux-2.4.22/arch/i386/boot


Ben ça semble OK non?

--
Sebastien Bricout

Placez votre main sur un poêle une minute et ça vous semble durer une
heure. Asseyez vous auprès d'une jolie fille une heure et ça vous
semble durer une minute. C'est ça la relativité.
-+- Albert Einstein (Physicien allemand) -+-

Avatar
Khanh-Dang
Sebastien Bricout wrote:
Root device is (3, 1)
Boot sector 512 bytes.
Setup is 2540 bytes.
System is 13 kB
make[1]: Leaving directory `/usr/src/linux-2.4.22/arch/i386/boot



Ben ça semble OK non?



Franchement, j'aimerais bien pouvoir faire un kernel qui marche et qui
fait 13 Ko en taille, même compressé ;)


Avatar
Qing Liu
Nicolas DEFFAYET writes:

Bonjour,


Bonjour,

Je n'arrive pas à compiler un kernel sur un serveur Linux Redhat 7.1.


À tout hasard, quel est le compilateur utilisé ? gcc -v.

--
Liu

Avatar
Samuel Colin
Dans l'article ,
Qing Liu a tapoté :
Nicolas DEFFAYET writes:

Bonjour,


Bonjour,

Ben, bonjour aussi.


Je n'arrive pas à compiler un kernel sur un serveur Linux Redhat 7.1.


À tout hasard, quel est le compilateur utilisé ? gcc -v.

Google vient de me dire gcc 2.96.

Tout est dit...
Donc il faut changer de gcc, mais je ne suis pas familier des mises à
jour/changements de paquets sur une Redhat.

--
On chie sur la nettiquéquette ! La liberté d'expression tu connais ? Moi
ça ne me dérange pas du tout de voir des pubs sur les news, ce le libre
commerce. Clovis
-+-in : <http://www.le-gnu.net> - Bien revendiquer sa connerie -+-


Avatar
Qing Liu
Samuel Colin writes:

Dans l'article ,
Qing Liu a tapoté :
Nicolas DEFFAYET writes:

Bonjour,


Bonjour,

Ben, bonjour aussi.



Tiens, bonjour !

Je n'arrive pas à compiler un kernel sur un serveur Linux Redhat 7.1.


À tout hasard, quel est le compilateur utilisé ? gcc -v.

Google vient de me dire gcc 2.96.

Tout est dit...
Donc il faut changer de gcc, mais je ne suis pas familier des mises à
jour/changements de paquets sur une Redhat.


Mais comme il y avait polémique sur les compilateurs à utiliser pour
le noyau, RH avait fourni un kgcc qui n'est d'autre qu'un
egcs-je-ne-sais-plus-combien et qui est bon pour les noyaux 2.2.
Je pose la question de gcc -v car le monsieur aurait pu changer de compilateur
entre temps comme il l'a fait pour les binutils. Changer de
compilo n'est pas compliqué, on peut faire cohabiter deux
compilo sur un système. C'est le changement de glibc qui est
difficile à gérer quand les versions portent le même numéro
mineur (glibc-2.0 à glibc-2.1 par exemple).

--
Liu