跳转到内容

2012 CM4/CM5 SSD 2.5G EN

来自Mcuzone Wiki

切换语言为中文

Keywords

Raspberry Pi, CM4 Core board, CM5 Core board, Gigabit Ethernet, 2.5Gbps Ethernet, Dual Ethernet, USB2.0, RPiOS, Ubuntu, NVMe SSD, DSI, CSI

I. Introduction

The CM4/CM5_SSD_2.5G expansion board is an expansion board based on the Raspberry Pi CM4 platform, offering 2.5Gbps Ethernet and M.2 SSD support. It can be used to build NAS-like network storage applications and is also suitable for general high-capacity storage solutions. The board features onboard DSI0 and CSI1 interfaces for image and video capture.

II. Hardware Spec

1) 1*Gigabit Ethernet port, 1*PCIe to 2.5G Ethernet port.

2) 1*PCIe M.2 M-key NVMe SSD slot, supporting 2242 and 2280 form factors.

4) 3*USB 2.0 Type-A host ports, 1*USB 2.0 host (1.25mm-4PIN), optional CM4 4G Mini and 5G Mini modules.

5) 1*4-lane CS11 interface (22-pin, 0.5mm, flip-down connector).

6) 1*2-lane DSl1 interface (22-pin, 0.5mm, flip-down connector).

7) 1*standard HDMI port (supports up to 4K resolution).

8) 1*TF card slot, reserved for OS storage on CM4 core boards without eMMC.

9) 1*USB Type-C port, for power supply (5V3A) and eMMC flashing.

10) 1*2.54mm-2pin 3.3V fan power port.

11) Reserve a 40-pin GPIO expansion interface, fully compatible with Raspberry Pi 4B.

12) Size: 123mm*76.5mm.

13) Aluminum alloy case.

2012_CM4_CM5_SSD_2_5G_69.jpg

III. Flash OS

It was tested using Raspberry Pi OS, Ubuntu OS, and OpenWrt.

For core boards with eMMC, the OS is flashed onto the eMMC. For core boards without eMMC, the OS is flashed onto the TF card or the SSD.

Using a core board with eMMC, the hardware operations are as follows:

Connect the USB Type-C port to the computer, and use a jumper cap to short the BOOT pins on the board:

For the flashing method, please refer to:

How to flash OS

After the OS flashing is completed, remove the jumper cap and power on again to start the OS.

IV. Work with Raspberry Pi OS

The version of Raspberry Pi OS is: 2025-05-13-raspios-bookworm-arm64.img.xz.

You can download it in:

https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit

4.1 USB port test

It has 4 built-in USB 2.0 ports. After connecting all peripherals, execute lsusb and lsusb -t in the terminal, and the display is as follows:

003 is a USB 2.0 12.5mm 4-pin port, while 004, 005, and 006 are USB 2.0 Type-A ports.

USB devices are detected normally. No device number will appear if no external USB device is connected.

Bus 01 is a USB 2.0 interface with 480Mbps, and the operating mode is also normal.

4.2 SSD test

Using the CM4/CM5 core board, the onboard SSD can both boot the OS and serve as data storage.

Execute lspci in the terminal to check SSD information:

SN750 is the SSD.

4.2.1 SSD for data storage

After the OS starts, if you need to operate on the SSD, authorization is required for it. In File Manager, click on the SSD partition, and an authorization dialog will pop up. Enter the current account password to authorize:

Note: The first partition requires password authorization upon clicking; others only need a click.

After authorization, the partition will appear on the desktop:

5008_CM5_2ETH_20.jpg

Execute df in the terminal to view the SSD partition information:

2010_CM4_CM5_SSD-POE_14.jpg

We can see that the partition name of the SSD is nvme0n1p1.

4.2.2 Test the interface speed of an SSD

After executing lsblk, we can see the SSD partition named nvme0n1p1:

2012_CM4_CM5_SSD_2_5G_03.jpg

install the hard disk speed testing software hdparm:

sudo apt install hdparm

Execute the speed test command repeatedly to measure disk performance multiple times:

sudo hdparm -t /dev/nvme0n1

The test results are as follows:

2012_CM4_CM5_SSD_2_5G_04.jpg

No. Transmission speed(MB/s)
1 371.86
2 354.19
3 366.00
4 354.79
5 348.39
Avg. 359.05 (about 2.81Gbps)

4.3 Test Ethernet port

Connect the Gigabit Ethernet to the upstream router. If the terminal shows that eth0 has obtained an IP address when executing ifconfig, then eth0 is the Gigabit Ethernet, while eth1, which has not obtained an IP address, is the 2.5Gbps Ethernet.

2012_CM4_CM5_SSD_2_5G_05.jpg

We use the network speed testing tool iperf3 for speed tests.

Download iperf3 for Windows:

http://www.mcuzone.com/down/Software.asp?ID=10000634

Install iperf3 on Linux:

sudo apt-get install iperf3

4.3.1 Test Gigabit Ethernet

We conducted speed tests on the Gigabit Ethernet port using iperf3:

Client mode is around 943Mbps:

2012_CM4_CM5_SSD_2_5G_06.jpg

Server mode is around 948Mbps:

2012_CM4_CM5_SSD_2_5G_07.jpg

Note: Gigabit Ethernet speed tests are affected by the network environment and testing methods. Please refer to the actual speed, as this test is for reference only.

4.3.2 Fix the MAC address of the 2.5Gbps Ethernet port

The 2.5G Ethernet port uses the RTL8125 network card, and during use, the MAC address is not fixed. Each time the device is powered on again, the MAC address changes randomly. The following explains how to set a fixed MAC address for the RTL8125 network card.

This explanation also applies to the Ubuntu system.

First, check the identification information of the RTL8125 network card in terminal:

ipconfig -a

0015_MP2_5G_28.jpg

Here, the RTL8125 network card is identified as eth1, but in practice, the name recognized by the system might be different.

Then input:

sudo mousepad /etc/systemd/system/macspoof@eth1.service

Or:

sudo nano /etc/systemd/system/macspoof@eth1.service

eth1 is the name recognized by the system for the network card shown above.

Executing the above command will create a new document, then enter the following text:

[Unit]

Description=MAC Address Change %I

Wants=network-pre.target

Before=network-pre.target

BindsTo=sys-subsystem-net-devices-%i.device

After=sys-subsystem-net-devices-%i.device

[Service]

Type=oneshot

ExecStart=/usr/bin/ip link set dev %i address xx:xx:xx:xx:xx:xx

ExecStart=/usr/bin/ip link set dev %i up

[Install]

WantedBy=multi-user.target

Here, "xx:xx:xx:xx:xx:xx" represents the MAC address you wish to assign. You can determine it according to the MAC address format (make sure it does not duplicate the MAC address of other network devices). After setting it, save and exit.

Then execute the following commands to enable the service:

sudo systemctl enable macspoof@eth1.service

sudo systemctl start macspoof@eth1.service

This completes the fixation of the MAC address for eth1.

After completing all operations, restart the system. Once the system has finished rebooting, execute ipconfig -a to see that the MAC address has been successfully changed.

0015_MP2_5G_29.jpg

4.3.3 Test 2.5Gbps Ethernet

We conducted speed tests on the 2.5Gbps Ethernet port using iperf3:

Client mode is around 2.21Gbps:

2012_CM4_CM5_SSD_2_5G_08.jpg

Server mode is around 1.77Gbps:

2012_CM4_CM5_SSD_2_5G_09.jpg

Note: 2.5Gbps Ethernet speed tests are affected by the network environment and testing methods. Please refer to the actual speed, as this test is for reference only.

4.4 DSI test

The two types of LCD screens for Raspberry Pi: the 1st-gen LCD has a resolution of 800×480, while the 2nd-gen LCD has a resolution of 1280×720. Both screens require additional power supply. The connection interface is DSI0.

