Re: rolo bootloader problem

Hi,

> > I want using rolo as the bootloader in my sc520 board, but when I > compiled rolo, I met problem. > > When the ld86 link object files to produce rolo.com that output: > "undefined symbol:_assert". I think that is head files problem, so I > modify Makefile to indicate include path, but the case is same. I > don't know how to solve the problem. > > I make rolo with the "bcc "which I download and also try another one > in redhat9.0, but the problems are same. > > Please give me some suggestion.

This is IMHO a bug in the BCC distribution: in assert.h, there is an "#ifdef" that should be an "#ifndef". Here is a patch against the current dev86 source tree to fix this problem (and a few others, too):

-------------------------- cut here ------------------------------ diff -urN dev86-0.16.11/libc/bios/Makefile dev86-0.16.11.rob/libc/bios/Makefile

--- dev86-0.16.11/libc/bios/Makefile Sat Aug 3 14:04:40 2002

+++ dev86-0.16.11.rob/libc/bios/Makefile Mon Jul 28 21:27:49 2003 @@ -4,7 +4,7 @@ ifeq ($(LIB_OS),BIOS) ASRC=bios.c

-AOBJ=bios_start.o bios_isatty.o bios_nofiles.o \

+AOBJ=bios_start.o bios_isatty.o bios_kbhit.o bios_nofiles.o \ bios_read.o bios_write.o bios_lseek.o bios_close.o BSRC=bios_vid.c @@ -12,7 +12,7 @@ bios_rdline.o CSRC=bios_min.c

-COBJ=bios_putc.o bios_getc.o

+COBJ=bios_putc.o bios_getc.o bios_khit.o DSRC=bios_disk.c DOBJ=bios_disk_rd.o bios_disk_wr.o bios_disk_rs.o bios_get_dpt.o diff -urN dev86-0.16.11/libc/error/Makefile dev86-0.16.11.rob/libc/error/Makefile

--- dev86-0.16.11/libc/error/Makefile Sat Mar 8 21:11:22 1997

+++ dev86-0.16.11.rob/libc/error/Makefile Mon Jul 28 21:09:46 2003 @@ -6,13 +6,12 @@ ifeq ($(LIB_OS),ELKS) OBJ=error.o sys_errlist.o perror.o sys_siglist.o __assert.o +else +OBJ=__assert.o +endif all: $(LIBC)($(OBJ)) @$(RM) $(OBJ)

-else

-all:

- @:

-endif clean: rm -f *.o libc.a diff -urN dev86-0.16.11/libc/error/__assert.c dev86-0.16.11.rob/libc/error/__assert.c

--- dev86-0.16.11/libc/error/__assert.c Sun Mar 3 22:29:51 1996

+++ dev86-0.16.11.rob/libc/error/__assert.c Mon Jul 28 21:10:59 2003 @@ -24,5 +24,10 @@ errput(" at line "); errput(itoa(linenumber)); errput(".\n"); +#ifdef __STANDALONE__
  • errput("Program Halted.\n");
  • while(1);
+#else abort(); +#endif } diff -urN dev86-0.16.11/libc/include/assert.h dev86-0.16.11.rob/libc/include/assert.h

--- dev86-0.16.11/libc/include/assert.h Sat Feb 24 16:21:20 1996

+++ dev86-0.16.11.rob/libc/include/assert.h Mon Jul 28 20:10:15 2003 @@ -1,4 +1,4 @@

-#ifdef __ASSERT_H

+#ifndef __ASSERT_H #define __ASSERT_H #include

-------------------------- cut here ------------------------------ Get the latest source tarball (version 0.16.11) from

formatting link
apply this patch, do a make; make install. That should do it.

Rob

--
Robert Kaiser                     email: rkaiser AT sysgo DOT de
SYSGO AG                          http://www.elinos.com
Klein-Winternheim / Germany       http://www.sysgo.de
Reply to
Robert Kaiser
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.