Jump to content

The ultimate starter guide to FriendlyElec CM3588 (RK3588)

When it comes to RockChip based devices especially RK3588 there have been many opensource efforts to make the software experience as seamless as one might have with RPI. Here’s a quick summary and then some guides for setting up OMV and Jellyfin with HW acceleration (16x 1080P/4x 4K with HDR ToneMapping).

 

There’s a lot of „new“ words to learn and know their differences. When it comes to the linux kernel we make a difference between mainline (kernel.org) and BSP (based on 6.1 with patches from vendors). The goal should always be to run mainline but until full support like HW acceleration isn’t available you might want to use BSP like in the provided images by FriendlyElec.

 

——

For mainline Linux

First of all keep a look on Collabora. They’re the main guys who bring RK3588 support to mainline and have support from the Arm and RockChip company. collabora: mainline-status.md here you can follow the development for the mainline Linux Kernel which supports RK3588 but not every board yet. It’s a good reference to keep up with would work and what not when choosing this route. For example with linux 6.10 coming up we finally after years in the work get an open source GPU driver in MESA for it (Blog post: Release the panthor).

 

——

Sidenote about the boot process and UEFI

It‘s based on the open source „das u-boot“ project and not the usual UEFI you would be familiar with. Vendors usually use older versions with their own patches on top to add device support.

There‘s also this cool project called edk2-rk3588 which brings uefi to RK3588 based devices and would allow you to boot from USB etc. like you’re used too. There’s even an effort to get the windows 11 arm variant working if you’re interested: https://worproject.com

 

——

So you got your CM3588 board and what now?

At the time of this writing FriendlyElec only provides images for OMV6 (based on Debian 11) which in March 2024 is now outdated by the new OMV7 (based on Debian 12). Luckily you can turn any minimal Debian 12 (provided in FriendlyElec Google Drive as "bookworm-core") into OMV7 with a simple script: 

sudo wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash

After it’s done your ssh session will probably be disconnected and the device will get a new IP from DHCP so use a lan scan tool to find your board again.

 

——

OpenMediaVault

For Docker: Go to System -> OMV-Extras -> Enable the Docker Repo checkbox.

 

The beginner friendliest way to use Docker would be to install Portainer now (I can make a guide for this but there’s also more than enough on the internet). It sums up to ssh‘ing on your board and running the docker command from Portainer.

 

 

Setting up your Drives and a Share: First check if your drives show up then go to filesystems and either create a RAID or mount your drives. Then you need to setup something called „Shared Folders“ those can then be used by SMB/NFS etc. to allow access from other devices. I would also recommend setting up a user/pw just for remote file access.

 

——

HW accelerated JellyFin 4K HDR (with tonemapping)

Now we’re getting to the fun stuff. Thanks to the amazing work from Nyanmisaka (a Jellyfin Dev) we get support for RKMPP (Quicksync/Nvenc from RockChip) in the HW acceleration drop down of JellyFin.

The Video processing capabilities are quite high on RK3588 with the support of up to 8k/30 4k/90 or 16x 1080p streams. It’s hidden strength comes from the HDR Tonemapping support which means you could watch Dune 2021 from a HDR source on your phone on a 1mbps connection in the middle of nowhere or just get a good image on non HDR devices.

 

First you need to download the BSP compatible GPU driver for OpenCL support needed by the HDR Tonemapping: https://github.com/tsukumijima/libmali-rockchip/releases/tag/v1.9-1-2d267b0 under the name: 

libmali-valhall-g610-g13p0-x11-wayland-gbm_1.9-1_arm64.deb

Installing it is just SSH on the device, wget the url for the file and dpkg -i filename.deb. 

 

Here’s a compose.yaml for docker (edit the file paths according to your setup):

version: "3.3"
services:
  jellyfin:
    image: nyanmisaka/jellyfin:latest-rockchip
    container_name: jellyfin
    privileged: true
    network_mode: host
    restart: always
    volumes:
      - /opt/jellyfin/config:/config
      - /opt/jellyfin/cache:/cache
      - /mnt/media:/media
    devices:
      - /dev/dri:/dev/dri
      - /dev/dma_heap:/dev/dma_heap
      - /dev/mali0:/dev/mali0
      - /dev/rga:/dev/rga
      - /dev/mpp_service:/dev/mpp_service
networks: {}

If you use Portainer that would be a stack.

Running this docker compose will result in device-ip:8096 where you can access your JellyFin and can setup your library. Tip have the Jellyfin config folder somewhere with lots off storage since the transcodes will be cached there and a sd card can fill up quick slowing down your whole device as well as stopping playback.

Link to comment
Share on other sites

Link to post
Share on other sites

Thanks for this!

 

Do you have any advice on staying safe while using PhotoPrism + PhotoSync as in the video? (connecting to the internet)

Is the OMV firewall in sufficient, or should I be considering further steps like a dedicated firewall?

 

Ben

Link to comment
Share on other sites

Link to post
Share on other sites

My board keeps resetting when transfering files.  What size power supply is needed?  I have a 12v 2a like it said on the website, but think I need more

Link to comment
Share on other sites

Link to post
Share on other sites

Hi there, I've loved the video and I decided for a similar setup.
While I was waiting for the 4 nvmes I plugged an old gen and everything was fine.
When the 2 + 2 (two different vendor on amazon and different led status color) nvmes arrived I had no green led from the board and running dmesg  showed the "PCIe link fail" in the screenshot.
Since than I tried flashing on the emmc all the imgs on FriendlyElec Gdrive and no result. All the 4 new m2s are healthy and tested.
Then I read this post and I followed the instructions to upgrade to OMV 7, but with the same results.
I had a pair of acs within the specifics but no change in behavior.
 

Quote

What size power supply is needed?  I have a 12v 2a like it said on the website, but think I need more


As D-Ring said maybe I need an AC different and with more power? I feel dirty going over what the website advice.

I'm usually fascinated in finding the culprit but I'm really tempted to return the m2s and simply switching to an older hardware.

Any ideas? I'm missing something?
Ty in advance!
Max



 

2.jpg

1.jpg

screen.png

Link to comment
Share on other sites

Link to post
Share on other sites

On 4/15/2024 at 5:22 PM, Xad said:

Since than I tried flashing on the emmc all the imgs on FriendlyElec Gdrive and no result

https://www.armbian.com/nanopc-cm3588-nas/

Try Armbian Jammy with the 6.1.43 (not 6.8) kernel.

Link to comment
Share on other sites

Link to post
Share on other sites

It seems that after a few hours of working, mine has failed. 

 

The only thing I can tell for sure is that over the course of five seconds-ish, the unit ramps up power consumption to 3 amps, at which point the bench power unit shuts it off. This is with no drives, etc. attached... just the bare unit. Prior to this, it was only pulling a few hundred milliamps.

 

I've gone to FriendlyElec and reported this, but I do have at the back of my mind, the history that western designs are over-engineered and can survive real world things like accidental shorts, voltage spikes, whatever, and shake some of it off... but it costs. Chinese designed electronics, however, have lacked this and I've paid the price.

 

If I get an update from FriendlyElec I'll let you know, but even if they go out of their way and ship a replacement FOC, I'll have this nagging doubt in my mind as to how far I can trust it.

Link to comment
Share on other sites

Link to post
Share on other sites

Quick update, I've tried Armbian Jammy 6.1.43 but still no disk (but emmc and sd) is recognize.
I'll keep trying and checking here for news.
Ty anyway for the advice.
M. 

Link to comment
Share on other sites

Link to post
Share on other sites

11 hours ago, Xad said:

Quick update, I've tried Armbian Jammy 6.1.43 but still no disk (but emmc and sd) is recognize.
I'll keep trying and checking here for news.
Ty anyway for the advice.
M. 

