i tried building LinuxBios V3 but it fails..
any suggestions ?
i did: svn co svn://linuxbios.org/repository/LinuxBIOSv3
Checked out revision 364.
cd LinuxBIOSv3/ make menuconfig <exit> <yes> (save) make CP build/config.h GEN build/build.h BUILD DUMMY VPD CC build/lib/uart8250.o CC build/lib/mem.o CC build/lib/elfboot.o CC build/lib/lar.o CC build/lib/delay.o CC build/lib/vtxprintf.o CC build/lib/vsprintf.o CC build/lib/console.o CC build/arch/x86/cachemain.o CC build/arch/x86/serial.o CC build/arch/x86/archelfboot.o CC build/arch/x86/speaker.o CC build/arch/x86/udelay_io.o CC build/arch/x86/mc146818rtc.o /home/reinder/proj/lbv3/LinuxBIOSv3/arch/x86/mc146818rtc.c:347: warning: 'do_normal_boot' defined but not used CC build/arch/x86/stage0_i586.o AS build/arch/x86/stage0_i586.o CC build/stage0.init /home/reinder/proj/lbv3/LinuxBIOSv3/build/arch/x86/stage0_i586.o: In function `_stage0': /home/reinder/proj/lbv3/LinuxBIOSv3/arch/x86/stage0_i586.S:(.text+0xf): relocation truncated to fit: R_386_16 against symbol `gdtptr' defined in text section in /home/reinder/proj/lbv3/LinuxBIOSv3/build/arch/x86/stage0_i586.o collect2: ld returned 1 exit status make: *** [/home/reinder/proj/lbv3/LinuxBIOSv3/build/stage0.init] Error 1
make V=1
mkdir -p /home/reinder/proj/lbv3/LinuxBIOSv3/build printf " CP build/config.h\n" CP build/config.h cp /home/reinder/proj/lbv3/LinuxBIOSv3/.tmpconfig.h /home/reinder/proj/lbv3/LinuxBIOSv3/build/config.h printf " GEN build/build.h\n" GEN build/build.h printf "#define LINUXBIOS_VERSION "3.0.0"\n" > /home/reinder/proj/lbv3/LinuxBIOSv3/build/build.h printf "#define LINUXBIOS_EXTRA_VERSION ""\n" >> /home/reinder/proj/lbv3/LinuxBIOSv3/build/build.h printf "#define LINUXBIOS_BUILD "`LANG= date`"\n" >> /home/reinder/proj/lbv3/LinuxBIOSv3/build/build.h printf "\n" >> /home/reinder/proj/lbv3/LinuxBIOSv3/build/build.h printf "#define LINUXBIOS_COMPILER "gcc (GCC) 4.1.1 (Gentoo 4.1.1-r3)"\n"
/home/reinder/proj/lbv3/LinuxBIOSv3/build/build.h
printf "#define LINUXBIOS_ASSEMBLER "GNU assembler 2.16.1"\n" >> /home/reinder/proj/lbv3/LinuxBIOSv3/build/build.h printf "#define LINUXBIOS_LINKER "GNU ld version 2.16.1"\n" >> /home/reinder/proj/lbv3/LinuxBIOSv3/build/build.h printf "#define LINUXBIOS_COMPILE_TIME "`LANG= date +%T`"\n" >> /home/reinder/proj/lbv3/LinuxBIOSv3/build/build.h printf "#define LINUXBIOS_COMPILE_BY "reinder"\n" >> /home/reinder/proj/lbv3/LinuxBIOSv3/build/build.h printf "#define LINUXBIOS_COMPILE_HOST "ubuddie"\n" >> /home/reinder/proj/lbv3/LinuxBIOSv3/build/build.h printf "#define LINUXBIOS_COMPILE_DOMAIN "eightdot.eu"\n" >> /home/reinder/proj/lbv3/LinuxBIOSv3/build/build.h # We need to be careful. If stage0.o gets bigger than # 0x4000 - 0x100, we will end up with a 4 gig file. # I wonder if that behavior is on purpose. # Note: we invoke gcc (instead of ld directly) here, as we hit # strange problems in the past. It seems that only gcc knows how # to properly invoke ld. printf " CC build/stage0.init\n" CC build/stage0.init gcc -nostdlib -static -T /home/reinder/proj/lbv3/LinuxBIOSv3/arch/x86/ldscript.ld \ /home/reinder/proj/lbv3/LinuxBIOSv3/build/lib/uart8250.o /home/reinder/proj/lbv3/LinuxBIOSv3/build/lib/mem.o /home/reinder/proj/lbv3/LinuxBIOSv3/build/lib/elfboot.o /home/reinder/proj/lbv3/LinuxBIOSv3/build/lib/lar.o /home/reinder/proj/lbv3/LinuxBIOSv3/build/lib/delay.o /home/reinder/proj/lbv3/LinuxBIOSv3/build/lib/vtxprintf.o /home/reinder/proj/lbv3/LinuxBIOSv3/build/lib/vsprintf.o /home/reinder/proj/lbv3/LinuxBIOSv3/build/lib/console.o /home/reinder/proj/lbv3/LinuxBIOSv3/build/arch/x86/cachemain.o /home/reinder/proj/lbv3/LinuxBIOSv3/build/arch/x86/serial.o /home/reinder/proj/lbv3/LinuxBIOSv3/build/arch/x86/archelfboot.o /home/reinder/proj/lbv3/LinuxBIOSv3/build/arch/x86/speaker.o /home/reinder/proj/lbv3/LinuxBIOSv3/build/arch/x86/udelay_io.o /home/reinder/proj/lbv3/LinuxBIOSv3/build/arch/x86/mc146818rtc.o /home/reinder/proj/lbv3/LinuxBIOSv3/build/arch/x86/stage0_i586.o -o /home/reinder/proj/lbv3/LinuxBIOSv3/build/stage0.o /home/reinder/proj/lbv3/LinuxBIOSv3/build/arch/x86/stage0_i586.o: In function `_stage0': /home/reinder/proj/lbv3/LinuxBIOSv3/arch/x86/stage0_i586.S:(.text+0xf): relocation truncated to fit: R_386_16 against symbol `gdtptr' defined in text section in /home/reinder/proj/lbv3/LinuxBIOSv3/build/arch/x86/stage0_i586.o collect2: ld returned 1 exit status make: *** [/home/reinder/proj/lbv3/LinuxBIOSv3/build/stage0.init] Error 1
This box is running gentoo.
gcc -v gives: Using built-in specs. Target: i686-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-4.1.1-r3/work/gcc-4.1.1/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.1.1 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-libunwind-exceptions --disable-multilib --disable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu Thread model: posix gcc version 4.1.1 (Gentoo 4.1.1-r3)
as -v gives: GNU assembler version 2.16.1 (i686-pc-linux-gnu) using BFD version 2.16.1
a tar gzip of my tree is at http://test.eightdot.eu:8890/logs/lbv3.tgz
greetings Reinder de Haan
On Thursday 21 June 2007 19:28, todthgie wrote:
i tried building LinuxBios V3 but it fails..
any suggestions ?
I tried the same revision (364) fresh from the repository and in a second step with your archive:
Hostcompiler: gcc 4.0.3, binutils 2.16.1 Crosscompiler: gcc 4.1.1, binutils 2.17 Crosscompiler: gcc 4.2.1, binutils 2.17
(all tests are done on a 32 bit "Linux from Scratch" host system)
No error messages like yours.
Juergen
Hi,
On 6/21/07, todthgie todthgie@hotmail.com wrote:
i tried building LinuxBios V3 but it fails..
any suggestions ?
<snip>
/home/reinder/proj/lbv3/LinuxBIOSv3/build/arch/x86/stage0_i586.o: In function `_stage0': /home/reinder/proj/lbv3/LinuxBIOSv3/arch/x86/stage0_i586.S:(.text+0xf): relocation truncated to fit: R_386_16 against symbol `gdtptr' defined in text section in
I had the exact same problem (gcc (GCC) 4.1.2 (Gentoo 4.1.2), GNU assembler 2.16.1, GNU ld version 2.16.1).
As far as I can tell binutils is mostly broken for 16-bit code and different versions of binutils is broken in different ways... ;-)
It's fairly easy to fix though - in "/arch/x86/stage0_i586.S" find the first line with the "lgdt" instruction in it (it's about line number 60) and replace that line with these lines:
movl $gdtptr,%ebx lgdt %cs:(%bx)
I'm not too sure if that's the only thing I messed with to get it to work (but I think it is) - to be honest, I stumbled around doing all sorts of things for a while first (I'm much more used to assemblers like NASM, and much less familiar with "compiler back-ends pretending to be assemblers")...
Cheers,
Brendan
Thanks, your suggestion is atleast compileable .. i will test later ..
greetings, Reinder
----- Original Message ----- From: "Brendan Trotter" btrotter@gmail.com To: "todthgie" todthgie@hotmail.com Cc: "LinuxBIOS Mailing List" linuxbios@linuxbios.org Sent: Thursday, June 21, 2007 22:47 Subject: Re: [LinuxBIOS] LinuxBios V3 build failure
Hi,
On 6/21/07, todthgie todthgie@hotmail.com wrote:
i tried building LinuxBios V3 but it fails..
any suggestions ?
<snip>
/home/reinder/proj/lbv3/LinuxBIOSv3/build/arch/x86/stage0_i586.o: In function `_stage0': /home/reinder/proj/lbv3/LinuxBIOSv3/arch/x86/stage0_i586.S:(.text+0xf): relocation truncated to fit: R_386_16 against symbol `gdtptr' defined in text section in
I had the exact same problem (gcc (GCC) 4.1.2 (Gentoo 4.1.2), GNU assembler 2.16.1, GNU ld version 2.16.1).
As far as I can tell binutils is mostly broken for 16-bit code and different versions of binutils is broken in different ways... ;-)
It's fairly easy to fix though - in "/arch/x86/stage0_i586.S" find the first line with the "lgdt" instruction in it (it's about line number 60) and replace that line with these lines:
movl $gdtptr,%ebx lgdt %cs:(%bx)
I'm not too sure if that's the only thing I messed with to get it to work (but I think it is) - to be honest, I stumbled around doing all sorts of things for a while first (I'm much more used to assemblers like NASM, and much less familiar with "compiler back-ends pretending to be assemblers")...
Cheers,
Brendan
On Thursday 21 June 2007 22:47, Brendan Trotter wrote:
I had the exact same problem (gcc (GCC) 4.1.2 (Gentoo 4.1.2), GNU assembler 2.16.1, GNU ld version 2.16.1).
So it seems its more a Gentoo related problem.
As far as I can tell binutils is mostly broken for 16-bit code and different versions of binutils is broken in different ways... ;-)
Prejudice only. ;-)
Juergen