HP Prime G2 graphing calculator gets a fixed-up Linux port
The HP Prime G2 is a graphing calculator on the market since 2013, updated to its current hardware revision in 2018. Under the hood it runs an i.MX 6 Ultralite ARM Cortex A7 CPU with 256 MB of DDR3 RAM and 512 MB of internal storage, on top of the FreeRTOS operating system, specifications the author calls closer to a small embedded Linux machine than a traditional calculator. The earlier G1 revision had a 400MHz ARM CPU with 32MB of RAM and ran a custom RTOS called Besta OS.
Remy van Elst, an embedded-software developer by day job, found an old unofficial Linux port for the G2 built around a 4.14 kernel, but it was in bad shape: the linked repository no longer had the right branch, buildroot failed to build, the devicetree file was broken, and the available download never reached a working console login. He reconstructed the original source using Software Heritage and got a build running again, then extended it. His changes fix the keyboard driver so numbers, dashes, underscores and the pipe character can actually be typed (the original only sent the orange-marked letters), make the calculator show up as a USB serial device, and raise the maximum image size that can be booted straight into RAM from 15 MB to 130 MB by changing offsets in the kernel configuration, the uuu flashing script and u-boot. He deliberately keeps the whole system running in RAM rather than flashing it to NAND, so the original calculator software and firmware stay intact and recoverable.
The touchscreen needed the most debugging. His particular unit has a newer Ilitek ILI211X controller (HP switched away from the original Goodix GT5688 once that chip went out of production), and the old kernel driver only supported the earlier hardware. The device claimed to sit at i2c address 0x14, but i2cdetect found nothing there; van Elst eventually traced a working touch controller to address 0x26, matched its 43-byte data packets to the ILI211X_DATA_SIZE constant used in newer kernel drivers, and wrote a stripped-down driver for it, dropping multitouch and pressure support he did not need. Separately, loading the USB-serial support as a loadable kernel module froze the whole device; compiling it directly into the kernel instead fixed that.
The finished build boots to a console login, runs an X11 session with the twm window manager plus small apps like xcalc, xclock and xeyes (a long press acts as a right click), ships Doom via the prboom port at a good framerate, and bundles the tiny C compiler tcc so users can write and run their own programs on the calculator itself, with a sample hello.c included. Van Elst has posted the source on GitHub and a pre-built, ready-to-flash download on his own site so others do not have to build buildroot and the kernel themselves.
He frames the project partly as a matter of principle: he tries to own only devices that allow root or administrative access, and notes that while Texas Instruments later restricted assembly-code execution on its calculators and Numworks locked down its later firmware, both changes were driven by exam-mode and anti-cheating requirements rather than a wish to block owners outright. An unnamed HP employee is quoted as saying the Prime's verification system is not currently locked down, though the hardware is capable of full encryption and could be switched on if needed. Checking rival calculators, van Elst found no Linux support on the TI 84+ CE (48 MHz eZ80), the Numworks N0110/N0120 (216 MHz and 550 MHz ARM Cortex-M7 respectively, with the OS open source but later firmware locked down) or the Casio FX-CG50 (roughly 118 MHz, per outside sources he cites). The TI Nspire CX(II) does already have a Linux port. His own favorite calculator, the HP-16C, an RPN model for programmers with only 203 bytes of program storage and a CPU clocked in the low hundreds of kilohertz, has no Linux port at all.
Key facts
- HP Prime G2 (the 2018 hardware revision of the 2013 HP Prime) runs an i.MX 6 Ultralite ARM Cortex A7 CPU with 256 MB of DDR3 RAM and 512 MB of storage on FreeRTOS, well ahead of most rival calculators.
- Remy van Elst rebuilt an old, broken unofficial Linux port (4.14 kernel) for the G2 by reconstructing its source from Software Heritage after the original repository lost its working branch.
- His changes raise the maximum RAM-booted image size from 15 MB to 130 MB, fix the keyboard driver so numbers and symbols work, add a USB serial console, and introduce a new driver for the newer Ilitek ILI211X touchscreen controller found at i2c address 0x26.
- The finished port boots to a console login, runs an X11 session with basic apps including xcalc, ships Doom (via prboom) at a good framerate, and bundles the tcc C compiler so users can write and run their own code on the calculator.
- Checking competitors, van Elst found no Linux support on the TI 84+ CE, Numworks N0110/N0120 or Casio FX-CG50, while the TI Nspire CX(II) already has a port; his own favorite, the HP-16C, has none either.
Why it matters
This is a hobbyist embedded-systems story rather than an industry development: it shows how far commodity calculator hardware has drifted from its original purpose. The HP Prime G2's ARM Cortex A7, 256 MB of RAM and 512 MB of storage put it closer to a stripped-down smartphone than to a traditional calculator, and van Elst treats that as an invitation to run a full Linux userspace, X11 desktop and even Doom on it. The project also carries a small statement about ownership: he frames running Linux, and having root access in general, as something he expects from any device he buys outright.
Who it affects
The audience is narrow: owners of the HP Prime G2 specifically, and the broader community of calculator collectors and embedded hobbyists who enjoy porting operating systems to hardware never designed for them. It has no direct relevance to HP's calculator business, to students who use the Prime for its intended purpose, or to the wider AI or software industry; the Hacker News discussion drew a modest 83 points and 8 comments, consistent with a niche audience.
How to use it
Van Elst has published the modified Linux kernel and build sources on his GitHub, plus a pre-built, ready-to-flash image on his own site so others can skip building buildroot and the kernel from scratch. Using it requires opening the calculator's case (removing four screws) and flashing over USB with the uuu tool. He runs the system entirely in RAM rather than writing it to the calculator's NAND storage, which keeps the original HP firmware in place and recoverable if something goes wrong during the Linux session itself.
How solid is it
The account comes directly from the person who did the work, published as a detailed technical blog post with screenshots, source code on GitHub and a working, downloadable build, which is a reasonably strong form of evidence for a hobby project. It is not independently verified by a third party, and it describes a single individual's build on his own unit; results on other Prime G2 units, which may have different component revisions, are not addressed in the source material.
Risks and caveats
The author warns that opening the calculator carries a real risk of unrecoverable damage that could prevent the device from booting back into HP's own software. The port is entirely unofficial and unsupported by HP, built on a years-old kernel version, and depends on hardware quirks, such as which touchscreen controller a given unit shipped with, that can vary between individual calculators. The source article's flashing instructions are also cut off mid-sentence in the text captured here, so some steps in the process are not covered by this summary.
“It is not locked down and is just used for verification at this time. Note however, we DO have the ability to fully encrypt and lock the system to hell as that is part of the new chip. We DO have that tested and working. We WILL turn it on if needed. It IS a corporate security mandate (after things like firmware being loaded into mice/keyboard or printers to hack networks came to light) that we fought to get an exemption for.”
— an unnamed HP employee, quoted by author Remy van Elst