Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PS3 2.6.21 Kernel ebuild / Controller via Bluetooth
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3, 4, 5, 6  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
garlicbread
Apprentice
Apprentice


Joined: 06 Mar 2004
Posts: 182

PostPosted: Thu Apr 26, 2007 11:22 pm    Post subject: PS3 2.6.21 Kernel ebuild / Controller via Bluetooth Reply with quote

This is a new ebuild / overlay for the PS3 git release of the kernel for 2.6.21
it includes a patch against 2.6.21 to bring it up to the same state as the ps3 git tree
and some other patches which may be useful as well
Note I've only tried this out on the ppc64 platform (not 32bit ppc)

Layman setup
overlay now setup via layman
I figure this will only need to be temporary since most of this will eventually find it's way into the main tree anyway
but since I've got other overlays in use myself on several other machines for other reasons I've now got the update of this automated via scripts

to get this working

1. install layman
Code:
emerge -u layman

2. edit /etc/layman/layman.cfg
add an extra line just below the overlays line so that it reads
Code:
overlays  : http://www.gentoo.org/proj/en/overlays/layman-global.txt
            http://homepage.ntlworld.com/garlicbread/Projects/overlays/layman-global.txt

3. when listing the overlays
Code:
layman -Lk

it should now be listed as garlicbread-ps3-overlay

4. add in the overlay
Code:
layman -a garlicbread-ps3-overlay


5. sync up to latest version of the overlays
Code:
layman -S


strictly speaking layman just pulls across the file http://homepage.ntlworld.com/garlicbread/Projects/overlays/tars/garlicbread-ps3-overlay.tar.bz2
and extracts it
however it makes setting things up a whole lot easier, and you just need to do layman -S to update it
(similar to emerge sync)

at this point you should be able to just do
emerge -u =dev-util/dtc-20060419 # used for compiling 2.6.21 now marked as a depend for 2.6.21 sources for the PS3
emerge -u =sys-kernel/ps3-git-sources-2.6.21-r1 # for the git kernel tree
emerge -u =net-wireless/bluez-utils-2.25-r2 # patched version of bluez for use with the controller via BT
emerge -u =net-wireless/bluez-hcidump-1.30-r1 # for testing purposes with bluetooth, just added the ppc64 keyword
emerge -u =games-util/joystick-20060731-r1 # added the ppc64 keyword
emerge -u =games-emulation/snes9x-1.50-r1 # up-to-date version of snes9x
emerge -u =games-emulation/snes9express-1.42-r1 # added the ppc64 keyword
emerge -u =app-misc/spe-samples-1.0 # Not tested this one yet, grabbed from lu zero's overlay need to get the spu cross compiler working before testing

for the cells-sources
emerge -u =sys-kernel/ps3-cell-sources-2.6.16 # Cell 2.0 CD 2.6.16
emerge -u =sys-kernel/ps3-cell-sources-2.6.21 # Cell 2.0 CD 2.6.21

Patch List for ps3-git-sources

1. UDF-2.50_linux-2.6.20.patch.bz2 - UDF 2.5 patch - for mounting those Blu-Ray disks
http://sourceforge.net/tracker/index.php?func=detail&aid=1671912&group_id=295&atid=300295

2. bt-2.6.21-rc6-ps3-setfilter.patch.bz2 - Blutooth patch
in all honesty I'm not entirely sure what this does
it's something that appears to be within the 2.6.16 kernel, it doesn't appear to be already included within 2.6.21
and it looks to have something to do with the setting of event filters for the device
hci0 / bluetooth device is visible without this patch, (and the PS3 can be discovered by other devices)
but I included it just incase it's needed
the code is selectable by a menu entry within PS3 Platform options

Git patches
different versions / patches generated at different dates from the PS3 kernel git tree, using git-clone / git-archive
http://git.kernel.org/?p=linux/kernel/git/geoff/ps3-linux.git;a=summary
note these are typically head releases so don't bug the kernel or gentoo dev's on this, some of this code is only a couple of days old
it should be considered unstable at best, but it does seem to work okay without problems

