Skip to content

Customized Raspberry Pi OS image for compute modules in Futurehome cube-1v* smarthubs

Notifications You must be signed in to change notification settings

RockPaperPencil/rpios-futurehome-cube1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Customized Raspberry Pi OS image for Futurehome cube-1v*

The contents in this repository is provided "as is", without any warranties of any kind.

Main differences from official rpios images

  • Configuration for RTC chip
  • Configuration for case LED
  • Configuration for automatic UART mapping
  • Reduced boot partition size to prioritize space for the rootfs partition
  • Reduced number of packages
  • APT configured to not install recommended packages

cube-1v0 radio modules

  • EnOcean module UART interface is mapped to /dev/ttyAMA0
  • EnOcean module reset line is at GPIO21
  • Z-Wave module UART interface is mapped to /dev/ttyS0
  • Z-Wave module reset line is at GPIO22

cube-1v1 radio modules

  • Z-Wave module UART interface is mapped to /dev/ttyAMA0
  • Z-Wave module reset line is at GPIO22
  • MGM12P module UART interface is connected to a CP2102N UART<->USB bridge
  • MGM12P module nRESET line is at GPIO23

Defaults and customizations

The default user is named cube, having its password also set to cube. This is defined in the file userconf.txt in the boot partition. To change this, userconf.txt could be edited before the first bootup of the system. It could also be deleted, and cloud-init, which has been included in the Raspberry Pi OS since pi-gen commit 372e563, could be used instead.

Hashed passwords for the userconf.txt file can be generated by running echo "password" | openssl passwd -6 -stdin

The default hostname is cube, and the device should by default be resolvable using mDNS (cube.local).

Post installation

It could take the hub a few moments to respond to SSH connection attempts when booting. Please have some extra patience for the cube-1v0 which boasts a first-gen compute module with a single 700MHz CPU core and 512 megabytes of ram.

The reduced boot partition size makes it extra important to not keep unneeded kernels around. The cube-1v0 and cube-1v1 uses different kernels, both of which is included in the image.

For a compute module 1 which is found in the cube-1v0, this means running sudo apt-get remove linux-image*rpi-v8.

For the compute module 3 which is found in the cube-1v1, this means running sudo apt remove linux-image*rpi-v6.

Swap

The rpi-swap package which had its debut with the release of the Trixie-based Raspberry Pi OS is also included in this customized version. Because this customized version of the OS is mainly focused on compute modules boasting a whopping four gigabytes of eMMC storage, the maximum space allowed for swap has been turned all the way down to 160MiB. This setting is defined in the config file at /etc/rpi/swap.conf.d/50-swap-file-max-size.conf. To change the amount of swap space, simply edit the config and reboot the system. Do keep in mind the amount of space available for the swap file at /var/swap to grow before applying changes!

Building

If the needed tools are present, getting a build going should be as easy as cloning this repository, running make and follow the directions.

About

Customized Raspberry Pi OS image for compute modules in Futurehome cube-1v* smarthubs

Topics

Resources

Stars

Watchers

Forks