custom ps3 bootloader with vfat support (0.1.2-20090917)

Investigation into how Linux on the PS3 might lead to homebrew development.

Moderators: cheriff, emoon

speedxl
Posts: 24
Joined: Thu Aug 07, 2008 5:39 am

Post by speedxl »

It´s nice to see collaboration from the community, sashz has done a excellent framework and with this new developments, this will surely serve to start up new things.

mgillespie, can you share your work?
ouasse
Posts: 80
Joined: Mon Jul 30, 2007 5:58 am
Location: Paris, France

Post by ouasse »

jimparis wrote:Here's a simple server that will open some Bluetooth sockets, listen for connections from paired Sixaxis controllers, enable reporting and set the LEDs, and display the raw data stream:
http://ps3.jim.sh/sixaxis/bt/server.tar.gz
It doesn't need bluez libraries, so it should be good for a bootloader.
I downloaded and tested your server. It works great, even better than the usual joystick driver (it sets the LEDs correctly !). Thank you very much for this.

Do you know if such a server could create a device file (just like udev would do), in order the sixaxis controller to be visible in the system the exact same way as it would in USB mode ? Then, programs using the joystick interface would still work correctly, not depending the sixaxis controller is used in usb or bluetooth mode.

As I'm writing this message I just imagined using a fifo for this purpose : any received controller packet would be converted into a joydev compatible stream by the server, and written to a /dev/jsXX fifo which should be able to be opened by client programs the same way as they would open a real device file. Maybe this is the simplest solution, I'll investigate about this as soon as I find the time for this.
sashz
Posts: 33
Joined: Thu Feb 23, 2006 1:48 am
Contact:

Post by sashz »

ouasse wrote: Do you know if such a server could create a device file (just like udev would do), in order the sixaxis controller to be visible in the system the exact same way as it would in USB mode ? Then, programs using the joystick interface would still work correctly, not depending the sixaxis controller is used in usb or bluetooth mode.
COOL! you can use uinput kernel module to create input device node. I made the sources to emulate mouse with elecard stb ir remote control, you can use it as example;) https://pdaxrom.svn.sourceforge.net/svn ... /rcontrol/
sandworm
Posts: 4
Joined: Mon Jun 18, 2007 11:58 pm

Post by sandworm »

"timeout" parameter in kboot.conf does not work.
Kali
Posts: 10
Joined: Mon Apr 14, 2008 10:44 pm

Post by Kali »

i'm trying to build cross-tool on ubuntu 8.10 and 9.04 but i have problem with eglic-2.8

Code: Select all

checking whether powerpc-linux-gcc -g -O2 supports -mlong-double-128... yes
running configure fragment for nptl/sysdeps/pthread
running configure fragment for sysdeps/pthread
running configure fragment for sysdeps/unix/sysv/linux
checking for grep that handles long lines and -e... Usage: /bin/grep [OPTION]... PATTERN [FILE]...
Try `/bin/grep --help' for more information.
configure: error: no acceptable grep could be found in /home/giulio/ps3/pdaXrom-ng/host/bin:/home/giulio/ps3/pdaXrom-ng/host/sbin:/opt/powerpc-linux/toolchain/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/usr/xpg4/bin
++ error 'configure build0'
++ echo 'ERROR: configure build0'
ERROR: configure build0
++ exit 1
there is also a problem with "build/eglibc-2.8/ports/sysdeps/powerpc/preconfigure" cc didn't like -E switch ?

Code: Select all

checking add-on ports for preconfigure fragments... am33 arm hppa m68k mips powerpc ../ports/sysdeps/powerpc/preconfigure: line 21: -E: command not found
ouasse
Posts: 80
Joined: Mon Jul 30, 2007 5:58 am
Location: Paris, France

Post by ouasse »

Jim and sashz,

I have somewhat modified Jim's example bluetooth server in order it handles a set of /dev/jsXX fifo's. The program has been successfully been tested using my own programs. There are still problems which need to be solved.

Here is a tarball containing the modified source code. Two programs are provided : sixsrv which waits for connections and creates the necessary fifo's, and sixtest, a test program which tries to connect to the first available joystick device and display the values for the axises and the buttons. The test program works using either the sixsrv fifos, or usual joystick device files, either handled by bluez or by the usb subsystem. I have not tested the code using anything else than a sixaxis controller.

Now, here are the remaining problems:
1. Not all joystick-compliant software works : at least the jstest program segfaults. I suppose the server does not strictly emulate a real joystick device. I suppose there are some ioctls which should be handled, at least for getting the number of axises and buttons. I even don't know whether it is possible to perform a ioctl on a fifo. Maybe what sashz suggested (using the uinput interface) is the one and only way to do things right.

2. The sixsrv server does not work in the bootloader mini system. It does work on my PS3's Debian GNU/Linux system (with bluez deactivated), but not in the pdaXrom-ng bootloader small system. I have added the following options in the bootloader kernel config (ps3_kboot):
- Networking Support->Bluetooth subsystem support
- L2CAP protocol support
- RFCOMM protocol support (needed ?)
- HIDP protocol support (needed ?)
- HCI USB driver
What happens is that the server seems to be waiting for connections, but it never "sees" the sixaxis controller when the PS button is pressed. I am really stuck. I just can't figure out what's missing.

Any suggestion or hint would be welcome. We are definitely close to be able to control the petitboot menu with a wireless sixaxis controller.
sashz
Posts: 33
Joined: Thu Feb 23, 2006 1:48 am
Contact:

Post by sashz »

Kali wrote:i'm trying to build cross-tool on ubuntu 8.10 and 9.04 but i have problem with eglic-2.8

there is also a problem with "build/eglibc-2.8/ports/sysdeps/powerpc/preconfigure" cc didn't like -E switch ?

Code: Select all

checking add-on ports for preconfigure fragments... am33 arm hppa m68k mips powerpc ../ports/sysdeps/powerpc/preconfigure: line 21: -E: command not found
that autoconfig problem.. Try

Code: Select all

pushd $PWD; cd build/eglibc-2.8/; autoconf; popd
and run the build script again (without cleaning) to continue a build process.
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

This is probably getting offtopic for this thread, I think it's worth making a new one.
ouasse wrote:Maybe what sashz suggested (using the uinput interface) is the one and only way to do things right.
I think that's correct. uinput is really the right way to do it if you want to
present a normal input device.
2. The sixsrv server does not work in the bootloader mini system. It does work on my PS3's Debian GNU/Linux system (with bluez deactivated), but not in the pdaXrom-ng bootloader small system. I have added the following options in the bootloader kernel config (ps3_kboot):
- Networking Support->Bluetooth subsystem support
- L2CAP protocol support
- RFCOMM protocol support (needed ?)
- HIDP protocol support (needed ?)
- HCI USB driver
You shouldn't need RFCOMM and you probably don't want HIDP loaded.
What happens is that the server seems to be waiting for connections, but it never "sees" the sixaxis controller when the PS button is pressed.
Is the BT controller set up properly? If you load bluez and unload it, it will have done some initialization, but if you don't have bluez, you'll probably need to set up the controller manually. Something like

Code: Select all

$ hciconfig hci0 up
$ hciconfig hci0 lm master
$ hciconfig hci0 piscan
If that doesn't work, check the output of "hciconfig -a", and compare that between Debian & pdaXrom-ng.

If you don't have hciconfig in pdaXrom, you can probably built it statically under Debian and just copy the binary over. Once we figure out what hciconfig setup is necessary, we can modify sixaxissrv to do that stuff without hciconfig.
Kali
Posts: 10
Joined: Mon Apr 14, 2008 10:44 pm

Post by Kali »

sashz wrote:that autoconfig problem.. Try

Code: Select all

pushd $PWD; cd build/eglibc-2.8/; autoconf; popd
and run the build script again (without cleaning) to continue a build process.
toolchain now build fine, but i got problem with audacious_plugin

Code: Select all

Entering directory src.
Entering directory tonegen.
Leaving directory tonegen.
Entering directory console.
powerpc-linux-gcc: Audacious_Driver.cxx: C++ compiler not installed on this system
powerpc-linux-gcc: Ay_Apu.cxx: C++ compiler not installed on this system
make[6]: *** [Audacious_Driver.dep] Error 1
make[6]: *** Waiting for unfinished jobs....
make[6]: *** [Ay_Apu.dep] Error 1
powerpc-linux-gcc: Audacious_Config.cxx: C++ compiler not installed on this system
make[6]: *** [Audacious_Config.dep] Error 1
Failed to generate dependencies!
make[5]: *** [depend] Error 1
make[4]: *** [all] Error 1
make[3]: *** [subdirs] Error 1
make[2]: *** [all] Error 1
make[1]: *** [subdirs] Error 1
make: *** [all] Error 1
thank's again
Kali
Posts: 10
Joined: Mon Apr 14, 2008 10:44 pm

Post by Kali »

i've moved all to my desktop (ubuntu 9.04) from laptop (8.10) and audacious_plugin build fine
on 9.04 i've got problem first with xcat (removed from packages-x-apps.inc) and now with dbus
erros sames to be much platform dependent, there is a better distro for building this stuff?
sashz
Posts: 33
Joined: Thu Feb 23, 2006 1:48 am
Contact:

Post by sashz »

Hello,

here first version of sixaxis uinput driver ;) jstest works just fine

http://mail.pdaxrom.org/sashz/sixaxisd-0.1.tar.bz2

i will try add it to ps3boot
sashz
Posts: 33
Joined: Thu Feb 23, 2006 1:48 am
Contact:

Post by sashz »

Kali wrote:i've moved all to my desktop (ubuntu 9.04) from laptop (8.10) and audacious_plugin build fine
on 9.04 i've got problem first with xcat (removed from packages-x-apps.inc) and now with dbus
erros sames to be much platform dependent, there is a better distro for building this stuff?
hmm, i use ubuntu 8.10 x86-64 and 7.04 32bit. maybe you have missed some dependencies.
Kali
Posts: 10
Joined: Mon Apr 14, 2008 10:44 pm

Post by Kali »

sashz wrote:maybe you have missed some dependencies.
yes, i miss libgtk2.0-dev
cut & paste dependencies from firefox to terminal didn't work very well :D
Last edited by Kali on Wed Mar 25, 2009 7:01 pm, edited 1 time in total.
sashz
Posts: 33
Joined: Thu Feb 23, 2006 1:48 am
Contact:

Post by sashz »

speedxl
Posts: 24
Joined: Thu Aug 07, 2008 5:39 am

Post by speedxl »

Congratulations!, will test it ASAP, thank you--
Kali
Posts: 10
Joined: Mon Apr 14, 2008 10:44 pm

Post by Kali »

nice, very usefull :D
ouasse
Posts: 80
Joined: Mon Jul 30, 2007 5:58 am
Location: Paris, France

Post by ouasse »

Hi sashz,

you did a really good job ;) nice to read you managed to get something good out of the sixsrv code.

I quickly have had a look at your code, this is really good work. I guess the "outfname" member of the hidfd structure is not necessary anymore.

Have you tested using the sixaxisd with the petitboot menu ? (sorry, didn't have the time for more checkings).

I also noticed, in the bootloader you provided, usb keyboard and joystick do not work anymore. I will check further about this problem very soon.
sashz
Posts: 33
Joined: Thu Feb 23, 2006 1:48 am
Contact:

Post by sashz »

ouasse wrote:Hi sashz,
Have you tested using the sixaxisd with the petitboot menu ? (sorry, didn't have the time for more checkings).

I also noticed, in the bootloader you provided, usb keyboard and joystick do not work anymore. I will check further about this problem very soon.
no, i didnt check it with petitboot.
USB keyboard works for me, usb joystick no. I will check it later.
ouasse
Posts: 80
Joined: Mon Jul 30, 2007 5:58 am
Location: Paris, France

Post by ouasse »

There seems to be a problem with a 2.6.29 kernels compiled from official source tree. USB does not seem to be working at all. The previous 2.6.28.8 kernel was working fine.

I'll do some more testings with geoff's ps3-linux patches during the weekend.

Update: the USB problem seems to be related to the cordless keyboard/mouse set I am using. Using a standard wired keyboard, it works.

However, using sixaxisd, jstest does not work on my ps3:

Code: Select all

$ jstest /dev/input/js0 
Driver version is 2.1.0.
Joystick (sixaxis ps3) has 28 axes (X, Y, Z, Rx, Ry, Rz, Throttle, Rudder, Wheel, Gas, Brake, ?, ?, ?, ?, ?, Hat0X, Hat0Y, Hat1X, Hat1Y, Hat2X, Hat2Y, Hat3X, Hat3Y, ?, ?, ?, ?)
Segmentation fault
mgillespie
Posts: 20
Joined: Sun Jul 04, 2004 10:36 pm

Latst SVN (768) not building.

Post by mgillespie »

Code: Select all

*********************************************************************************
Build linux-2.6.29.tar.bz2

Downloading linux-2.6.29.tar.bz2
Patching linux-2.6.29
~/pdaXrom-ng ~/pdaXrom-ng
./rules/core.sh: line 209: cd: /root/pdaXrom-ng/build/linux-2.6.29: No such file or directory
*** /root/pdaXrom-ng/patches/linux-2.6.29/linux-2.6.27-apple.patch  patch -p1
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nur linux-2.6.27/arch/powerpc/boot/mktree.c linux-2.6.27-new/arch/powerpc/boot/mktree.c
|--- linux-2.6.27/arch/powerpc/boot/mktree.c	2008-10-10 05:13:53.000000000 +0700
|+++ linux-2.6.27-new/arch/powerpc/boot/mktree.c	2008-11-23 23:56:45.000000000 +0600
--------------------------
File to patch: 

Done a clean of the build area and also a clean and rebuild of the crosstools.
mgillespie
Posts: 20
Joined: Sun Jul 04, 2004 10:36 pm

Post by mgillespie »

speedxl wrote:It´s nice to see collaboration from the community, sashz has done a excellent framework and with this new developments, this will surely serve to start up new things.

mgillespie, can you share your work?
sashz has done an amazing job with this. I have posted my "work" (not really work, more integrating) and got some Linux PS3 "virgins" who previously thought it too complicated to runb Linux on PS3 to try it out too...

http://boardsus.playstation.com/playsta ... .id=151281

Hopefully the word can be spread, Linux on PS3 need NOT be complicated, infact it's only as complicated as people make it..

PS. The latesn SVN is working very well for me, 2.6.29 kernel (Tuz enabled!!)...
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

Thanks, mgillespie. Always nice to see pre-built stuff to try. But...
Tried winrar, winzip or 7z and got "unsupported compression method 99"
(I talk about PS3EasyLinux.zip size: 121 362 161 bytes)

Is password one of these (I've tried them without success)?
st0rmbr1nger
mgillespie
Firble
(if method 99 means bad password, then I'm just lacking the password)

You got a bit flamed there. Unfortunately, it's sad and true... If a PS3 purchaser forgets to format an 'other os' partition immediately, he may get trapped later... Even if the bootloader doesn't need, theoretically, a hard disk partition, user will always been asked to partition hard disk first (if no 'other os' partition exists), before being able to install an 'other os' bootloader... It's sad because nice stuff will keep on coming as game os bootloaders...
mgillespie
Posts: 20
Joined: Sun Jul 04, 2004 10:36 pm

Post by mgillespie »

Winzip should decompress it, as that what compressed it. password is: st0rmbr1nger (which you tried).

Sounds like it may be a corrupted download.
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

I've downloaded it again.
Same size (121 362 161 bytes) and
same md5 hash : e384b5734e6719d98bcf907600ceab69
The file on their server seems to be stable and unzippable...
mgillespie
Posts: 20
Joined: Sun Jul 04, 2004 10:36 pm

Post by mgillespie »

Just checked the file I uploaded:

MD5: e384b5734e6719d98bcf907600ceab69
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

And do you manage to extract files from it with, let's say, winzip 8.1 or winrar 3.30?
mgillespie
Posts: 20
Joined: Sun Jul 04, 2004 10:36 pm

Post by mgillespie »

ps2devman wrote:And do you manage to extract files from it with, let's say, winzip 8.1 or winrar 3.30?
Yes, tried it with Winzip 11 SR2 and latest 7Zip from Sourceforge.

I have done a SFX 7Zip file, i'll update the link on my webpage when it's uploaded. If you still have problems, wait for that.
mgillespie
Posts: 20
Joined: Sun Jul 04, 2004 10:36 pm

Post by mgillespie »

7Zip self extracting 7Zip posted.

http://www.markgillespie.co.uk/ps3linux/
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

Thanks. It works.
(there is really no advantage in using that new compression method 99)
mgillespie
Posts: 20
Joined: Sun Jul 04, 2004 10:36 pm

Post by mgillespie »

ps2devman wrote:Thanks. It works.
(there is really no advantage in using that new compression method 99)
I think "compression method 99" is when the unzipper does not understand the zip compression used. I will use legacy zip methods in future.

Did you get the distro booting?
Post Reply