You should definitely try a higher Amperage PSU. 12v5a should do the trick since they can take up to 8w per drive depending on the drive.

Link to comment
Share on other sites

Link to post
Share on other sites

On 4/18/2024 at 4:27 AM, Xad said:

Quick update, I've tried Armbian Jammy 6.1.43 but still no disk (but emmc and sd) is recognize.
I'll keep trying and checking here for news.
Ty anyway for the advice.
M. 

Sorry for my general ignorance. Once i've got Debian up and running, I think I'll be golden. Its running android out of the box though, right? How do i get Linux on there? I know I sound like a caveman, I'm used to BIOS. Is flashing similar to booting from USB for windows? Do you have a link to a tutorial that might help?

Link to comment
Share on other sites

Link to post
Share on other sites

Maybe I'm in way over my head but I"m trying to follow the instructions on Friendly elec's wiki but they're just not clear to me. I just bought my CM3588 recently and a m.2 ssd. I'm trying to use a USB to install OMV like in the LTT video, but I'm clearly not knowledgeable enough to figure it out myself. Does anybody have a guide for dummies or could make a quick video about how I'm supposed to get OMV running on the 3588 if I'm installing with USB? If that's a huge ask, please let me know, because they glossed over it in the video about setting it up and I didn't anticipate being as inept as I apparently am.

 

This is the guide I am using:

https://wiki.friendlyelec.com/wiki/index.php/CM3588#Essentials_You_Need

 

For example: Step 4.3 says some serial parameters but I don't know where to how to set those.

 

I downloaded the programs and the OS install image from the Google Drive shared files. but I can't do anything other than that without help apparently.

Where do I install the driver in step 4.4.3.3.1?

Step 4.4.3.3.2 is confusing, do I need a TF card at all if I'm using this method? 

 

If there is a video out there that I could follow along with would be so so helpful.

 

If I'm already struggling with this part am I better of just selling this stuff and buying an old pc? Or is this just a simple thing that I can learn?

 

Anyways, thanks for the help or answers.

Link to comment
Share on other sites

Link to post
Share on other sites

6 hours ago, TheHawzzy said:

Maybe I'm in way over my head but I"m trying to follow the instructions on Friendly elec's wiki but they're just not clear to me. I just bought my CM3588 recently and a m.2 ssd. I'm trying to use a USB to install OMV like in the LTT video, but I'm clearly not knowledgeable enough to figure it out myself. Does anybody have a guide for dummies or could make a quick video about how I'm supposed to get OMV running on the 3588 if I'm installing with USB? If that's a huge ask, please let me know, because they glossed over it in the video about setting it up and I didn't anticipate being as inept as I apparently am.

 

This is the guide I am using:

https://wiki.friendlyelec.com/wiki/index.php/CM3588#Essentials_You_Need

 

For example: Step 4.3 says some serial parameters but I don't know where to how to set those.

 

I downloaded the programs and the OS install image from the Google Drive shared files. but I can't do anything other than that without help apparently.

Where do I install the driver in step 4.4.3.3.1?

Step 4.4.3.3.2 is confusing, do I need a TF card at all if I'm using this method? 

 

If there is a video out there that I could follow along with would be so so helpful.

 

If I'm already struggling with this part am I better of just selling this stuff and buying an old pc? Or is this just a simple thing that I can learn?

 

Anyways, thanks for the help or answers.

I used the Micro SD card slot. It appears that the boo order is MicroSD and then on-board.

 

I started using the resource in 1) Official images and 2) SD to eMMC to put an image onto the SD card, and then inserting that and it would transfer itself to the eMMC. ... at least that's what I was doing before my CM3588 died.

Link to comment
Share on other sites

Link to post
Share on other sites

11 hours ago, Theodore Smith said:

Sorry for my general ignorance. Once i've got Debian up and running, I think I'll be golden. Its running android out of the box though, right? How do i get Linux on there? I know I sound like a caveman, I'm used to BIOS. Is flashing similar to booting from USB for windows? Do you have a link to a tutorial that might help?

