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
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

If you're looking to change something that needs kernel mode code run from old-style to 3.xx, check this out. It should help more than the other thread you linked above.

http://forums.ps2dev.org/viewtopic.php?p=58653#58653
danzel
Posts: 182
Joined: Fri Nov 04, 2005 11:03 pm

Post by danzel »

Alright, I've done a quick port of the bootloader to the 3.XX kernel.

Prebuilt:
http://localhost.geek.nz/psplinux/ucboot340.tar.bz2
(Install in PSP/Game3XX. Get vmlinux.bin and pspboot.conf from the kernel package, put them in the same dir)

Source:
http://localhost.geek.nz/psplinux/ucboot340_src.tar.bz2
(make in /kernelmodule/, make in /, copy kernelboot.prx and eboot.pbp)

I've tested on my 3.40 OE psp phat. I'm interested to know if it works for others ( slim? :D )
M.Jackson
Posts: 85
Joined: Mon Sep 10, 2007 6:37 pm
Contact:

Post by M.Jackson »

danzel wrote:Alright, I've done a quick port of the bootloader to the 3.XX kernel.

Prebuilt:
http://localhost.geek.nz/psplinux/ucboot340.tar.bz2
(Install in PSP/Game3XX. Get vmlinux.bin and pspboot.conf from the kernel package, put them in the same dir)

Source:
http://localhost.geek.nz/psplinux/ucboot340_src.tar.bz2
(make in /kernelmodule/, make in /, copy kernelboot.prx and eboot.pbp)

I've tested on my 3.40 OE psp phat. I'm interested to know if it works for others ( slim? :D )
The port was very neat! Thanks danzel
noquarter
Posts: 17
Joined: Sun Jul 23, 2006 5:56 pm

Post by noquarter »

I just tested this on my 3.71m33-3 slim and it works beautifully!!
Thank you guy's,I'm willing to flash the bootloader or have a linux only psp for testing if you are interested.
vijay
Posts: 25
Joined: Thu Jan 03, 2008 10:07 pm

Post by vijay »

ye i also tested it on my slim 3.71 M33-4 it works like a charm :P :P
but only problem is i cant switch off or exit ..... i have to remove the battery to get back to xmb

thanx alot for jackson and danzel :) :)
Apeiron
Posts: 7
Joined: Thu Dec 13, 2007 5:30 pm

Post by Apeiron »

You don't have to pop out the battery, you should be able to just type "poweroff" in the console to shut off the system (po[tab] is fastest). "reboot" also works to shut it off, since it's a bit buggy and doesn't restart the system.
vijay
Posts: 25
Joined: Thu Jan 03, 2008 10:07 pm

Post by vijay »

ye thanx Apeiron ......... i was trying the shutdown command ; its not working
poweroff command works ......... but while shutting down i hear a pop sound is it normal ????
vijay
Posts: 25
Joined: Thu Jan 03, 2008 10:07 pm

Post by vijay »

im trying to get the mipsel toolchain
im folowing the tut on the web site

i downloaded the buildroot from
http://buildroot.uclibc.org/downloads/s ... 16.tar.bz2

but im unsble to see build_mipsel directory
M.Jackson
Posts: 85
Joined: Mon Sep 10, 2007 6:37 pm
Contact:

Post by M.Jackson »

Apeiron wrote:You don't have to pop out the battery, you should be able to just type "poweroff" in the console to shut off the system (po[tab] is fastest). "reboot" also works to shut it off, since it's a bit buggy and doesn't restart the system.
haha, actually it was not a bug that let "reboot" and "poweroff" doing the same thing. it was only because I coundn't find a way to reset the psp back to XMB after flushing the firmware down to toilet (actually just out of RAM :) when launching the linux kernel. In fact, I already have the code structure ready inside the kernel to distinguish reboot from shutdown. If anyone figure out how to properly reset the machine, the function will fit into the kernel effortlessly.
M.Jackson
Posts: 85
Joined: Mon Sep 10, 2007 6:37 pm
Contact:

Post by M.Jackson »

vijay wrote:im trying to get the mipsel toolchain
im folowing the tut on the web site

i downloaded the buildroot from
http://buildroot.uclibc.org/downloads/s ... 16.tar.bz2