1. linux-2.6.21-rc6-ps3-head-20060414.patch.bz2
ps3-git-sources-2.6.21_rc6
alsa now appears to be fixed
with 2.6.16
mplayer -ao oss 1.mp3 - sounds okay
mplayer -ao alsa 1.mp3 - lots of distortion
under 2.6.21 both OSS / Alsa now appear to sound okay no distortion
Bluetooth seems less stable, using hciconfig to bring the interface down / up seems to lock hciconfig
(this problem isn't apparant under 2.6.16)

2. linux-2.6.21-ps3-head-20060426.patch.bz2
ps3-git-sources-2.6.21-r1
the main kernel tree for 2.6.21 has recently been marked stable / final release
and the changes have been merged into the ps3 git tree
hciconfig now appears to work for BT without locking up / alsa is still okay

3. linux-2.6.21-ps3-head-20070502.patch.bz2
ps3-git-sources-2.6.21-r2
now contains wireless support, seems to be okay with Bluetooth and X
however the main disk node has moved from /dev/sda to /dev/ps3da
this means that /etc/kboot.conf /etc/fstab will need to be altered in a certain way
see post further down the thread for more info on this and wireless

4. linux-2.6.22-rc1-ps3-head-20070515.patch.bz2
ps3-git-sources-2.6.22_rc1
latest release, currently testing / masked at the moment
same issue as above with /etc/kboot.conf /etc/fstab

Notes
1. alsa driver
drivers originally called ps3pf within 2.6.16 have been migrated to the new name of ps3
so in other words within /etc/modules.d/alsa
you may need to change
Code:
alias snd-card-0 snd-ps3pf

to
Code:
alias snd-card-0 snd-ps3

this is assuming you've got alsasound running at startup (not enabled by default in the current stage4)

2. bluez-utils is needed for bluetooth / hciconfig etc
I've not tested this out with a BT keyboard / mouse
but the controller now appears to work via BT

3. I've put some example kernel config files within the files directory in the ps3-git-sources

4. controller six axis
I haven't found anything to enable the motion sensing yet
this appears to act like a normal usb / Hid joystick
the only difference is that a specific command has to be sent initially to switch it on via usb
within drivers/usb/input/hid-core.c
more info can be seen here http://ps3.jim.sh/sixaxis/usb/
one thing that's quite interesting using jstest / joystick, is that a lot of the buttons, instead of having just a state of on / off
instead detect gradual changes in preasure (giving the 28 axis)
TODO - try experimenting with libusb

5. to compile
make sure dtc has been emerged
setup the config - make menuconfig
or copy one of the example configs to .config
make vmlinux
make modules
make modules_install
cp vmlinux across to /boot/kernel-<version>

make sure /usr/src/linux is pointing to the right kernel via symlink
modify /usr/share/genkernel/ppc64/modules_load
so that the line
MODULES_USB=""
reads
MODULES_USB="scsi_mod ps3pf_storage sd_mod ehci-hcd uhci-hcd usbhid"

genkernel initrd
edit /etc/kboot.conf

6. Note for snes9x I've placed an example config file for snes9x for the PS3 under the files directory called snes9x.conf.ps3
you'll just need to copy this across to ~/.snes96_snapshots/snes9x.conf
this should map the controller out correctly / set any options for sound etc

7. Note for the cell sources I've not yet included any of the patches for Blu-Ray etc that I've added on for ps3-git-sources as I wasn't sure if it would be best to add these in at this point

TODO
see if the gentoo patchset can be added to the mix for 2.6.21
try out BT keyboard / mouse
test out the others.bld from the Cell 2.0 CD


Last edited by garlicbread on Wed May 16, 2007 1:57 am; edited 8 times in total
Back to top
View user's profile Send private message
RaZoR1394
Guru
Guru


Joined: 09 Jan 2005
Posts: 356

PostPosted: Fri Apr 27, 2007 9:01 pm    Post subject: Reply with quote

Thanks. At first glance I would add dtc as a dependency for ps3-git-sources and also use dtc from git not from the latest build. I say this because I had compilation problems with dtc-20060419. I personally don't know how to make ebuild use git but I know It's possible. Let's hope that this one boots for me. My manual 2.6.21 build I tried did not work :/. It resulted in a lockup during init.
_________________
http://en.wikipedia.org/wiki/Cell_(microprocessor)
Back to top
View user's profile Send private message
garlicbread
Apprentice
Apprentice


Joined: 06 Mar 2004
Posts: 182

PostPosted: Fri Apr 27, 2007 10:30 pm    Post subject: Reply with quote

that's strange so far I've tried out both the ps3-git-kernel ebuilds with just the dtc release in the overlay (20060419 instead of git) and I've had no problems with booting or compiling
something to note is that you have to use the uncompressed vmlinux, not the compressed zImage
zImage won't compile, and even if it does the kboot bootloader won't accept it (not yet anyway)
(I re-compiled 2.6.16 originally which doesn't need dtc, but it's zImage wouldn't work)

here's a binary copy of the kernel / initramfs / modules directory I'm using (about 28Mb) this was created with the dtc 20060419
http://homepage.ntlworld.com/garlicbread/Projects/PS3Linux/ps3-kernel-build-2.6.21-r1.tar.bz2

I was going to use the git.eclass originally, and I did manage to figure it out
(git-clone copies the whole git tree and all changes, git-archive seperates out a tar archive of the specified release)
however it's a pain in the arse as you have to make a full clone of the tree before extracting the version / date release you want
for dtc this might not be so big but for the ps3-git tree it's nearly 160Mb, which is why I thought it'd be better to generate the diff's before hand and stick them in the files dir to save downloading / load on the git servers

I mentioned this above but just remembered the bit about configuring genkernel
make menuconfig
make vmlinux (zImage or just make on it's own won't work)
make modules
make modules_install
cp vmlinux across to /boot/kernel-version

make sure /usr/src/linux is symlinked properly
make sure MODULES_USB="scsi_mod ps3pf_storage sd_mod ehci-hcd uhci-hcd usbhid"
is set in /usr/share/genkernel/ppc64/modules_load
genkernel initrd

add entry to /etc/kboot.conf for the new kernel / initramfs etc
Back to top
View user's profile Send private message
puntjuh
n00b
n00b


Joined: 16 Feb 2007
Posts: 20

PostPosted: Sat Apr 28, 2007 1:09 pm    Post subject: Reply with quote

So, which files should i download there and where do I place them ? I'd like to update my ps3's kernel.
_________________
It's not teh size of the hammer, it's how you wield it!
Back to top
View user's profile Send private message
garlicbread
Apprentice
Apprentice


Joined: 06 Mar 2004
Posts: 182

PostPosted: Sat Apr 28, 2007 7:05 pm    Post subject: Reply with quote

If you just want pre-compiled binaries
http://homepage.ntlworld.com/garlicbread/Projects/PS3Linux/ps3-kernel-build-2.6.21-r1.tar.bz2
there shoud be a kernel file / initramfs file to go into /boot/
and a seperate directory to copy over for the kernel modules
(normally all kernel modules are stored in /lib/modules/<kernel version>)

but you'll still need to edit /etc/kboot.conf to specify a new line for the new kernel
different lines can be selected at boot by hitting the tab key at the initial kboot: prompt
e.g. gentoo_test=
but it's best to leave the default gentoo= line in for 2.6.16 until your sure the new kernel is okay
just in case the new entry doesn't work for any reason and you need to get back in to change the configuration


if you want to compile your own sources
http://homepage.ntlworld.com/garlicbread/Projects/PS3Linux/PS3-overlay.tar.bz2
you'll need to download / extract the archive and set it up as an overlay
(which means adding the direcrtory path to /etc/make.conf for the overlay once you've moved it into the right place)

I'm not going to go into the details of overlays
but there is more info here
http://www.gentoo.org/proj/en/overlays/userguide.xml
(it's just a way of adding custom packages / ebuilds that layer ontop of the default /usr/portage tree)
Back to top
View user's profile Send private message
puntjuh
n00b
n00b


Joined: 16 Feb 2007
Posts: 20

PostPosted: Sat Apr 28, 2007 10:11 pm    Post subject: Reply with quote

Cheers mate, that's all i need to know :). If i screw up, i know i did it wrong, learning is a painful fun process :).
_________________
It's not teh size of the hammer, it's how you wield it!
Back to top
View user's profile Send private message
Crymson
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 203
Location: New England

PostPosted: Tue May 01, 2007 5:34 pm    Post subject: Reply with quote

Hey Garlicbread - thanks for making the kernel binary!

I do have a few questions though. I got the new kernel installed, everything looks ok, but I can't get in to Gnome anymore. XDM says it starts OK, but when I type "startx" it fails and returns me to the command line.

Does this have something to do with your kernel being ppc64? I was using 32-bit U/L before. Are there some steps I need to take to recompile everything on my system for 64-bit U/L?

I think this will all work, and I'm really anxious to go and play some games on the emulators, but without X, I'm kinda stuck.

Thanks again mate!
_________________
Knowledge is Power // Power Corrupts // Study Hard // Be Evil
Back to top
View user's profile Send private message
garlicbread
Apprentice
Apprentice


Joined: 06 Mar 2004
Posts: 182

PostPosted: Tue May 01, 2007 10:28 pm    Post subject: Reply with quote

the kernel binary is compiled for 64 bit / ppc64 not for 32bit

if you need a 32bit kernel you'll need to compile from source code
also I'm not sure if you'll need to alter one of the configuration options in the kernel config to tell it to compile 32bit

to get the source code setup you can setup the overlay I've provided
or just extract the 2.6.21 kernel sources directly and try to patch manually using the patches in the files dir
I think I'll try to setup something via layman to make this simpler for setting up the overlay

On a side note I've just spotted this for Bluetooth
http://www.pabr.org/sixlinux/sixlinux.en.html
this should allow us to use the 6 axis controller (and I suspect the remote) under Linux via Bluetooth
Back to top
View user's profile Send private message
garlicbread
Apprentice
Apprentice


Joined: 06 Mar 2004
Posts: 182

PostPosted: Wed May 02, 2007 12:18 am    Post subject: Bluetooth Reply with quote

Full credit goes to the authors of the original web site for this one

After a bit of experimentation
I've found that 2.6.21 already contains the needed patches for getting the controller to work under BT
all I needed to apply was a minor patch to bluez-utils-2.25-r1
I'll get this added into the overlay when I've got time

looking at the instructions from http://www.pabr.org/sixlinux/sixlinux.en.html
we'll need bluez-utils that's been patched
and bluez-hcidump (I'll also have to add this to the overlay as it's got a missing keyword for ppc64 in the default tree)

this is as far as I've got

  1. edit /etc/conf.d/bluetooth
    change the line that reads
    Code:
    # Start hidd (allowed values are "true" and "false")
    HIDD_ENABLE=false

    # Arguments to hidd
    HIDD_OPTIONS=""

    to
    Code:
    # Start hidd (allowed values are "true" and "false")
    HIDD_ENABLE=true

    # Arguments to hidd
    HIDD_OPTIONS="--nocheck"


  2. in /etc/bluetooth/hcid.conf
    make sure the lines for auth and encrypt are commented out
    this appears to be the default for gentoo
    usually located right at the bottom of the config file
    Code:
    # Authentication and Encryption (Security Mode 3)
    #auth enable;
    #encrypt enable;


  3. restart bluetooth
    Code:
    /etc/init.d/bluetooth restart


  4. run
    Code:
    hcidump -V -x

    to see what's going on
    press the PS button on the controller

  5. you should see a load of crap flow past the screen and the lights on the controller should now start to flash
    the controller is now connected to the PS3
    you can just stop hcidump at this point as it's not needed

  6. you can also run hidd this should show something like
    Code:
    <Address> Sony Computer Entertainment Wireless Controller [054c:0268] connected


  7. if we do the following
    Code:
    cat var/log/messages

    I get something along the lines of
    Code:
    input: Sony Computer Entertainment Wireless Controller as /class/input/input3


  8. we should now have an entry in /dev/input/js0
    which we can test via the jstest (emerge the joystick package for this)
    Code:
    jstest /dev/input/js0


  9. Also tried this with the Bluetooth Remote controll
    it created a new event entry e.g. /dev/input/event3
    when I ran evtest on this however I couldn't get any output

  10. to break the connection / reset the controller
    Code:
    hciconfig hci0 down
    hciconfig hci0 up
    /etc/init.d/bluetooth restart



Notes
this does appear to work :D but I'm not sure how open this leaves the BT connection on the PS3 in terms of security etc
so further fiddling may be required to enable authentication etc
Also it looks as if to connect the PS3 controller via Bluetooth to a device other than the PS3 you first need to send some special commands via the USB cable to the controller to give it the correct master address
(I'm wondering if Sony have asked him to pull the code for this from the site as sixpair.c doesn't appear visible)
connecting the controller to the PS3 still leaves the LED's flashing so there must be some special command to send to just set one of the LED's to on all the time as an indicator
From the looks of things the motion detection isn't visible via js0, but there is some mention of it being possible via a raw hci connection, not sure if this is visible under hcidump
Back to top
View user's profile Send private message
puntjuh
n00b
n00b


Joined: 16 Feb 2007
Posts: 20

PostPosted: Sun May 06, 2007 11:57 am    Post subject: Reply with quote

Hi, i used your example .config to compile kernel 2.6.21-r1.
But now when i try to do: make vmlinux

I get the following stream of errors:

Code:

:0: error: -m64 not supported in this configuration
:0: error: -m64 not supported in this configuration
/usr/src/linux-2.6.21-ps3-r1/scripts/gcc-version.sh: line 13: printf: #: invalid number
/usr/src/linux-2.6.21-ps3-r1/scripts/gcc-version.sh: line 13: printf: #: invalid number
/bin/sh: line 0: [: too many arguments
:0: error: -m64 not supported in this configuration
:0: error: -m64 not supported in this configuration
/usr/src/linux-2.6.21-ps3-r1/scripts/gcc-version.sh: line 13: printf: #: invalid number
/usr/src/linux-2.6.21-ps3-r1/scripts/gcc-version.sh: line 13: printf: #: invalid number
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CC      arch/powerpc/kernel/asm-offsets.s
arch/powerpc/kernel/asm-offsets.c:1: error: -m64 not supported in this configuration
make[1]: *** [arch/powerpc/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2


And then it just goes back the to command line.

Any ideas?

*EDIT* If I DISABLE 64-bit kernel, then i can make my vm-linux. Does it perhaps have something to do with the fact that I installed ppc64 32UL ? *EDIT*
_________________
It's not teh size of the hammer, it's how you wield it!
Back to top
View user's profile Send private message
anunakin
Tux's lil' helper
Tux's lil' helper


Joined: 31 May 2004
Posts: 101

PostPosted: Sun May 06, 2007 1:16 pm    Post subject: Reply with quote

To compile the kernel on a 32bit ul, you need install sys-devel/kgcc64

And use this:
Code:
alias powerpc64make='make ARCH=powerpc CROSS_COMPILE=powerpc64-unknown-linux-gnu-'


And use powerpc64make to compile the kernel.... :wink: this tip was posted on other... topic... :wink:
_________________
Anunakin (Marcus Fazzi)
PHP/Java/C++ Developer
Sony PS3 JPN 60GB, with Gentoo Linux + HDD 160GB
Sony PS2 50001, with PS2Linux, HDD 80GB
Back to top
View user's profile Send private message
puntjuh
n00b
n00b


Joined: 16 Feb 2007
Posts: 20

PostPosted: Sun May 06, 2007 1:19 pm    Post subject: Reply with quote

trying to : emerge -av kgcc64 results in:

[ebuild N ] sys-devel/kgcc64-4.1.1 USE="-multislot -test" 38,283 kB
[blocks B ] sys-devel/gcc-powerpc64 (is blocking sys-devel/kgcc64-4.1.1)

Total: 1 package (1 new, 1 block), Size of downloads: 38,283 kB


Is it safe to remove gcc-powerpc64 ?
_________________
It's not teh size of the hammer, it's how you wield it!
Back to top
View user's profile Send private message
anunakin
Tux's lil' helper
Tux's lil' helper


Joined: 31 May 2004
Posts: 101

PostPosted: Sun May 06, 2007 3:18 pm    Post subject: Reply with quote

puntjuh wrote:
trying to : emerge -av kgcc64 results in:

[ebuild N ] sys-devel/kgcc64-4.1.1 USE="-multislot -test" 38,283 kB
[blocks B ] sys-devel/gcc-powerpc64 (is blocking sys-devel/kgcc64-4.1.1)

Total: 1 package (1 new, 1 block), Size of downloads: 38,283 kB


Is it safe to remove gcc-powerpc64 ?


You must remove old package sys-devel/gcc-powerpc64
Code:
emerge -C sys-devel/gcc-powerpc64

:wink:
Then try again!
_________________
Anunakin (Marcus Fazzi)
PHP/Java/C++ Developer
Sony PS3 JPN 60GB, with Gentoo Linux + HDD 160GB
Sony PS2 50001, with PS2Linux, HDD 80GB
Back to top
View user's profile Send private message
RaZoR1394
Guru
Guru


Joined: 09 Jan 2005
Posts: 356

PostPosted: Sun May 06, 2007 8:31 pm    Post subject: Reply with quote

garlicbread wrote:
the kernel binary is compiled for 64 bit / ppc64 not for 32bit

if you need a 32bit kernel you'll need to compile from source code
also I'm not sure if you'll need to alter one of the configuration options in the kernel config to tell it to compile 32bit

to get the source code setup you can setup the overlay I've provided
or just extract the 2.6.21 kernel sources directly and try to patch manually using the patches in the files dir
I think I'll try to setup something via layman to make this simpler for setting up the overlay

On a side note I've just spotted this for Bluetooth
http://www.pabr.org/sixlinux/sixlinux.en.html
this should allow us to use the 6 axis controller (and I suspect the remote) under Linux via Bluetooth


There is a python script/driver for the remote in the workings by someone named Brett but there hasn't been any recorded activity since the beginning of April. Also do you know what patches are included in the Sony prepatched 2.6.21 kernel on the new Cell CD? Do you plan to use it?
_________________
http://en.wikipedia.org/wiki/Cell_(microprocessor)
Back to top
View user's profile Send private message
hozt
n00b
n00b


Joined: 13 Jul 2006
Posts: 10

PostPosted: Fri May 11, 2007 5:45 pm    Post subject: Thanks for the how to, but can not boot new kernel Reply with quote

I know that I am close, but I am getting an error when I try to boot the new kernel:

>> Loading Modules
>> Activating mdev
>> Determining root device
!! Block device /dev/sda1 is not a valid root device
!! The root block device is unspecified or not detected

Here is the line from my kboot.conf
This one works
gentoo='sda1:/boot/kernel-genkernel-ppc64-2.6.16-ps3 initrd=sda1:/boot/initramfs-genkernel-ppc64-2.6.16-ps3 root=/dev/ram0 real_root=/dev/sda1 init=/linuxrc video=ps3fb:mode:1 rhgb'

This is the one with the new kernel
linux='sda1:/boot/vmlinux-2.6.21 initrd=sda1:/boot/initramfs-genkernel-ppc64-2.6.21-g2858acb9 root=/dev/ram0 real_root=/dev/sda1 video=ps3fb:mode:1 rhgb'

Here is /etc/fstab
/dev/sda1 / ext3 noatime 0 1
/dev/sda2 none swap sw 0 0
/dev/sr0 /mnt/cdrom iso9660 noauto,ro 0 0
/dev/sdf1 /mnt/storage ext3 noauto 0 0
proc /proc proc defaults 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
none /spu spufs defaults 0 0

I did label the sda1 partition according to the instructions. I have tried many different combinations in the kboot.conf without any luck. Any help or suggestions would be greatly appreciated.
Back to top
View user's profile Send private message
garlicbread
Apprentice
Apprentice


Joined: 06 Mar 2004
Posts: 182

PostPosted: Fri May 11, 2007 10:19 pm    Post subject: Reply with quote

are you missing init=/linuxrc on the 2nd line?

this is my /etc/kboot.conf at the moment

Code:
default=gentoo_2_6_21_dev
timeout=20
gentoo_2_6_21_dev='sda1:/kernel-ppc64-2.6.21-git-r1 initrd=sda1:/initramfs-genkernel-ppc64_2.6.21-git-r1 root=/dev/ram0 real_root=/dev/sda2 init=/linuxrc video=ps3fb:mode:163 rhgb'
gentoo_2_6_16_std='sda1:/kernel-genkernel-ppc64-2.6.16-ps3 initrd=sda1:/initramfs-genkernel-ppc64-2.6.16-ps3 root=/dev/ram0 real_root=/dev/sda2 init=/linuxrc video=ps3fb:mode:163 rhgb'


for me I've got /boot/ setup as a separate partition
which is why I'm using sda1:/kernel-ppc64-2.6.21-git-r1 instead of sda1:/boot/kernel-ppc64-2.6.21-git-r1
it's actually proving to a problem as I can only fit 2 kernels on it at one time

in your case from looking at your fstab the /boot/ prefix is needed
assuming the file naming is correct
linux='sda1:/boot/vmlinux-2.6.21 initrd=sda1:/boot/initramfs-genkernel-ppc64-2.6.21-g2858acb9 root=/dev/ram0 real_root=/dev/sda1 init=/linuxrc video=ps3fb:mode:1 rhgb'
this should be correct
Back to top
View user's profile Send private message
RaZoR1394
Guru
Guru


Joined: 09 Jan 2005
Posts: 356

PostPosted: Sat May 12, 2007 6:23 pm    Post subject: Re: Thanks for the how to, but can not boot new kernel Reply with quote

hozt wrote:
I know that I am close, but I am getting an error when I try to boot the new kernel:

>> Loading Modules
>> Activating mdev
>> Determining root device
!! Block device /dev/sda1 is not a valid root device
!! The root block device is unspecified or not detected

Here is the line from my kboot.conf
This one works
gentoo='sda1:/boot/kernel-genkernel-ppc64-2.6.16-ps3 initrd=sda1:/boot/initramfs-genkernel-ppc64-2.6.16-ps3 root=/dev/ram0 real_root=/dev/sda1 init=/linuxrc video=ps3fb:mode:1 rhgb'

This is the one with the new kernel
linux='sda1:/boot/vmlinux-2.6.21 initrd=sda1:/boot/initramfs-genkernel-ppc64-2.6.21-g2858acb9 root=/dev/ram0 real_root=/dev/sda1 video=ps3fb:mode:1 rhgb'

Here is /etc/fstab
/dev/sda1 / ext3 noatime 0 1
/dev/sda2 none swap sw 0 0
/dev/sr0 /mnt/cdrom iso9660 noauto,ro 0 0
/dev/sdf1 /mnt/storage ext3 noauto 0 0
proc /proc proc defaults 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
none /spu spufs defaults 0 0

I did label the sda1 partition according to the instructions. I have tried many different combinations in the kboot.conf without any luck. Any help or suggestions would be greatly appreciated.


I solved that problem by using genkernel (got that problem what ever I did until then). Unfortunately genkernel doesn´t work for me with this one.
_________________
http://en.wikipedia.org/wiki/Cell_(microprocessor)
Back to top
View user's profile Send private message
anunakin
Tux's lil' helper
Tux's lil' helper


Joined: 31 May 2004
Posts: 101

PostPosted: Sun May 13, 2007 3:13 am    Post subject: Re: Bluetooth Reply with quote

garlicbread wrote:
Full credit goes to the authors of the original web site for this one

After a bit of experimentation
I've found that 2.6.21 already contains the needed patches for getting the controller to work under BT
all I needed to apply was a minor patch to bluez-utils-2.25-r1
I'll get this added into the overlay when I've got time

looking at the instructions from http://www.pabr.org/sixlinux/sixlinux.en.html
we'll need bluez-utils that's been patched
and bluez-hcidump (I'll also have to add this to the overlay as it's got a missing keyword for ppc64 in the default tree)

this is as far as I've got

  1. edit /etc/conf.d/bluetooth
    change the line that reads
    Code:
    # Start hidd (allowed values are "true" and "false")
    HIDD_ENABLE=false

    # Arguments to hidd
    HIDD_OPTIONS=""

    to
    Code:
    # Start hidd (allowed values are "true" and "false")
    HIDD_ENABLE=true

    # Arguments to hidd
    HIDD_OPTIONS="--nocheck"


  2. in /etc/bluetooth/hcid.conf
    make sure the lines for auth and encrypt are commented out
    this appears to be the default for gentoo
    usually located right at the bottom of the config file
    Code:
    # Authentication and Encryption (Security Mode 3)
    #auth enable;
    #encrypt enable;


  3. restart bluetooth
    Code:
    /etc/init.d/bluetooth restart


  4. run
    Code:
    hcidump -V -x

    to see what's going on
    press the PS button on the controller

  5. you should see a load of crap flow past the screen and the lights on the controller should now start to flash
    the controller is now connected to the PS3
    you can just stop hcidump at this point as it's not needed

  6. you can also run hidd this should show something like
    Code:
    <Address> Sony Computer Entertainment Wireless Controller [054c:0268] connected


  7. if we do the following
    Code:
    cat var/log/messages

    I get something along the lines of
    Code:
    input: Sony Computer Entertainment Wireless Controller as /class/input/input3


  8. we should now have an entry in /dev/input/js0
    which we can test via the jstest (emerge the joystick package for this)
    Code:
    jstest /dev/input/js0


  9. Also tried this with the Bluetooth Remote controll
    it created a new event entry e.g. /dev/input/event3
    when I ran evtest on this however I couldn't get any output

  10. to break the connection / reset the controller
    Code:
    hciconfig hci0 down
    hciconfig hci0 up
    /etc/init.d/bluetooth restart




I do all right ... and can see sixaxis at kbluetoothd... and
Code:
input: Sony Computer Entertainment Wireless Controller as /class/input/input3

is ok
But the system not creating the /dev/input/js0 , any help?
_________________
Anunakin (Marcus Fazzi)
PHP/Java/C++ Developer
Sony PS3 JPN 60GB, with Gentoo Linux + HDD 160GB
Sony PS2 50001, with PS2Linux, HDD 80GB
Back to top
View user's profile Send private message
thetwister
n00b
n00b


Joined: 13 May 2007
Posts: 3

PostPosted: Sun May 13, 2007 8:37 am    Post subject: Reply with quote

Hi,

I want to try your overlay and try to compile my own kernel. but without success :(
the thing is: if i try the source from kernel.org or your's there is no difference in the behavior of the system.

what i did:
- used the ps3_* example config for .config.
- used powerpc64make (as i had the same error massage as puntjhu and tested anunakin's workaround)
- kernel compiled now without any error
- powerpc64make modules - without error
- powerpc64make modules_install
- copied vmlinux to /boot/kernel-test

tryed genkernel with an without editet /usr/share/genkernel/ppc64/modules_load does not make difference.
and make a link /boot/initrd-test showing on the new initramfs.

edit the kboot.conf file:

(i just copied the working line to a newone an added 3 times test):
gentoo-test="sda1:/boot/kernel-test initrd=sda1:/boot/initrd-test root=/dev/ram0 real_root=/dev/sda1 init=/linuxrc video=ps3fb:mode:3 rhgb"

ok here is the Problem:
i reboot, see the kboot prompt choose my new gentoo-test. i see the ps3 is working, there come these few lines and the display shows only a black screen. :(
(tv must get an input 'cause if there is no input it shows a blue screen)

:( any help is welcome!!! :(

thx!

p.s. sorry for my bad english
greetz
Back to top
View user's profile Send private message
garlicbread
Apprentice
Apprentice


Joined: 06 Mar 2004
Posts: 182

PostPosted: Sun May 13, 2007 2:28 pm    Post subject: Reply with quote

I've not tried this with powerpc64make, I don't know if that's for use when compiling on a different system other than the PS3
if you're compiling on a PS3 in a 64bit system (on 2.6.16) all you should need to use is the normal make command

if you've got a 32bit system I think you will need to un-select 64bit inside "make menuconfig"
as the default ps3 config defaults to 64bit
to be honest I've not tried this on a 32bit system only on 64bit
but if the correct option is selected I'm guessing it should compile with the usual make commands on the PS3

also you can't use
gentoo-test="sda1:/boot/kernel-test initrd=sda1:/boot/initrd-test root=/dev/ram0 real_root=/dev/sda1 init=/linuxrc video=ps3fb:mode:3 rhgb"
it would have to be
gentoo_test="sda1:/boot/kernel-test initrd=sda1:/boot/initrd-test root=/dev/ram0 real_root=/dev/sda1 init=/linuxrc video=ps3fb:mode:3 rhgb"
for some reason the "-" can't be used in the label only "_" as a separator
Back to top
View user's profile Send private message
thetwister
n00b
n00b


Joined: 13 May 2007
Posts: 3

PostPosted: Sun May 13, 2007 4:46 pm    Post subject: Reply with quote

well, u r damn sure , i'm running a 32bit version on my ps3 i think (i'm not 100 % sure why ;-) )

i installed it with this howto:
http://ps3wiki.qj.net/index.php/Gentoo_Howto

an now i changed the flag for 64bit and i can compile it with normal make.

i can test ist, in perhabs one hour when kdebase is compiled (runs since a few hours now) an the kernel is compiled too :)

hope to have good news ;)

but a question: is it possible to change to a 64 bit system? or have i do start at 0 ?

thank you!

greetz
Back to top
View user's profile Send private message
Crymson
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 203
Location: New England

PostPosted: Sun May 13, 2007 5:18 pm    Post subject: Reply with quote

You'd have to start over from 0 to go to a 64-bit system. That's what I had to do, and I'm going to finish it when I get home from travel next week. I'll post up my results when I get it finished.
_________________
Knowledge is Power // Power Corrupts // Study Hard // Be Evil
Back to top
View user's profile Send private message
garlicbread
Apprentice
Apprentice


Joined: 06 Mar 2004
Posts: 182

PostPosted: Sun May 13, 2007 7:12 pm    Post subject: Reply with quote

I must admit I've not got any experience with just the ppc / 32bit arch
for me instead of http://gentoo.osuosl.org/experimental/ppc64/stages/stage4-970-ps3_32ul.tar.bz2
I'm using http://gentoo.osuosl.org/experimental/ppc64/stages/stage4-970-ps3_64ul.tar.bz2

I know that when you go into to configure the kernel with
Code:
make menuconfig

there's an option right at the top labled "64-bit kernel" or CONFIG_PPC64
normally it defaults to on with the default ps3 configuration that comes bundled with the kernel
but for a 32 bit kernel I'm guessing it's just a case of turning it off and using make inside the 32bit PS3 environment
unless there's something special that needs to be done just for 32bit that I'm not aware of
Back to top
View user's profile Send private message
anunakin
Tux's lil' helper
Tux's lil' helper


Joined: 31 May 2004
Posts: 101

PostPosted: Mon May 14, 2007 10:59 am    Post subject: Reply with quote

OK I using kernel 2.6.16, with patches from Sony and with wireless/wifi support and bluez patches, I do all right ... and can see sixaxis at kbluetoothd... and hidd works
Code:
input: Sony Computer Entertainment Wireless Controller as /class/input/input3


But the system not creating the /dev/input/js0 , any help is welcome?
_________________
Anunakin (Marcus Fazzi)
PHP/Java/C++ Developer
Sony PS3 JPN 60GB, with Gentoo Linux + HDD 160GB
Sony PS2 50001, with PS2Linux, HDD 80GB
Back to top
View user's profile Send private message
garlicbread
Apprentice
Apprentice


Joined: 06 Mar 2004
Posts: 182

PostPosted: Mon May 14, 2007 11:38 am    Post subject: Reply with quote

if you look here http://www.pabr.org/sixlinux/sixlinux.en.html
there was a patch for HIDD that was included in as part of 2.6.21 kernel that's not present in 2.6.16
the patch itself is part of the basic vanilla 2.6.21 tree
so any PS3 kernel sources based on 2.6.21 should have this patch included

I've noticed it doesn't always work on first bootup of the machine
usually I try hitting the button on the controller, lights start to flash but /dev/input/js0 isn't always created first time

usually I try resetting the Bluetooth
Code:
hciconfig hci0 down
hciconfig hci0 up

which breaks the connection with the controller (lights stop flashing)

then try hitting the button on the controller a 2nd time and then it usually works
(lights still flashing but /dev/input/js0 is created)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Goto page 1, 2, 3, 4, 5, 6  Next
Page 1 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum