OtherOS demo 1.1 (with RSX visuals)

Technical discussion on the newly released and hard to find PS3.

Moderators: cheriff, emoon

rapso
Posts: 140
Joined: Mon Mar 28, 2005 6:35 am

Post by rapso »

hi,

i'm trying to get 720p instead of 480i, is there any known setting for that?

i've tried

Code: Select all

static const unsigned char avb_param_720p_cmd[] = {
  2, 5, /* av command version */
  0, 148, /* Length following this length field */
  4, 0, 0, 1, /* command id:  AVB_PARAM */
  0, 2, /* number of video packets */
  0, 0, /* number of audio packets */
  0, 2, /* number of av video packets */
  0, 0, /* number of av audio packets */
  /* pkt_video_mode x 2 */
  2, 5,
  0, 44,
  1, 0, 0, 2,
  0, 0, 0, 0, /* head A */
  0, 0, 0, 0, 
  0, 0, 0, 5, /* 720p */
  0, 0, 0x5, 0x00, /* w=1280 */
  0, 0, 0x2, 0xd0, /* h=720 */
  0, 0, 0x14,0x00, /* pitch=5120 */
  0, 0, 0, 0,
  0, 0, 0, 7, /* XRGB */
  0, 0, 0, 0,
  0, 0, 0, 0,
  2, 5,
  0, 44,
  1, 0, 0, 2,
  0, 0, 0, 1, /* head B */
  0, 0, 0, 0, 
  0, 0, 0, 3, /* 576I */
  0, 0, 0x5, 0x00, /* w=1280 */
  0, 0, 0x2, 0xd0, /* h=720 */
  0, 0, 0x14,0x00, /* pitch=5120 */
  0, 0, 0, 0,
  0, 0, 0, 7, /* XRGB */
  0, 0, 0, 0,
  0, 0, 0, 0,
  /* pkt_av_video_cs x 2 */
  2, 5,
  0, 16,
  0, 1, 0, 1,
  0, 0, /* avport HDMI 0 */
  0, 5, /* av_vid 576I */
  0, 0, /* av_cs_out RGB-8 */
  0, 0, /* av_cs_in RGB-8 */
  0, /* dither off */
  0, /* bitlen_out 8 */
  0, /* super_white off */
  1, /* aspect 4:3 */
  2, 5,
  0, 16,
  0, 1, 0, 1,
  0, 16, /* avport AVMULTI 0 */
  0, 8, /* av_vid 720p */
  0, 0, /* av_cs_out RGB-8 */
  0, 0, /* av_cs_in RGB-8 */
  0, /* dither off */
  0, /* bitlen_out 8 */
  0, /* super_white off */
  1, /* aspect 4:3 */
};
but it keeps the ps3 just crashing :(

thx in advance.
User avatar
mc
Posts: 211
Joined: Wed Jan 12, 2005 7:32 am
Location: Linköping

Post by mc »

If you want the second PPU hardware thread to do something, just change the loop at
"secondary_hold" in start.S to go somewhere useful. Note that you'll need to set
up MSR, SLB etc separately for the second thread.
Flying at a high speed
Having the courage
Getting over crisis
I rescue the people
rapso
Posts: 140
Joined: Mon Mar 28, 2005 6:35 am

Post by rapso »

mc wrote:If you want the second PPU hardware thread to do something, just change the loop at
"secondary_hold" in start.S to go somewhere useful. Note that you'll need to set
up MSR, SLB etc separately for the second thread.
oh, that's awesome, thx. I will check that.
I was also seekin through the kernel source and found some pthread stuff, which was a way to highlevell for my needs to reimplement it, ur solution is probably best :).

regarding this 720p request, i found the 1080i thread for other os, which has some 720p setup, but on my 1050p TFT it seems still to flicker like interlacing (while games dont), I wonder if that setup was correct.
but maybe someone else seeks for that as well, so

Code: Select all