but im unsble to see build_mipsel directory
You need to build one for your own following the steps i posted on my website. It is not like the buildroot tarball has already contained the mips toolchain you are look for.
M.Jackson
Posts: 85
Joined: Mon Sep 10, 2007 6:37 pm
Contact:

Post by M.Jackson »

I have had my website updated. There is a detailed instruction guiding you how to build the unified toolchain (very simple and automatic) and a few updated patches. Please visit http://jacksonm88.googlepages.com for details.

Cheers
hyper_sonic
Posts: 6
Joined: Fri Dec 28, 2007 11:35 pm

uart3* function

Post by hyper_sonic »

danzel wrote:Alright, I've done a quick port of the bootloader to the 3.XX kernel.

Prebuilt:
http://localhost.geek.nz/psplinux/ucboot340.tar.bz2
(Install in PSP/Game3XX. Get vmlinux.bin and pspboot.conf from the kernel package, put them in the same dir)

Source:
http://localhost.geek.nz/psplinux/ucboot340_src.tar.bz2
(make in /kernelmodule/, make in /, copy kernelboot.prx and eboot.pbp)

I've tested on my 3.40 OE psp phat. I'm interested to know if it works for others ( slim? :D )
I am affraid, may be it's incorrect, in this port, we are can't use UART debug port. Because implemetation uart3* function is part of main.c, but not kernelboot.c.
Eniko
Posts: 6
Joined: Mon Dec 24, 2007 8:08 am

Post by Eniko »

danzel wrote:Alright, I've done a quick port of the bootloader to the 3.XX kernel.

Prebuilt:
http://localhost.geek.nz/psplinux/ucboot340.tar.bz2
(Install in PSP/Game3XX. Get vmlinux.bin and pspboot.conf from the kernel package, put them in the same dir)

Source:
http://localhost.geek.nz/psplinux/ucboot340_src.tar.bz2
(make in /kernelmodule/, make in /, copy kernelboot.prx and eboot.pbp)

I've tested on my 3.40 OE psp phat. I'm interested to know if it works for others ( slim? :D )
Worked on my 3.71 m33-4 slim.
M.Jackson
Posts: 85
Joined: Mon Sep 10, 2007 6:37 pm
Contact:

Re: uart3* function

Post by M.Jackson »

hyper_sonic wrote: I am affraid, may be it's incorrect, in this port, we are can't use UART debug port. Because implemetation uart3* function is part of main.c, but not kernelboot.c.
Just some additional info about UART3. The uart3* functions you saw in the bootloader is mostly for a rarely used feature called "early printk for psp" I wrote specifically for this port to help debugging at the early stage of the project. It is a tunable feature in kernel config and basically it enables "printk" to work via UART3 so early that it even precedes the initialization of the memory subsystem (mainly the mem page table) and the trap subsystem, hence it was extremely helpful for kernel development. But as now the kernel is getting more and more stable, this function appears less useful than before.

In addition, to enable the SIO console on UART3, you need to modify the boot command line to specify ttySRC2 as the console device, and modify /etc/inittab to launch the shell upon the console device.
vijay
Posts: 25
Joined: Thu Jan 03, 2008 10:07 pm

Post by vijay »

im getting this error ........ while issuing the make command

Code: Select all

uclibc/libstdc++-v3/include/bits/istream.tcc:899: error: 'space' is not a member of 'std::ctype_base'
make[5]: *** [mipsel-linux-uclibc/bits/stdc++.h.gch/O0g.gch] Error 1
make[5]: Leaving directory `/usr/src/buildroot-20071216/toolchain_build_mipsel/gcc-4.2.1-final/mipsel-linux-uclibc/libstdc++-v3/include'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/usr/src/buildroot-20071216/toolchain_build_mipsel/gcc-4.2.1-final/mipsel-linux-uclibc/libstdc++-v3'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/usr/src/buildroot-20071216/toolchain_build_mipsel/gcc-4.2.1-final/mipsel-linux-uclibc/libstdc++-v3'
make[2]: *** [all-target-libstdc++-v3] Error 2
make[2]: Leaving directory `/usr/src/buildroot-20071216/toolchain_build_mipsel/gcc-4.2.1-final'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/buildroot-20071216/toolchain_build_mipsel/gcc-4.2.1-final'
make: *** [/usr/src/buildroot-20071216/toolchain_build_mipsel/gcc-4.2.1-final/.compiled] Error 2
M.Jackson
Posts: 85
Joined: Mon Sep 10, 2007 6:37 pm
Contact:

Post by M.Jackson »

vijay wrote:im getting this error ........ while issuing the make command

Code: Select all

uclibc/libstdc++-v3/include/bits/istream.tcc:899: error: 'space' is not a member of 'std::ctype_base'
make[5]: *** [mipsel-linux-uclibc/bits/stdc++.h.gch/O0g.gch] Error 1
make[5]: Leaving directory `/usr/src/buildroot-20071216/toolchain_build_mipsel/gcc-4.2.1-final/mipsel-linux-uclibc/libstdc++-v3/include'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/usr/src/buildroot-20071216/toolchain_build_mipsel/gcc-4.2.1-final/mipsel-linux-uclibc/libstdc++-v3'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/usr/src/buildroot-20071216/toolchain_build_mipsel/gcc-4.2.1-final/mipsel-linux-uclibc/libstdc++-v3'
make[2]: *** [all-target-libstdc++-v3] Error 2
make[2]: Leaving directory `/usr/src/buildroot-20071216/toolchain_build_mipsel/gcc-4.2.1-final'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/buildroot-20071216/toolchain_build_mipsel/gcc-4.2.1-final'
make: *** [/usr/src/buildroot-20071216/toolchain_build_mipsel/gcc-4.2.1-final/.compiled] Error 2
What's the version of your host gcc? there was a time I was also getting weird errors when compiling the c++ lib, but all of them went away after I upgraded my host gcc to 4.2.1 as well. Just have a try.
cloudhunter
Posts: 86
Joined: Thu Aug 17, 2006 3:27 am

Post by cloudhunter »

Nice work on the 3.xx kernel port. Question M. Jackson - will your kernel take advantage of the extra memory available automatically?

Cloudy
:)
cloudhunter
Posts: 86
Joined: Thu Aug 17, 2006 3:27 am

Post by cloudhunter »

Man, was that a badly formed post. What I meant to say was, will your kernel take advantage of the extra memory available in the slim automatically?

Cloudy
:)
vijay
Posts: 25
Joined: Thu Jan 03, 2008 10:07 pm

Post by vijay »

