Skip to content

Installing an initramfs with Gentoo

frno7 edited this page May 14, 2022 · 2 revisions

Make sure that you have

This repository contains an initramfs directory that will used in the following. It already has the necessary initramfs/init and initramfs/sbin/init scripts. Note that whenever -musl is used in the following for a Musl compiler, this suffix can be replaced with -gnu if GNU libc compiler is used instead.

Now, make additional directories for the initramfs structure with

mkdir -p initramfs/{lib/firmware/ps2,bin,dev,etc,mnt,proc,root,sbin,sys,tmp,usr,usr/bin,usr/sbin,var}

and copy Busybox with

cp /usr/mipsr5900el-unknown-linux-musl/bin/busybox initramfs/bin/

Then copy the IOP modules with

cp /usr/mipsr5900el-unknown-linux-musl/lib/firmware/ps2/* initramfs/lib/firmware/ps2/

The initramfs now contains everything needed for booting PlayStation 2 Linux, except for any kernel modules that, if they will be used, will be installed in the initramfs/lib/modules directory when the Linux kernel is compiled.

For reference, see the initramfs installation script.