/* 720p 60 hz*/ 
static const unsigned char avb_param_pal_cmd2[] = { 
  2, 5, /* av command version */ 
  0, 148, /* Length following this length field */ 
  4, 0, 0, 1, /* command id:  AVB_PARAM */ 
  0, 2, /* number of video packets */ 
  0, 0, /* number of audio packets */ 
  0, 2, /* number of av video packets */ 
  0, 0, /* number of av audio packets */ 
  /* pkt_video_mode x 2 */ 
  2, 5, 
  0, 44, 
  1, 0, 0, 2, 
  0, 0, 0, 0, /* head A */ 
  0, 0, 0, 0, 
  0, 0, 0, 9, /* 720p */ 
  0, 0, 0x5, 0x0, /* w=1280 */ 
  0, 0, 0x2, 0xd0, /* h=720 */ 
  0, 0, 0x14, 0x0, /* pitch=5120 */ 
  0, 0, 0, 0, 
  0, 0, 0, 7, /* XRGB */ 
  0, 0, 0, 0, 
  0, 0, 0, 0, 
  2, 5, 
  0, 44, 
  1, 0, 0, 2, 
  0, 0, 0, 1, /* head B */ 
  0, 0, 0, 0, 
  0, 0, 0, 9, /* 720p */ 
  0, 0, 0x5, 0x0, /* w=1280 */ 
  0, 0, 0x2, 0xd0, /* h=720 */ 
  0, 0, 0x14, 0x0, /* pitch=5120 */ 
  0, 0, 0, 0, 
  0, 0, 0, 7, /* XRGB */ 
  0, 0, 0, 0, 
  0, 0, 0, 0, 
  /* pkt_av_video_cs x 2 */ 
  2, 5, 
  0, 16, 
  0, 1, 0, 1, 
  0, 0, /* avport HDMI 0 */ 
  0, 2, /* av_vid 720p */ 
  0, 1, /* av_cs_out YUV444-8 */ 
  0, 0, /* av_cs_in RGB-8 */ 
  0, /* dither off */ 
  0, /* bitlen_out 8 */ 
  0, /* super_white off */ 
  1, /* aspect 4:3 */ 
  2, 5, 
  0, 16, 
  0, 1, 0, 1, 
  0, 16, /* avport AVMULTI 0 */ 
  0, 2, /* av_vid 720p */ 
  0, 1, /* av_cs_out YUV444-8 */ 
  0, 0, /* av_cs_in RGB-8 */ 
  0, /* dither off */ 
  0, /* bitlen_out 8 */ 
  0, /* super_white off */ 
  1, /* aspect 4:3 */ 
}; 
next stuff i was lookin in is

Code: Select all

LV1_CALL(enable_logical_spu,					2, 0, 207 ) 
comparing to libspu from sourceforge, it seems they're not 1to1 mapped, as creating a context with libspu calls some hv-function that expects a way more parameters. i wonder what parameters this function needs or where some source for reference is.


(thx once again mc)
rapso
Posts: 140
Joined: Mon Mar 28, 2005 6:35 am

Post by rapso »

i got some time to test the threading, it was quite easy to setup, not sure if it's 100% correct tho. but maybe someone needs some performance?

the whole modified start.S:

Code: Select all

#define LOAD_REG_IMMEDIATE(reg,expr)		\
	lis     reg,(expr)@highest;		\
	ori     reg,reg,(expr)@higher;		\
	rldicr  reg,reg,32,31;			\
	oris    reg,reg,(expr)@h;		\
	ori     reg,reg,(expr)@l;

#define STACK_FRAME_OVERHEAD 112 /* minimum ppc64 stack frame */

