From: prateemmandal
authorAlan Cox <alan@linux.intel.com>
Fri, 26 Jun 2015 11:03:34 +0000 (12:03 +0100)
committerAlan Cox <alan@linux.intel.com>
Fri, 26 Jun 2015 11:05:08 +0000 (12:05 +0100)
[FUZIX] make for z80pack fails with error ?ASlink-Warning-Undefined Global '_trap_reboot' referenced by module 'syscall_other' (#215)

I am trying to follow https://sinrega.org/?p=218 to build a Fuzix OS disk image and it fails with following  error:

prateem@prateem-VirtualBox:~$ tail -10 fuzix_build_failure.log
Must remake target `sdldz80'.
cc -g -O2 -Wall -Wno-parentheses -DINDEXLIB -DUNIX -I.  -o sdldz80 lk_readnl.o lkaomf51.o lkar.o lkarea.o lkdata.o lkelf.o lkeval.o lkhead.o lklex.o lklib.o lklibr.o lklist.o lkmain.o lkmem.o lknoice.o lkout.o lkrel.o lkrloc.o lkrloc3.o lks19.o lksdcclib.o lksym.o sdld.o lksdcdb.o lkbank.o
Successfully remade target file `sdldz80'.
make[1]: Leaving directory `/home/prateem/work/FUZIX/Kernel/tools/bankld'
      Successfully remade target file `tools/bankld/sdldz80'.
    Must remake target `fuzix.ihx'.
tools/bankld/sdldz80 -n -k /usr/share/sdcc/lib/z80 -f platform-z80pack/fuzix.lnk

?ASlink-Warning-Undefined Global '_trap_reboot' referenced by module 'syscall_other'
make: *** [fuzix.ihx] Error 2

I was able to fix it by making the following changes (but I am not sure if this is the right fix):

Kernel/platform-z80pack/z80pack.s

index bf32b50..1580fcd 100644 (file)
@@ -27,6 +27,8 @@
 
            .globl _fd_bankcmd
 
+           .globl _trap_reboot
+
             ; exported debugging tools
             .globl _trap_monitor
             .globl outchar