Skip to contentSkip to conversation

Porting To New System

DISCUSSION developer 6 participants 10 messages May 27, 2005 – May 28, 2005 MIPS

lore
Share & tools
lore

developer

author
#0 lore raw

Hello all,

I'm a long time Linux user, and computer engineering student. I've recently become interested in porting Linux to Sony's PSP gaming system. I'm wanting to do this mainly as an exercise in understanding the kernel better, also I just think it would be neat :). The PSP system has a MIPS R4000 CPU which is already supported so it is my understanding that the port should not be so difficult, not to say that I think it will be easy. At this time I have a gcc toolchain set up which allows me to write and execute code on the PSP, however I have never attempted a kernel port so I'm a little unsure on what to do. I'm looking for someone who wouldn't mind assisting me with my project by helping me with my questions on the porting process. I you have time to answer a few emails here and there, and would like to help me, I would greatly appreciate it.

Thanks,
Cameron Cooper

#1 lore raw

First, does the PSP's processor have a MMU? If not, then there is not much point in porting Linux (or for that matter, anything else). A machine without a MMU is pretty worthless under Linux except as a fixed-function embedded system; to wit, mmap(2) will not work.

Next, see http://www.linux-mips.org/wiki/index.php/Porting - it's excellent. I don't know if a PSP has an accessible serial port - if not, then you are somewhat screwed (OK, so not that bad; I've done a port that used graphical display from the beginning for all debugging purposes).

You've got to do three things:
1) use lines no longer than 80 chars in your mails ;)
2) get all docs on the PSP you can get - reverse engineering is fun but only if you enjoy hacking for 14 hours a day,
3) take a look at some directory in arch/mips.

Of course, the hardest of them is (2) in my experience, unless Sony felt generous at the time and released all PSP docs. My port was completely reverse-engineered but I wouldn't advise to do that unless you are sure you can spare the time and effort.

Oh, and one more thing: USE THE CVS LINUX-MIPS.ORG TREE! The kernel.org tree is so out of sync that it's virtually worthless.

Cheers,

Stanislaw Skowronek

#2 lore raw
In reply to developer
Quoted 14 lines

Hello all,

I'm a long time Linux user, and computer engineering student. I've recently become interested in porting Linux to Sony's PSP gaming system. I'm wanting to do this mainly as an exercise in understanding the kernel better, also I just think it would be neat :). The PSP system has a MIPS R4000 CPU which is already supported so it is my understanding that the port should not be so difficult, not to say that I think it will be easy. At this time I have a gcc toolchain set up which allows me to write and execute code on the PSP, however I have never attempted a kernel port so I'm a little unsure on what to do. I'm looking for someone who wouldn't mind assisting me with my project by helping me with my questions on the porting process. I you have time to answer a few emails here and there, and would like to help me, I would greatly appreciate it.

You should probably have a look at http://www.psp-linux.org/ click on messages boards at the top of the page to get to all the action. I am sure these guys can answer all your questions.

Ed Okerson

#3 lore raw
Quoted 3 lines

You should probably have a look at http://www.psp-linux.org/ click on messages boards at the top of the page to get to all the action. I am sure these guys can answer all your questions.

Hurm, hurm. I think that the closed-circle development model is, uhm, less efficient - there are no tech info on the forums which means nobody can try and follow. They just finished organizing themselves, and it took them *three months*. Three months wasted on choosing developers. He he he.

That said, they have really hard work to do - I wish them all the luck they need, which is *a lot*. Cracking locked-down systems with proprietary formats is incredibly hard. It's hard enough when they aren't proprietary, or when they aren't deliberately locked-down.

Stanislaw Skowronek

PS. There are also some funny things there, like "Off-Topic: please keep related to the PSP". Maybe I'm just an anal-retentive paranoid (OK, I know I am), but when I see something like that I feel put upon. It's like all those "keep off the grass" and "private property, survivors will be shot again" signs. Placed in the middle of Sahara.

#4 lore raw
Quoted 5 lines · Stanislaw Skowronek

That said, they have really hard work to do - I wish them all the luck they need, which is *a lot*. Cracking locked-down systems with proprietary formats is incredibly hard. It's hard enough when they aren't proprietary, or when they aren't deliberately locked-down.

With this in mind, I'm watching the port of Linux to the Nintendo DS. They apparently just got 2.6 and framebuffer working, so it'll be interesting to see where they go with it. Given the DS is a far more constrained system, and Nintendo not very forthcoming on their hardware specs, I'm surprised at the speed with which they've gotten things working.

And PSP isn't entirely closed -- it is based to a certain degree off PS2 hardware, of which Sony release 6 of a supposed 7 total technical documents regarding the innards of the system. Now I imagine alot of the custom hacks needed to support the R5900 in PS2 aren't needed in PSP, since it uses a more standard CPU, this might have an impact on how fast or slow they wind up porting the kernel.

--Kumba

Signature · 1 line
"Such is oft the course of deeds that move the wheels of the world: small hands do them because they must, while the eyes of the great are elsewhere."  --Elrond
#5 lore raw
In reply to developer
Quoted 1 line · developer

I'm a long time Linux user, and computer engineering student. I've recently become interested in porting Linux to Sony's PSP gaming system. I'm wanting to do this mainly as an exercise in understanding the kernel better, also I just think it would be neat :). The PSP system has a MIPS R4000 CPU which is already supported

Nitpicking - it's probably an 4K, not R4000 which is ~ '91 vintage.

Ralf

#9 lore raw
Quoted 2 lines

Don't believe everything you read ... Sony claims the processors are two R4000 32-bit cores. Which is obvious nonsense, the R4000 is 64-bit.

Thanks, that is very useful to know.

Cameron