▶ Raspberry Pi 1st-Gen LCD Display

Power up the OS, open the terminal and execute the following commands.

sudo nano /boot/firmware/config.txt

Insert the following lines at the end of the file:

dtoverlay=vc4-kms-dsi-7inch,dsi0

2012_CM4_CM5_SSD_2_5G_10.jpg

After saving and restarting the OS, you can use the Raspberry Pi 7-inch touchscreen.

▶ Raspberry Pi 2nd-Gen LCD Display

Open the terminal and execute the following commands:

sudo nano /boot/firmware/config.txt

Insert the following lines at the end of the file:

dtoverlay=vc4-kms-dsi-ili9881-7inch,dsi0

2012_CM4_CM5_SSD_2_5G_11.jpg

After saving and restarting the OS, you can use the Raspberry Pi 7-inch touchscreen.

▶ Notes:

1): If both the HDMI display and the 7-inch touchscreen are connected simultaneously, the 7-inch touchscreen may become the secondary screen. Simply power off the system, disconnect the HDMI display, and restart; the 7-inch touchscreen will then function as the primary display.

2): The added command actually enables the second display, meaning a dual-screen setup. Whether the second screen's hardware is installed or not, the system may still recognize it as a dual-display configuration. If you use PrtScn (Print Screen) to take a screenshot, it may capture both screens. In some cases, this could even cause the OS to fail to boot. Therefore, if you don’t need this screen, it is recommended to remove or comment out this line in config.txt.

4.5 CSI test

The camera used for testing here is the OV5647 (Connect to the CAM1 interface). Once the OS is running, open the terminal and execute the following commands:

sudo nano /boot/firmware/config.txt

Insert the following lines at the end of the file:

dtoverlay=ov5647,cam1

2010_CM4_CM5_SSD-POE_10.jpg

Add according to your model in practice. Save and restart the OS, then you can use the OV5647 camera.

Execute the following command in the terminal:

ls /dev/video*

You will then see the video0 device listed:

2010_CM4_CM5_SSD-POE_11.jpg

Execute libcamera-hello --camera 0 in the terminal to open the corresponding camera for preview:

5005_CM5IO_Mini_18.jpg

If a photo is required, please excute:

libcamera-jpeg -o test.jpg

