Package: initscripts Version: 2.86.ds1-56 Severity: wishlist Tags: patch User: [EMAIL PROTECTED] Usertags: origin-ubuntu intrepid ubuntu-patch
Hi! Attached patch provides support for the Cell processor's SPU virtual kernel file system [1]. This is e. g. found on the Sony PlayStation 3. Thanks for considering, Martin [1] http://www.research.ibm.com/cell/SPU.html -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
* Support Cell processor:
- debian/initscripts/postinst: Create spu system group and /spu mount
point if we are running on a Cell processor.
- debian/initscripts/etc/init.d/mountkernfs.sh: Mount spufs if Cell
processor is detected.
- debian/control: Add initscripts dependency 'passwd' for groupadd.
--- sysvinit-2.86.ds1/debian/control
+++ sysvinit-2.86.ds1/debian/control
@@ -48,7 +49,7 @@
Package: initscripts
Architecture: any
-Depends: ${shlibs:Depends}, ${glibc:Depends}, ${mount:Depends}, e2fsprogs (>= 1.32+1.33-WIP-2003.04.14-1), debianutils (>= 2.13.1), lsb-base (>= 3.0-6), sysvinit-utils (>= 2.86.ds1-39)
+Depends: ${shlibs:Depends}, ${glibc:Depends}, ${mount:Depends}, e2fsprogs (>= 1.32+1.33-WIP-2003.04.14-1), debianutils (>= 2.13.1), lsb-base (>= 3.0-6), sysvinit-utils (>= 2.86.ds1-39), passwd
Recommends: psmisc
Conflicts: sysv-rc (<< 2.86.ds1-1.2), sysvinit (<< 2.86.ds1-12), udev (<< 0.080-1), usplash (<< 0.5.8-2), libdevmapper1.02.1 (<< 2:1.02.24-1), insserv (<< 1.09.0-12)
Replaces: sysvinit (<< 2.85-12), libc6, libc6.1, libc0.1, libc0.3
--- sysvinit-2.86.ds1/debian/initscripts/postinst
+++ sysvinit-2.86.ds1/debian/initscripts/postinst
@@ -197,6 +212,20 @@
fi
#
+# Create mount point for spufs, and create spu system group
+#
+if mountpoint -q /proc && grep -qs '^cpu.*Cell' /proc/cpuinfo; then
+ if ! getent group spu >/dev/null; then
+ # the adduser package is priority important; cannot use addgroup
+ groupadd -K GID_MAX=1000 spu
+ fi
+ mkdir -p /spu
+ if ! mountpoint -q /spu; then
+ mount -t spufs -ogid=spu spufs /spu
+ fi
+fi
+
+#
# Create initial log files
#
[ "$PREV_VER" ] || chmod 755 /var/log/fsck || :
--- sysvinit-2.86.ds1/debian/initscripts/etc/init.d/mountkernfs.sh 2008-05-28 18:23:56.000000000 +0200
+++ sysvinit-2.86.ds1.new/debian/initscripts/etc/init.d/mountkernfs.sh 2008-05-28 18:23:38.000000000 +0200
@@ -74,6 +74,11 @@
then
domount usbfs usbdevfs /proc/bus/usb usbfs -onodev,noexec,nosuid
fi
+
+ # Mount spufs, if Cell Broadband processor is detected
+ if [ -d /spu ] && grep -qs '^cpu.*Cell' /proc/cpuinfo; then
+ domount spufs "" /spu -ogid=spu
+ fi
}
case "$1" in
signature.asc
Description: Digital signature

