为 PlayStation 3 Linux 开发

发布于 2024-07-11 14:10:16 字数 1542 浏览 10 评论 0 原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

烂柯人 2024-07-18 14:10:16

您也可以尝试 Ubuntu 8.10 (Intrepid Ibex)。 他们对 PS3 的支持非常好,可以在此处找到安装说明和编译入门。 GCC 4.3 和 binutils 4.18 包括 Cell PPU(通用 PowerPC 目标)和 SPU 的目标,并且 Ubuntu 存储库中提供了可用的软件包(例如 spu-gcc、spu-g++、spu-binutils、ppu-gdb、spu-newlib等)它将为您编译二进制文件。

就合适的 IDE 而言,上述实用程序应该可以与任何 IDE(即 KDevelop、Eclipse CDT、Code::Blocks)很好地集成,只要您可以找到语法突出显示文件(适用于大多数流行的 IDE)。 Cell SDK 也可用,并且可能提供更好的集成,并且软件包可用于 RHEL 5.2 和 Fedora 9(应该能够使用 alien 将它们拉入 Debian/Ubuntu,但不确定在那)。

OpenMPI 是一个好主意,他们已经能够为基于单元的刀片编译它(这里)所以我认为这不应该是一个问题。 您还可以滚动自己的消息传递,因为低开销是在 Cell 上获得良好性能的关键(尽管我不知道 OpenMPI 对此有多适合,但它可能很棒)。

You might also try Ubuntu 8.10 (Intrepid Ibex). Their PS3 support is pretty good, and instructions for installation and a rough primer on compilation can be found here. GCC 4.3 and binutils 4.18 include targets for the Cell PPU (a generic PowerPC target) and SPUs, and there are packages available in the Ubuntu repositories (e.g. spu-gcc, spu-g++, spu-binutils, ppu-gdb, spu-newlib, etc) which will compile binaries for you.

As far as a proper IDE, the above utilities should integrate fine with about any IDE (i.e. KDevelop, Eclipse CDT, Code::Blocks), so long as you can find syntax highlighting files (available for most popular IDEs). The Cell SDK is available as well, and could potentially provide better integration, and packages are available for RHEL 5.2 and Fedora 9 (should be able to use alien to pull these into Debian/Ubuntu, but not sure on that).

OpenMPI is a fine idea, they've been able to compile it for Cell-based blades (here) so I don't think it should be an issue. You could also roll your own message passing, as low overhead is key in extracting good performance on the Cell (though I don't know how well-suited OpenMPI is for this, it could be great).

獨角戲 2024-07-18 14:10:16

您可能想尝试从 Codeplay 软件卸载 C++。 它提供了 C++ 的扩展方言,简化了在 Cell 处理器等多核硬件上的软件开发。

交叉编译器工具链允许在 Windows 上编译 PS3 的代码,考虑到运行 Linux 的 PS3 控制台上的资源限制(例如系统内存),这可能很有用,这可能会影响编译时间并使 PS3 作为桌面使用变得尴尬。

Offload C++ 编译器和工具的版本可通过 Cell BE SDK 针对 PS3 GameOS 和 Linux on Cell 进行使用。 Cell Linux 版本与 IDE 的 Eclipse CDT 集成。

免责声明:我是 Codeplay 的开发人员。

You may want to try Offload C++ from Codeplay Software. It provides an extended dialect of C++ easing development of software on multicore hardware like the Cell processor.

A cross compiler toolchain allows compilation of code for the PS3 on Windows, which can be useful given the resource constraints (e.g. system memory) on a PS3 console running Linux, which can impact compile times and make the use of a PS3 as a desktop awkward.

Versions of the Offload C++ compiler and tools are available targeting the PS3 GameOS and Linux on Cell with the Cell BE SDK. The Cell Linux version integrates with the Eclipse CDT for an IDE.

Disclaimer: I am a developer at Codeplay.

葵雨 2024-07-18 14:10:16

马修·斯卡皮诺 (Matthew Scarpino) 的书《细胞处理器编程》非常最新,并且包含很多有用的信息。 另外,该书的网站 有大量示例代码可供下载。

还有一个关于通过 Cell 处理器进行并行编程的 MIT 课程,其中有一些很好的内容信息,尽管其中一些已经过时,即它使用旧的单元机制,其中 libspe 提供了自己的线程。 使用最新版本的库,您将需要从其他地方获取线程(pthreads、boost 等)才能运行并行程序。

至于操作系统和编译器,我一直使用Yellow Dog Linux 6.1。 到目前为止,YDL 的表现相当不错,无论如何都比 Fedora 9 好得多,尽管这可能是因为 YDL 附带了超轻量级窗口管理器,而 Fedora 9 没有。 我在网络方面遇到了一些问题,但这些很可能是我设置系统的稍微奇怪的网络环境的产物。

一旦我启动并运行了 YDL,我就在 ( 之上安装了 cell sdk fedora 软件包)这需要一些工作,因为 cellsdk 安装脚本错误地将 YDL 识别为 RHEL,而不是 Fedora)。 YDL 确实在其软件包存储库之一中提供了大部分 SDK,但默认情况下并没有安装太多 SDK,仅安装了编译器(当然,直到我已经破解了 IBM 安装程序以执行以下操作后,我才弄清楚这一点)正确的事)。 我只是使用基本的 IBM 编译器(不是 XL 的东西)。

