This is a Linux Kernel source tailored to run on exploitable PlayStation 4 systems with various subsystem patches from
the fail0verflow team,
eeply,
Ps3itaTeam,
rancido,
valeryy (no Github - contributed to PS4 Baikal southbridges),
mircoho,
codedwrench,
tihmstar,
crashniels,
saya,
whitehax0r,
DFAUS -- and others.
For a more detailed credits section, check out this page.
This fork aimed to make the internal WiFi+Bluetooth modules on specific PlayStation models with the Marvell 88w8897 combo card (internal codename Torus 2) functional, as they typically error out on the default kernels.
Over time, I also managed to fix the common blackscreen at GUI login issue on newer kernels, and added support for various miscellaneous components such as the MT7668 WiFi and BT chip on certain consoles.
The branch names are meant to be descriptive and provide an idea, but they're far from perfect!
Merging all the main fixes into a few distinct branches is a WIP.
While the CUH-1216/1215 models are definitively known to have the Torus 2 models with probelmatic WiFi, along with some 11xx models with similar WiFi issues, here is a list of consoles reported working without any hiccups from the kernels in this repo:
| Console Model | Variation | WiFi+BT Chip Present | Compatible Kernel (Patched) |
|---|---|---|---|
| CUH-1216(A/B) | Phat - Belize B0 | Marvell 88w8897 (Torus 2) | 6.15.4, 5.15.15 |
| CUH-1215(A/B) | Phat - Belize | Marvell 88w8897 (Torus 2) | 6.15.4, 5.15.15 |
| CUH-1003 | Phat - Aeolia | ? | 6.15.4; probably non-built in firmware version |
| CUH-1004A | Phat - Aeolia | Marvell 88w8797 (Torus 1) | 6.15.4; non-built in firmware version |
| CUH-1116A | Phat - Aeolia | ? | 6.15.4 |
| CUH-2215B | Slim - Baikal | ? | 5.4.247 |
| CUH-2216A | Slim - Baikal B1 | MediaTek 7668 | 5.4.247 |
| CUH-2216A | Slim - Belize | MediaTek 7668 | 5.15.15 |
| CUH-7116B | Pro - Baikal B1 | ? | 5.4.247 |
| CUH-7202B | Pro - Baikal | ? | 5.4.247 |
| CUH-7216B | Pro - Baikal | MediaTek 7668 | 5.4.247 |
[A and B are just hard-drive specification: 500 GB vs 1000GB].
Aeolia, Belize and Baikal are the console Southbridges.
B0, B1 etc. are the Southbridge subrevisions.
- [[ Note: For 5.4.247 kernels, the latest working Mesa is version 25.1.x. Ensure your distribution ships this when picking a distro for these kernels for proper GPU function. See this issue. ]]
- [[ Certain older models (specifically the 1004A) needed a kernel that was built without embedding the latest proprietary firmware blobs (for Marvell SDIO WiFi+Bluetooth), and instead functioned properly with older firmware sourced from the initramfs. For these, each affected kernel release has a "no-built-in-fw" version for best functionality. See the releases page of the referring kernels or this issue for info. ]]
- TODO: Add a list with all supported console models, their southbridges, and their compatible kernels.
The main patches which in combination fix the CUH-1216/1215 wireless module are:
150 MHz rate limit quirk on the 88w8897 card's Function 0.
relying on the patch for added sdio_id for the Function 0,
Then a few SDHCI Host quirks for the PlayStation SDHCI host {only the SDHCI_QUIRK2_PRESET_VALUE_BROKEN is needed now},
additionally with extra retries for MMC CMD 52 or 53, which it would usually fail on {this is optional}.
The primary culprit behind the failed SDIO initialization, seems to be that the card doesn't properly support 208 or 200 MHz clock rate on this PS4 SDHCI host, causing the card to show tuning and other command failures. You can read more about the search for a solution from here.
Through MUCH trial and error, I was able to reach such an arcane fix,