The system boots from MicroSD first and then eMMC. You can put Debian on it this way, using the SD to eMMC images to transfer an image to the eMMC, or else boot from the MicroSD card directly. However, if you're using Debian with the intention of using ZFS, then I had problems with the FriendlyElec ARM kernel images so I was about to try Ubuntu before my CM3588 died on me.

Link to comment
Share on other sites

Link to post
Share on other sites

12 hours ago, msknight said:

The system boots from MicroSD first and then eMMC. You can put Debian on it this way, using the SD to eMMC images to transfer an image to the eMMC, or else boot from the MicroSD card directly. However, if you're using Debian with the intention of using ZFS, then I had problems with the FriendlyElec ARM kernel images so I was about to try Ubuntu before my CM3588 died on me.

RIP! Thanks for the advice and wish me luck! hopefully mine will survive the operation.

Link to comment
Share on other sites

Link to post
Share on other sites

25 minutes ago, Theodore Smith said:

RIP! Thanks for the advice and wish me luck! hopefully mine will survive the operation.

AAAAnnnd We're up and running! Thanks so much for the help!

Link to comment
Share on other sites

Link to post
Share on other sites

On 3/31/2024 at 7:26 AM, HeyMeco said:

When it comes to RockChip based devices especially RK3588 there have been many opensource efforts to make the software experience as seamless as one might have with RPI. Here’s a quick summary and then some guides for setting up OMV and Jellyfin with HW acceleration (16x 1080P/4x 4K with HDR ToneMapping).

 

There’s a lot of „new“ words to learn and know their differences. When it comes to the linux kernel we make a difference between mainline (kernel.org) and BSP (based on 6.1 with patches from vendors). The goal should always be to run mainline but until full support like HW acceleration isn’t available you might want to use BSP like in the provided images by FriendlyElec.

 

——

For mainline Linux

First of all keep a look on Collabora. They’re the main guys who bring RK3588 support to mainline and have support from the Arm and RockChip company. collabora: mainline-status.md here you can follow the development for the mainline Linux Kernel which supports RK3588 but not every board yet. It’s a good reference to keep up with would work and what not when choosing this route. For example with linux 6.10 coming up we finally after years in the work get an open source GPU driver in MESA for it (Blog post: Release the panthor).

 

——

Sidenote about the boot process and UEFI

It‘s based on the open source „das u-boot“ project and not the usual UEFI you would be familiar with. Vendors usually use older versions with their own patches on top to add device support.

There‘s also this cool project called edk2-rk3588 which brings uefi to RK3588 based devices and would allow you to boot from USB etc. like you’re used too. There’s even an effort to get the windows 11 arm variant working if you’re interested: https://worproject.com

 

——

So you got your CM3588 board and what now?

At the time of this writing FriendlyElec only provides images for OMV6 (based on Debian 11) which in March 2024 is now outdated by the new OMV7 (based on Debian 12). Luckily you can turn any minimal Debian 12 (provided in FriendlyElec Google Drive as "bookworm-core") into OMV7 with a simple script: 

sudo wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash

After it’s done your ssh session will probably be disconnected and the device will get a new IP from DHCP so use a lan scan tool to find your board again.

 

——

OpenMediaVault

For Docker: Go to System -> OMV-Extras -> Enable the Docker Repo checkbox.

 

The beginner friendliest way to use Docker would be to install Portainer now (I can make a guide for this but there’s also more than enough on the internet). It sums up to ssh‘ing on your board and running the docker command from Portainer.

 

 

Setting up your Drives and a Share: First check if your drives show up then go to filesystems and either create a RAID or mount your drives. Then you need to setup something called „Shared Folders“ those can then be used by SMB/NFS etc. to allow access from other devices. I would also recommend setting up a user/pw just for remote file access.

 

——

