Student turns a PDF into a functional Linux emulator
www.techspot.com
Recap: Early last month, someone used the PDF format's JavaScript support to run Tetris inside what should normally be a static text document. Predictably, within days, a high school student upgraded the hack to run Doom within a PDF file. The same developer has now enhanced the code to run the entire Linux operating system. Barely a month after unveiling a port of Doom running inside a PDF, high school student and programmer "Ading2210" has successfully emulated Linux within the popular file format. Although performance is limited, the project redefines what's possible with PDF JavaScript tools. Users can try it here using Chromium browsers like Chrome, Edge, and Opera. The source code is available on the developer's GitHub page.LinuxPDF runs in a RISC-V emulator based on TinyEMU. Its inner workings closely resemble those of Ading2210's DoomPDF. For example, the inputs repeat the trick pioneered by the earlier Tetris PDF hack, reusing the Doom port's code. Users can click on virtual keys below the main screen, but most will likely prefer direct keyboard controls, which work by interpreting inputs in a text field.Although the PDF format was primarily designed to display text and images, it can also run JavaScript code. Adobe Acrobat includes the entire JavaScript specification, enabling features like 3D rendering, monitor detection, and HTTP requests.PDFs running in browsers use a more limited version, but it's good enough to run games and operating systems. Ading2210 discovered that an old version of Emscripten that targets asm.js instead of WebAssembly can compile C code to run within the file format.Like DoomPDF, the Linux emulation suffers from slow performance. Booting the kernel takes up to a full minute about 100 times longer than a traditional Linux system. According to Ading2210, this cannot, unfortunately, be fixed because Chromium uses a version of V8 that doesn't support the JIT compiler.The file system is 32-bit by default. However, users can build a 64-bit version from the source code by cloning the repository within a real Linux system, editing the "BITS" line, and downloading Emscripten version 1.39.20. Sadly, running the 64-bit version doubles the performance deficit.Users interested in a more practical Linux application for low-end hardware can try Ading2210's ChromeOS RMA Shim Bootloader. The script collection allows a full Debian distro to run on a Chromebook without modifying the firmware. The project also supports enrolled enterprise devices. // Related Stories
0 Σχόλια ·0 Μοιράστηκε ·32 Views