/* MSR bits */
#define MSR_SF	 &#40;1<<63&#41;        /* Enable 64 bit mode */
#define MSR_ISF	 &#40;1<<61&#41;        /* Interrupt 64b mode valid on 630 */
#define MSR_HV 	 &#40;1<<60&#41;        /* Hypervisor state */
#define MSR_VEC	 &#40;1<<25&#41;	/* Enable AltiVec */
#define MSR_POW	 &#40;1<<18&#41;	/* Enable Power Management */
#define MSR_WE	 &#40;1<<18&#41;	/* Wait State Enable */
#define MSR_TGPR &#40;1<<17&#41;	/* TLB Update registers in use */
#define MSR_CE	 &#40;1<<17&#41;	/* Critical Interrupt Enable */
#define MSR_ILE	 &#40;1<<16&#41;	/* Interrupt Little Endian */
#define MSR_EE	 &#40;1<<15&#41;	/* External Interrupt Enable */
#define MSR_PR	 &#40;1<<14&#41;	/* Problem State / Privilege Level */
#define MSR_FP	 &#40;1<<13&#41;	/* Floating Point enable */
#define MSR_ME	 &#40;1<<12&#41;	/* Machine Check Enable */
#define MSR_FE0	 &#40;1<<11&#41;	/* Floating Exception mode 0 */
#define MSR_SE	 &#40;1<<10&#41;	/* Single Step */
#define MSR_BE	 &#40;1<<9&#41;		/* Branch Trace */
#define MSR_DE	 &#40;1<<9&#41; 	/* Debug Exception Enable */
#define MSR_FE1	 &#40;1<<8&#41;		/* Floating Exception mode 1 */
#define MSR_IP	 &#40;1<<6&#41;		/* Exception prefix 0x000/0xFFF */
#define MSR_IR	 &#40;1<<5&#41; 	/* Instruction Relocate */
#define MSR_DR	 &#40;1<<4&#41; 	/* Data Relocate */
#define MSR_PE	 &#40;1<<3&#41;		/* Protection Enable */
#define MSR_PX	 &#40;1<<2&#41;		/* Protection Exclusive Mode */
#define MSR_PMM	 &#40;1<<2&#41;		/* Performance monitor */
#define MSR_RI	 &#40;1<<1&#41;		/* Recoverable Exception */
#define MSR_LE	 &#40;1<<0&#41; 	/* Little Endian */

/* SPRs */
#define SRR0	 0x01A	/* Save/Restore Register 0 */
#define SRR1	 0x01B	/* Save/Restore Register 1 */
#define CTRLF	 0x088
#define SPRG0    0x110
#define SPRG1    0x111
#define SPRG2    0x112
#define SPRG3    0x113
	
		
	.global _start, ._mmu_off, __mmu_off

	
	/* This is the entry point of the main PPE thread
	   when we're started from kboot.

	   r3 contains a pointer to the "device tree"
	   r4 contains the address to which the program was loaded
	      &#40;When started from kboot, the program isn't loaded to
	       address 0, but to an arbitrary address.  The first
	       256 bytes are copied to 0, but the rest needs to be
	       moved by the program itself&#41;
	   r5 contains 0
	*/
_start&#58;	
	b relocate_and_start_master
	trap




	/* This is the entry point of the PPE slaves &#40;of which
	   there is exactly one in the case of the PS3&#41; when
	   we're started from kboot.

	   r3 holds the number of the CPU &#40;= 1&#41;   */
	
	. = 0x60





	/* This is the entry point of both the main and slave
	   PPE threads when we're started from GameOS.

	   r3 appears to hold the CPU number, but we'll check nevertheless */

	. = 0x100

	mfspr	r3, CTRLF
	cntlzw.	r3, r3	/* r3 is now CPU number  0=master, 1=slave */
	bne	start_slave

	b start_master


	/* Exception and interrupt vectors */

	. = 0x200 /* Machine check */
	mtspr	SPRG1, r3
	li r3,0x200
	b general_exception

	. = 0x300 /* DSI */
	mtspr	SPRG1, r3
	li r3,0x300
	b general_exception

	. = 0x380 /* Data segment */
	mtspr	SPRG1, r3
	li r3,0x380
	b general_exception

	. = 0x400 /* ISI */
	mtspr	SPRG1, r3
	li r3,0x400
	b general_exception

	. = 0x480 /* Instruction segment */
	mtspr	SPRG1, r3
	li r3,0x480
	b general_exception

	. = 0x500 /* External interrupt */
	mtspr	SPRG1, r3
	li r3,0x500
	b general_exception

	. = 0x600 /* Alignment */
	mtspr	SPRG1, r3
	li r3,0x600
	b general_exception

	. = 0x700 /* Program */
	mtspr	SPRG1, r3
	li r3,0x700
	b general_exception

	. = 0x800 /* Floating point unavailable */
	mtspr	SPRG1, r3
	li r3,0x800
	b general_exception

	. = 0x900 /* Decrementer */
	mtspr	SPRG1, r3
	li r3,0x900
	b general_exception

	. = 0xa00 /* Reserved 1 */
	mtspr	SPRG1, r3
	li r3,0xa00
	b general_exception

	. = 0xb00 /* Reserved 2 */
	mtspr	SPRG1, r3
	li r3,0xb00
	b general_exception

	. = 0xc00 /* System call */
	mtspr	SPRG1, r3
	li r3,0xc00
	b general_exception

	. = 0xd00 /* Trace */
	mtspr	SPRG1, r3
	li r3,0xd00
	b general_exception

	. = 0xf00 /* Performance monitor */
	mtspr	SPRG1, r3
	li r3,0xf00
	b general_exception