HW accelerated JellyFin 4K HDR (with tonemapping)

Now we’re getting to the fun stuff. Thanks to the amazing work from Nyanmisaka (a Jellyfin Dev) we get support for RKMPP (Quicksync/Nvenc from RockChip) in the HW acceleration drop down of JellyFin.

The Video processing capabilities are quite high on RK3588 with the support of up to 8k/30 4k/90 or 16x 1080p streams. It’s hidden strength comes from the HDR Tonemapping support which means you could watch Dune 2021 from a HDR source on your phone on a 1mbps connection in the middle of nowhere or just get a good image on non HDR devices.

 

First you need to download the BSP compatible GPU driver for OpenCL support needed by the HDR Tonemapping: https://github.com/tsukumijima/libmali-rockchip/releases/tag/v1.9-1-2d267b0 under the name: 

libmali-valhall-g610-g13p0-x11-wayland-gbm_1.9-1_arm64.deb

Installing it is just SSH on the device, wget the url for the file and dpkg -i filename.deb. 

 

Here’s a compose.yaml for docker (edit the file paths according to your setup):

version: "3.3"
services:
  jellyfin:
    image: nyanmisaka/jellyfin:latest-rockchip
    container_name: jellyfin
    privileged: true
    network_mode: host
    restart: always
    volumes:
      - /opt/jellyfin/config:/config
      - /opt/jellyfin/cache:/cache
      - /mnt/media:/media
    devices:
      - /dev/dri:/dev/dri
      - /dev/dma_heap:/dev/dma_heap
      - /dev/mali0:/dev/mali0
      - /dev/rga:/dev/rga
      - /dev/mpp_service:/dev/mpp_service
networks: {}

If you use Portainer that would be a stack.

Running this docker compose will result in device-ip:8096 where you can access your JellyFin and can setup your library. Tip have the Jellyfin config folder somewhere with lots off storage since the transcodes will be cached there and a sd card can fill up quick slowing down your whole device as well as stopping playback.

Can I save the config folder in my disk storage in raid created with omv?

Link to comment
Share on other sites

Link to post
Share on other sites

How do you get all the nvme drives to be recognized? Only one is recognized on multiple units for me. Do I need to enable bifurcation? How?

Link to comment
Share on other sites

Link to post
Share on other sites

Good thread - my CM3588 and NAS board arrived today, I see a huge amount of potential in it. So far it has been possible (albeit non-trivial) to get Debian Bookworm, Proxmox (with ZFS and Optane 😈), KVM virtual machines and LXC containers working nicely. Docker seems to run well inside an LXC too which is nice. Thanks for pointing out the hardware encode/decode features and the recent addition of support for them in Jellyfin - I have been attempting to give control of these hardware features to an Ubuntu LXC container and run Jellyfin therein. No success so far, but I feel it coming. It's super nice to be able to play with an arm64 platform with more grunt and features than a Pi!

 

proxmox.png

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, dingus_khan said:

Good thread - my CM3588 and NAS board arrived today, I see a huge amount of potential in it. So far it has been possible (albeit non-trivial) to get Debian Bookworm, Proxmox (with ZFS and Optane 😈), KVM virtual machines and LXC containers working nicely. Docker seems to run well inside an LXC too which is nice. Thanks for pointing out the hardware encode/decode features and the recent addition of support for them in Jellyfin - I have been attempting to give control of these hardware features to an Ubuntu LXC container and run Jellyfin therein. No success so far, but I feel it coming. It's super nice to be able to play with an arm64 platform with more grunt and features than a Pi!

 

proxmox.png

What version of proxmox are you using?

So the KVM VMs are not working?

Link to comment
Share on other sites

Link to post
Share on other sites

17 hours ago, Pietro95 said:

What version of proxmox are you using?

So the KVM VMs are not working?

