Skip to content

Software, firmware and a case for the CM4-WRT-A: A Raspberry Pi CM4 Router Baseboard.

License

Notifications You must be signed in to change notification settings

jhohertz/cm4-wrt-a

 
 

Repository files navigation

CM4-WRT-A

This repository contains the source code for the software and firmware necessary to utilize the custom features of the CM4-WRT-A: A Raspberry Pi CM4 Router Baseboard with NVME support. Currently sold on Tindie: https://www.tindie.com/products/mytechcatalog/rpi-cm4-router-baseboard-with-nvme/

The repository is organized as follows:

Directory Description
CM4 Source code for picod: A service for communicating with the Raspberry Pi Pico
pico Firmware for the Raspberry Pi Pico microcontroller
case STL files for a 3D printed case for the CM4-WRT-A

Documentation

Complimentary Video

Install Prerequisites

The build scripts for the CM4-WRT-A rely on Docker. If you would like to build OpenWrt or the Raspberry Pi Pico firmware for the CM4-WRT-A, install Docker with these commands on the terminal in Ubuntu or Debian: See https://docs.docker.com/desktop/install/linux-install/ for further details.

sudo apt update
sudo apt install -y docker.io
sudo usermod -aG docker $USER

Building OpenWrt (with picod included)

  1. Clone this repository:
    git clone https://github.com/MyTechCatalog/cm4-wrt-a.git
  2. Run the OpenWrt build script:
    cd cm4-wrt-a && ./build-openwrt.sh v23.05.4
  3. The OpenWrt images will be located in this folder: cm4-wrt-a/bin/targets/bcm27xx/bcm2711/

You can omit the OpenWrt release version in step 2 above (v23.05.4), and the script will use the latest tag from the OpenWrt repo.

Building the picod service for Raspbian or Debian variants

Cross-compiling with Docker

Assuming you have Docker installed as described in the prerequisites above, run the commands below:

cd CM4
make docker-cross
./build-picod.sh

The debian package picod_1.0_arm64.deb will be located in CM4/build folder. Copy it to the Raspberry Pi and install it with this command:

dpkg -i picod_1.0_arm64.deb

Starting the picod service (on Raspbian)

sudo systemctl daemon-reload
sudo systemctl enable picod.service
sudo systemctl start picod.service

You can then access the picod web interface at http://localhost:8086/. This location is not accessible from outside the RPi CM4 itself. As such, an SSH tunnel can be created with the following command to forward port 8086 to localhost on your computer:

ssh -L 8086:localhost:8086 username@cm4_ip_address

Update config.txt

Copy to CM4/config_rpios.txt to /boot/firmware/config.txt in order to configure/enable the custom interfaces on the board.

Compiling the Raspberry Pi Pico firmware

  1. Clone this repository if you haven't already done so from above:
    git clone https://github.com/MyTechCatalog/cm4-wrt-a.git
  2. Run the Pico build script:
    cd cm4-wrt-a && ./build-pico-firmware.sh
  3. The firmware will be located here : cm4-wrt-a/pico/build/cm4-wrt-a.uf2

Contact information

Email: [email protected]

About

Software, firmware and a case for the CM4-WRT-A: A Raspberry Pi CM4 Router Baseboard.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 92.0%
  • C 3.3%
  • HTML 1.7%
  • CSS 1.4%
  • Shell 0.5%
  • JavaScript 0.4%
  • Other 0.7%