general_exception&#58;
	/* This handler does not return, so trashing registers is ok */
	mfspr r4, SRR0
	mfspr r5, SRR1
	LOAD_REG_IMMEDIATE&#40;r1,__stack_end&#41;
	li	r0,0
	stdu	r0,-STACK_FRAME_OVERHEAD&#40;r1&#41;
	LOAD_REG_IMMEDIATE&#40;r2,__toc_start&#41;
	addi	r2,r2,0x4000
	addi	r2,r2,0x4000
	bl	.__mmu_on
	bl	.exception_handler
1&#58;	b 1b


relocate_and_start_master&#58;
	/* This is the code which moves us to address 0 if
	   we're started from kboot */
	/* This code needs to be position independent */	

	bl	.__mmu_off  /* just in case */

	li	r3,0  /* Target address */
	/* The source address is already in r4 */

	li      r5,copy_to_here@l       /* # bytes of memory to copy */
	li	r6,0x100		/* Start offset, the first 0x100 */
					/* bytes were copied earlier.	 */

	bl	.copy_and_flush		/* copy the first n bytes	 */
					/* this includes the code being	 */
					/* executed here.		 */

	ba 4f				/* Jump to the copy of this code */
4&#58;					/* that we just made/relocated	 */

	LOAD_REG_IMMEDIATE&#40;r5,_edata&#41;
	bl	.copy_and_flush		/* copy the rest */

	b  start_master


.__mmu_off&#58;
	mfmsr	r3
	andi.	r0,r3,MSR_IR|MSR_DR
	beqlr
	mflr	r4
	andc	r3,r3,r0
	mtspr	SRR0,r4
	mtspr	SRR1,r3
	sync
	rfid
	b	.	/* prevent speculative execution */


.copy_and_flush&#58;
	addi	r5,r5,-8
	addi	r6,r6,-8
4&#58;	li	r0,16			/* Use the least common		*/
					/* denominator cache line	*/
					/* size.  This results in	*/
					/* extra cache line flushes	*/
					/* but operation is correct.	*/

	mtctr	r0			/* put # words/line in ctr	*/
3&#58;	addi	r6,r6,8			/* copy a cache line		*/
	ldx	r0,r6,r4
	stdx	r0,r6,r3
	bdnz	3b
	dcbst	r6,r3			/* write it to memory		*/
	sync
	icbi	r6,r3			/* flush the icache line	*/
	cmpld	0,r6,r5
	blt	4b
	sync
	addi	r5,r5,8
	addi	r6,r6,8
	blr

	.align 8
copy_to_here&#58;

start_slave&#58;
	/* NOP out the kboot entry vector */
	li	r3,_start@l
	lis	r0,0x60000000@h	/* nop */
	stw	r0,0&#40;r3&#41;
	dcbst	0,r3
	sync
	icbi	0,r3
	isync
		
	/* Clear out the BSS */
	LOAD_REG_IMMEDIATE&#40;r11,__bss_stop&#41;
	LOAD_REG_IMMEDIATE&#40;r8,__bss_start&#41;
	sub	r11,r11,r8		/* bss size			*/
	addi	r11,r11,7		/* round up to an even double word */
	rldicl. r11,r11,61,3		/* shift right by 3		*/
	beq	4f
	addi	r8,r8,-8
	li	r0,0
	mtctr	r11			/* zero this many doublewords	*/
