Compare commits

..

67 Commits

Author SHA1 Message Date
Andy Nguyen
c363690546 config: enable some more options 2026-07-05 17:25:30 +02:00
mia26MAjFm
5236127a9e build-kernel: kill double-build + wipe stale outputs (#28)
* build-kernel: call rpm packager container directly, skip second full build

* build-kernel: sudo-wipe image/ before checkout to drop stale root-owned outputs
2026-07-05 17:15:33 +02:00
masterzorag
c404a24cbf Update .config: Include NFS client support (#27)
* Update .config: Include NFS client support

Enable NFSv3 + ACLs support;
The libnfs implementation (gvfs*) it's limited and lacks features; We could have to use the kernel modules and use `mount -t nfs`.

* Update .config: include nfs support as modules
2026-07-05 14:34:13 +02:00
Andy Nguyen
cb839ab600 linux: set fan target temp to 80 celsius 2026-07-05 09:35:45 +02:00
Andy Nguyen
1926418e4e linux: move fan autoservo to fan.c 2026-07-05 09:34:17 +02:00
Andy Nguyen
c445e9adf3 linux: add spdx license identifier 2026-07-05 09:26:20 +02:00
Andy Nguyen
e81e281f38 config: enable CONFIG_MODULE_ALLOW_BTF_MISMATCH 2026-07-05 09:11:33 +02:00
Andy Nguyen
050704a2f5 config: update to 7.1.3 2026-07-05 09:10:35 +02:00
rmux
bf16f7e8b7 Add fan driver for PS5 (#25)
* linux: ps5: add fan driver

Thanks to cow for EMC RE and general help.

* ps5: remove redundant autoservo call in spcie
2026-07-04 21:22:16 +02:00
mia26MAjFm
8fbb1b2057 build-kernel: stash .deb + .pkg.tar.zst around the rpm run so all three survive (#26) 2026-07-04 20:12:56 +02:00
mia26MAjFm
935dc3e322 build-kernel: run --distro fedora after --distro all so .rpm ships (#23)
* build-kernel: release .rpm alongside .deb + .pkg.tar.zst

Now that ps5-linux-image's --distro all also produces an .rpm (paired
image PR), pick it up in the artifact upload, checksum list and
release files: block. Also add rpm as an explicit format choice so
someone can dispatch an rpm-only kernel build.

The sha256sum pipeline gets a 2>/dev/null so it doesn't complain
when an older ps5-linux-image checkout is used that only writes
deb + pkg.tar.zst.

* test: run on ubuntu-latest, point at paired ps5-linux-image branch, skip release on fork

* build-kernel: run --distro fedora after --distro all so .rpm ships

---------

Co-authored-by: Your Name <you@example.com>
2026-07-04 18:27:59 +02:00
mia26MAjFm
9ee33721e4 build-kernel: release .rpm alongside .deb + .pkg.tar.zst (#22)
Now that ps5-linux-image's --distro all also produces an .rpm (paired
image PR), pick it up in the artifact upload, checksum list and
release files: block. Also add rpm as an explicit format choice so
someone can dispatch an rpm-only kernel build.

The sha256sum pipeline gets a 2>/dev/null so it doesn't complain
when an older ps5-linux-image checkout is used that only writes
deb + pkg.tar.zst.

Co-authored-by: Your Name <you@example.com>
2026-07-04 08:56:04 +02:00
Andy Nguyen
a57d783d89 config: update to 7.1.2 2026-06-30 11:26:04 +02:00
Andy Nguyen
07f9d7f847 readme: remove todo for xhci 2026-06-30 09:18:59 +02:00
rmux
6cfe53c6d3 feat: add PS5 LED driver (#21)
usage:
  # list presets
  ls /sys/class/leds/

  # set a preset
  echo 255 > /sys/class/leds/ps5:<preset>:indicator/brightness

  # turn off
  echo 0 > /sys/class/leds/ps5:off:indicator/brightness
2026-06-28 15:59:14 +02:00
c0w-ar
06e7cbf7bd fix salina xhci reset on unbind (#20)
Co-authored-by: c0w <c0w@ps5.com>
2026-06-25 14:33:31 +02:00
c0w-ar
498b83a4a5 add xHCI Salina driver and btusb fix by bizkut (#19)
* add xHCI Salina driver and btusb fix by bizkut

* change abbreviation to 12 chars

---------

Co-authored-by: c0w <c0w@ps5.com>
2026-06-23 12:34:23 +02:00
Andy Nguyen
a2c666ba29 linux: mute audio and video on mode switch 2026-06-22 20:19:14 +02:00
Hasanuddin Abu Bakar
06bb2bb268 linux: fix HDMI audio on monitors with missing EDID audio modes (#18)
Some monitors do not advertise audio modes in their EDID CEA block,
causing audio_info.mode_count to be zero. When this happens, the
channel counting loop never executes and sceHdmiSetAudioConfig is
called with channels=0, which silently disables audio output on the
PS5 HDMI bridge.

Add a stereo (2ch) fallback when no audio modes are found so that
sceHdmiSetAudioConfig always receives a valid channel count.

Also fix a loop variable reuse bug where the inner audio channel
counting loop shared the iterator 'i' with the outer
for_each_oldnew_crtc_in_state loop. Rename the inner iterator to 'j'.
2026-06-22 17:54:33 +02:00
Andy Nguyen
2ee68463af linux: add svm implementation and run transmitter_control in guest mode 2026-06-20 17:31:51 +02:00
Andy Nguyen
76db3a464b linux: add bc250 audio patch by essdee 2026-06-19 17:19:34 +02:00
Andy Nguyen
9fec3c7729 config: update to 7.1.1 2026-06-19 17:17:46 +02:00
MassZero0
e00c8a7d38 linux: mts: fix NAPI poll storm that pins a CPU when the NIC MSI never fires (#14)
The PS5 GbE NIC has no INTx pin and its MSI sometimes never fires after a
cold boot. The driver already works around that with a 1 Hz link-poll
watchdog that kicks NAPI by hand.

But gbe_poll() re-checks GBE_REG_ISR after completing NAPI and reschedules
itself whenever a GBE_IER_MASK cause is still latched, without ever
acknowledging (W1C) the ISR -- only the hardware handler gbe_isr() does.
When the MSI is dead gbe_isr() never runs, so the latched cause (e.g.
RX_DONE) is never cleared, the re-check stays true forever, and NAPI
reschedules itself ~30k times/s, pinning ksoftirqd on that CPU at 100%.

Acknowledge the pending causes before re-kicking so a stale, undelivered
cause can no longer spin NAPI.

While the MSI is dead also poll the rings every GBE_POLL_FALLBACK_MS (10 ms)
instead of once per second, so interactive RX latency drops from ~1 s to a
few ms; fall back to HZ as soon as real IRQs start arriving.
2026-06-01 21:54:28 +02:00
Andy Nguyen
45c3a2ec19 linux: improve hdmi sequence in amdgpu dm 2026-05-31 21:47:54 +02:00
rmux
61eb7c0f71 Add buzzer driver for PS5 chassis piezo (#12)
thanks to cow for testing. legend as usual.
2026-05-30 23:11:28 +02:00
Andy Nguyen
5b0dc56c1b linux: fix cu unlock patches 2026-05-30 21:47:59 +02:00
Andy Nguyen
bcf718f3d5 linux: improve icc code 2026-05-30 21:40:20 +02:00
Andy Nguyen
52b956d985 config: enable NFT_QUEUE and NFT_TUNNEL 2026-05-29 22:49:47 +02:00
Andy Nguyen
e9424efb51 linux: add icc_device_power_* functions and fix black screen 2026-05-29 22:43:06 +02:00
eeply
a833df9c73 Add PS5 adapted bc-250 patch to enable 40CUs (#10) 2026-05-28 01:58:33 +02:00
rmux
ba4f29d40c Add ahci_salina driver for PS5 BD-ROM AHCI (0x104d:0x9105 / 0x9106) (#9)
thanks to cow for testing. legend as usual.
2026-05-28 01:58:06 +02:00
Andy Nguyen
2c46113af9 linux: clean up and fix blackscreen 2026-05-25 00:38:04 +02:00
Andy Nguyen
50cf28acb1 linux: refresh linux.patch 2026-05-24 18:32:09 +02:00
rmux
643e214d7b Add mts ethernet driver for PS5 GBE (0x104d:0x9104) (#8)
Credits:
- slidybat: shared his base, from which a few fixes were merged in
- cow: endless testing, corrections when I went wrong, catching the
  upload-under-load issue, and being an absolute legend
2026-05-24 16:52:22 +02:00
Andy Nguyen
3c05c6140a config: update to 7.0.10 2026-05-24 15:36:49 +02:00
Andy Nguyen
e6fb93f866 linux: add fan autoservo param update 2026-05-24 15:30:04 +02:00
Andy Nguyen
7d5d7976dd linux: re-add link training
Some monitors blackscreen without it.
2026-05-24 15:27:37 +02:00
Andy Nguyen
d44cfeb934 linux: add spcie and tpcie shutdown 2026-05-18 20:37:16 +02:00
Andy Nguyen
99e816eccb linux: use bapm param set 2 2026-05-18 20:33:52 +02:00
Andy Nguyen
f2c40a90d5 readme: remove todo for wlan driver 2026-05-17 12:09:05 +02:00
Andy Nguyen
042599e9f5 config: update to 7.0.8 2026-05-17 12:07:48 +02:00
Andy Nguyen
fe852d3cdb linux: fix link training failure 2026-05-17 12:04:36 +02:00
Dan
3da1ba3610 CI: build and release kernel on push (#5) 2026-05-14 19:55:53 +02:00
Andy Nguyen
874c43ebb6 linux: add spcie init 2026-05-11 00:05:10 +02:00
Andy Nguyen
d8d6674e74 config: update to 7.0.5 2026-05-10 14:17:20 +02:00
Andy Nguyen
59bb64ec34 config: enable cifs and smb 2026-05-09 08:58:15 +02:00
Andy Nguyen
e18eb668c7 linux: implement more hdmi and mp1 cmds 2026-05-08 20:13:33 +02:00
sleirsgoevy
7169870a21 linux: fix shutdown 2026-05-08 16:00:12 +02:00
Andy Nguyen
c6571488b6 readme: simplify it 2026-05-07 23:24:11 +02:00
EclipseFox25
640bb1a4e3 Added instructions for Arch Linux (#3) 2026-05-07 07:18:49 +02:00
Andy Nguyen
f221a7b224 linux: improve hdmi audio 2026-05-06 22:27:30 +02:00
Andy Nguyen
23375e091c linux: add 1080p120 support 2026-05-06 20:59:07 +02:00
Andy Nguyen
c1ecd51139 linux: fix typo and increase delay 2026-05-06 11:37:03 +02:00
Andy Nguyen
e2f07ba332 config: update to 7.0.3 2026-05-06 11:24:22 +02:00
Andy Nguyen
520ccf7787 linux: rework hdmi patches 2026-05-06 11:21:29 +02:00
Andy Nguyen
fb8321d25d linux: ignore legacy irq 2026-05-05 23:09:47 +02:00
Andy Nguyen
d2a2f89d50 linux: improve dmi patch 2026-05-05 23:03:17 +02:00
Andy Nguyen
0a043f6e76 linux: reorganize flava3 and verde in hdmi 2026-05-05 22:45:39 +02:00
Andy Nguyen
e366fdf3f6 config: enable dmi 2026-05-04 07:50:26 +02:00
Andy Nguyen
81a51f9750 linux: add icc power button 2026-05-03 18:43:54 +02:00
Andy Nguyen
59dce27dca linux: add dmi info 2026-05-03 17:22:38 +02:00
Andy Nguyen
bb79008922 readme: add instructions for installation 2026-05-03 10:38:18 +02:00
Andy Nguyen
dd041dcac0 config: enable ntsync and more 2026-05-03 10:30:09 +02:00
sleirsgoevy
1f493df000 linux: defer amdgpu initialization until HDMI is enabled (#2)
This fixes a black screen issue when amdgpu happens to initialize before
salina.
2026-05-01 12:10:45 +02:00
Andy Nguyen
dc2ee1ce8c linux: lock pci read/write 2026-04-30 23:04:50 +02:00
Andy Nguyen
639992e81d linux: hardcode ari functions 2026-04-30 22:31:03 +02:00
MikeM64
ae12c3982c Enable CONFIG_BNX2X for Devkit Ethernet
This enables the kernel module for the dev lan port
2026-04-29 18:44:09 -04:00
5 changed files with 8263 additions and 450 deletions

444
.config

File diff suppressed because it is too large Load Diff

110
.github/workflows/build-kernel.yml vendored Normal file
View File

@@ -0,0 +1,110 @@
name: Build Kernel
run-name: Build Kernel
on:
workflow_dispatch:
inputs:
format:
description: 'Package format'
default: 'all'
type: choice
options: [deb, arch, rpm, all]
patches_ref:
description: 'Patches branch/tag/SHA (empty = default)'
default: ''
type: string
workflow_call:
inputs:
patches_ref:
type: string
default: ''
jobs:
build:
runs-on: self-hosted
timeout-minutes: 120
permissions:
contents: write
env:
CCACHE_DIR: /home/opc/ccache
steps:
- name: Clean image workspace
# Docker containers write to image/linux-bin/ as root; actions/checkout's
# git clean runs as the runner user and skips root-owned files, so stale
# .deb / .pkg.tar.zst from prior kernel versions leak into the release.
run: sudo rm -rf image
- name: Checkout image builder
uses: actions/checkout@v6
with:
repository: ps5-linux/ps5-linux-image
path: image
ref: main
- name: Build kernel
run: |
FORMAT="${{ inputs.format || github.event.client_payload.format || 'all' }}"
PATCHES_REF="${{ inputs.patches_ref || '' }}"
bash image/build_image.sh --kernel-only \
--distro "$FORMAT" \
--patches-ref "$PATCHES_REF"
# --distro all skips the rpm packager. Call the packager container
# directly against the already-staged kernel (image/linux-bin/staging/)
# instead of re-running build_image.sh, which wipes outputs and
# rebuilds the kernel — that doubled CI time. This step is ~1 minute.
if [ "$FORMAT" = "all" ]; then
docker build -t ps5-kernel-packager-rpm \
-f image/docker/kernel-builder-rpm/Dockerfile image/
docker run --rm -v "$PWD/image/linux-bin":/out \
ps5-kernel-packager-rpm
fi
- name: Read kernel and patches version
id: version
run: |
psha=$(git -C image/work/ps5-linux-patches rev-parse --short HEAD)
kver=$(cat image/linux-bin/VERSION)
ts=$(date -u +%Y%m%d-%H%M%S)
echo "kver=$kver" >> "$GITHUB_OUTPUT"
echo "psha=$psha" >> "$GITHUB_OUTPUT"
echo "ts=$ts" >> "$GITHUB_OUTPUT"
- name: Upload build artifacts
uses: actions/upload-artifact@v6
with:
name: kernel-${{ steps.version.outputs.kver }}-${{ steps.version.outputs.psha }}
path: |
image/linux-bin/*.deb
image/linux-bin/*.pkg.tar.zst
image/linux-bin/*.rpm
retention-days: 7
- name: Compute checksums
id: sha
run: |
{
echo 'sums<<SHAEOF'
sha256sum image/linux-bin/*.deb image/linux-bin/*.pkg.tar.zst image/linux-bin/*.rpm 2>/dev/null | sed 's|image/linux-bin/||'
echo 'SHAEOF'
} >> "$GITHUB_OUTPUT"
- name: Create or update release
if: github.event_name != 'pull_request' && github.event_name != 'pull_request_target'
uses: softprops/action-gh-release@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: kernel-${{ steps.version.outputs.kver }}-${{ steps.version.outputs.psha }}
name: Kernel ${{ steps.version.outputs.kver }} (${{ steps.version.outputs.psha }})
body: |
PS5 Linux kernel packages for **${{ steps.version.outputs.kver }}**.
Patches: [`${{ steps.version.outputs.psha }}`](https://github.com/ps5-linux/ps5-linux-patches/commit/${{ steps.version.outputs.psha }})
```
${{ steps.sha.outputs.sums }}
```
files: |
image/linux-bin/*.deb
image/linux-bin/*.pkg.tar.zst
image/linux-bin/*.rpm
make_latest: true

19
.github/workflows/trigger-build.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: deploy
on:
workflow_dispatch:
push:
branches: [main]
pull_request_target:
types: [labeled]
branches: [main]
jobs:
kernel:
if: github.event.label.name == 'run-ci' || github.event_name != 'pull_request_target'
permissions:
contents: write
uses: ./.github/workflows/build-kernel.yml
with:
patches_ref: ${{ github.event.pull_request.head.sha || github.sha }}
secrets: inherit

View File

@@ -1,22 +1,29 @@
# ps5-linux-patches
## Compile
## Compilation
```bash
git clone https://github.com/ps5-linux/ps5-linux-patches
git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
cd linux
git checkout tags/v7.0.2
git apply ~/ps5-linux-patches/linux.patch
cp ~/ps5-linux-patches/.config .config
make -j16
git checkout "tags/v$(grep -m1 "^# Linux/" ../ps5-linux-patches/.config | awk '{print $3}')"
git apply ../ps5-linux-patches/linux.patch
cp ../ps5-linux-patches/.config .config
make -j$(nproc)
```
## Installation
In the same `linux` folder after compilation, do:
```bash
sudo make modules_install
sudo make install
```
## TODO
- amdgpu smu driver to show correct gpu frequency and temperature
- ethernet driver for (mediatek?) 0x104d:0x9104
- xhci driver adjustment for 0x104d:0x9108 to enable bluetooth
- wlan driver marvell 1b4b:2b56 (https://github.com/nxp-imx/mwifiex)
- hdmi converter improvments: hdr, rgb range, 120hz
## Bugs

File diff suppressed because it is too large Load Diff