The photos are saved in the /home/mcuzone directory (i.e., the user's home directory). The photo effects are as follows:

5005_CM5IO_Mini_19.jpg

4.6 HDMI test

The HDMI interface supports 4K output, and the display effect is as shown below:

4K resolution (3840 × 2160):

Compared to standard 1080p resolution (1920×1080):

V. Work with Ubuntu OS

The version of Ubuntu OS is: ubuntu-25.04-preinstalled-desktop-arm64+raspi.img.xz.

You can download it in:

https://ubuntu.com/download/raspberry-pi

5.1 USB port test

It has 4 built-in USB 2.0 ports. After connecting all peripherals, execute lsusb in the terminal, and the display is as follows:

003 is a USB 2.0 12.5mm 4-pin port, while 004, 005, and 006 are USB 2.0 Type-A ports.

USB devices are detected normally. No device number will appear if no external USB device is connected.

Execute lsusb -t in the terminal, and the display is as follows:

Bus 01 is a USB 2.0 interface with 480Mbps, and the operating mode is also normal.

5.2 SSD test

Using the CM4/CM5 core board, the onboard SSD can both boot the OS and serve as data storage.

Execute lspci in the terminal to check SSD information:

The red box indicates the SSD.

5.2.1 SSD for data storage

After the OS starts, if you need to operate on the SSD, authorization is required for it Click on the SSD partition in Files without entering a password:

Whether authorized or not, the partition will be displayed on the desktop, and you can also access the SSD partition from here:

Execute df in the terminal to view SSD partition information:

We can see that the partition name of the SSD is nvme0n1p1.

5.2.2 Test the interface speed of an SSD

Execute the speed test command repeatedly to measure disk performance multiple times:

sudo hdparm -t /dev/nvme0n1

The test results are as follows:

2012_CM4_CM5_SSD_2_5G_15.jpg

No. Transmission speed(MB/s)
1 317.22
2 311.87
3 346.43
4 331.29
5 310.80
Avg. 323.52 (about 2.53Gbps)

5.3 Test Ethernet port

5.3.1 Test Gigabit Ethernet

Connect the Gigabit Ethernet to the upstream router. The Ubuntu OS does not install the ifconfig tool by default, so after the OS starts, install it manually first:

sudo apt install net-tools

Then, execute ifconfig in the terminal, and the displayed eth0 indicates a Gigabit Ethernet connection:

2012_CM4_CM5_SSD_2_5G_16.jpg

Note: On Ubuntu OS, the 2.5Gbps Ethernet requires driver installation to be recognized. Without the 2.5Gbps Ethernet driver, only Gigabit Ethernet will be displayed.

We conducted speed tests on the Gigabit Ethernet port using iperf3:

Client mode is around 932Mbps:

2012_CM4_CM5_SSD_2_5G_17.jpg

Server mode is around 942Mbps:

2012_CM4_CM5_SSD_2_5G_18.jpg

Note: Gigabit Ethernet speed tests are affected by the network environment and testing methods. Please refer to the actual speed, as this test is for reference only.

5.3.2 Install the 2.5Gbps Ethernet driver

Ubuntu OS does not include the 2.5Gbps Ethernet (RTL8125) driver by default and require manual installation.

First, you need to update the OS:

sudo apt-get update

Next, prepare the compilation environment:

sudo apt-get install --reinstall linux-headers-$(uname -r) linux-headers-generic build-essential dkms

Then compile and install the driver:

sudo apt-get install r8125-dkms

If the OS freezes during the compilation and installation of the driver, you can limit the number of CPU cores used before compiling and installing the driver:

sudo MAKEFLAGS="-j2" apt-get install r8125-dkms

2012_CM4_CM5_SSD_2_5G_21.jpg

After installation is complete, execute:

sudo modprobe r8125

Execute ifconfig and you will see a network interface named enpxxx, which is the 2.5Gbps Ethernet:

2012_CM4_CM5_SSD_2_5G_22.jpg

The Ubuntu OS also has the issue where the MAC address of the 2.5Gbps Ethernet changes randomly after every reboot. The modification method is the same as for the Raspberry Pi OS. For details, refer to Section 4.3.2.

5.3.3 Test 2.5Gbps Ethernet

We conducted speed tests on the 2.5Gbps Ethernet port using iperf3:

Client mode is around 2.34Gbps:

2012_CM4_CM5_SSD_2_5G_23.jpg

Server mode is around 1.68Gbps:

2012_CM4_CM5_SSD_2_5G_24.jpg

Note: 2.5Gbps Ethernet speed tests are affected by the network environment and testing methods. Please refer to the actual speed, as this test is for reference only.

5.4 DSI test

The two types of LCD screens for Raspberry Pi: the 1st-gen LCD has a resolution of 800×480, while the 2nd-gen LCD has a resolution of 1280×720. Both screens require additional power supply. The connection interface is DSI0.

▶ Raspberry Pi 1st-Gen LCD Display:

Power up the OS, open the terminal and execute the following commands.

sudo nano /boot/firmware/config.txt

Insert the following lines at the end of the file:

dtoverlay=vc4-kms-dsi-7inch,dsi0

After saving and restarting the OS, you can use the Raspberry Pi 7-inch touchscreen.

▶ Raspberry Pi 2nd-Gen LCD Display:

Open the terminal and execute the following commands:

sudo nano /boot/firmware/config.txt

Insert the following lines at the end of the file:

dtoverlay=vc4-kms-dsi-ili9881-7inch,dsi0

After saving and restarting the OS, you can use the Raspberry Pi 7-inch touchscreen.

▶ Notes:

1): If both the HDMI display and the 7-inch touchscreen are connected simultaneously, the 7-inch touchscreen may become the secondary screen. Simply power off the system, disconnect the HDMI display, and restart; the 7-inch touchscreen will then function as the primary display.

2): The added command actually enables the second display, meaning a dual-screen setup. Whether the second screen's hardware is installed or not, the system may still recognize it as a dual-display configuration. If you use PrtScn (Print Screen) to take a screenshot, it may capture both screens. In some cases, this could even cause the OS to fail to boot. Therefore, if you don’t need this screen, it is recommended to remove or comment out this line in config.txt.

VI. Work with OpenWrt

The OpenWrt is compiled by our company, and the version is: openwrt-bcm27xx-bcm2711-rpi-4-squashfs-sysupgrade-lean-linux-6.12.43-qmodem-20250828.img.gz

The CM4/CM5_SSD_2.5G expansion board can be configured as follows: set the 2.5Gbps Ethernet as LAN and the Gigabit Ethernet as WAN, while enabling the NAS function. This maximizes the high bandwidth of the 2.5Gbps Ethernet for file transfers within the local network, while also fully utilizing the performance of the broadband connection.

6.1 Preparation

OpenWrt defaults to using the Gigabit Ethernet of the expansion board as the LAN. Connect the Gigabit Ethernet to the PC, go to Windows Settings, find Network & Internet, and open the connected network under Ethernet to view the default gateway IP address. This address is the access address for the OpenWrt's configuration page. As shown in the figure, the tested address in this article is 192.168.198.1.

Then open a web browser, enter 192.168.198.1 to access the OpenWrt. The default username is root, and the default password is password:

6.2 Set 2.5Gbps Ethernet as LAN and Gigabit Ethernet as WAN

Click "Network - Interfaces", click "Devices", then click "Configure..." next to "br-lan":

In the pop-up window under "Bridge Ports", click the drop-down arrow, select "eth1" (2.5Gbps Ethernet), and then click "Save":

Automatically return to the previous page, click "Save & Apply":

So we have configured 2.5Gbps Ethernet as a LAN.

Power off the expansion board, connect the 2.5Gbps Ethernet to the PC, then start the OS and log in to the backend through the browser again..

Go back to the previous "Bridge Ports" settings, click the drop-down arrow, uncheck the box in front of "eth0" (Gigabit Ethernet), and then click "Save":

:

Automatically return to the previous page, click "Save & Apply":

Click "Network - Interfaces" - "Add new interface...":

Configure eth0 as shown in the figure, where the "Name" can be customized, and then click the "Create Interface" button:

In the "Firewall Settings", set "Create / Assign firewall-zone" to "wan", then click "Save":

Save and return to the previous page, then click "Save & Apply":

Connect the Gigabit Ethernet to the upstream router, wait a moment, and you will see the WAN port (eth0) obtain an IP address:

6.3 Test 2.5Gbps Ethernet

At this point, the CM4/CM5_SSD_2.5G expansion board is connected to the PC via 2.5Gbps Ethernet (eth1). The IP address of the CM4/CM5_SSD_2.5G expansion board is 192.168.198.1, while the PC's IP address, as confirmed through inquiry, is 192.168.198.239. We used iperf3 speed testing software to measure the network speed between the PC and the CM4/CM5_SSD_2.5G expansion board.

Click "Services - Terminal", log in to the built-in terminal of the OpenWrt. The default username is root, and the password is password:

The OpenWrt comes with the iperf3 software. A speed test was conducted between the CM4/CM5_SSD_2.5G expansion board and a PC using iperf3, and the results are as follows:

Client mode is around 2.35Gbps:

Server mode is around 1.77Gbps:

Note: 2.5Gbps Ethernet speed tests are affected by the network environment and testing methods. Please refer to the actual speed, as this test is for reference only.

6.4 SSD test

6.4.1 SSD detection and mounting

Insert the SSD into the SSD slot of the CM4/CM5_SSD_2.5G expansion board and start the OS.