3&#58;	stdu	r0,8&#40;r8&#41;
	bdnz	3b
4&#58;

	/* Setup stack */
	LOAD_REG_IMMEDIATE&#40;r1,__stack_slave_end&#41;
	li	r0,0
	stdu	r0,-STACK_FRAME_OVERHEAD&#40;r1&#41;

	/* Setup TOC */
	LOAD_REG_IMMEDIATE&#40;r2,__toc_start&#41;
	addi	r2,r2,0x4000
	addi	r2,r2,0x4000

	/* Create and activate address space */
	;bl	.mmu_init
	;bl	.__mmu_on

	/* And we're off... */
	bl	.main2

1&#58;
	b 1b

	
start_master&#58;
	/* NOP out the kboot entry vector */
	li	r3,_start@l
	lis	r0,0x60000000@h	/* nop */
	stw	r0,0&#40;r3&#41;
	dcbst	0,r3
	sync
	icbi	0,r3
	isync
		
	/* Clear out the BSS */
	LOAD_REG_IMMEDIATE&#40;r11,__bss_stop&#41;
	LOAD_REG_IMMEDIATE&#40;r8,__bss_start&#41;
	sub	r11,r11,r8		/* bss size			*/
	addi	r11,r11,7		/* round up to an even double word */
	rldicl. r11,r11,61,3		/* shift right by 3		*/
	beq	4f
	addi	r8,r8,-8
	li	r0,0
	mtctr	r11			/* zero this many doublewords	*/
3&#58;	stdu	r0,8&#40;r8&#41;
	bdnz	3b
4&#58;

	/* Setup stack */
	LOAD_REG_IMMEDIATE&#40;r1,__stack_end&#41;
	li	r0,0
	stdu	r0,-STACK_FRAME_OVERHEAD&#40;r1&#41;

	/* Setup TOC */
	LOAD_REG_IMMEDIATE&#40;r2,__toc_start&#41;
	addi	r2,r2,0x4000
	addi	r2,r2,0x4000

	/* Create and activate address space */
	bl	.mmu_init
	bl	.__mmu_on

	/* And we're off... */
	bl	.main

1&#58;
	b 1b


.__mmu_on&#58;
	LOAD_REG_IMMEDIATE&#40;r0, MSR_ME | MSR_RI | MSR_IR | MSR_DR | MSR_ISF | MSR_SF&#41;
	mtspr	SRR1,r0
	mflr	r0
	mtspr	SRR0,r0
	sync
	rfid
	b	.	/* prevent speculative execution */


	.section ".opd","aw"

__mmu_off&#58;
	.llong .__mmu_off
	.llong .TOC.@tocbase
	.llong 0


	.section ".bss"

	.align 3

__stack&#58;
	.space 65536
__stack_end&#58;

__stack_slave&#58;
	.space 65536
__stack_slave_end&#58;
add this above main() in demo.c

Code: Select all


void main2&#40;&#41;
&#123;
	unsigned int a;
	while&#40;1&#41;
	&#123;
		for&#40;a=0;a<sizeof&#40;scrolltext&#41;-1;a++&#41;
		&#123;
			if&#40;scrolltext&#91;a&#93;>='a' && scrolltext&#91;a&#93;<='z'&#41;
				scrolltext&#91;a&#93;+='A'-'a';
		&#125;
		sleep&#40;1&#41;;
		for&#40;a=0;a<sizeof&#40;scrolltext&#41;-1;a++&#41;
		&#123;
			if&#40;scrolltext&#91;a&#93;>='A' && scrolltext&#91;a&#93;<='Z'&#41;
				scrolltext&#91;a&#93;+='a'-'A';
		&#125;
		sleep&#40;1&#41;;
	&#125;
