Home IoT Giang Vinh Loc Creates “the World’s Worst Linux PC” Utilizing an Arduino UNO R3 and Its ATmega328P

Giang Vinh Loc Creates “the World’s Worst Linux PC” Utilizing an Arduino UNO R3 and Its ATmega328P

0
Giang Vinh Loc Creates “the World’s Worst Linux PC” Utilizing an Arduino UNO R3 and Its ATmega328P

[ad_1]

Vietnamese embedded developer Giang Vinh Loc has taken Linux to new lows, by efficiently booting to a console session on an Arduino UNO R3’s Microchip ATmega328P eight-bit microcontroller — by having it fake to be a 32-bit RISC-V processor.

“It is a port of mini-rv32ima (a minimal RISC-V emulator, able to booting Linux) on ATmega328P (the core of Arduino UNO, a eight-bit AVR microcontroller),” Loc explains of the venture. “So principally, this code is for booting Linux on [the] Arduino UNO. Sure you’re studying it appropriately, Arduino UNO can (theoretically, however not virtually) boot Linux.”

If you happen to’ve a spare sixteen or so hours to attend for a login immediate, why not strive Linux in your Arduino UNO? (📹: Giang Vinh Loc)

Loc’s venture builds on the work of Charles Lohr, who wrote mini-rv32ima late final yr in simply 400 traces of C code — the discharge of which triggered a race to see who might get it, and the Linux kernel the emulator helps, operating on probably the most resource-constrained {hardware}. In Loc’s case, that was an Arduino UNO R3 — a microcontroller board with an eight-bit 16MHz processor and simply 2kB of static RAM (SRAM).

That, then, posed an issue: the Linux kernel might be able to squeeze itself into surprisingly little reminiscence, however not all the way in which right down to 2kB. The answer: convincing the emulator that an SD Card linked over SPI is RAM, vastly growing the reminiscence out there to the kernel.

Efficiency, as you may count on, is extra proof-of-concept than usable: “Full boot time (from begin to shell) is about 15 hours and 44 minutes,” Loc admits — although this was later improved by the implementation of an instruction cache and a “lazy write system.”

The total venture write-up, together with supply code, is offered on Loc’s GitHub repository; “If you happen to can run this,” he writes, “you in all probability are operating world’s worst Linux PC. Get pleasure from!”

[ad_2]