Log in to the built-in terminal of the OpenWrt and execute lspci and lsblk. The output is as follows:

The SSD is recognized but not mounted.

Click "System - Mount Points", select "Anonymous Swap" and "Anonymous Mount", then click "Save & Apply":

Wait a moment, and you will see the SSD successfully mounted in the "Mounted file systems":

Execute lsblk again in the terminal, and you will see the SSD successfully mounted.

6.4.2 Configure and use Network Shares

Click "Services - Network Shares", then click the "Add" button under "Shared Directories":

Fill in the relevant parameters, then click "Save & Apply" (if multiple shared directories are needed, you may add them multiple times).

After completing the setup, on a PC connected to the CM4/CM5_SSD_2.5G expansion board (using Windows 11 as an example), enter \192.168.198.1 in the file explorer (the address is that of the expansion board and may vary in practice). You will then be able to see the shared directory:

Note: If you encounter errors when accessing shared directories or cannot see files within them, go to "Network - Firewall", uncheck the box next to "Enable SYN-flood protection", then click "Save & Apply":

Once completed, enter the shared directory again.

Drag any file from the SSD to the PC desktop to test the SSD read speed, which is around 210MB/s:

Drag any file from the PC desktop to the SSD to test the SSD write speed, which is around 203 MB/s:

VII. The compatibility test of the CM5 core board

Raspberry Pi OS:

The version of Raspberry Pi OS is: 2025-05-13-raspios-bookworm-arm64.img.xz

Boot Supports booting via the eMMC version of the CM5 core board. The CM5 core board without eMMC can only boot to the startup screen (Raspberry Pi logo) when booting from a TF card, but supports booting the OS from an SSD.
Device Name HDMI output USB2.0-A ports USB2.0-1.25mm-4p port Gigabit Ethernet 2.5Gbps Ethernet
Compatible or not?
Device Name SSD (storage) DSI0 CSI1 CSI1 used as DSI
Compatible or not? × √(cam0) √(dsi0)
Note: √ = compatible, × = incompatible. The text in parentheses indicates the differences from the CM4 core board.

Ubuntu OS:

The version of Ubuntu OS is: ubuntu-25.04-preinstalled-desktop-arm64+raspi.img.xz

Boot Supports booting via the eMMC version of the CM5 core board. The CM5 core board without eMMC can only boot to the startup screen (Ubuntu logo) when booting from a TF card, but supports booting the OS from an SSD.
Device Name HDMI output USB2.0-A ports USB2.0-1.25mm-4p port Gigabit Ethernet
Compatible or not?
Device Name 2.5Gbps Ethernet SSD (storage) DSI0 CSI1 used as DSI
Compatible or not? × √(dsi0)
Note: √ = compatible, × = incompatible. The text in parentheses indicates the differences from the CM4 core board.

Note: You need to add dtoverlay=dwc2,dr_mode=host at the end of the config.txt file, otherwise the USB port will not function.

OpenWrt:

The OpenWrt is compiled by our company, and the version is: openwrt-bcm27xx-bcm2712-rpi-5-squashfs-sysupgrade-lean-linux-6.12.43-qmodem-20250828.img.gz

Boot Supports all versions of the CM5 core board and also allows booting the OS from an SSD.
Device Name SSD (storage) Gigabit Ethernet 2.5Gbps Ethernet
Compatible or not?
Note: √ = compatible, × = incompatible.

Note: In the config.txt file of the CM5's OpenWrt, change dtoverlay=dwc2,dr_mode=peripheral to dtoverlay=dwc2,dr_mode=host, otherwise the USB devices on this expansion board will not be recognized.

▶ Test date: November 4, 2025.

Contact Us

0001_x.jpg 0002_fb.jpg 0004_ytb.jpg 0003_bb.jpg 0005_qq.jpg QQ:8204136

Email: mcuzone@vip.qq.com

Tel: +86(0)13957118045

If there are any omissions, errors, or infringements on this page, please contact us through the above methods. Thank you!

Copyright 2004-2025 Wildchip