-
Notifications
You must be signed in to change notification settings - Fork 3
Installing an R5900 Busybox with Gentoo
The R5900 is the main processor of the PlayStation 2 and this R5900 Busybox guide is specific to Gentoo Linux.
Decide whether to build a statically linked or dynamically linked variant of Busybox. The USE flag static
configures this. For a default configuration, do
emerge-mipsr5900el-unknown-linux-gnu -v sys-apps/busybox
to obtain a /usr/mipsr5900el-unknown-linux-gnu/bin/busybox
R5900 executable.
The command file /usr/mipsr5900el-unknown-linux-gnu/bin/busybox
now prints either
/usr/mipsr5900el-unknown-linux-gnu/bin/busybox: ELF 32-bit LSB executable, MIPS, MIPS-III version 1 (SYSV), statically linked, for GNU/Linux 3.2.0, stripped
or
/usr/mipsr5900el-unknown-linux-gnu/bin/busybox: ELF 32-bit LSB pie executable, MIPS, MIPS-III version 1 (SYSV), dynamically linked, interpreter /lib/ld.so.1, for GNU/Linux 3.2.0, stripped
A simple method to provisionally override a default USE flag is to prepend it as an environment variable setting. So one can do
USE="static" emerge-mipsr5900el-unknown-linux-gnu -av sys-apps/busybox
for a statically linked executable, or
USE="-static" emerge-mipsr5900el-unknown-linux-gnu -av sys-apps/busybox
with a -
prefix to static
for a dynamically linked executable. If circular dependencies error resolving needs multiple USE flags, then flags can be combined inside quotas, for example: USE="static prefix-guest"
To permanently configure USE flags for Busybox, create a file /usr/mipsr5900el-unknown-linux-gnu/etc/portage/package.use/busybox
with for example
sys-apps/busybox static
to build a statically linked executable.