[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[openrisc] Running ORPsoc simulator



I am trying to build everything to get a 'Hello World' running on the ORPsoc
simulator. I am doing the following, using
http://www.opencores.org/projects/or1k/GNU%20Toolchain%20Port as the main
guide line, plus the tutorial in
http://www.opencores.org/forums/openrisc/2002/11/00070 and the README.or32
in or1k/uclinux/uClinux-2.0.x. I am having problems further down the line.
'OK' means 'built without error', although there are many warnings (is this
to be expected?):

Get all the tools:
cvs -z9 co or1k/binutils
cvs -z9 co or1k/gcc-3.1
cvs -z9 co or1k/gdb-5.0
cvs -z9 co or1k/uclinux/uClinux-2.0.x
cvs -z9 co or1k/uclibc
cvs -z9 co or1k/or1ksim cd or1k/or1ksim

Get the utilities:
cvs -z9 co or1k/uclinux/userland/init
cvs -z9 co or1k/uclinux/userland/sash
cvs -z9 co or1k/uclinux/userland/route
cvs -z9 co or1k/uclinux/userland/ping

Build the tools:
Build binutils as per instructions - OK
Build GCC as per instructions - OK
Build GDB as per instructions, applying patch to gdb/utils.c as mentioned in
http://www.opencores.org/forums/openrisc/2002/11/00001 - OK
Build simulator - OK
Build ucLinux as per instructions - OK
Build uclibc as per instructions - OK
Rebuild GCC as per instructions - OK

Build the utilities
Build uclinux/userland/init as per README.or32 - FAIL.

I notice the Makefile specifies or32-uclibc-gcc. I changed this to
or32-uclinux-gcc. This failed saying it could not find the standard include
files - why is this happening? So I changed the Makefile to look like this:

OBJS = simpleinit.o

CC = or32-uclinux-gcc
STRIP = or32-uclinux-strip

PRGS = init

all: $(PRGS)

init: $(OBJS)
	$(CC) $(CFLAGS) -r -d $(OBJS) -o $@
	$(STRIP) -g $@
.c.o:
	$(CC) $(CFLAGS) -isystem /usr/include -c $< -o $@

clean:
	rm -f *.[oa] *.coff *~ core init

This runs the following (make -n):

or32-uclinux-gcc -isystem /usr/include -c simpleinit.c -o simpleinit.o
or32-uclinux-gcc -r -d simpleinit.o -o init
or32-uclinux-strip -g init

However, it gives up on the second command with the error:

/opt/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/../../../../or32-uclinux/bin/
ld: cannot open crt0.o: No such file or directory.

Seeing as I rebuilt GCC again after uclibc (with exactly the same parameters
in 'configure'), I would have thought it would know not to pick up crt0.o.
How exactly does GCC know that it is using uclibc?

A further question: README.or32 gives instructions to build romfs or ext2
ramdisk - which one is used by uclinux? Is it ext2 ramdisk, simply because
it overwrites initrd, if you follow the instructions?

I am a bit confused by the whole uclinux process not having used it before.
Any help much appreciated.

Robert Cragie, Design Engineer

Direct: +44 (0) 114 281 4512
_______________________________________________________________
Jennic Ltd, Furnival Street, Sheffield, S1 4QT,  UK
http://www.jennic.com  Tel: +44 (0) 114 281 2655   Confidential
_______________________________________________________________
Visit our stand (C79) at DATE - Munich 4-6 March 2003
_______________________________________________________________

--
To unsubscribe from openrisc mailing list please visit http://www.opencores.org/mailinglists.shtml