and here's a screenshot with working internal WiFi and Bluetooth as shown in the logs, on an Arch Linux system running on my CUH-1216 console:
Hard work paid off!
There are different branches that you can select on the repo,
x_old__ps4-linux-5.15.y and x_old__ps4-linux-5.15.y-conservative2 are branches with excessive debug logs, that helped me pinpoint the issue on the whole MMC stack. Due to the logging, it is not advisable to use those kernel branches.
The other "x_experimental__" or "x_exp__" prefixed branches were made for debugging & testing a particular subsystem or problem in the kernel, and are not advised to be used.
They are only kept for further future experiment, archive or study only.
- - For example, the x_experimental__5.15.15-fix-baikal branch is non-functional.
Kernel 5.15 is not reported to be working on any Baikal console, but it's kept for testing only.
The 5.15.15-aeolia-belize is a branch without the PS4 patches from codedwrench's Baikal branch.
It still runs as intended on a Belize (no blackscreen fix yet), but you will get bad errors. Should be used for testing only.
However, it probably runs on Aeolia models, unlike the *-belize -only branches. (Not tested yet)
The main release branches are:
-
5.15.15-belize: The clean WiFi, Blackscreen & other misc. fixes' branch for Kernel version 5.15.15 on Belize southbridges.
This is the primary branch of the repo. -
5.15.189-belize: The clean WiFi & Blackscreen fix branch for Kernel version 5.15.189 on Belize southbridges.
(Not as well maintained as 5.15.15) -
5.4.247-baikal-dfaus: A branch for version 5.4.247 with fixed blackscreen and MT7668 support for Baikal southbridges.
Based on DFAUS' source. -
6.15.4-aeolia-belize-crashniels: The clean WiFi, Blackscreen & other misc. fixes' branch for Kernel version 6.15.4, on Aeolia/Belize southbridges.
Based on crashniels' source.
To compile any of these branches, you can simply fork the repo, go to the Actions tab and run the Workflow file for build-kernel_latest.yaml for a particular branch.
Or if you would like to build locally, just clone the repo for your desired branch and run the necessary commands (commands based on Ubuntu 24.04):
apt-get update
apt-get install build-essential
# gcc-11 is ideal for compiling the 5.4 & 5.15.y kernels, and can build 6.15.y too
# Otherwise you will have many typecheck and compile errors compiling the older kernels
apt-get-install libssl-dev gcc-11 libgcc-11-dev -y # Needs libssl-dev, at least on 5.x
apt-get install clang-14 lld-14 llvm-14 -y # Needs LLVM-14 to compile 5.4.247 and 5.15.15
apt-get install clang lld llvm -y # Will get LLVM-18 on Ubuntu 24.04; can compile 6.15.4
apt-get build-dep linux -y
git clone https://github.com/feeRnt/ps4-linux-12xx --branch <desired-branch-name> --depth=3
# keep a low depth to save on space
cd ps4-linux-12xx
## Copy additional firmware files
if [ -d extra_firmware ]; then
if [ ! -z "$( ls -A 'extra_firmware/')" ]; then
echo "Copying extra firmware to /lib/firmware"
cp -ri extra_firmware/* /lib/firmware
fi
fi
echo "Copying even more (mainline) extra firmware to /lib/firmware"
sudo mkdir /lib/firmware/mrvl
wget -nc https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/mrvl/sd8897_uapsta.bin \
&& sudo mv -i sd8897_uapsta.bin /lib/firmware/mrvl
wget -nc https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/mrvl/sd8797_uapsta.bin \
&& sudo mv -i sd8797_uapsta.bin /lib/firmware/mrvl
sudo mkdir /lib/firmware/mediatek
wget -nc https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/mediatek/mt7668pr2h.bin \
&& sudo mv -i mt7668pr2h.bin /lib/firmware/mediatek
## Rename .config file
mv config .config
## Set installation variables
export localversion=`cat .config | grep CONFIG_LOCALVERSION= | sed -nE 's|^.*="-||p' | tr -d '"'` # expects CONFIG_LOCALVERSION starting with a dash
export INSTALL_DIR="${PWD}/install_path/${localversion}/install"
## Set compiler options
export KCFLAGS="-march=btver2 -mtune=btver2 -O3"
export KAFLAGS="-march=btver2 -mtune=btver2 -O3"
export KCPPFLAGS="-march=btver2 -mtune=btver2 -O3"
# O3 is experimental; maybe O2 gives better performance on 5.x kernels?
## Set build options (for GCC)
export MAKE_OPTS="-j`nproc` \
INSTALL_PATH="${INSTALL_DIR}/boot" \
INSTALL_MOD_PATH="${INSTALL_DIR}" \
HOSTCC=gcc-11 \
CC=gcc-11"
## Set build options (for Clang,LLVM-14)
# export MAKE_OPTS="-j`nproc` \
# INSTALL_PATH="${INSTALL_DIR}/boot" \
# INSTALL_MOD_PATH="${INSTALL_DIR}" \
# CC=clang-14 LD=ld.lld-14 AR=llvm-ar-14 NM=llvm-nm-14 STRIP=llvm-strip-14 \
# OBJCOPY=llvm-objcopy-14 OBJDUMP=llvm-objdump-14 OBJSIZE=llvm-size-14 \
# READELF=llvm-readelf-14 HOSTCC=clang-14 HOSTCXX=clang++-14 HOSTAR=llvm-ar-14 \
# HOSTLD=ld.lld-14"
# Set build options (for Clang,LLVM-18)
# export MAKE_OPTS="-j`nproc --ignore=1` \
# INSTALL_PATH="${INSTALL_DIR}/boot" \
# INSTALL_MOD_PATH="${INSTALL_DIR}" \
# LLVM=1"
mkdir -p "${INSTALL_DIR}/boot"
## Disable/Enable Link Time Optimization:
scripts/config --disable CONFIG_LTO_CLANG_FULL
#scripts/config --enable CONFIG_LTO_CLANG_THIN
scripts/config --enable CONFIG_LTO_NONE
# Full LTO is enabled by default on the configs in this repo,
# except for the 5.4 kernels, which don't have this option.
# Explicitly disable it here
# Selecting GCC as the compiler automatically deselects LTO as well
# Warning ::: you might want to reduce the thread/processor count, j, with fullLTO builds
# Ensure you have proper RAM and swapspace, otherwise you will likely run Out of Memory (OOM).
# 32 GB of memory is recommended for fulLTO builds. thinLTO should be much easier however.
## Compilation:
make ${MAKE_OPTS} olddefconfig
make ${MAKE_OPTS} prepare
echo "making kernel. . ."
make ${MAKE_OPTS}
echo "making modules . . ."
make ${MAKE_OPTS} modules
echo "installing kernel . . ."
make ${MAKE_OPTS} install # This step is unnecessary
echo "installing modules . . ."
make ${MAKE_OPTS} modules_install
echo "Copying bzImage to $INSTALL_DIR/boot. . ."
cp arch/x86/boot/bzImage "$INSTALL_DIR/boot/"
echo "Copying used .config to $INSTALL_DIR/.config. . ."
cp .config "$INSTALL_DIR/.config"
cd "${INSTALL_DIR}"The bzImage should now be in boot/, and any modules compiled in lib/ .
To get some pre-compiled kernels, go to the releases section, and choose a kernel (bzImage) based on your needed version.
Please read the boldened out and highlighted text, as they contain some information that might be useful for a particular release. It's very wordy, that needs to be fixed!!
If something doesn't work on these kernels, has missing features, or your model still has unsupported WiFi, you can open a GitHub issue to share its details.
Pull requests/code contributions are always welcome.
While many of the bugs and issues prevalent in PS4 Linux kernels, and PS4 Linux in general have been fixed over the years, many of them still exist, and are seldom worked on.
A few honorable mentions aimed at improving this scene go to:
-
Blackscreen/No Display/Unsupported Monitor issue:
-
https://github.com/oberdfr/kernel-ps4linux/tree/ps4-linux-v6.17.1-custom-resolution:
attempts at using the display EDID information from your monitor, to use in Linux. This aims to improve the various blackscreen issues for monitors that don't support 1080p, or when using a capture card.
(Work in Progress) -
https://github.com/ps4gentoo/initramfs &
https://github.com/ps4boot/ps4-linux-payloads/
Same goal as the last link, but attempts it (successfully) by acquiring the EDID from Orbis (PS4-OS) throught the PS4-Linux Loader, and copies it over to the initramfs.
(Work in Progress; latest fix might not've been committed)
-
-
Mainling the PS4-specific patches and packages (OS-specific):
See, -
General discussion/help:
- https://ps4linux.com/
- https://discord.gg/QtcPmzHVVm (PS4-Linux Server Discord)
- https://discord.gg/jebUjgBu6T (ps4gentoo/ps4boot (mircoho's) Discord)
-
Random and other links regarding PS4-Linux that were, are, or could be useful:
- https://github.com/Hakkuraifu/PS4Linux-Documentation (Early documentation on PS4-Linux)
- https://github.com/Ps3itaTeam/ (Fan control, kernel, graphics drivers etc.)
- https://github.com/ErkkolaMaitohappo/arch-ps4-aur-smth-fork (Clean Arch Linux on PS4 (2025, Dec))
- https://github.com/7coil/archlinux-on-ps4 (Arch Linux on PS4, automated to fetch latest release)
- https://github.com/Dr4kk3N/dkn-overlay (Gentoo overlay for PS4-Linux)
- https://github.com/Hakkuraifu/PS4Linux-ArchDrivers (Graphics Drivers; Arch Based)
- https://github.com/rinsuki/ps4linux-video-drivers (Graphics Drivers; Arch Based)
- https://github.com/IT-Mania/PS4linux-deb/ (Graphics drivers ; Debian based)
- https://github.com/DionKill/ps4-video-archlinux (Graphics drivers ; Arch based - 2025, Dec)
- https://github.com/noob404yt/ (Mediatek drivers, Pop!_OS drivers)
- https://github.com/TigerClips1/ (Developer of PS4 JaguarLinux)
For an instructional manual on installation and other topics, refer to this all-around guide.
Enjoy your Linux-Station!
There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. Please read Documentation/admin-guide/README.rst first.
In order to build the documentation, use make htmldocs or
make pdfdocs. The formatted documentation can also be read online at:
https://www.kernel.org/doc/html/latest/
There are various text files in the Documentation/ subdirectory, several of them using the Restructured Text markup notation.
Please read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.