Skip to content

Conversation

@masayuki-kono
Copy link

@masayuki-kono masayuki-kono commented Dec 26, 2025

Summary

This PR adds automatic Raspberry Pi hardware detection to the CMake build system, enabling automatic platform selection between raspberry_pi and manifold2 based on the detected hardware.

Changes

1. Automatic Raspberry Pi Detection

  • Added detection logic that checks /proc/device-tree/model to identify Raspberry Pi hardware
    • Example output from /proc/device-tree/model
      $ cat /proc/device-tree/model
      Raspberry Pi 5 Model B Rev 1.1
      
  • When Raspberry Pi is detected on an aarch64 system, the build system automatically selects the raspberry_pi platform
  • Falls back to manifold2 platform for other aarch64 systems (e.g., Manifold2-G/C)

2. CMake Policy Configuration

  • Set CMake policy CMP0053 to NEW to resolve variable reference evaluation warnings

Motivation

Previously, the root CMakeLists.txt only supported manifold2 and RTOS platforms, requiring manual configuration to build for Raspberry Pi. This change enables automatic platform detection, making it easier to build the Payload SDK on Raspberry Pi without manual intervention.

Testing

  • ✅ Tested on Raspberry Pi 5 Model B (aarch64)
    • OS: Ubuntu 24.04.3 Raspberry Pi Generic (64-bit ARM) server
    • Correctly detects Raspberry Pi hardware
    • Automatically selects raspberry_pi platform
    • Build completes successfully

Evidence: Build logs from both cmake and make commands are attached as cmake_logs.zip .

Impact

  • Breaking Changes: None
  • Backward Compatibility: Fully maintained

- Detect Raspberry Pi via /proc/device-tree/model
- Automatically select raspberry_pi platform on Raspberry Pi hardware
- Set CMake policy CMP0053 to resolve warnings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant