Linux kernel 2.6.29 released with an option to have the Playstation 3's unused vram as a block device. It is 256MB of otherwise unused memory. A common use for it is as swap, but this needs to be recreated with every boot. Two methods of doing this are through a udev rule or an init script. I don't know the best way to have this incorporated into Gentoo, or if it even should be. I'm leaving the work here for someone else to decide. Reproducible: Always Steps to Reproduce: 1. Boot a PS3 with kernel 2.6.29 and CONFIG_PS3_VRAM enabled.
Created attachment 192334 [details] init script to setup PS3's vram as swap
Created attachment 192336 [details] 2 udev rules to handle /dev/ps3vram These were originally put together by one of Sony's PS3 devs and put up here: http://www.kernel.org/pub/linux/kernel/people/geoff/cell/ps3-conf/ps3vram-swap.rules My version has a typo fix in the second rule, allowing grep to accurately parse the /etc/fstab entry. My preference for if this makes its way into Gentoo proper is with the second udev rule.
This could probably also be achieved by adding the following to /etc/conf.d/swap start_pre() { if [ -e /dev/ps3vram ]; then mkswap /dev/ps3vram >/dev/null fi } and using the standard fstab entry. I believe that works for older versions of baselayout as well as for openrc, but it saves the need for a completely new init script (and trying to figure out which package it should be a part of). I'm going to assign this to the people who handle ps3pf_utils since they're the only other playstation 3 related package I can find in the tree. Perhaps it would be worth making a ps3 project?
For what it's worth, I've been using the /etc/conf.d/swap method for the last several months without issue.
I'm withdrawing my request as Sony is abandoning the platform.