IBM 站点 还散布着大量信息,但它可以有点难以理解。

Matthew Scarpino's book, Programming the Cell Processor, is pretty up to date and has a lot of good information. Also, the website for the book has a lot of example code available for download.

There was also an MIT course on parallel programming via the Cell processor that has some good info, although some of it is out of date, namely, it uses the old cell mechanics where libspe provided its own threads. With the newest version of the library, you will need to get your threads from elsewhere (pthreads, boost, whatever) in order to run parallel programs.

As for OS and compiler, I've been using Yellow Dog Linux 6.1. YDL has worked out pretty well so far, much better than Fedora 9 anyway, although that is likely a result of the fact that YDL comes with a super-lightweight window manager and Fedora 9 doesn't. I had a few problems with networking, but those are most likely a product of the slightly bizarre network environment that I have the system set up in.

Once I had YDL up and running, I then installed the cell sdk fedora packages on top of (this takes a little bit of work, as the cellsdk install script falsely recognizes YDL as RHEL, not Fedora). YDL does have most of the SDK available in one of their package repos, but by default not much of it is installed, just the compilers (of course, I didn't figure this out until I had already hacked the IBM installer to do the right thing). I'm just using the basic IBM compilers (not the XL stuff).

There is also a ton of information scattered around the IBM site, but it can be a bit hard to make sense of.

べ映画 2024-07-18 14:10:16

在特殊设计的 SPE 上运行代码时要小心 - 默认堆栈大小因编译器而异,并且在溢出时可能会导致各种问题。 通常最好的做法是在 SPE 代码中全局声明大部分数据,并避免使用堆栈(除了非常小的变量分配之外)。

由于没有缓存(或者......从某种意义上说,它是所有 L2 缓存),因此这样做不会造成真正的性能损失,并且您永远不会遇到诸如尝试将 DMA 数据传入或传出不存在的内存地址之类的问题。 IBM SPE 编译器通常被认为是

最好的,据我所知,尽管我个人从未使用过它。

Be mindful when running code on the SPEs of their special design -- the default stack size varies widely from compiler to compiler, and can cause all sorts of issues when you overflow. It's usually a good practice to declare most data globally in SPE code, and avoid the stack except for very small variable allocations.

Since there's no cache (or... its all L2 cache, in a sense), there's no real performance penalty to doing this, and you'll never run into problems like trying to DMA data to or from a memory address that is no longer valid, etc.

The IBM SPE compiler is generally considered the best, afaik, although I have never used it, personally.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文