Port-powerpc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Porting NetBSD to the GameCube
Water NB wrote:
> On Fri, Nov 11, 2005 at 12:05:04PM +0100, St?phane Witzmann wrote:
>> Hello
>>
>> I'm trying to port NetBSD to the GameCube (but don't expect something big
>> right now). So far, I have gathered code from other ppc architectures,
>> removed all the I could from it, and made a minimalistic kernel config
>> file. So I've got something that builds. Now I'm trying to set the entry
>> point to 0x80003100, but the building fails. Some help would be very
>> appreciated. Below are the details :
>>
>> # link TEST/netbsd
>> /home/durandil/NetBSD/gcdev/cross//tools/bin/powerpc--netbsd-ld -N -Ttext
>> 0x80003100 -e __start -X -o netbsd ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
>> locore.o(.text+0x414): In function `trapcode':
>> : relocation truncated to fit: R_PPC_ADDR24 s_trap
>> locore.o(.text+0x454): In function `alitrap':
>> : relocation truncated to fit: R_PPC_ADDR24 s_trap
>> locore.o(.text+0x4fc): In function `dsitrap':
>> : relocation truncated to fit: R_PPC_ADDR24 disitrap
>> locore.o(.text+0x5a4): In function `dsi601trap':
>> : relocation truncated to fit: R_PPC_ADDR24 disitrap
>> locore.o(.text+0x5e4): In function `extint':
>> : relocation truncated to fit: R_PPC_ADDR24 extintr
>> locore.o(.text+0x624): In function `decrint':
>> : relocation truncated to fit: R_PPC_ADDR24 decrintr
>> locore.o(.text+0x8a0): In function `ddblow':
>> : relocation truncated to fit: R_PPC_ADDR24 u_trap
>> locore.o(.text+0x8c4): In function `ddblow':
>> : relocation truncated to fit: R_PPC_ADDR24 ddbtrap
>> locore.o(.text+0xcfc): In function `sctrap':
>> : relocation truncated to fit: R_PPC_ADDR24 s_sctrap
>>
>> # $NetBSD: std.gamecube $
>> #
>> # standard, required NetBSD/gamecube 'options'
>>
>> machine gamecube powerpc
>>
>> options PPC_OEA # Support Motorola PPC60x CPUs
>> makeoptions PPCDIR="oea" # Tell Makefile.powerpc what dir to use
>>
>> options EXEC_ELF32 # exec ELF binaries
>> options EXEC_SCRIPT # exec #! scripts
>>
>> options INTSTK=0x2000
>>
>> makeoptions TEXTADDR=0x80003100
>>
>> See http://www.gcdev.com/download/yet_another_gamecube_doc.html.tar.gz
>> for technical information on the GameCube.
>> Thanks.
>>
>> Stéphane Witzmann
>>
>>
>>
>>
> It seems that is a problem of long-jump.
> short-jump of PowerPC is in a range of only 32M (25 bit)
> You can try CC option -mlong-calls
Added: makeoptions CFLAGS="-mlong-calls"
Building fails as follows :
# create TEST/assym.h
cat /home/durandil/NetBSD/gcdev/src/sys/arch/powerpc/oea/genassym.cf |
sh /home/durandil/NetBSD/gcdev/src/sys/kern/genassym.sh
/home/durandil/NetBSD/gcdev/cross//tools/bin/powerpc--netbsd-gcc
-mlong-calls -msoft-float -ffreestanding -g -O2 -Wreturn-type -Werror
-Wall -Wno-main -Wno-format-zero-length -Wpointer-arith
-Wmissing-prototypes -Wstrict-prototypes -Wno-sign-compare
-fno-zero-initialized-in-bss -Dgamecube=gamecube -I.
-I/home/durandil/NetBSD/gcdev/src/sys/arch
-I/home/durandil/NetBSD/gcdev/src/sys -nostdinc -DDIAGNOSTIC -DDEBUG
-DMAXUSERS=8 -D_KERNEL -D_KERNEL_OPT > assym.h.tmp && mv -f assym.h.tmp
assym.h
cc1: error: invalid option `long-calls'
Looking at "man gcc", there is no -mlong-calls option :
RS/6000 and PowerPC Options -mcpu=cpu-type -mtune=cpu-type -mpower
-mno-power -mpower2 -mno-power2 -mpowerpc -mpowerpc64 -mno-pow-
erpc -maltivec -mno-altivec -mpowerpc-gpopt -mno-powerpc-gpopt
-mpowerpc-gfxopt -mno-powerpc-gfxopt -mnew-mnemonics
-mold-mnemonics -mfull-toc -mminimal-toc -mno-fp-in-toc
-mno-sum-in-toc -m64 -m32 -mxl-call -mno-xl-call -mpe
-msoft-float -mhard-float -mmultiple -mno-multiple -mstring
-mno-string -mupdate -mno-update -mfused-madd -mno-fused-madd
-mbit-align -mno-bit-align -mstrict-align -mno-strict-align
-mrelocatable -mno-relocatable -mrelocatable-lib -mno-relocat-
able-lib -mtoc -mno-toc -mlittle -mlittle-endian -mbig
-mbig-endian -mcall-aix -mcall-sysv -mcall-netbsd
-maix-struct-return -msvr4-struct-return -mabi=altivec
-mabi=no-altivec -mabi=spe -mabi=no-spe -misel=yes -misel=no
-mprototype -mno-prototype -msim -mmvme -mads -myellowknife
-memb -msdata -msdata=opt -mvxworks -mwindiss -G num -pthread
Did I miss something ?
S.W.
Home |
Main Index |
Thread Index |
Old Index