The first working ps3toolchain release!
Got it ;)! I noticed that this only runs C++ code on the processor cores. I didn't find any type of graphics functions, which I didn't expect to find seeing that the new update stated that we can now run 'C++ code on the SPUs and PPUs'. Good to know, but I was wondering (if I'm allowed to ask), do you think we'll ever see a ps3sdk that'll have use of the graphics hardware using the sce* functions like the PSP? Also, I have v1.7 on my PS3, will I be able to run homebrew on it, and if so, how would I do that? I was thinking of sticking on a memorystick, but I'm not sure if it has to be in a certain directory (kinda like the PSP's ms0:/PSP/GAME folder). I've never worked on the PS2 before by the way.
hi,
I managed to install the ps3toolchain on a amd64 Debian GNU/Linux box.
Can the PS3 toolchain compile binaries for ps3/linux, ie can it be used as a replacement for the IBM Cell BE devkit ?
when I compile this sample hello.c program :
I get this error :
however, compiling a kernel or the otheros demo example works.
I managed to install the ps3toolchain on a amd64 Debian GNU/Linux box.
Can the PS3 toolchain compile binaries for ps3/linux, ie can it be used as a replacement for the IBM Cell BE devkit ?
when I compile this sample hello.c program :
Code: Select all
#include <stdio.h>
int main( int argc, char **argv )
{
printf( "hello !\n" );
return 0;
}
Code: Select all
ouasse@dionysos:/home/nfs/ouasse/projet/ps3 >ppu-gcc -o hello hello.c
/usr/local/ps3dev/ppu/lib/gcc/ppu/4.2.0/../../../../ppu/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
Wow the only Sony game console you didn't mention there was the PSOne :PVincent_M wrote:Got it ;)! I noticed that this only runs C++ code on the processor cores. I didn't find any type of graphics functions, which I didn't expect to find seeing that the new update stated that we can now run 'C++ code on the SPUs and PPUs'. Good to know, but I was wondering (if I'm allowed to ask), do you think we'll ever see a ps3sdk that'll have use of the graphics hardware using the sce* functions like the PSP? Also, I have v1.7 on my PS3, will I be able to run homebrew on it, and if so, how would I do that? I was thinking of sticking on a memorystick, but I'm not sure if it has to be in a certain directory (kinda like the PSP's ms0:/PSP/GAME folder). I've never worked on the PS2 before by the way.
To answer your question about the sce* functions, the PS3 architecture for homebrew is vastly different than the PSP and as such we don't have access to the libraries in the FW. Right now all homebrew development for the PS3 is done through Linux and is mostly similar to doing normal Linux development except for the SPUs that you have access to.
There are some people here working on a PS3SDK that will allow people to run homebrew / develop without having to do so in a Linux environment but it will still run inside of the same environment that Linux does (under a hypervisor). What does this mean? We have to write all of our own drivers and libraries to do things. Blitting to the screen, disk IO and Network are fairly easy but don't look for full on 3D support anytime soon. Expect USB and Bluetooth to take a good long while to make it into PS3SDK with audio falling somewhere in the middle.
Technically it could, but since newlib is compiled for powerpc64-unknown-none it doesn't know anything about linux. In fact, it doesn't know anything about any particular OS.ouasse wrote:Can the PS3 toolchain compile binaries for ps3/linux, ie can it be used as a replacement for the IBM Cell BE devkit ?
You could edit the ppu entry in config.sub and change it to powerpc64-unknown-linux if you want to build linux binaries.
any idea how to fix this error trying to build using Cygwin?
ive tried this
Code: Select all
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory `/home/Mike/ps3toolchain/scripts/newlib-1.15.0/build-
spu/spu/libgloss/doc'
make[3]: Entering directory `/home/Mike/ps3toolchain/scripts/newlib-1.15.0/build
-spu/spu/libgloss/libnosys'
make[3]: Leaving directory `/home/Mike/ps3toolchain/scripts/newlib-1.15.0/build-
spu/spu/libgloss/libnosys'
make[3]: Entering directory `/home/Mike/ps3toolchain/scripts/newlib-1.15.0/build
-spu/spu/libgloss/spu'
for outputs in libgloss.a crti.o crtn.o crt1.o crt2.o; do\
/usr/bin/install -c -m 644 ${outputs} //usr/local/ps3dev//spu/spu/lib/$
{outputs}; \
done
/usr/bin/install: cannot create regular file `//usr/local/ps3dev//spu/spu/lib/li
bgloss.a': No such host or network path
/usr/bin/install: cannot create regular file `//usr/local/ps3dev//spu/spu/lib/cr
ti.o': No such host or network path
/usr/bin/install: cannot create regular file `//usr/local/ps3dev//spu/spu/lib/cr
tn.o': No such host or network path
/usr/bin/install: cannot create regular file `//usr/local/ps3dev//spu/spu/lib/cr
t1.o': No such host or network path
/usr/bin/install: cannot create regular file `//usr/local/ps3dev//spu/spu/lib/cr
t2.o': No such host or network path
make[3]: *** [install] Error 1
make[3]: Leaving directory `/home/Mike/ps3toolchain/scripts/newlib-1.15.0/build-
spu/spu/libgloss/spu'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/home/Mike/ps3toolchain/scripts/newlib-1.15.0/build-
spu/spu/libgloss'
make[1]: *** [install-target-libgloss] Error 2
make[1]: Leaving directory `/home/Mike/ps3toolchain/scripts/newlib-1.15.0/build-
spu'
make: *** [install] Error 2
ive tried this
but it just rewrites over the makefile when it buildsJim wrote:I'm trying to build the ps3 toolchain on cygwin.
At step 5 (binutils-2.17.50 spu) it's failing building bin2c.c because there are 2 prototypes missing and it's built with -Wmissing-prototypes and -Werror.
I had to addafter the includes to get the step to complete. I know this isn't a good solution though.Code: Select all
int __cdecl _fileno (FILE*); int __cdecl _setmode(int, int);
<edit>
At step 7 (newlib-1.15.0 spu) it fails at 'make install'.
I had to change the install rule in Makefile
newlib-1.15.0\build-spu\spu\libgloss\spuI've removed the / between $(DESTDIR) and ${tooldir}, since my ${tooldir} ends up as /usr/local/ps3dev/spu and that expands to //usr/local/ps3dev/spu.Code: Select all
install: for outputs in ${OUTPUTS}; do\ ${INSTALL_DATA} $${outputs} $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$${outputs}; \ done
Jim
Correct, because if you just run 007- again, it'll run configure again and that's where it's broken.
Check out the script file. In mine, after configure all it does is
So, fix the Makefile like I showed, and then just run make/make install
Jim
Check out the script file. In mine, after configure all it does is
Code: Select all
make clean && make && make install
Jim
thanks for the quick reply
ok so i edit the make file as shown
sorry excuse my ignorance but how do i just run
make clean && make && make install
do i just do that from within the newlib-1.15.0 dir?
edit:
i removed that line from the script file and get the following error
newlib-1.15.0/config.guess
newlib-1.15.0/config.rpath
newlib-1.15.0/config.sub
newlib-1.15.0/configure
newlib-1.15.0/configure.in
newlib-1.15.0/depcomp
newlib-1.15.0/install-sh
newlib-1.15.0/libtool.m4
newlib-1.15.0/ltcf-c.sh
newlib-1.15.0/ltcf-cxx.sh
newlib-1.15.0/ltcf-gcj.sh
newlib-1.15.0/ltconfig
newlib-1.15.0/ltmain.sh
newlib-1.15.0/makefile.vms
newlib-1.15.0/missing
newlib-1.15.0/mkdep
newlib-1.15.0/mkinstalldirs
newlib-1.15.0/move-if-change
newlib-1.15.0/setup.com
newlib-1.15.0/src-release
newlib-1.15.0/symlink-tree
newlib-1.15.0/ylwrap
make: *** No rule to make target `clean'. Stop.
ok so i edit the make file as shown
sorry excuse my ignorance but how do i just run
make clean && make && make install
do i just do that from within the newlib-1.15.0 dir?
edit:
i removed that line from the script file and get the following error
newlib-1.15.0/config.guess
newlib-1.15.0/config.rpath
newlib-1.15.0/config.sub
newlib-1.15.0/configure
newlib-1.15.0/configure.in
newlib-1.15.0/depcomp
newlib-1.15.0/install-sh
newlib-1.15.0/libtool.m4
newlib-1.15.0/ltcf-c.sh
newlib-1.15.0/ltcf-cxx.sh
newlib-1.15.0/ltcf-gcj.sh
newlib-1.15.0/ltconfig
newlib-1.15.0/ltmain.sh
newlib-1.15.0/makefile.vms
newlib-1.15.0/missing
newlib-1.15.0/mkdep
newlib-1.15.0/mkinstalldirs
newlib-1.15.0/move-if-change
newlib-1.15.0/setup.com
newlib-1.15.0/src-release
newlib-1.15.0/symlink-tree
newlib-1.15.0/ylwrap
make: *** No rule to make target `clean'. Stop.
i get the following error running clean
Mike@mike-c15e9068e7 ~/ps3toolchain/scripts/newlib-1.15.0/build-spu/spu/libgloss
/spu
$ make clean
Makefile:139: *** missing separator. Stop.
Mike@mike-c15e9068e7 ~/ps3toolchain/scripts/newlib-1.15.0/build-spu/spu/libgloss
/spu
$
edit appears to be this line
for outputs in ${OUTPUTS}; do\
Mike@mike-c15e9068e7 ~/ps3toolchain/scripts/newlib-1.15.0/build-spu/spu/libgloss
/spu
$ make clean
Makefile:139: *** missing separator. Stop.
Mike@mike-c15e9068e7 ~/ps3toolchain/scripts/newlib-1.15.0/build-spu/spu/libgloss
/spu
$
edit appears to be this line
for outputs in ${OUTPUTS}; do\
i think ive sorted it by changing this line
prefix = /usr/local/ps3dev//spu
to this
prefix = usr/local/ps3dev/spu
it said it worked anyway, so i dont need to build anything else from the newlib-1.15.0 part? or was this file the very last thing that the script did? and can go onto doing 008 now?
thanks for your help
prefix = /usr/local/ps3dev//spu
to this
prefix = usr/local/ps3dev/spu
it said it worked anyway, so i dont need to build anything else from the newlib-1.15.0 part? or was this file the very last thing that the script did? and can go onto doing 008 now?
thanks for your help
excellent, ive finished every script now, is there any documentation to go with this? and maybe some example apps like hello world just to test it compiles correctly etc
edit i noticed the otheros_demo in another thread
but that doesnt seem to compille, i get the following error
edit i noticed the otheros_demo in another thread
but that doesnt seem to compille, i get the following error
Code: Select all
Mike@mike-c15e9068e7 ~/ps3toolchain/otheros_demo/source
$ make
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
-c -o start.o start.S
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
-c -o hv.o hv.S
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
-c -o mmu.o mmu.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
-c -o time.o time.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
-c -o vuart.o vuart.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
-c -o sysmgr.o sysmgr.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
-c -o av.o av.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
-c -o flash.o flash.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
-c -o fb.o fb.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
-c -o font_8x8.o font_8x8.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
-c -o debug.o debug.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
-c -o demo.o demo.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
-c -o gpuinit.o gpuinit.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector
-c -o utils.o utils.c
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector -s
tatic -nostdlib -Wl,-T,script.lds -o demo.elf start.o hv.o mmu.o time.o vuart.o
sysmgr.o av.o flash.o fb.o font_8x8.o debug.o demo.o gpuinit.o utils.o -lm
objcopy -O binary demo.elf demo.bin
objcopy: demo.elf: File format not recognized
make: *** [demo.bin] Error 1
ahh right, the only paths i could see that where supposed to be set where these
export PS3DEV=/usr/local/ps3dev/
export PATH=$PATH:$PS3DEV/bin/
export PATH=$PATH:$PS3DEV/ppu/bin/
export PATH=$PATH:$PS3DEV/spu/bin/
just looking through my folders now and i definitly have these
export PATH=$PATH:$PS3DEV/ppu/bin/
export PATH=$PATH:$PS3DEV/spu/bin/
but is no
export PATH=$PATH:$PS3DEV/bin/
folder
sorry for all this, im fairly new to linux / cygwin
EDIT: seem to have got it to build by changing the make file to
demo.bin : demo.elf
ppu-objcopy -O binary $^ $@
with the following output
is this correct? will be getting my ps3 this weekend to test it out.
im assuming theres an app similar to ps2 link isnt there?
export PS3DEV=/usr/local/ps3dev/
export PATH=$PATH:$PS3DEV/bin/
export PATH=$PATH:$PS3DEV/ppu/bin/
export PATH=$PATH:$PS3DEV/spu/bin/
just looking through my folders now and i definitly have these
export PATH=$PATH:$PS3DEV/ppu/bin/
export PATH=$PATH:$PS3DEV/spu/bin/
but is no
export PATH=$PATH:$PS3DEV/bin/
folder
sorry for all this, im fairly new to linux / cygwin
EDIT: seem to have got it to build by changing the make file to
demo.bin : demo.elf
ppu-objcopy -O binary $^ $@
with the following output
Code: Select all
ppu-gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector -s
tatic -nostdlib -Wl,-T,script.lds -o demo.elf start.o hv.o mmu.o time.o vuart.o
sysmgr.o av.o flash.o fb.o font_8x8.o debug.o demo.o gpuinit.o utils.o -lm
ppu-objcopy -O binary demo.elf demo.bin
gzip -c9v demo.bin > otheros.bld
demo.bin: 80.4%
im assuming theres an app similar to ps2 link isnt there?
-
- Posts: 23
- Joined: Sat Nov 25, 2006 5:53 am
-
- Posts: 23
- Joined: Sat Nov 25, 2006 5:53 am
Oh, right. Bollocks, I guess I'm going to be busy learning how to do all this tonight then by looking at the scripts (still a bit of a newbie when it comes to Linux) :p Thanks ooPo.ooPo wrote:It needs to be changed in the config.sub file after patching each of binutils, gcc and newlib. You'll have to manually unpack, patch, modify and build each package.
hi,
I've followed Jim's tips to solve the issues in stage 5 and 7 (THX!@Jim) and it builds everything so far (at least there were no errors).
now building stage 8
I've followed Jim's tips to solve the issues in stage 5 and 7 (THX!@Jim) and it builds everything so far (at least there were no errors).
now building stage 8
I got the following error and i'm not sure what it means, nor how to solve that :( (i'm a make-n00b)$ scripts/008-gcc-4.3-20070608-spu-stage2.sh
has anyone an idea what it means and how to solve that issue? :/checking whether -lc should be explicitly linked in... yes
checking size of int... no
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking for shl_load... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
4
checking for uintptr_t... make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: *** Waiting for unfinished jobs....
yes
checking for a 64-bit type... uint64_t
checking for pid_t... yes
checking for working strncmp... no
updating cache ./config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating config.h
config.status: executing default commands
Adding multilib support to Makefile in ../../../libiberty
multidirs=
with_multisubdir=
make[1]: Leaving directory `PS3Dev/ps3toolchain/gcc-4.3-20070608/build-spu-stage2'
make: *** [all] Error 2
hi
I'm having trouble building the toolchain under cygwin - I'm currently trying to build stage 6 (./006-gcc-4.3-20070608-spu-stage1.sh) and get the "checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile" errors others had reported:
I get:
I've tried changing the makefile prefix line from
to
but still get the same issue
'config.log' in scripts/gcc-4.3-20070608/build-spu-stage1/spu/libgcc contains the following block:
is the 'xgcc: '-V' must come at the start of the command line' line important ?
'/cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/as: line 60: exec: : not found'
is this telling me that it can't find 'as' ? - I do have this file:
/cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/as
thanks for any help - I feel I'm pretty close!
-j
I'm having trouble building the toolchain under cygwin - I'm currently trying to build stage 6 (./006-gcc-4.3-20070608-spu-stage1.sh) and get the "checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile" errors others had reported:
Code: Select all
$ cd /cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1
$ make
I get:
Code: Select all
checking whether ln -s works... yes
checking for spu-gcc... /cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/xgcc -B/cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/ -B/usr/local/ps3dev/spu/spu/bin/ -B/usr/local/ps3dev/spu/spu/lib/ -isystem /usr/local/ps3dev/spu/spu/include -isystem /usr/local/ps3dev/spu/spu/sys-include
checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory `/cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1'
make: *** [all] Error 2
I've tried changing the makefile prefix line from
Code: Select all
prefix = /usr/local/ps3dev/spu
Code: Select all
prefix = usr/local/ps3dev/spu
but still get the same issue
'config.log' in scripts/gcc-4.3-20070608/build-spu-stage1/spu/libgcc contains the following block:
Code: Select all
gcc version 4.3.0 20070608 (experimental)
configure:2373: $? = 0
configure:2375: /cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/xgcc -B/cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/ -B/usr/local/ps3dev/spu/spu/bin/ -B/usr/local/ps3dev/spu/spu/lib/ -isystem /usr/local/ps3dev/spu/spu/include -isystem /usr/local/ps3dev/spu/spu/sys-include -V </dev/null >&5
xgcc: '-V' must come at the start of the command line
configure:2378: $? = 1
configure:2397: /cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/xgcc -B/cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/ -B/usr/local/ps3dev/spu/spu/bin/ -B/usr/local/ps3dev/spu/spu/lib/ -isystem /usr/local/ps3dev/spu/spu/include -isystem /usr/local/ps3dev/spu/spu/sys-include -o conftest -O2 -g -O2 conftest.c >&5
/cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/as: line 60: exec: : not found
configure:2400: $? = 1
configure:2566: checking for suffix of object files
configure:2587: /cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/xgcc -B/cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/ -B/usr/local/ps3dev/spu/spu/bin/ -B/usr/local/ps3dev/spu/spu/lib/ -isystem /usr/local/ps3dev/spu/spu/include -isystem /usr/local/ps3dev/spu/spu/sys-include -c -O2 -g -O2 conftest.c >&5
/cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/as: line 60: exec: : not found
configure:2590: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2604: error: cannot compute suffix of object files: cannot compile
is the 'xgcc: '-V' must come at the start of the command line' line important ?
'/cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/as: line 60: exec: : not found'
is this telling me that it can't find 'as' ? - I do have this file:
/cygdrive/c/tmp/ps3toolchain/scripts/gcc-4.3-20070608/build-spu-stage1/./gcc/as
thanks for any help - I feel I'm pretty close!
-j
so
had empty paths for as and ld:
and indeed, I only have ar, nm, objcopy, objdump, ranlib and strip in
so presumably spu binutils didn't build properly ?
-j
Code: Select all
ps3toolchain/build/gcc-4.3-20070608/build-spu-stage1/gcc/as
Code: Select all
ORIGINAL_AS_FOR_TARGET="/usr/local/ps3dev/spu/spu/bin/as"
ORIGINAL_LD_FOR_TARGET="/usr/local/ps3dev/spu/spu/bin/ld"
ORIGINAL_NM_FOR_TARGET="/usr/local/ps3dev/spu/spu/bin/nm"
exeext=.exe
Code: Select all
/usr/local/ps3dev/spu/spu/bin/
-j
ugh, I'd pasted the version of as I'd modified before I realized the actual exes weren't there - here's the original:
Code: Select all
ORIGINAL_AS_FOR_TARGET=""
ORIGINAL_LD_FOR_TARGET=""
ORIGINAL_NM_FOR_TARGET="/usr/local/ps3dev/spu/spu/bin/nm"
exeext=.exe