hi jackson i have upgraded to 4.2.1 as u said but still getting the same error :(
morpheus5
Posts: 2
Joined: Sat Jan 05, 2008 1:57 pm

Post by morpheus5 »

Jackson.
Suggestion:
for the OSK
Instead of using directional pad to choose the 3x3 character box, why not we use the keys on the right side to choose the charbox, this would be less frustrating for PSP phatt version.

for the kernel, how could we build MIPS initrd image? and how to run an initrd image without a bootloader?
hyper_sonic
Posts: 6
Joined: Fri Dec 28, 2007 11:35 pm

Re: uart3* function

Post by hyper_sonic »

M.Jackson wrote:
hyper_sonic wrote: I am affraid, may be it's incorrect, in this port, we are can't use UART debug port. Because implemetation uart3* function is part of main.c, but not kernelboot.c.
Just some additional info about UART3. The uart3* functions you saw in the bootloader is mostly for a rarely used feature called "early printk for psp" I wrote specifically for this port to help debugging at the early stage of the project. It is a tunable feature in kernel config and basically it enables "printk" to work via UART3 so early that it even precedes the initialization of the memory subsystem (mainly the mem page table) and the trap subsystem, hence it was extremely helpful for kernel development. But as now the kernel is getting more and more stable, this function appears less useful than before.

In addition, to enable the SIO console on UART3, you need to modify the boot command line to specify ttySRC2 as the console device, and modify /etc/inittab to launch the shell upon the console device.
Thanks, for addition infomation.
Apeiron
Posts: 7
Joined: Thu Dec 13, 2007 5:30 pm

Post by Apeiron »

morpheus5 wrote:Instead of using directional pad to choose the 3x3 character box, why not we use the keys on the right side to choose the charbox, this would be less frustrating for PSP phatt version.
I do believe he was going to change it to use the analog stick instead, since it's the easiest by far.
roge
Posts: 11
Joined: Thu Dec 13, 2007 11:44 pm

Post by roge »

Hi Jackson

i am trying to compile your new toolchain, but i have an error on libstdc++-v3 compiling gcc-4.2.1

this is the full error out:
http://pastebin.ca/842448

gcc of my pc is:

gcc version 4.2.3 20071123 (prerelease) (Debian 4.2.2-4)

any sugestion?


-------------------------

i try to compile 4.2.0 and i view the same error..
vijay
Posts: 25
Joined: Thu Jan 03, 2008 10:07 pm

Post by vijay »

hi roge im getting exact same error as u r :(
im using ubuntu gutsy
M.Jackson
Posts: 85
Joined: Mon Sep 10, 2007 6:37 pm
Contact:

Post by M.Jackson »

I have taken a look at the errors you posted and they all seem to me like the underlined headers are referencing certain type definitions or data members that the compiler did not recognize, which could be the result of differentiations in other system headers...but all of the system headers used to build this c++ lib should come from the same kernel/uclibc package that buildroot downloads, so having differences in those headers between your building environment and mine just doesn't make any sense...I don't know man. I have got no clue for the time being how that happened. But I was using RedHat 9 when compiling the toolchain. Could that make any differences?

I will keep looking into this.
M.Jackson
Posts: 85
Joined: Mon Sep 10, 2007 6:37 pm
Contact:

Post by M.Jackson »

ok, I found some of the missing type definitions in file $(BUILDROOT)/toolchain_build_mipsel/uClibc_dev/usr/include/bits/uClibc_touplow.h. So maybe the compiler should somehow refer to this file (or its copy/soft link) when interpreting the code in ctype_base.h. Here are two suggestions:

The easier one (but less likely to solve the problem): try to change some of the config options in uclibc (by running make uclibc-menuconfig). There are certain tunable options related to glibc compatibility in strings and stdio functions and previously I decided to turn off some in the favor of size reduction ('cos glibc is powerful but also a giant monster for embedded at the same time). If you really can't get around the problem, try to turn them back on.

The harder one (more likely to work): find a way to force the compiler to look for missing definitions in the file i pointed out above, or just copy the missing definitions to those headers you were having trouble with.
ale152
Posts: 2
Joined: Sun Dec 30, 2007 10:00 pm

Post by ale152 »

Woooah!!
It works! AWESOME!
But.. now what can i do with it?
Can i use serial port or usb to connect a usb keyboard to psp?
MythosGR
Posts: 4
Joined: Sun Dec 23, 2007 9:53 pm

Works!

Post by MythosGR »

Works great for me too (slim 3.71M33-4). Well done!
riverful
Posts: 6
Joined: Tue Dec 25, 2007 2:55 am

Post by riverful »

roge wrote:Hi Jackson

i am trying to compile your new toolchain, but i have an error on libstdc++-v3 compiling gcc-4.2.1

this is the full error out:
http://pastebin.ca/842448

gcc of my pc is:

gcc version 4.2.3 20071123 (prerelease) (Debian 4.2.2-4)

any sugestion?


-------------------------

i try to compile 4.2.0 and i view the same error..
Hi roge?
my host machine is debian & gcc has same version like you. ( 4.2.3 20071123 (prerelease) (Debian 4.2.2-4) )
i solved this problem using the uclibc-menuconfig.

# make uclibc-menuconfig

& choose follow settings.

String and Stdio Support
[*] Use Table Versions Of 'ctype.h' Functions.
[*] Support Signed Characters In 'ctype.h' Functions. │ │
ctype argument checking (Detect and handle appropriately) --->

then, make in the $(BUILDROOT) dir again.
enjoy it. bye~ :)
roge
Posts: 11
Joined: Thu Dec 13, 2007 11:44 pm

Post by roge »

Hi Hiverful, Jackson

i was trying in last night to compile with the options and i see new erros..

from /home/rogerio/buildroot/toolchain_build_mipsel/gcc-4.2.1/libstdc++-v3/include/precompiled/stdc++.h:56:
/home/rogerio/buildroot/toolchain_build_mipsel/gcc-4.2.1-final/mipsel-linux-uclibc/libstdc++-v3/include/bits/locale_facets.h:688: error: '__to_type' does not name a type
/home/rogerio/buildroot/toolchain_build_mipsel/gcc-4.2.1-final/mipsel-linux-uclibc/libstdc++-v3/include/bits/locale_facets.h:689: error: '__to_type' does not name a type


but, now, i am in slackware 12.0 and my gcc is 4.1.2
my debian is in my work and i dont work on weekend.. :(

thanks for suggestions
Post Reply