I am currently running the Bookworm image provided by Friendlyelec with Proxmox installed over the top from the jiangcuo github repo. As far as I can tell it makes few changes and just provides arm64 binaries compiled from vanilla Proxmox. Pimox does a similar thing, but I haven't tried it yet. ZFS needed compiling from source, as did the kernel headers required for doing so. Friendlyelec's docs on that front were solid: https://wiki.friendlyelec.com/wiki/index.php/CM3588#Compile_the_kernel_headers

 

With regards to VMs, I think the problem is that the kernel provided in Friendlyelec's Debian image (and/or the one that got installed with Proxmox) does not include the kvm kernel module. I am dimly familiar with the Intel/AMD virtualisation extentions and how they interface with the kernel, but haven't trod this path with arm before. Assuming this is indeed the issue, it should be sortable by building a kernel which includes both the hardware patches from Friendlyelec and the kvm module. I'm doing some reading and will embark shortly - if anyone has a good understanding of this feel free to advise! While there is in principle no reason why kvm shouldn't work, actually building the kernel with all the right bits and no moronic errors might take me a minute.

 

edit: as predicted it is taking me a minute and I have made some moronic errors. I found this in the makefile from FriendlyElec though and felt I should share it:

ninjasloth.png

Link to comment
Share on other sites

Link to post
Share on other sites

i just got my CM3588 and tried connecting two 2TB nvme drives to it but only one shows up. I've tried changing the slots around but what ever I do I can only get one to work. I've seen other people with the same problem but I haven't seen a solution yet. Any ideas on how to fix this?

Link to comment
Share on other sites

Link to post
Share on other sites

15 hours ago, Lochie A said:

i just got my CM3588 and tried connecting two 2TB nvme drives to it but only one shows up. I've tried changing the slots around but what ever I do I can only get one to work. I've seen other people with the same problem but I haven't seen a solution yet. Any ideas on how to fix this?

What distro are you using?

They show up on lspci?

Link to comment
Share on other sites

Link to post
Share on other sites

12 hours ago, Pietro95 said:

What distro are you using?

They show up on lspci?

I'm using open media vault

when I run lspci I can see two NVMe SSD controllers but I still can't see both in open media vault

 

Link to comment
Share on other sites

Link to post
Share on other sites

 

On 3/31/2024 at 9:26 AM, HeyMeco said:

So you got your CM3588 board and what now?

At the time of this writing FriendlyElec only provides images for OMV6 (based on Debian 11) which in March 2024 is now outdated by the new OMV7 (based on Debian 12). Luckily you can turn any minimal Debian 12 (provided in FriendlyElec Google Drive as "bookworm-core") into OMV7 with a simple script: 

sudo wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash

After it’s done your ssh session will probably be disconnected and the device will get a new IP from DHCP so use a lan scan tool to find your board again.

 

So this might be a really dumb question: How do I log into the SSH session? It didn't give me chance to set a user or password and I've tried just about any default password I can think of. It also doesnt give me the normal debian start menu when it boots up, so I can't change anything in there either. Thanks in advance. 

EDIT: Figured it out, password is "fa" without the quotation marks. Its also on the CM3588 Wiki, which I should have checked in more detail, before asking here. 

Edited by lukazzz007
Solution found
Link to comment
Share on other sites

Link to post
Share on other sites

16 hours ago, Lochie A said:

I'm using open media vault

when I run lspci I can see two NVMe SSD controllers but I still can't see both in open media vault

 

trying to isolate the problem to either OMV or the board itself would be a good start. lspci to see if both are visible - you say they are. then lsblk to see if both are visible. if so, try making filesystems on each and see if they behave correctly. trying other drives might be useful, but obviously we don't all have spare SSDs lying around. what's the current rating of PSU are you using? are there PCIe errors in dmesg? It might be that there's not enough juice to go around and one drive is being cut off when it initialises. make sure you don't actually have one dead SSD (I'm sure you thought of that but stupider things have happened). I haven't seen the other reports of this problem, but do they all have something in common with your case? similar drive models or something?

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×