PS3 Linux: Compiling an Experimental Kernel and Enabling WLAN on Linux for PS3

July 6th, 2007 by Ozzy

This short guide covers how to compile and run an experimantal kernel on linux for Playstation 3 as well as how to enable WLAN on it.

Prerequisites:

  • Linux Distribution installed with the latest Cell-Linux ADD-ON CD
  • git – which you can download and install using yum(e.g. for FC6: yum –enablerepo=extras install git)
  • root access

How to: Compiling and Running an Experimental Kernel

Part I – Compiling and Installing the Device Tree Compiler
git clone git://www.jdl.com/software/dtc.git dtc cd dtc make cp dtc /usr/bin/

Part II – Compiling and Running an Experimental Kernel

Make sure you have finished Part I.

cd /usr/src git clone git://git.kernel.org/pub/scm/linux/kernel/git/geoff/ps3-linux.git ps3-linux ln -s /usr/src/ps3-linux /usr/src/linux cd /usr/src/linux make clean make mrproper make ps3_defconfig

Optional:

You can edit the config file to your liking now:
make menuconfig

I usually disable Kernel Debugging (Kernel Hacking -> Kernel Debugging) and enable HugeTLB Support(File Systems -> Pseudo Filesystems -> HugeTLB File System Support). Also, at least on of the CellSDK examples requires TUN/TAP Support(Device Drivers -> Network Device Support -> Universal TUN/TAP Device Driver Support.)

Take a look at Mike Acton’s HowTo: Huge TLB pages on PS3 Linux if you need more information.

Part II – Continued
make make modules_install

Now look at the last line of your console(within red squares on this screenshot):
Experimental Kernel Version

There you can see the kernel version. This one was 2.6.22-rc7-g9b6d7171. Write yours down and replace it with mine.

Part II – Continued
mkinitrd initrd.img 2.6.22-rc7-g9b6d7171 cp initrd.img /boot/initrd-2.6.22-rc7-g9b6d7171.img cp vmlinux /boot/vmlinux-2.6.22-rc7-g9b6d7171 cp .config /boot/config-2.6.22-rc7-g9b6d7171 cp System.map /boot/System.map-2.6.22-rc7-g9b6d7171

Open up your kboot config file (mine is under /etc/kboot.conf) with a text-editor:

Place the following line at the end of the file:
linux227='/boot/2.6.22-rc7-g9b6d7171 initrd=/initrd-2.6.22-rc7-g9b6d7171.img video=ps3fb:mode:XXXX'

Replace XXXX with whatever your ps3 video mode is. (Type ps3videomode in a console if you’re not sure).

If you like, you can replace the default line to point to the new kernel, or you can press the tab-key when the kboot: prompt appears when you boot up.
default=linux227

Save the file and reboot. If anything goes wrong, press tab during the kboot: prompt and select one of the working kernels.

Part III – Enabling WLAN

As root, open up /etc/sysconfig/network-scripts/ifcfg-eth0 in your texteditor.

Scroll down to the end of the file.

For WEP Encryption, Type:

KEY="s:YourAccessPointPassword" ESSID="YourAccessPointName"

For WAP Encryption, Type:

IWPRIV="set_alg 2" KEY="s:YourAccessPointPassword" ESSID="YourAccessPointName"

For WAP2 Encryption, Type:

IWPRIV="set_alg 3" KEY="s:YourAccessPointPassword" ESSID="YourAccessPointName"

As always replace everything that starts with Your…. Save the file and reboot.

Fin.

5 Responses

  1. mra Wrote:

    Thanks for this howto !
    I m trying to get my own linux kernel working (but still have problems with my init ramdisk).
    I m following your blog with attention.

  2. nabster Wrote:

    I have posted a pre-built non-modular kernel, called nabster, at http://www.nabster.supanet.com/nabster

    If this single file is put in /boot, it is bootable on my system with the following lines in /etc/kboot.conf

    default=nabster
    root=/dev/ps3da1
    nabster=’/boot/nabster’

  3. Kylie Batt Wrote:

    А как это перефразировать?…

    Операционист, кредитный менеджер, экономист, ассистент
    Prerequisites:

    Linux Distribution installed with the latest Cell-Linux ADD-ON CD
    git – which you can download and install using yum…

  4. HOMER Wrote:


    Pillspot.org. Canadian Health&Care.Special Internet Prices.Best quality drugs.No prescription online pharmacy. High quality drugs. Order drugs online

    Buy:Prevacid.Actos.Zovirax.Nexium.Prednisolone.Zyban.100% Pure Okinawan Coral Calcium.Petcam (Metacam) Oral Suspension.Lumigan.Valtrex.Human Growth Hormone.Arimidex.Retin-A.Synthroid.Mega Hoodia.Accutane….

  5. Songs Wrote:

    High http://vplaystationnetrp.ABABYCLOTHES.INFO/tag/Songs+musical+High/ : Songs…

    musical…

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.


Anti-Spam Image

I thought what I'd do was, I'd pretend I was one of those deaf-mutes. That way I wouldn't have to have any goddam stupid useless conversations with anybody. If anybody wanted to tell me something, they'd have to write it on a piece of paper and shove it over to me. They'd get bored as hell doing that after a while, and then I'd be through with having conversations for the rest of my life.