Skip to content

Notes ·

Of Course the Calculator Runs Linux

Remy van Elst updated an old Linux port for the HP Prime G2 graphing calculator, turning an already overpowered calculator into a tiny, fully programmable Linux computer.

The HP Prime G2 contains an ARM Cortex-A7 processor, 256 MB of RAM, 512 MB of internal storage and a touchscreen. Those specifications make it closer to an embedded Linux system with a calculator keyboard than a traditional calculator.

An earlier Linux port existed, but its source had deteriorated, parts of the build no longer worked and it did not provide a particularly usable system. Van Elst reconstructed missing repositories through Software Heritage and improved the port with:

  • A functional console login
  • Better keyboard support
  • USB serial access
  • Support for larger RAM-based system images
  • X11 with basic graphical applications
  • A new touchscreen driver for newer HP Prime hardware
  • A C compiler for developing directly on the calculator
  • Doom, because apparently that remains the final hardware certification test

The touchscreen work is especially good. His calculator used a newer controller unsupported by the old kernel, so he inspected raw I²C data, identified the device and adapted a newer Linux driver to work with the older kernel.

The Linux environment can boot entirely from RAM without replacing the original calculator software stored in flash. That makes the project somewhat less terrifying to try, although it still requires opening the calculator and shorting two tiny recovery pads.

I love projects like this because there is no commercial reason for the calculator to run Linux. Someone looked at the hardware, realized it was capable of more and decided that owning a device should include the freedom to understand and modify it.

The result is a calculator that can run xcalc, compile its own programs and play Doom. It is unnecessary, technically impressive and exactly the kind of computing project worth celebrating.

Read “But can your calculator run Linux?”

All notes