&#125;
and remove the const from 'scrolltext'.
User avatar
mc
Posts: 211
Joined: Wed Jan 12, 2005 7:32 am
Location: Linköping

Post by mc »

Here you haven't set up the SLB or enabled the MMU for the second
thread. This means you will not be able to access DDR ram, and
probably not all of the XDR ram either.

Also, clearing the BSS from both threads is probably not a good idea.
What you should do is leave global setup like clearing the BSS and
setting up the PTEGs to the main thread, and create a synchronization
point so that the secondary thread doesn't enter main2() until the main
thread has entered main(). Just make the secondary thread check a
global variable and wait for main() to change it.
Flying at a high speed
Having the courage
Getting over crisis
I rescue the people
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Well, it's been a while since anyone posted here, but I wanted to ask a question related to 2.10+... if you look at the demo source, you find

Code: Select all

#define GPU_CMD_BUF_SIZE			&#40;1024 * 1024&#41;
The issue is that a post by Geert Uytterhoeven to the linux kernel archive tells us that starting with 2.10, the GPU command buffer must be at least 2 MB. I've successfully run this demo in 2.1, but I wonder if someone who couldn't run it in 2.10+ might try bumping the command buffer to 2 MB and try it again. I'd do it myself, but I'm scared to update past 2.1 until something is found about 3D in 2.10+. :)
carlosn
Posts: 38
Joined: Thu Mar 10, 2005 2:14 am
Location: Orlando, Florida, US
Contact:

Post by carlosn »

I changed the line of code to
#define GPU_CMD_BUF_SIZE (2 * 1024 * 1024)
and run the demo, but all I get is a blank screen.

I am running firmware 2.42

Demo 1.0 works without a glitch.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Well, that's good to know. I didn't think it was something so easy. :) Especially after finally making it through all 16 pages of the thread on the RSX fifo pushbuffer. That took a while to go through.
Jaapio
Posts: 12
Joined: Tue Jul 31, 2007 5:30 am

Post by Jaapio »

I have system software version 2.43 on a european CECHC04 model ps3.

version 1.0 of the demo works fine but version 1.1 gives just a black screen and does not exit after a minute like the 1.0 version.
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

Sony has closed RSX access in fw 2.10, remain UNDER that fw version if you dream about programming RSX yourself (if you have luck there should still be some ps3's with fw 2.01 out of the box on shelves in europe for example the 40Gb+uncharted drake fortune+prostreet bundle)

At 2.10 or above, you should just use your ps3 for online stuff and stay up to date with fw. RSX or hacks won't be for you. Also downgrading won't be possible (there is just a trick to go down from under 2.17 but that's all. At 2.17 and above it's completely out of question, at least for now, and it may be very well hardware enforced).
Last edited by ps2devman on Fri Oct 17, 2008 4:31 am, edited 2 times in total.
Jaapio
Posts: 12
Joined: Tue Jul 31, 2007 5:30 am

Post by Jaapio »

Too bad. If anyone still has the <2.10 fw version pup files there aint no trick to fool the ps3 into installing those?
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

To have the 2.01 pup files may help those between 2.10 and under 2.17 but requires soldering skills to damage a specific area of fw to force it accept the pup files and actually downgrade.

At 2.17 and above pup files won't help you. Hardware KNOWS what you will attempt to do and SONY disagrees with it! Only things that may happen now will happen UNDER 2.10.

Anyway, if PS4 spawns in 2011, you will get another chance. Don't upgrade its fw this time... and be very very patient as always...
Jaapio
Posts: 12
Joined: Tue Jul 31, 2007 5:30 am

Post by Jaapio »

What do I need to compile the 1.0 source?

I took openSUSE 10.2, installed everyting gcc from yast. installed the libgmp3-dev and another libxxx-dev,

Installed:
autoconf, automake, bison, flex, gcc, make, ncurses, patch, subversion, terminfo, wget


Executed and added to startup script:
export PS3DEV=/usr/local/ps3dev
export PATH=$PATH:$PS3DEV/bin
export PATH=$PATH:$PS3DEV/ppu/bin
export PATH=$PATH:$PS3DEV/spu/bin

after that I ran ./toolchain.sh for the ps3 toolchain and it failed on:
WARNING: `makeinfo' is missing on your system. You should only need it if
you modified a `.texi' or `.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy `make' (AIX,
DU, IRIX). You might want to install the `Texinfo' package or
the `GNU make' package. Grab either from any GNU archive site.
make[3]: *** [standards.info] Error 1
make[3]: Leaving directory `/root/Desktop/ps3toolchain/build/newlib-1.15.0/build-ppu/etc'
make[2]: *** [info] Error 1
make[2]: Leaving directory `/root/Desktop/ps3toolchain/build/newlib-1.15.0/build-ppu/etc'
make[1]: *** [all-etc] Error 2
make[1]: Leaving directory `/root/Desktop/ps3toolchain/build/newlib-1.15.0/build-ppu'
make: *** [all] Error 2
../scripts/003-newlib-1.15.0-ppu.sh: Failed.


Running make demo.bin gives this error:

linux-ksrq:/usr/otheros_demo_1.0/source # make demo.elf
gcc -O -m64 -mregnames -mfull-toc -G0 -ffreestanding -fno-stack-protector -c -o start.o start.S
gcc: unrecognized option '-G0'
cc1: error: unrecognized command line option "-mregnames"
cc1: error: unrecognized command line option "-mfull-toc"
start.S:0: sorry, unimplemented: 64-bit mode not compiled in
make: *** [start.o] Error 1

What am I doing wrong, what do I need to do to fix this?

- Jaap
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Both the PPU and SPU fail on the makeinfo - you can get around that by altering the newlib makefile during the error and then continuing. Look at what I did in the toolchain thread, specifically this

http://forums.ps2dev.org/viewtopic.php?p=73988#73988
Jaapio
Posts: 12
Joined: Tue Jul 31, 2007 5:30 am

Post by Jaapio »

Thanks, I am trying that right now. Too bad the buildscript takes so long to build.
Jaapio
Posts: 12
Joined: Tue Jul 31, 2007 5:30 am

Post by Jaapio »

And I got a new error:

--01:49:38-- ftp://sources.redhat.com/pub/newlib/new ... 5.0.tar.gz
=> `newlib-1.15.0.tar.gz'
Resolving sources.redhat.com... 209.132.176.174
Connecting to sources.redhat.com|209.132.176.174|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD /pub/newlib ... done.
==> SIZE newlib-1.15.0.tar.gz ... done.
==> PASV ... done. ==> REST 10943595 ... done.
==> RETR newlib-1.15.0.tar.gz ...
No such file `newlib-1.15.0.tar.gz'.

../scripts/003-newlib-1.15.0-ppu.sh: Failed.


But the file is definitly there in the build folder with all the other .tar.gz files.

What is wrong this time?
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Is the file complete? Maybe it's not, and maybe redhat just happened to be down then.
Jaapio
Posts: 12
Joined: Tue Jul 31, 2007 5:30 am

Post by Jaapio »

I can check if I can open the file in ARK. Or is there something else I could do?
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

The MD5SUM should be 4020004b1b7a56ca4cf7f6d35b40a4cb.

Remember that after editing the makefile for newlib, you don't rerun the script, you cd into the buildppu/buildspu directory and make/make install newlib directly. Then you run the remaining steps in the toolchain skipping the steps already done.

If you can't get it to work, I could put an arc of my toolchain on RabidSwear... it 82MB 7zipped. You'd have to chown it to use it, but if there's no other choice, it's better than nothing. :)

I do know that my toolchain compiles demo 1.1 fine. I'm starting to work on some basic libs for doing stuff in OTHEROS mode.
Last edited by J.F. on Mon Oct 13, 2008 8:52 pm, edited 1 time in total.
Jaapio
Posts: 12
Joined: Tue Jul 31, 2007 5:30 am

Post by Jaapio »

Thanks, I'll try to get it working by myself first.
Jaapio
Posts: 12
Joined: Tue Jul 31, 2007 5:30 am

Post by Jaapio »

Great a new batch of errors:

checking for a BSD-compatible install... /usr/bin/install -c
updating cache ./config.cache
configure: creating ./config.status
config.status: creating Makefile
make[2]: Entering directory `/root/ps3toolchain/newlib-1.15.0/build-ppu/etc'
for f in standards.info configure.info; do \
if test -f ../../etc/`echo $f | sed -e 's/.info$/.texi/'`; then \
if make "MAKEINFO=/root/ps3toolchain/newlib-1.15.0/missing makeinfo --split-size=5000000 --split-size=5000000" $f; then \
true; \
else \
exit 1; \
fi; \
fi; \
done
make[3]: Entering directory `/root/ps3toolchain/newlib-1.15.0/build-ppu/etc'
/root/ps3toolchain/newlib-1.15.0/missing makeinfo --split-size=5000000 --split-size=5000000 --no-split -I../../etc -o standards.info ../../etc/standards.texi
WARNING: `makeinfo' is missing on your system. You should only need it if
you modified a `.texi' or `.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy `make' (AIX,
DU, IRIX). You might want to install the `Texinfo' package or
the `GNU make' package. Grab either from any GNU archive site.
make[3]: *** [standards.info] Error 1
make[3]: Leaving directory `/root/ps3toolchain/newlib-1.15.0/build-ppu/etc'
make[2]: *** [info] Error 1
make[2]: Leaving directory `/root/ps3toolchain/newlib-1.15.0/build-ppu/etc'
make[1]: *** [all-etc] Error 2
make[1]: Leaving directory `/root/ps3toolchain/newlib-1.15.0/build-ppu'
make: *** [all] Error 2
linux-ksrq:~/ps3toolchain #


Could you please send me your toolchain? I don't think I'll get this one working within the next weeks.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

You can get the archive here:
http://rapidshare.com/files/153732494/ps3dev.7z.html

That's the full ps3dev directory. You'll need to chown it once you've unarc'd it.

Code: Select all

sudo chown -R user&#58;group /usr/local/ps3dev
where user:group is usually just your username. For me this would be

Code: Select all

sudo chown -R jlfenton&#58;jlfenton /usr/local/ps3dev
Naturally, if you put the directory somewhere else, be sure to use the proper path. I've run my toolchains for the user directory before. That works fine. Just change your envvars for the path.
Jaapio
Posts: 12
Joined: Tue Jul 31, 2007 5:30 am

Post by Jaapio »

Thanks, I finally got it compiling and running.

But I have a new question, what do I need to do to beable to get the square root of a number?

Can I include a file or do I have to write my own function?
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Libm should be working with the toolchain just fine. If you look at the demo, libm is used. I don't think you can use libc, or at least, not all of it as it's not patched for the PS3. So functions like open/close/read/write DEFINITELY won't work, but things like strlen might.
Jaapio
Posts: 12
Joined: Tue Jul 31, 2007 5:30 am

Post by Jaapio »

Nevermind... I forgot to enable floatingpoint..... X_x
wiigamecube
Posts: 5
Joined: Thu Oct 08, 2009 9:01 am
Contact:

Post by wiigamecube »

i thanks for this demo

i have black screen in my PAL 80 Gb Frimware 3.0 do you have an idee ?
User avatar
Ameen
Posts: 10
Joined: Sun Jun 14, 2009 6:28 am
Location: Bahrain
Contact:

Post by Ameen »

wiigamecube wrote:i thanks for this demo

i have black screen in my PAL 80 Gb Frimware 3.0 do you have an idee ?
That demo was released long time ago, and I believe that Sony had blocked it long ago too.
wiigamecube
Posts: 5
Joined: Thu Oct 08, 2009 9:01 am
Contact:

Post by wiigamecube »

hi the versions 1.0 works for me and 1.1 versions don't work thanks ameen for your reponse
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

If I remember well 1.1 is only for ps3's with fw<=2.01
(takes advantage of acceleration by harnessing RSX)
wiigamecube
Posts: 5
Joined: Thu Oct 08, 2009 9:01 am
Contact:

Post by wiigamecube »

ok thanks see you for a futur demo ^^
Post Reply