Skip to contentSkip to conversation

Compilation problem with kernel 2.4.16

DISCUSSION Krishna 5 participants 11 messages Mar 24, 2006 – Mar 28, 2006 1 message not in the archive MIPS

lore
Share & tools
lore

Krishna

author
#0 lore raw

Hi,

I have been trying to cross compile Linux/MIPS kernel verison 2.4.16 with the specifix's sibyte cross compiler (sb1-elf cross compilers for x86 linux hosts) for BCM 1480 Broadcom board. I have set the path for cross compiler properly in make file even then the compilation failed. Then we tried adding parameter " -Tcfe.ld" (which is must for compilation) in compilation command (as has been suggested by broadcom) still unble to get it done correctly. Wondering what else we need to change in make file. Or else is there any other cross compiler for BCM 1480 (than specifix one) that we can use. Anyone suggest me the proper way for compiling the kernel with the above cross compiler.

Thanks and Regards
Krishna

---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.

#1 lore raw

Hi,
could you post the error message , so that group members can analyse and post you correct solution.

Gowri

Quoted 20 lines · Krishna

Hi,

I have been trying to cross compile Linux/MIPS kernel verison 2.4.16 with the specifix's sibyte cross compiler (sb1-elf cross compilers for x86 linux hosts) for BCM 1480 Broadcom board. I have set the path for cross compiler properly in make file even then the compilation failed. Then we tried adding parameter " -Tcfe.ld" (which is must for compilation) in compilation command (as has been suggested by broadcom) still unble to get it done correctly. Wondering what else we need to change in make file. Or else is there any other cross compiler for BCM 1480 (than specifix one) that we can use. Anyone suggest me the proper way for compiling the kernel with the above cross compiler.

Thanks and Regards
Krishna

______________________________________________________________________
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.

author
#2 lore raw

here is the error description:

********************************************************
Makefile:489: .config: No such file or directory
scripts/basic/fixdep.c: In function `parse_config_file':
scripts/basic/fixdep.c:228: warning: implicit declaration of function `ntohl'
scripts/basic/fixdep.c: In function `print_deps':
scripts/basic/fixdep.c:336: warning: unused variable `map' /home1/guest/vikram/COMPILER/specifix/broadcom_2004e_341/i686-pc-linux-gnu/bin/../lib/gcc/sb1-elf/3.4.1/../../../../sb1-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000400040 /tmp/ccb1vCvc.o(.text+0x4): In function `usage':
: undefined reference to `_impure_ptr'
/tmp/ccb1vCvc.o(.text+0x4): In function `usage':
: relocation truncated to fit: R_MIPS_GPREL16 _impure_ptr
/tmp/ccb1vCvc.o(.text+0x1c): In function `usage':
: undefined reference to `fwrite'
/tmp/ccb1vCvc.o(.text+0x24): In function `usage':
: undefined reference to `exit'
/tmp/ccb1vCvc.o(.text+0x3c): In function `print_cmdline':
: undefined reference to `printf'
/tmp/ccb1vCvc.o(.text+0x80): In function `grow_config':
: undefined reference to `realloc'
/tmp/ccb1vCvc.o(.text+0xc0): In function `grow_config':
: undefined reference to `perror'
/tmp/ccb1vCvc.o(.text+0xc8): In function `grow_config':
: undefined reference to `exit'
/tmp/ccb1vCvc.o(.text+0x148): In function `is_defined_config':
: undefined reference to `memcmp'
/tmp/ccb1vCvc.o(.text+0x1b8): In function `define_config':
: undefined reference to `memcpy'
/tmp/ccb1vCvc.o(.text+0x268): In function `use_config':
: undefined reference to `memcpy'
/tmp/ccb1vCvc.o(.text+0x340): In function `parse_config_file':
: undefined reference to `_ctype_'
/tmp/ccb1vCvc.o(.text+0x290): In function `use_config':
: undefined reference to `_ctype_'
/tmp/ccb1vCvc.o(.text+0x2e8): In function `use_config':
: undefined reference to `printf'
/tmp/ccb1vCvc.o(.text+0x280): In function `use_config':
: undefined reference to `_ctype_'
/tmp/ccb1vCvc.o(.text+0x358): In function `parse_config_file':
: undefined reference to `_ctype_'
/tmp/ccb1vCvc.o(.text+0x360): In function `parse_config_file':
: undefined reference to `ntohl'
/tmp/ccb1vCvc.o(.text+0x374): In function `parse_config_file':
: undefined reference to `ntohl'
/tmp/ccb1vCvc.o(.text+0x388): In function `parse_config_file':
: undefined reference to `ntohl'
/tmp/ccb1vCvc.o(.text+0x3b0): In function `parse_config_file':
: undefined reference to `ntohl'
/tmp/ccb1vCvc.o(.text+0x3d8): In function `parse_config_file':
: undefined reference to `memcmp'
/tmp/ccb1vCvc.o(.text+0x498): In function `strrcmp':
: undefined reference to `strlen'
/tmp/ccb1vCvc.o(.text+0x4a4): In function `strrcmp':
: undefined reference to `strlen'
/tmp/ccb1vCvc.o(.text+0x4dc): In function `strrcmp':
: undefined reference to `memcmp'
/tmp/ccb1vCvc.o(.text+0x514): In function `do_config_file':
: undefined reference to `open'
/tmp/ccb1vCvc.o(.text+0x52c): In function `do_config_file':
: undefined reference to `fstat'
/tmp/ccb1vCvc.o(.text+0x540): In function `do_config_file':
: undefined reference to `close'
/tmp/ccb1vCvc.o(.text+0x560): In function `do_config_file':
: undefined reference to `close'
/tmp/ccb1vCvc.o(.text+0x57c): In function `do_config_file':
: undefined reference to `_impure_ptr'
/tmp/ccb1vCvc.o(.text+0x57c): In function `do_config_file':
: relocation truncated to fit: R_MIPS_GPREL16 _impure_ptr
/tmp/ccb1vCvc.o(.text+0x590): In function `do_config_file':
: undefined reference to `fwrite'
/tmp/ccb1vCvc.o(.text+0x598): In function `do_config_file':
: undefined reference to `perror'
/tmp/ccb1vCvc.o(.text+0x5a0): In function `do_config_file':
: undefined reference to `exit'
/tmp/ccb1vCvc.o(.text+0x5dc): In function `parse_dep_file':
: undefined reference to `strchr'
/tmp/ccb1vCvc.o(.text+0x600): In function `parse_dep_file':
: undefined reference to `memcpy'
/tmp/ccb1vCvc.o(.text+0x614): In function `parse_dep_file':
: undefined reference to `printf'
/tmp/ccb1vCvc.o(.text+0x6a4): In function `parse_dep_file':
: undefined reference to `memcpy'
/tmp/ccb1vCvc.o(.text+0x704): In function `parse_dep_file':
: undefined reference to `printf'
/tmp/ccb1vCvc.o(.text+0x714): In function `parse_dep_file':
: undefined reference to `printf'
/tmp/ccb1vCvc.o(.text+0x7b8): In function `parse_dep_file':
: undefined reference to `printf'
/tmp/ccb1vCvc.o(.text+0x7d0): In function `parse_dep_file':
: undefined reference to `_impure_ptr'
/tmp/ccb1vCvc.o(.text+0x7d0): In function `parse_dep_file':
: relocation truncated to fit: R_MIPS_GPREL16 _impure_ptr
/tmp/ccb1vCvc.o(.text+0x7e4): In function `parse_dep_file':
: undefined reference to `fwrite'
/tmp/ccb1vCvc.o(.text+0x7ec): In function `parse_dep_file':
: undefined reference to `exit'
/tmp/ccb1vCvc.o(.text+0x808): In function `print_deps':
: undefined reference to `open'
/tmp/ccb1vCvc.o(.text+0x820): In function `print_deps':
: undefined reference to `fstat'
/tmp/ccb1vCvc.o(.text+0x83c): In function `print_deps':
: undefined reference to `_impure_ptr'
/tmp/ccb1vCvc.o(.text+0x83c): In function `print_deps':
: relocation truncated to fit: R_MIPS_GPREL16 _impure_ptr
/tmp/ccb1vCvc.o(.text+0x844): In function `print_deps':
: undefined reference to `fprintf'
/tmp/ccb1vCvc.o(.text+0x850): In function `print_deps':
: undefined reference to `close'
/tmp/ccb1vCvc.o(.text+0x868): In function `print_deps':
: undefined reference to `_impure_ptr'
/tmp/ccb1vCvc.o(.text+0x868): In function `print_deps':
: relocation truncated to fit: R_MIPS_GPREL16 _impure_ptr
/tmp/ccb1vCvc.o(.text+0x87c): In function `print_deps':
: undefined reference to `fwrite'
/tmp/ccb1vCvc.o(.text+0x884): In function `print_deps':
: undefined reference to `perror'
/tmp/ccb1vCvc.o(.text+0x88c): In function `print_deps':
: undefined reference to `exit'
/tmp/ccb1vCvc.o(.text+0x8a4): In function `traps':
: undefined reference to `ntohl'
/tmp/ccb1vCvc.o(.text+0x8c0): In function `traps':
: undefined reference to `_impure_ptr'
/tmp/ccb1vCvc.o(.text+0x8c0): In function `traps':
: relocation truncated to fit: R_MIPS_GPREL16 _impure_ptr
/tmp/ccb1vCvc.o(.text+0x8cc): In function `traps':
: undefined reference to `fprintf'
/tmp/ccb1vCvc.o(.text+0x8d4): In function `traps':
: undefined reference to `exit'
/tmp/ccb1vCvc.o(.sdata+0x0): undefined reference to `_ctype_'
collect2: ld returned 1 exit status
make[2]: *** [scripts/basic/fixdep] Error 1
make[1]: *** [scripts_basic] Error 2
make: *** [include/linux/autoconf.h] Error 2

******************************************************************************************

Hope it will help you to sort it out the problem.

Thanks
Krishna

Gowri Satish Adimulam <[email protected]> wrote:
Hi,
could you post the error message , so that group members can analyse and post you correct solution.

Gowri

Quoted 14 lines · Krishna

Hi,

I have been trying to cross compile Linux/MIPS kernel verison 2.4.16 with the specifix's sibyte cross compiler (sb1-elf cross compilers for x86 linux hosts) for BCM 1480 Broadcom board. I have set the path for cross compiler properly in make file even then the compilation failed. Then we tried adding parameter " -Tcfe.ld" (which is must for compilation) in compilation command (as has been suggested by broadcom) still unble to get it done correctly. Wondering what else we need to change in make file. Or else is there any other cross compiler for BCM 1480 (than specifix one) that we can use. Anyone suggest me the proper way for compiling the kernel with the above cross compiler.

Quoted 6 lines

Thanks and Regards
Krishna

______________________________________________________________________
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.

---------------------------------
Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice.

#8 lore raw
In reply to Krishna
Quoted 1 line · Krishna

I have been trying to cross compile Linux/MIPS kernel verison 2.4.16 with the specifix's sibyte cross compiler (sb1-elf cross compilers for x86 linux hosts) for BCM 1480 Broadcom board. I have set the path for cross compiler properly in make file even then the compilation failed. Then we tried adding parameter " -Tcfe.ld" (which is must for compilation) in compilation command (as has been suggested by broadcom) still unble to get it done correctly. Wondering what else we need to change in make file. Or else is there any other cross compiler for BCM 1480 (than specifix one) that we can use. Anyone suggest me the proper way for compiling the kernel with the above cross compiler.

As posted nobody can help you because you forgot to mention what kind of error you're seeing, what compiler you're using etc.

Aside of that, 2.4.16 is The Jurassic Kernel. The thing is now almost 5 years old and I recommend ritually burrying of a hardcopy on the compost pile in the garden. Make sure no kernel hacker is watching ;-)

Ralf

#3 lore raw
In reply to Krishna

Hi , your first line of error gives some indication taht your make file is trying to use conditional compilation based on .config . hence searching for .config but it could not find location.

maybe due to the first error , you are getting remaining errors. Regards
Gowri

Quoted 191 lines · Krishna

here is the error description:

********************************************************
Makefile:489: .config: No such file or directory
scripts/basic/fixdep.c: In function `parse_config_file':
scripts/basic/fixdep.c:228: warning: implicit declaration of function
`ntohl'
scripts/basic/fixdep.c: In function `print_deps':
scripts/basic/fixdep.c:336: warning: unused variable `map' /home1/guest/vikram/COMPILER/specifix/broadcom_2004e_341/i686-pc-linux-gnu/bin/../lib/gcc/sb1-elf/3.4.1/../../../../sb1-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000400040 /tmp/ccb1vCvc.o(.text+0x4): In function `usage':
: undefined reference to `_impure_ptr'
/tmp/ccb1vCvc.o(.text+0x4): In function `usage':
: relocation truncated to fit: R_MIPS_GPREL16 _impure_ptr
/tmp/ccb1vCvc.o(.text+0x1c): In function `usage':
: undefined reference to `fwrite'
/tmp/ccb1vCvc.o(.text+0x24): In function `usage':
: undefined reference to `exit'
/tmp/ccb1vCvc.o(.text+0x3c): In function `print_cmdline':
: undefined reference to `printf'
/tmp/ccb1vCvc.o(.text+0x80): In function `grow_config':
: undefined reference to `realloc'
/tmp/ccb1vCvc.o(.text+0xc0): In function `grow_config':
: undefined reference to `perror'
/tmp/ccb1vCvc.o(.text+0xc8): In function `grow_config':
: undefined reference to `exit'
/tmp/ccb1vCvc.o(.text+0x148): In function `is_defined_config':
: undefined reference to `memcmp'
/tmp/ccb1vCvc.o(.text+0x1b8): In function `define_config':
: undefined reference to `memcpy'
/tmp/ccb1vCvc.o(.text+0x268): In function `use_config':
: undefined reference to `memcpy'
/tmp/ccb1vCvc.o(.text+0x340): In function `parse_config_file':
: undefined reference to `_ctype_'
/tmp/ccb1vCvc.o(.text+0x290): In function `use_config':
: undefined reference to `_ctype_'
/tmp/ccb1vCvc.o(.text+0x2e8): In function `use_config':
: undefined reference to `printf'
/tmp/ccb1vCvc.o(.text+0x280): In function `use_config':
: undefined reference to `_ctype_'
/tmp/ccb1vCvc.o(.text+0x358): In function `parse_config_file':
: undefined reference to `_ctype_'
/tmp/ccb1vCvc.o(.text+0x360): In function `parse_config_file':
: undefined reference to `ntohl'
/tmp/ccb1vCvc.o(.text+0x374): In function `parse_config_file':
: undefined reference to `ntohl'
/tmp/ccb1vCvc.o(.text+0x388): In function `parse_config_file':
: undefined reference to `ntohl'
/tmp/ccb1vCvc.o(.text+0x3b0): In function `parse_config_file':
: undefined reference to `ntohl'
/tmp/ccb1vCvc.o(.text+0x3d8): In function `parse_config_file':
: undefined reference to `memcmp'
/tmp/ccb1vCvc.o(.text+0x498): In function `strrcmp':
: undefined reference to `strlen'
/tmp/ccb1vCvc.o(.text+0x4a4): In function `strrcmp':
: undefined reference to `strlen'
/tmp/ccb1vCvc.o(.text+0x4dc): In function `strrcmp':
: undefined reference to `memcmp'
/tmp/ccb1vCvc.o(.text+0x514): In function `do_config_file':
: undefined reference to `open'
/tmp/ccb1vCvc.o(.text+0x52c): In function `do_config_file':
: undefined reference to `fstat'
/tmp/ccb1vCvc.o(.text+0x540): In function `do_config_file':
: undefined reference to `close'
/tmp/ccb1vCvc.o(.text+0x560): In function `do_config_file':
: undefined reference to `close'
/tmp/ccb1vCvc.o(.text+0x57c): In function `do_config_file':
: undefined reference to `_impure_ptr'
/tmp/ccb1vCvc.o(.text+0x57c): In function `do_config_file':
: relocation truncated to fit: R_MIPS_GPREL16 _impure_ptr
/tmp/ccb1vCvc.o(.text+0x590): In function `do_config_file':
: undefined reference to `fwrite'
/tmp/ccb1vCvc.o(.text+0x598): In function `do_config_file':
: undefined reference to `perror'
/tmp/ccb1vCvc.o(.text+0x5a0): In function `do_config_file':
: undefined reference to `exit'
/tmp/ccb1vCvc.o(.text+0x5dc): In function `parse_dep_file':
: undefined reference to `strchr'
/tmp/ccb1vCvc.o(.text+0x600): In function `parse_dep_file':
: undefined reference to `memcpy'
/tmp/ccb1vCvc.o(.text+0x614): In function `parse_dep_file':
: undefined reference to `printf'
/tmp/ccb1vCvc.o(.text+0x6a4): In function `parse_dep_file':
: undefined reference to `memcpy'
/tmp/ccb1vCvc.o(.text+0x704): In function `parse_dep_file':
: undefined reference to `printf'
/tmp/ccb1vCvc.o(.text+0x714): In function `parse_dep_file':
: undefined reference to `printf'
/tmp/ccb1vCvc.o(.text+0x7b8): In function `parse_dep_file':
: undefined reference to `printf'
/tmp/ccb1vCvc.o(.text+0x7d0): In function `parse_dep_file':
: undefined reference to `_impure_ptr'
/tmp/ccb1vCvc.o(.text+0x7d0): In function `parse_dep_file':
: relocation truncated to fit: R_MIPS_GPREL16 _impure_ptr
/tmp/ccb1vCvc.o(.text+0x7e4): In function `parse_dep_file':
: undefined reference to `fwrite'
/tmp/ccb1vCvc.o(.text+0x7ec): In function `parse_dep_file':
: undefined reference to `exit'
/tmp/ccb1vCvc.o(.text+0x808): In function `print_deps':
: undefined reference to `open'
/tmp/ccb1vCvc.o(.text+0x820): In function `print_deps':
: undefined reference to `fstat'
/tmp/ccb1vCvc.o(.text+0x83c): In function `print_deps':
: undefined reference to `_impure_ptr'
/tmp/ccb1vCvc.o(.text+0x83c): In function `print_deps':
: relocation truncated to fit: R_MIPS_GPREL16 _impure_ptr
/tmp/ccb1vCvc.o(.text+0x844): In function `print_deps':
: undefined reference to `fprintf'
/tmp/ccb1vCvc.o(.text+0x850): In function `print_deps':
: undefined reference to `close'
/tmp/ccb1vCvc.o(.text+0x868): In function `print_deps':
: undefined reference to `_impure_ptr'
/tmp/ccb1vCvc.o(.text+0x868): In function `print_deps':
: relocation truncated to fit: R_MIPS_GPREL16 _impure_ptr
/tmp/ccb1vCvc.o(.text+0x87c): In function `print_deps':
: undefined reference to `fwrite'
/tmp/ccb1vCvc.o(.text+0x884): In function `print_deps':
: undefined reference to `perror'
/tmp/ccb1vCvc.o(.text+0x88c): In function `print_deps':
: undefined reference to `exit'
/tmp/ccb1vCvc.o(.text+0x8a4): In function `traps':
: undefined reference to `ntohl'
/tmp/ccb1vCvc.o(.text+0x8c0): In function `traps':
: undefined reference to `_impure_ptr'
/tmp/ccb1vCvc.o(.text+0x8c0): In function `traps':
: relocation truncated to fit: R_MIPS_GPREL16 _impure_ptr
/tmp/ccb1vCvc.o(.text+0x8cc): In function `traps':
: undefined reference to `fprintf'
/tmp/ccb1vCvc.o(.text+0x8d4): In function `traps':
: undefined reference to `exit'
/tmp/ccb1vCvc.o(.sdata+0x0): undefined reference to `_ctype_'
collect2: ld returned 1 exit status
make[2]: *** [scripts/basic/fixdep] Error 1
make[1]: *** [scripts_basic] Error 2
make: *** [include/linux/autoconf.h] Error 2

******************************************************************************************

Hope it will help you to sort it out the problem.

Thanks
Krishna

Gowri Satish Adimulam <[email protected]> wrote:
Hi,
could you post the error message , so that group members can analyse and
post you correct solution.

Gowri
On Thu, 2006-03-23 at 23:45 -0800, Krishna wrote:
> Hi,
>
> I have been trying to cross compile Linux/MIPS kernel verison 2.4.16
> with the specifix's sibyte cross compiler (sb1-elf cross compilers for
> x86 linux hosts) for BCM 1480 Broadcom board. I have set the path for
> cross compiler properly in make file even then the compilation failed.
> Then we tried adding parameter " -Tcfe.ld" (which is must for
> compilation) in compilation command (as has been suggested by
> broadcom) still unble to get it done correctly. Wondering what else we
> need to change in make file. Or else is there any other cross compiler
> for BCM 1480 (than specifix one) that we can use. Anyone suggest me
> the proper way for compiling the kernel with the above cross > compiler.
>
> Thanks and Regards
> Krishna
>
>
______________________________________________________________________
> New Yahoo! Messenger with Voice. Call regular phones from your PC and
> save big.

______________________________________________________________________
Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice.

#10 lore raw
In reply to a message not in the archive
Quoted 3 lines · Krishna

Sorry I mentioned version incorrectly. It is 2.6.14. The compiler i m using is sb1-elf-gcc (which i downloaded from www.broadcom.com/products/sibyte_downloads.php#toolchain). Her is the error description:

The *-elf gcc configuration will not work for compiling Linux/MIPS or applications; you need a mips-linux target.

Quoted 11 lines

**********************************************
Makefile:489: .config: No such file or directory
scripts/basic/fixdep.c: In function `parse_config_file':
scripts/basic/fixdep.c:228: warning: implicit declaration of function `ntohl'
scripts/basic/fixdep.c: In function `print_deps':
scripts/basic/fixdep.c:336: warning: unused variable `map' /home1/guest/vikram/COMPILER/specifix/broadcom_2004e_341/i686-pc-linux-gnu/bin/../lib/gcc/sb1-elf/3.4.1/../../../../sb1-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000400040 /tmp/ccb1vCvc.o(.text+0x4): In function `usage':
: undefined reference to `_impure_ptr'
/tmp/ccb1vCvc.o(.text+0x4): In function `usage':
: relocation truncated to fit: R_MIPS_GPREL16 _impure_ptr

These messages seem to indicate you did something bad to the makefiles. The crosscompiler is being invoked where the target compiler should be.

Ralf

author
#11 lore raw

then will u please suggest me which compiler to use to compile kernel 2.6.14 for BCM1480 or else where i get the proper compiler.

Quoted 3 lines · Krishna

Sorry I mentioned version incorrectly. It is 2.6.14. The compiler i m using is sb1-elf-gcc (which i downloaded from www.broadcom.com/products/sibyte_downloads.php#toolchain). Her is the error description:

The *-elf gcc configuration will not work for compiling Linux/MIPS or applications; you need a mips-linux target.

Quoted 11 lines

**********************************************
Makefile:489: .config: No such file or directory
scripts/basic/fixdep.c: In function `parse_config_file':
scripts/basic/fixdep.c:228: warning: implicit declaration of function `ntohl'
scripts/basic/fixdep.c: In function `print_deps':
scripts/basic/fixdep.c:336: warning: unused variable `map' /home1/guest/vikram/COMPILER/specifix/broadcom_2004e_341/i686-pc-linux-gnu/bin/../lib/gcc/sb1-elf/3.4.1/../../../../sb1-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000400040 /tmp/ccb1vCvc.o(.text+0x4): In function `usage':
: undefined reference to `_impure_ptr'
/tmp/ccb1vCvc.o(.text+0x4): In function `usage':
: relocation truncated to fit: R_MIPS_GPREL16 _impure_ptr

These messages seem to indicate you did something bad to the makefiles. The crosscompiler is being invoked where the target compiler should be.

Ralf

*Krishna*

---------------------------------
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.

#4 lore raw
In reply to Krishna
Quoted 3 lines · Krishna

scripts/basic/fixdep.c: In function `print_deps':
scripts/basic/fixdep.c:336: warning: unused variable `map' /home1/guest/vikram/COMPILER/specifix/broadcom_2004e_341/i686-pc-linux-gnu/bin/../lib/gcc/sb1-elf/3.4.1/../../../../sb1-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000400040

You apparently have something like
HOSTCC=sb1-elf-gcc
in your linux kernel Makefile. This will not work. The host compiler is the compiler for the machine that you are building the linux kernel on. This will normally be just "cc" or "gcc".

The other problem is that you have apparently set CROSS-COMPILE to sb1-elf- which will also not work. This must be either mips-linux- or mips64-linux- (if you want a 64-bit kernel) as others have already mentioned.

You can use the specifix toolchain release to build the linux kernel. However, you can't use the sb1-elf binaries. These are only for building embedded applications that run on top of CFE without an OS. To build the linux kernel, you need to grab the sources (which are just FSF gcc-3.4.x with some SB-1 support backported), configure them for mips-linux (or mips64-linux), and then build and install them. You can then use this compile to build the linux kernel.

There is a learning curve here if you have never done this before. There is probably a FAQ somewhere that explains how to do this. I don't know offhand where to look for linux kernel building FAQs. Perhaps someone else can point you at one.

Signature · 1 line
Jim Wilson, GNU Tools Support, http://www.specifix.com
#5 lore raw
Quoted 8 lines · James E Wilson

You can use the specifix toolchain release to build the linux kernel. However, you can't use the sb1-elf binaries. These are only for building embedded applications that run on top of CFE without an OS. To build the linux kernel, you need to grab the sources (which are just FSF gcc-3.4.x with some SB-1 support backported), configure them for mips-linux (or mips64-linux), and then build and install them. You can then use this compile to build the linux kernel.

Quoted 4 lines

There is a learning curve here if you have never done this before. There is probably a FAQ somewhere that explains how to do this. I don't know offhand where to look for linux kernel building FAQs. Perhaps someone else can point you at one.

There is a lot of information in the wiki http://www.linux-mips.org/ and I would like to encourage people to contribute to it. Editing a wiki page _once_ is more productive than answering the same question again and again ... In particular I also want to encourage the mere mortals to contribute to the wikis.

Ralf

author
#6 lore raw

building cross compiler for compiling kernel 2.6.14 for BCM1480

I went to the site (http://www.linux-mips.org/wiki/Toolchains > Pre-built/Build Kits ).. Downloaded the following tools
-binutils-2.16.1
-gcc-4.1.0
-gdb-6.4
And followed the installation instruction as described there. First installed binutils successfully. But got follwing error while doing make -j2 in the process of installing gcc-4.1.c:

checking for --enable-version-specific-runtime-libs... no
checking whether to enable maintainer-specific portions of Makefiles... no checking for mipsel-unknown-linux-gnu-gcc...
/home/ssf/bdcom/tools-cross-toolchains/build-gcc-bootstrap/./gcc/xgcc -B/home/ssf/bdcom/tools-cross-toolchains/build-gcc-bootstrap/./gcc/ -B/home/ssf/bdcom/cross-compilers/mips-linux/mipsel-unknown-linux-gnu/bin/ -B/home/ssf/bdcom/cross-compilers/mips-linux/mipsel-unknown-linux-gnu/lib/ -isystem /home/ssf/bdcom/cross-compilers/mips-linux/mipsel-unknown-linux-gnu/include -isystem /home/ssf/bdcom/cross-compilers/mips-linux/mipsel-unknown-linux-gnu/sys-include
checking for C compiler default output file name... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether byte ordering is bigendian... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for sys/file.h... no
checking for sys/param.h... no
checking for limits.h... yes
checking for stdlib.h... no
checking for malloc.h... no
checking for string.h... no
checking for unistd.h... no
checking for strings.h... no
checking for sys/time.h... no
checking for time.h... no
checking for sys/resource.h... no
checking for sys/stat.h... no
checking for sys/mman.h... no
checking for fcntl.h... no
checking for alloca.h... no
checking for sys/pstat.h... no
checking for sys/sysmp.h... no
checking for sys/sysinfo.h... no
checking for machine/hal_sysinfo.h... no
checking for sys/table.h... no
checking for sys/sysctl.h... no
checking for sys/systemcfg.h... no
checking for stdint.h... no
checking for stdio_ext.h... no
checking for sys/wait.h that is POSIX.1 compatible... no
checking whether time.h and sys/time.h may both be included... no checking whether errno must be declared... yes
checking for egrep... grep -E
checking for ANSI C header files... no
checking for sys/types.h... no
checking for sys/stat.h... (cached) no
checking for stdlib.h... (cached) no
checking for string.h... (cached) no
checking for memory.h... no
checking for strings.h... (cached) no
checking for inttypes.h... no
checking for stdint.h... (cached) no
checking for unistd.h... (cached) no
checking for int... no
checking size of int... 0
checking for uintptr_t... no
checking for a 64-bit type... unsigned long long
checking for pid_t... no
checking for library containing strerror... make[1]: Leaving directory
`/home/ssf/bdcom/tools-cross-toolchains/build-gcc-b
configure:error: C compiler cannot create executables
See 'config.log' for more details.
make[1]: *** [configure-target-libmudflap] Error 1
make[1]: *** Waiting for unfinished jobs....
configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES. make[1]: *** [configure-target-libiberty] Error 1
make: *** [all] Error 2
Here is the config.log file:
configure:600: checking host system type
configure:621: checking target system type
configure:639: checking build system type
configure:694: checking for a BSD compatible install
configure:747: checking whether ln works
configure:771: checking whether ln -s works
configure:1825: checking for gcc
configure:1938: checking whether the C compiler (gcc ) works
configure:1954: gcc -o conftest conftest.c 1>&5
configure:1980: checking whether the C compiler (gcc ) is a cross-compiler configure:1985: checking whether we are using GNU C
configure:2013: checking whether gcc accepts -g
configure:2080: checking for gnatbind
configure:2145: checking whether compiler driver understands Ada configure:2177: checking how to compare bootstrapped objects configure:2275: checking for correct version of gmp.h
configure:2288: gcc -c -g -O2 conftest.c 1>&5
configure:2301: checking for MPFR
configure:2314: gcc -o conftest -g -O2 conftest.c -lmpfr -lgmp 1>&5
configure:3313: checking for bison
configure:3353: checking for bison
configure:3392: checking for gm4
configure:3431: checking for flex
configure:3471: checking for flex
configure:3510: checking for makeinfo
configure:3563: checking for expect
configure:3604: checking for runtest
configure:3652: checking for i686-pc-linux-gnu-ar
configure:3727: checking for i686-pc-linux-gnu-as
configure:3802: checking for i686-pc-linux-gnu-dlltool
configure:3833: checking for dlltool
configure:3877: checking for i686-pc-linux-gnu-ld
configure:3952: checking for i686-pc-linux-gnu-lipo
configure:3983: checking for lipo
configure:4027: checking for i686-pc-linux-gnu-nm
configure:4102: checking for i686-pc-linux-gnu-ranlib
configure:4172: checking for i686-pc-linux-gnu-strip
configure:4242: checking for i686-pc-linux-gnu-windres
configure:4273: checking for windres
configure:4317: checking for i686-pc-linux-gnu-objcopy
configure:4392: checking for i686-pc-linux-gnu-objdump
configure:4474: checking for mipsel-unknown-linux-gnu-ar
configure:4549: checking for mipsel-unknown-linux-gnu-as
configure:4624: checking for mipsel-unknown-linux-gnu-cc
configure:4624: checking for mipsel-unknown-linux-gnu-gcc configure:4699: checking for mipsel-unknown-linux-gnu-c++ configure:4699: checking for mipsel-unknown-linux-gnu-g++ configure:4699: checking for mipsel-unknown-linux-gnu-cxx configure:4699: checking for mipsel-unknown-linux-gnu-gxx configure:4774: checking for mipsel-unknown-linux-gnu-dlltool configure:4849: checking for mipsel-unknown-linux-gnu-gcc configure:4919: checking for mipsel-unknown-linux-gnu-gcj configure:4994: checking for mipsel-unknown-linux-gnu-gfortran configure:5069: checking for mipsel-unknown-linux-gnu-ld
configure:5144: checking for mipsel-unknown-linux-gnu-lipo configure:5219: checking for mipsel-unknown-linux-gnu-nm
configure:5294: checking for mipsel-unknown-linux-gnu-objdump configure:5369: checking for mipsel-unknown-linux-gnu-ranlib configure:5439: checking for mipsel-unknown-linux-gnu-strip configure:5514: checking for mipsel-unknown-linux-gnu-windres configure:5588: checking where to find the target ar
configure:5613: checking where to find the target as
configure:5638: checking where to find the target cc
configure:5663: checking where to find the target c++
configure:5691: checking where to find the target c++ for libstdc++ configure:5719: checking where to find the target dlltool configure:5744: checking where to find the target gcc
configure:5769: checking where to find the target gcj
configure:5797: checking where to find the target gfortran configure:5825: checking where to find the target ld
configure:5850: checking where to find the target lipo
configure:5865: checking where to find the target nm
configure:5890: checking where to find the target objdump configure:5915: checking where to find the target ranlib
configure:5940: checking where to find the target strip
configure:5965: checking where to find the target windres configure:6018: checking whether to enable maintainer-specific portions of Makefiles configure:6065: checking if symbolic links between directories work

Then i searched through the net for the procedure and found one
like this:
../configure --with-system-zlib --libexecdir=/usr/lib
--prefix=/usr/local/gcc-4.0.2 --enable-shared --with-arch=sb1
--with-tune=sb1 --without-included-gettext --enable-nls
--program-suffix=-4.0.2 --enable-__cxa_atexit
--enable-libstdcxx-allocator=mt --with-target=mips64-linux
I tried with this also but did not work. Again big list of errors. Then searched for more and it seems that i need to have glibc. So i downleded glibc-2.16.1 also.
Now don't know where to start. Let me make u clear that I am new to this. Getting hard to figure out problems. can anyone please tell me the
exact procedure or let me know where i can find the correct reference for the tools needed doing all the stuffs from making a cross compiler for sb1 (BCM1480) and then cross compiling kernel 2.6.14.

Thanks and Regards,
Krishna

There is a lot of information in the wiki http://www.linux-mips.org/ and I would like to encourage people to contribute to it. Editing a wiki page _once_ is more productive than answering the same question again and again ... In particular I also want to encourage the mere mortals to contribute to the wikis.

Ralf

---------------------------------
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.

#7 lore raw

Re: building cross compiler for compiling kernel 2.6.14 for BCM1480

Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Krishna

I went to the site (http://www.linux-mips.org/wiki/Toolchains > Pre-built/Build Kits ).. Downloaded the following tools
-binutils-2.16.1
-gcc-4.1.0
-gdb-6.4
And followed the installation instruction as described there. First installed binutils successfully. But got follwing error while doing make -j2 in the process of installing gcc-4.1.c:

If you want to use gcc 4.1, Add --disable-libmudflap --disable-libssp when configuring the bootstrap gcc. These libraries are not required to compile linux kernel.

---
Atsushi Nemoto