Skip to content

Commit f9d3f5f

Browse files
authored
Fix readme
1 parent 32f2826 commit f9d3f5f

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
11
# arv32-opt
2-
[Tested successfully!] Atmega328p port of mini-rv32ima. Let's run Linux on the world's worst Linux PC (and beat Dmitry Grinberg)
2+
[Tested successfully!] Atmega328p port of mini-rv32ima. Let's run Linux on ~~the world's worst~~ one of the world's worst Linux PC (and beat Dmitry Grinberg)
33

44
![image](https://github.com/raspiduino/arv32-opt/assets/68118236/e457c5f7-110e-457c-ab98-48de47102af9)
55

66
[Video on Youtube](https://youtu.be/ZzReAELagG4)
77

88
Note: The code is in **pure AVR C**. Arduino IDE is just used as *serial terminal*.
99

10+
UPDATE: I found a worse Linux PC: [C64](https://github.com/onnokort/semu-c64)!
11+
1012
## What is this?
1113
This is a port of [mini-rv32ima](https://github.com/cnlohr/mini-rv32ima) (a minimum RISC-V emulator, capable of booting Linux) on atmega328p (the core of Arduino UNO, a 8-bit AVR microcontroller). So basically, this code is for **booting Linux on Arduino UNO**.
1214

1315
Yes you are reading it correctly, Arduino UNO can (theorically, but not practically) boot Linux. And it definitely beats [Dmitry Grinberg's (once) world's worst Linux PC](https://dmitry.gr/?r=05.Projects&proj=07.%20Linux%20on%208bit).
1416

17+
As seen on
18+
1519
## How does it work?
1620
The idea is really simple: you have an Arduino UNO (or atmega328p) to run the emulator's logic, and emulator's RAM is accessed via swapping with an SD card (which is communicated through SPI interface, see more below). The emulator also has 3 512-bytes cache (1 icache and 2 dcache interchangable) and lazy/delayed cache write system.
1721

1822
The code is written in pure C (and not Arduino) to reduce Arduino overhead (if any). It initializes UART, SPI, SD card, and a digital input-pullup pin for triggering emulator state dump. Finally, it initialize cache, then mini-rv32ima and let the emulator does its works.
1923

2024
## How fast is it?
21-
About ~~175Hz - 205Hz~~ ~~426 - 600Hz~~ most of the time 700 Hz, peak 1500Hz, lowest 70Hz with `-O3` code on an Arduino UNO based on atmega328p, clocked at 16MHz, with a class 4 SDHC card connected via 1-bit SPI interface. Complete boot time (from start to shell) is about 15 hours and 44 minutes.
25+
About ~~175Hz - 205Hz~~ ~~426 - 600Hz~~ most of the time ~~700 Hz~~ 1100Hz, peak ~~1500Hz~~ 2000Hz, lowest 70Hz with `-O3` code on an Arduino UNO based on atmega328p, clocked at 16MHz, with a class 4 SDHC card connected via 1-bit SPI interface. **[WARNING: NOT YET UPDATED]** Complete boot time (from start to shell) is about 15 hours and 44 minutes.
2226

2327
Update 24/9/2023: The speed is double/tripled by implementing icache
2428

2529
Update 26/9/2023: The speed is x1.5 by implementing 3 cache + lazy write system
2630

31+
Update 25/10/2023: SPI speed is x8, thanks to @kittennbfive's [suggestion](https://github.com/raspiduino/arv32-opt/issues/4)
32+
2733
<br> Why it's *that* slow? Read `Current issues and drawbacks` section below.
2834

2935
## Pinout
@@ -149,5 +155,8 @@ extraflags: 0x019446E3
149155
- [adnbr](https://github.com/adnbr/) for writing [1 ms counter](https://gist.github.com/adnbr/2439125)
150156
- [me (gvl610/raspiduino)](https://github.com/raspiduino) for bringing all this stuff together.
151157

158+
## As seen on
159+
[Hackaday](https://hackaday.com/2023/10/13/because-you-can-linux-on-an-arduino-uno/), [Hackster](https://www.hackster.io/news/giang-vinh-loc-creates-the-world-s-worst-linux-pc-using-an-arduino-uno-r3-and-its-atmega328p-e5ed03e3f594), [Habr](https://habr.com/ru/news/767550/), [Maker News](https://news.mkme.org/?p=66623), [internetua](https://internetua.com/entuziast-zapustiv-linux-na-arduino-uno), [futuranet.it](https://ei.futuranet.it/2023/10/24/arduino-uno-linux-su-atmega328/), [zhihu.com](https://zhuanlan.zhihu.com/p/662411944)
160+
152161
## One last thing
153162
If you can run this, you probably are running world's worst Linux PC. Enjoy!

0 commit comments

Comments
 (0)