Rationale

The posmarketOS HW-CI system has been designed with the following goals in mind:

  • Ensure reliability of specific functionality on specific devices

  • Reduce friction for contributions through easier and broader automated testing

  • Enable long-term crowd sourced / decentralised board farm

After a previous attempt at building a custom system did not make it production, and some further research, the team decided to use CI-tron as the tool to manage hardware, and provide integration to our current GitLab CI. The reason for this is that most other systems we found were deemed too complex to be crowd sourced long-term and reduce contributor friction on test development. On the contrary, CI-tron focuses on:

  • Providing a plug-and-play experience by automating best practices and minimizing manual configuration;

  • Using containers rather than rootfses for test environments;

  • Allowing both interactive and CI sessions.

In addition to that, to make hardware testing possible, the postmarketOS team had to develop a custom PDU, our phone harness. The combination of CI-tron, a volunteer community, and phone devices set some requirements that were not supported by any of the existing solutions. Meaning:

  • To power the device with the battery removed, as otherwise the continuous connection to power can risk damaging it, and potentially setting it aflame. As a consequence, power must the provided directly through the battery connectors, and the PDU must be able to provide a high current (max ~5A) at potentially low voltages (minimum ~3.3V), to be able to mimic the battery.

    • To have an USB-C connector through which to provide testing artifacts to the phone without affecting persistent storage.

  • To provide UART to get early boot serial logs from the device.

  • To be extensible to potentially control power buttons in the device.

  • The price-point should be acceptable to pay for it from the project’s donations, or for volunteers to be able to afford it.

No commercially-available options exist that support all these requirement. Although some companies like Linaro or CodeThink have developed similar boards, they have done so for internal use, meaning the price point is usually unaffordable for volunteers, documentation is non-existent, and modifying them or writing firmware that supports ci-tron would become a complex effort of reverse-engineering.