A new port of uClinux on PSP (with accessibility to ms0)

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
M.Jackson
Posts: 85
Joined: Mon Sep 10, 2007 6:37 pm
Contact:

A new port of uClinux on PSP (with accessibility to ms0)

Post by M.Jackson »

Hi everyone. I have recently ported another uClinux of version 2.6.22-uc1 onto PSP. On top of the serial driver and the framebuffer driver, there is a new joypad driver enabling apps to read input from PSP buttons, and the a block device driver allowing linux users to access the Memory Stick in linux. And I have established a website for it: http://jacksonm88.googlepages.com/linuxonpsp.htm

Or visit http://jacksonm80.googlepages.com/linuxonpsp.htm which is a mirror site.

Thanks to everyone who have offered me help on this.

PS: Due to the bandwidth limitation in the original server, here is another location where you could download uClinux.zip and extract it to game150/ for a fresh try:
http://myfreefilehosting.com/f/a94c114520_0.9MB
Last edited by M.Jackson on Thu Dec 13, 2007 1:57 pm, edited 2 times in total.
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

I never knew Office was that broken.. but I think you need to use a different app to create that webpage, all but the first paragraph are just images and so none of the links work. http://jacksonm88.googlepages.com/image699.gif
killerrabbit
Posts: 1
Joined: Wed Dec 12, 2007 3:24 am
Location: france

Post by killerrabbit »

Very nice man but can you give a good link to download . please.

P.S : I have found how to get it go to this link

http://jacksonm88.googlepages.com/uClinux.zip

and it runs . very great work.
The life is only a step and the death is another !!
noquarter
Posts: 17
Joined: Sun Jul 23, 2006 5:56 pm

Post by noquarter »

This is wonderful,the only thing is that using the dpad on the phat is extremely unpleasant. It would be much better to use the analog for input.
IM back!
Posts: 44
Joined: Tue Apr 17, 2007 9:53 pm

Post by IM back! »

first of all id like to say thanks for porting linu× to the psp.

some recomendetions id like to make are:

1. targus universal driver. (ill might be able to make one myself but ive never made a driver before even thow ive coded c++/c for 2 years now.)

2. your not using the psp's FPU.

3. it might be possible to use the PSP's ME as another CPU (dual core PSP :) ). as it runs at the same clock speed and has full memory acssses
sorry for spelling!
hardrive
Posts: 11
Joined: Fri Mar 17, 2006 11:13 am

Post by hardrive »

I must not be doing something right... I've got it to boot just fine, the only problem is that in trying to use the OSK, I can't access the keys on the diagonals, making it VERY hard for me to type commands in ;)

Phat PSP btw.
M.Jackson
Posts: 85
Joined: Mon Sep 10, 2007 6:37 pm
Contact:

Post by M.Jackson »

jimparis wrote:I never knew Office was that broken.. but I think you need to use a different app to create that webpage, all but the first paragraph are just images and so none of the links work. http://jacksonm88.googlepages.com/image699.gif
Really? I did use Office Publisher to create the website just for its convenience, but neither did I realize it could have such a problem. The weird thing is when I tested it in my navigator, the page was indeed presented in text mode and all the links worked...Anyway, I will try another apps to rebuild this page. Thanks for your feedback.
M.Jackson
Posts: 85
Joined: Mon Sep 10, 2007 6:37 pm
Contact:

Post by M.Jackson »

hardrive wrote:I must not be doing something right... I've got it to boot just fine, the only problem is that in trying to use the OSK, I can't access the keys on the diagonals, making it VERY hard for me to type commands in ;)

Phat PSP btw.
I think you can try pressing down two arrow keys together to reach diagonal sections. I know that may not be as easy as using the analog stick as I knew exactly how difficult that was when playing Street Fighters, but back then I decided to leave OSK just that way only because I wanted to preserved the analog stick for simulating mouse in future. But now, however, I don't even know I will have enough time to get that far, I think I'd better stick to the OSK and make it easier to use first. So analog stick will be in the next revision of OSK.
M.Jackson
Posts: 85
Joined: Mon Sep 10, 2007 6:37 pm
Contact:

Post by M.Jackson »

Ok, I have updated the webpage, which should have gotten rid of the weird problem now.

Btw, I have also updated the memory stick driver a little bit so that it now can flash the LED during reading or writing.

Enjoy!
brin_vg
Posts: 17
Joined: Wed Oct 03, 2007 5:43 pm
Location: A pineapple, under the sea
Contact:

Post by brin_vg »

M.Jackson wrote:So analog stick will be in the next revision of OSK.
I'm very grateful that the OSK uses the dpad instead of analog, on account of my analog stick wandering upwards, and not moving down in the slightest bit (even with JoySens).

Perhaps an option in the boot config file?
futaris
Posts: 45
Joined: Wed Dec 28, 2005 7:47 am

Post by futaris »

Sweet. Now all we need is Wifi or USB Gadget for connectivity. Porting the IR keyboard driver is a fairly trivial task.

Is uClibc-0.9.15 the only thing that needs to be patched for the toolchain? If so I can add the PSP to openembedded fairly easily...
brk3
Posts: 2
Joined: Wed Dec 12, 2007 11:17 pm

Post by brk3 »

Yes this is amazing work :) Cant wait to get home and try it! Thankyou and look forward to seeing where else this can go
User avatar
Oguz286
Posts: 35
Joined: Tue Oct 30, 2007 4:56 am

Post by Oguz286 »

It says the bandwith limit has exceeded. Could you post it somewere else? I'd really like to try it :)
M.Jackson
Posts: 85
Joined: Mon Sep 10, 2007 6:37 pm
Contact:

Post by M.Jackson »

Oguz286 wrote:It says the bandwith limit has exceeded. Could you post it somewere else? I'd really like to try it :)
Oh my god, I had no idea there is such a restriction even in the mighty server that google provides...Is there anyone who can recommend a free website space for me? cos it seems there is really not too much left nowadays
M.Jackson
Posts: 85
Joined: Mon Sep 10, 2007 6:37 pm
Contact:

Post by M.Jackson »

brin_vg wrote:
M.Jackson wrote:So analog stick will be in the next revision of OSK.
I'm very grateful that the OSK uses the dpad instead of analog, on account of my analog stick wandering upwards, and not moving down in the slightest bit (even with JoySens).

Perhaps an option in the boot config file?
Well, a solution to this is easy. OSK can use both dpad and analog at the same time. haha
User avatar
Oguz286
Posts: 35
Joined: Tue Oct 30, 2007 4:56 am

Post by Oguz286 »

M.Jackson wrote:
Oguz286 wrote:It says the bandwith limit has exceeded. Could you post it somewere else? I'd really like to try it :)
Oh my god, I had no idea there is such a restriction even in the mighty server that google provides...Is there anyone who can recommend a free website space for me? cos it seems there is really not too much left nowadays
I don't know how big the file itself is, but you shouldn't host such files on a webspace, because it eats up your bandwidth. You could try hosting the file on rapidshare, sharebigfile or something like that. There are better sites, but i don't recall the names atm, since i host my own files.
M.Jackson
Posts: 85
Joined: Mon Sep 10, 2007 6:37 pm
Contact:

Post by M.Jackson »

futaris wrote:Sweet. Now all we need is Wifi or USB Gadget for connectivity. Porting the IR keyboard driver is a fairly trivial task.

Is uClibc-0.9.15 the only thing that needs to be patched for the toolchain? If so I can add the PSP to openembedded fairly easily...
It seems to me yes, cos the changes applied on the mips toolchain are primarily targeting uClibc for addressing issues like differences in calling convention and a few APIs like fork/vfork. However, like I said, this toolchain is using such an old version of gcc that it no longer maintains its compatibility with the latest kernel. Therefore it can only be used to compile applications, while a separate toolchain is reqired to build the kernel, which is a problem I could not get away from yet despite my sincere efforts.
M.Jackson
Posts: 85
Joined: Mon Sep 10, 2007 6:37 pm
Contact:

Post by M.Jackson »

Ok, I have just uploaded uClinux.zip to this location. http://myfreefilehosting.com/f/a94c114520_0.9MB

For those who are eager to have a try, just download the zip and extract it to game150. Later I will renovate the webpage so that everybody can access.
noquarter
Posts: 17
Joined: Sun Jul 23, 2006 5:56 pm

Post by noquarter »

You could try talking to the guys over at dcemu,they host several developers projects.
Thanks again for working on this M.Jackson,could you provide a link to your prebuilt toolchain?
gambiting
Posts: 154
Joined: Thu Aug 17, 2006 5:39 pm

Post by gambiting »

I also uploaded it on my own server - http://sklep.vivexpol.pl/uclinux/uClinux.zip
It's 24/7,and with no limits.Glad I can help :D
M.Jackson
Posts: 85
Joined: Mon Sep 10, 2007 6:37 pm
Contact:

Post by M.Jackson »

gambiting wrote:I also uploaded it on my own server - http://sklep.vivexpol.pl/uclinux/uClinux.zip
It's 24/7,and with no limits.Glad I can help :D
Thanks very much!

I have also setup a mirror site: http://jacksonm80.googlepages.com/linuxonpsp.htm

where you can find everything just as the original one.

Enjoy!
Apeiron
Posts: 7
Joined: Thu Dec 13, 2007 5:30 pm

Post by Apeiron »

M.Jackson wrote:... but back then I decided to leave OSK just that way only because I wanted to preserved the analog stick for simulating mouse in future.
You could have both if the mouse software gave the OSK priority somehow. Who types and uses a mouse at the same time anyway? When the OSK is active, the mouse software can ignore the analog, and when the OSK is idle, it can take over. Just an idea.

M.Jackson wrote:Well, a solution to this is easy. OSK can use both dpad and analog at the same time. haha
With the drift problem sometimes effecting the analog stick, if it were to read both at the same time the OSK would probably drift around following the stick's response, and only make it even more difficult as it would just jump around with the DPad. I think a switch in the config would be the best route, for that drifting reason.
roge
Posts: 11
Joined: Thu Dec 13, 2007 11:44 pm

Post by roge »

