Editing Making Isolated SPU Modules and Loaders
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
=Introduction= | =Introduction= | ||
Line 6: | Line 5: | ||
=Tools= | =Tools= | ||
==SPU GCC Compiler== | ==SPU GCC Compiler== | ||
* You need SPU GCC compiler to compile your code and create binary version of it. | * You need SPU GCC compiler to compile your code and create binary version of it. | ||
* On PS3 Debian, just install spu toolchain | * On PS3 Debian, just install spu toolchain. | ||
* You can also cross-compile SPU GCC toolchain for your Linux PC. | * You can also cross-compile SPU GCC toolchain for your Linux PC. | ||
* See http://gitorious.ps3dev.net/ps3linux/powerpc64-cross-compiler if you want to build SPU GCC cross-compiler. Just change in HOWTO target option from powerpc64-linux to spu-elf. | * See http://gitorious.ps3dev.net/ps3linux/powerpc64-cross-compiler if you want to build SPU GCC cross-compiler. Just change in HOWTO target option from powerpc64-linux to spu-elf. | ||
Line 47: | Line 43: | ||
* First you need '''sb_iso_spu_module.self''' from your NOR/NAND flash or from PS3 update file. | * First you need '''sb_iso_spu_module.self''' from your NOR/NAND flash or from PS3 update file. | ||
<pre> | |||
# compile your SPU code | # compile your SPU code | ||
Line 89: | Line 85: | ||
# entry point is 0x880 which is in first program segment at file offset 0x100 | # entry point is 0x880 which is in first program segment at file offset 0x100 | ||
# now we kill all old code | # now we kill all old code with 0s before we put our code there. | ||
# seek parameter is the offset of the first program segment. | # seek parameter is the offset of the first program segment. | ||
# count parameter is the sum of the offset of the last program segment plus its size and | # count parameter is the sum of the offset of the last program segment plus its size and | ||
# minus the offset of the first program segmnet. | # minus the offset of the first program segmnet. | ||
# killing old code | # killing old code with 0s is a good idea because 0x00000000 means stop opcode. | ||
dd if=/dev/zero of=dump_ata_keys.elf bs=1 seek=$((0x100)) count=$((0x51b0 + 0x34 - 0x100)) conv=notrunc | dd if=/dev/zero of=dump_ata_keys.elf bs=1 seek=$((0x100)) count=$((0x51b0 + 0x34 - 0x100)) conv=notrunc | ||
Line 123: | Line 119: | ||
# mount spuisofs (we do it of course on PS3 Linux and not on PC) | # mount spuisofs (we do it of course on PS3 Linux and not on PC) | ||
sudo mount -t spuisofs none /mnt | sudo mount -t spuisofs none /mnt | ||
ls -l /mnt | glevand@debian:~$ ls -l /mnt | ||
total 0 | total 0 | ||
-rw-rw-rw- 1 root root 1048576 Sep 7 12:12 app | -rw-rw-rw- 1 root root 1048576 Sep 7 12:12 app | ||
Line 160: | Line 155: | ||
problem: spu_status_R 6660082 | problem: spu_status_R 6660082 | ||
# here is important to check the stop code which is | # here is important to check the stop code which is 0x0666 | ||
# my dump_ata_keys.S code stops with stop code | # my dump_ata_keys.S code stops with stop code 0x0666 when it's done | ||
# this way you can be really sure that your dump_ata_keys.self was correctly signed, | # this way you can be really sure that your dump_ata_keys.self was correctly signed, encrypted and accepted by isoldr | ||
# dump your ATA keys | # dump your ATA keys | ||
hexdump -C /mnt/arg1 | hexdump -C /mnt/arg1 | ||
</ | </pre> | ||
=Example: Making dump_encdec_keys.self= | =Example: Making dump_encdec_keys.self= | ||
* First you need '''lv1ldr''' from your NOR/NAND flash or from PS3 update file. | * First you need '''lv1ldr''' from your NOR/NAND flash or from PS3 update file. | ||