|
Message
From: Matjaz Breskvar<phoenix@o...>
Date: Wed Oct 26 21:41:35 CEST 2005
Subject: [openrisc] Linux-2.4 with uClibc
* Jacob Bower (jab00@d...) wrote: > Hi, > > I realise this may have been discussed at length already and I may just be > missing something simple, but please could someone help me to get a build > environment for Linux-2.4 with uClibc. I've got as far as being able to > build executeables, but when I try to run them in the pre-made initrd > environment supplied in the CVS, I get the error: > > ./a.out: 1: Syntax error: "(" unexpecte > > To get to this I followed the following steps: > > * Build binutils and gcc for with target or32-elf. > * Build Linux-2.4 for or32. > * Build uClibc against Linux-2.4 build, and install into or32-elf gcc > environment (/opt/or32-elf/or32-elf/). > * Extract __errrno* files from libc.a > * Modify gcc specs file to link against crt0, crti, crtn and the errno > objects. > * Compile a simple hello world program with: or32-elf-gcc -e __start test.c
i use something like:
or32-linux-gcc -O2 -o test test.c __errno* -L/path-to-or32-uclibc -I/path-to-or32-includes
but since you are able to compile the test program, i guess you are ok here. (a quick or32-*-objdump of the file should confirm all is ok there)
> * Add the resulting a.out file to the initrd ext2 image using a loop-back > mount. > * Boot openrisc on an FPGA. > * Run the a.out from the busybox command line.
first thing worth checking is that there is the same ELF Machine code set in linux (include/asm-or32/elf.h, define EM_OR32) and in binutils.
there were some changes lately and since ramdisk is still working for you, i would guess that you have the old version of EM_OR32 define in linux, but new one in binutils.
please let me know if this solves your problem; otherwise you may send me the test file source, preprocessed source and binary for me to check.
best regards, p.
|
 |