# Rock 5B switch to mainline kernel

**URL:** https://dietpi.com/forum/t/rock-5b-switch-to-mainline-kernel/25215
**Category:** General Discussion
**Created:** [15 May 2026 02:35 UTC](https://dietpi.com/forum/t/rock-5b-switch-to-mainline-kernel/25215 "2026-05-15T02:35:17Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [22 May 2026 22:52 UTC](https://dietpi.com/forum/t/rock-5b-switch-to-mainline-kernel/25215/2 "2026-05-22T22:52:10Z")

</div>

Sorry for the late reply: Safe and recommended, unless you use Jellyfin (which does not support the mainline Linux VPU driver).

```sh
packages=('linux-image-current-rockchip64' 'linux-u-boot-rock-5b-current')
dpkg-query -l | grep -q '^ii[[:blank:]]*linux-headers-vendor-rk35xx[[:blank:]:]' && packages+=('linux-headers-current-rockchip64')
dpkg-query -l | grep -q '^ii[[:blank:]]*linux-libc-dev-vendor-rk35xx[[:blank:]:]' && packages+=('linux-libc-dev-current-rockchip64')
G_AGI "${packages[@]}"
G_AGP linux-{image,dtb,headers,libc-dev}-vendor-rk35xx
[[-d '/boot/dtb']] || sudo dpkg-reconfigure linux-image-current-rockchip64
/boot/dietpi/func/dietpi-set_hardware flash-u-boot-mmc
sudo sed --follow-symlinks -i 's/ttyFIQ0/ttyS2/' /boot/dietpiEnv.txt
if systemctl -q is-enabled serial-getty@ttyFIQ0
then
	/boot/dietpi/func/dietpi-set_hardware serialconsole 0 ttyFIQ0
	/boot/dietpi/func/dietpi-set_hardware serialconsole 1 ttyS2
fi

```

---

_[View the full topic](https://dietpi.com/forum/t/rock-5b-switch-to-mainline-kernel/25215)._