yeeahhhh, very cool!

Jackson, i am trying to build my own boot image but whithout success..

i am get the last uclinux-dist-release (not cvs)
i am try to patch 2.6.22-uc0 (not find uc1)
i am try to patch your kernel.patch
i am try to patch your kernel.patch without 2.6.22-uc0

and i am try here now, how can i build this port?
some howto? tutorial?
please, give us more informations of developing of the port

(sorry for bad english :))

[]`s
M.Jackson
Posts: 85
Joined: Mon Sep 10, 2007 6:37 pm
Contact:

Post by M.Jackson »

I think there is really no much difference between building a standard kernel and building this port. All you need is just having your toolchain setup properly in preparation and applying this patch before compilation. In case you never built a kernel before, here are some general steps:

- have the toolchain installed properly (something like mipsel-linux-XXXX);
- under the root directory of the kernel source tree (not the root directory of the distribution package), config your kernel with commands like "make ARCH=mips menuconfig" or others; or you could just start with the config file I posted (by replacing the .config file with my kernel.config, and then run "make ARCH=mips menuconfig" again);
- build the kernel using "make ARCH=mips CROSS_COMPILE=mipsel-linux- vmlinux.bin", after which you will get the binary image of the kernel. The loader actually supports compressed images, thus you can further shrink down the size of the kernel by using "gzip -9 /share/psp/vmlinux.bin". Don't forget to change the loader's config file to point to the compressed image.

In addition, to produce a fully functional system, you may also need to build busybox as well as constructing the initial root fs - a directory structure that contains /bin /dev /proc and so on. Building busybox will help construct some of those, but you still need to manually create some of the devices under /dev just like the ones you saw in the pre-compiled version.

I really hope I can explain everything right here, but it is just that the details of all these are totally beyond the space of this post. Generally, I think maybe you could try to get started by preparing the toolchains first (one for building the kernel, the other one for building busybox and other apps). And then maybe you could try to build an application of your own, which will certainly familiarize you with all these stuff. Once you get used to it, you can have it done with little effort.
W00fer
Posts: 40
Joined: Fri Apr 13, 2007 8:02 am

Post by W00fer »

Can we use the uClinux port for the ipod (ipodlinux.org) on this ?

Because it also uses the 2.6 kernel i think.

Would be cool, playing some games etc etc (i suppose music wont work).
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Post by Raphael »

W00fer wrote:Can we use the uClinux port for the ipod (ipodlinux.org) on this ?

Because it also uses the 2.6 kernel i think.

Would be cool, playing some games etc etc (i suppose music wont work).
iPod is ARM, while PSP is MIPS.
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki

Alexander Berl
roge
Posts: 11
Joined: Thu Dec 13, 2007 11:44 pm

Post by roge »

Hello Jackson,

I already have the toolchain compiled in my system
I forget the flags 'ARCH' and 'CROSS_COMPILE'

your kernel.patch its for whitch kernel? uclinux-dist with 2.6.x? 2.6.2x-ucX? original 2.6.22 kernel?

first i will compile kernel, later i will try to build the rootfs..
one step of each time

Very Thanks
Apeiron
Posts: 7
Joined: Thu Dec 13, 2007 5:30 pm

Post by Apeiron »

Is it at all possible to add persistence to the initial file system? Perhaps with the Cygwin way and save it in the directory the loader resides in (or perhaps a sub-directory within it), or a tar archive or similar method. ms0 is a bit difficult to type in, and links in /bin and such aren't saved as far as I can tell. Theoretically, everything the end-user might want to link to can be set up in a shell script, but it would have to be run at boot manually each time.

Also, it would be neat if you could add a hibernate-like system, dumping the RAM to disk somewhere and using that instead of the default if it exists.

I know these ideas aren't real important at the moment, but it's just "food for thought."
brin_vg
Posts: 17
Joined: Wed Oct 03, 2007 5:43 pm
Location: A pineapple, under the sea
Contact:

Post by brin_vg »

Fun idea... PSP toolchain....

... on PSP :D Lol
M.Jackson
Posts: 85
Joined: Mon Sep 10, 2007 6:37 pm
Contact:

Post by M.Jackson »

Apeiron wrote:Is it at all possible to add persistence to the initial file system? Perhaps with the Cygwin way and save it in the directory the loader resides in (or perhaps a sub-directory within it), or a tar archive or similar method. ms0 is a bit difficult to type in, and links in /bin and such aren't saved as far as I can tell. Theoretically, everything the end-user might want to link to can be set up in a shell script, but it would have to be run at boot manually each time.

Also, it would be neat if you could add a hibernate-like system, dumping the RAM to disk somewhere and using that instead of the default if it exists.

I know these ideas aren't real important at the moment, but it's just "food for thought."
The changes applied to the initial rootfs at run time are not persistent only because it resides in RAM. In fact this rootfs in 2.6 is comparable with the concept of initrd (initial RAM disk) in 2.4. To establish a persistent root fs, a typical way is to switch the root directory from RAM to ms0 at boot time (by using utilities like pivot_root which is also supported by busybox), and then you can maintain a persistent root file system on ms0.
Post Reply