Sunday, November 25, 2007

How to connect PSP to Linux?

Latest Linux distributions should be able to detect PSP automatically. You may want to examine the kernel messages with dmesg to see what device the PSP was recognized as:

 $ dmesg
Linux version (buildd@vernadsky) (gcc version 3.3.4 (Debian 1:
3.3.4-9ubuntu5)) #1 Wed Aug 17 23:34:53 UTC 2005
BIOS-provided physical RAM map:

[…] lots of output deleted […]

scsi0 : SCSI emulation for USB Mass Storage devices
Vendor: Sony Model: PSP Rev: 1.00
Type: Direct-Access ANSI SCSI revision: 02
USB Mass Storage device found at 2
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
SCSI device sda: 487936 512-byte hdwr sectors (250 MB)
sda: Write Protect is off
sda: Mode Sense: 00 6a 20 00
sda: assuming drive cache: write through
/dev/scsi/host0/bus0/target0/lun0: p1

If however your PSP is not automatically detected, run the command modprobe usb-storage as the root user and run dmesg again, check its output. You should be able to identify the device, you can mount it with the following commands (if it was identified as sda, you want to use sda1, as the first partition):

 $ sudo mount /dev/sda1 /mnt -o uid=$USER
$ ls -l /mnt/

total 128
-rwxr--r-- 1 me root 5125 2005-09-04 12:35 index.html
-rwxr--r-- 1 me root 4060 2005-09-04 12:34
-r-xr--r-- 1 me root 0 2005-01-30 22:28 memstick.ind
drwxr--r-- 4 me root 32768 2005-09-02 22:50 mp_root
-r-xr--r-- 1 me root 0 1979-12-31 23:00 mstk_pro.ind
drwxr--r-- 9 me root 32768 2005-04-08 23:55 psp

The sudo command will let you to run mount as root user, and the -o uid $USER tells Linux to mount it so that the currently logged-in user is the owner of the files on the stick.

No comments: