Raspberry Pi OS on MNT Reform with CM4 Adapter (RCM4)

MNT Reform running Raspberry Pi OS on CM4

Rather immediately when made available via MNT Shop I ordered the MNT Reform CM4 Processor Module Adapter.

I've received the adapter already a while ago, but until recently couldn't get hold of a reasonably priced Raspberry PI Compute Module 4, along w/ the Compute Module 4 Antenna Kit, certified by for use with Raspberry Pi Compute Module 4.

With all three parts at my disposable it was finally time, to assemble the hardware and install Raspberry Pi OS.

For the hardware assembly I followed the accurately compiled and also very lovely and visually appealing made RCM4 for Raspberry Pi CM4 Processor Module Manual, PDF.

Unfortunately, neither when ordering the CM4 nor before assembly the hardware, I was aware of the following fact:

eMMC and SD card pins are shared on the Raspberry Pi CM4. That means you can only boot from SD card on a CM4 with no eMMC.
If you want to use an eMMC-based CM4, you have to provision it first in another baseboard over USB (for example, the CM4IO or Piunora). Consult the official Raspberry Pi CM4 documentation for more details.
src ref: source.mnt.re/reform/mnt-reform-raspberry-pi-cm4-som

Sure, I've bought a CM4 with 16GB of eMMC, of course 🙄.

Unfortunately, I also do neither own a Compute Module 4 IO Board (CM4IO) nor a Piunora—yet 😉.

So, the rather straight fwd. and simple OS installation approach via SD card wasn't feasible for me. 🤷

Instead, I came up w/ the following (spoiler: successful) approach:

  • ✅ to flash the Raspberry Pi OS onto a USB stick (via the Raspberry Pi Imager)
  • ✅ apply additional customization to the installation as outlined here: source.mnt.re/reform/mnt-reform-raspberry-pi-cm4-som
  • ✅ boot from said USB
  • ✅ assure we have wifi working and internal display working at full brightness (also see this community post)
  • ✅ work around a chicken and egg kind of problem, where the GPIO toggles of (de)asserting USB hub reset (required for the input devices and lower 2 USB ports to work) would lead to EXTfs errors for the mounted USB stick. Solution: comment out the GPIO toggles in /etc/rc.local and use ext. USB hub on the first USB port w/ both, USB stick and ext. keyboard and mouse attached.
  • ✅ use the build in SD Card Copier application to copy the installation from the USB stick (/dev/sda) to eMMC (/dev/mmcblk0)
  • ✅ reboot from the eMMC (i.e. w/ out the USB stick attached)—but still w/ ext. keyboard and mouse attached
  • ✅ make internal keyboard and trackpad working. by commenting-in GPIO toggles in /etc/rc.local
  • ✅ reboot from the eMMC, this time w/ out the ext. keyboard and mouse attached
  • ✅ install pending Raspberry Pi OS updates (if any)
  • ✅ have sound working
  • ❓ …

2024-04-07 UPDATE Troubleshooting display w/ low backlight after dist-upgrade

# /boot/firmware/config.txt
dtdebug=on

sudo apt install vcdbg

sudo vcdbg log msg

2024-04-21 UPDATE Fixing Monkey patching display w/ low backlight after dist-upgrade

# dmesg | grep backlight
[    6.202666] OF: /backlight: #pwm-cells = 3 found 2
[    6.202710] of_pwm_get(): can't parse "pwms" property
[    6.202721] pwm-backlight backlight: unable to request PWM

Raspberry Pi Forums: Kernel 6.6.0 - PWM seems not working/available

As it stands, it seems upstream change has broken it:

# Apply monkey patch
mkdir -p ~/Code
git clone https://source.mnt.re/reform/mnt-reform-raspberry-pi-cm4-som
cd mnt-reform-raspberry-pi-cm4-som

vi rcm4-overlay.dts
- pwms = <&pwm 0 10000>;
+ pwms = <&pwm 0 10000 0>;

./mkoverlay.sh
sudo cp /boot/firmware/overlays/rcm4-overlay.dtbo /boot/firmware/overlays/rcm4-overlay.dtbo.old
sudo cp rcm4-overlay.dtbo /boot/firmware/overlays/rcm4-overlay.dtbo

sudo reboot

TO BE CONTINUED…