Waveshare Mini-B IO board
What is it?
This is a small carrier board for the Compute Module 4 that has the approximate footprint of a Pi model 4B. It has an M.2 NVMe socket underneath (connected as a 1-lane PCIe bus). It also has miniature header sockets to allow two extra USB sockets and one extra HDMI socket to be added.
All assembled: adding the fan takes the height from 18mm to 22mm and the custom board increases this to 25mm. It is all a bit of a snug fit!
This board (see picture) is fitted with a CM4 4GB RAM 16GB eMMc, a custom RTC and fan controller, a Waveshare 5V variable speed fan and a 512GB NVMe drive. All in the footprint (approx.) of a Pi model 4B. Full instructions for fitting a real time clock and fan controller to this board may be downloaded here.
I'll describe (and demonstrate) how to prepare an NVMe drive with multi-partitions on it. To do this, I will use an NVME drive in a USB caddy so that RISC OS can 'see' it. By using RISC OS and Linux in turn I'll build a four partition drive: Loader; Filecore; FAT; ext4 (Linux). The theory is that RISC OS will use the filecore partition and Linux use the ext4 partition and the machine will dual boot into either OS. Full instructions for doing this have been published on !Store and may be downloaded here.
This works in the USB caddy and, if the drive is connected directly to the M.2 socket, works at full speed under Linux. Although RISC OS currently uses the eMMc storage on the CM4, I would expect the NVMe drive to work under RISC OS once an NVME driver is released.
I'll also describe three custom circuit boards to add fan control and/or RTC to the Waveshare IO board and the Pi Foundation IO board, and to add a RTC and dual boot switch to a Geek DeskPi Mini (aka PiRO Qube).
So ... how much did it cost to build (excluding the USB caddy and the purpose-built PCB)?
Technology
There is a lot of technology here so let’s just explain some of it. First of all we have had SATA drives for a while: the ARMX6 used a 2.5″ SATA drive under SCSIfs, the Titanium used 2.5″ SATA discs under ADFS and the FAST system used 2.5″ SATA drives under ADFS.
SATA (Serial Advanced Technology Attachment) uses a serial interface with a native transfer rate of 6Gb/s (600MB/s) but depends on which generation of PCIe connector is used, by drive and computer.
Are all SATA/NVMe SSDs equal? No - it depends on the interface and the drive.
NVMe (Non Volatile Memory Express) drives are faster than SATA drives and use an M.2 connector (formerly known as NGFF (Next Generation Form Factor) using a PCIe 3.0 or higher which may be up to 4 lanes.
M.2 connectors can be used for either a SATA or an NVMe bus interface so the drive type and connector type must match: an M.2 connector can be ‘M-key’ (supports PCIe x4), ‘B-key’ (supports PCIe x2) or ‘M+B-key’ (limited to PCIe x2). ‘M-key’ is what is used here.
The NVMe interface has been designed to capitalize on the low latency and internal parallelism of solid-state storage devices. Whereas SATA can run up to 6Gb/s, NVMe can run up to 6GB/s (about 7 times faster). However the CM4 only offers a PCIe interface that is Gen 2x1 limiting its capacity to 4GB/s (about 400MB/s) but it should perform better than SATA for random read/write operations such a file copying. A discussion of the speed of different SSDs may be downloaded here (once the talk is over).
There is therefore considerable interest in developing an NVMe driver for RISC OS. Meanwhile the drives work under Linux and can be ‘seen’ by RISC OS (under SCSIfs) if placed in a USB caddy.