8 ms·
Linux 5.0 shown to boot on ESP32 processor
- faisalhackshah 5y agoSort of equivalent to this: https://hackaday.com/2012/03/28/building-the-worst-linux-pc-ever/ https://hackaday.com/2012/03/28/building-the-worst-linux-pc-...
- ASalazarMX 5y ago> it takes two hours to boot up to a bash prompt, and four more to load up Ubuntu and login. If you want a Megahertz rating, good luck; the effective clock speed is about 6.5 kilohertz. While the worst Linux PC ever won’t win any races, its simple construction puts it within the reach of even the klutziest of hardware builders; the entire device is just a microcontroller, RAM, SD card, a few resistors, and some wire. I don't know why, but this little kludge greatly pleases my sense of aesthetics.
- jhgb 5y agoShould have run Oberon, though.
- IgorPartola 5y agoI remember when I first learned of MySQL’s triggers I immediately thought that it might be fun to use them to implement a microcontroller or even a full computer emulator. A table with registers, a table for RAM, etc. If it was x86 or ARM or some such then I could compile Linux on it and then run MySQL inside of that!
- krylon 5y agoThat is an amazing idea. Then run SAP on top of that and turn it into an art installation.
- bradleypowers 5y agoSort of equivalent to this (installing Linux on a dead badger): http://strangehorizons.com/non-fiction/articles/installing-linux-on-a-dead-badger-users-notes/ http://strangehorizons.com/non-fiction/articles/installing-l...
- anthk 5y agoNot even close. 8MB of RAM with a 32bit processor will run Linux perfecly well on minimal builds. A 230MHZ 32bit CPU it's far more powerful than a 8bit processor emulating a 32bit one. You could use cli apps and even X perfecly well with 16MB and 80MHZ in 1996. EDIT: Ok, this is emulating too. Sorry, then.
- danachow 5y agoLinux doesn’t target the xtensa nor does it have a proper mmu so this is emulating a risc-v. It is still very much in the novelty “hack” realm.
- anthk 5y agoAh, then that's different, because I've run Linux under an Armv5 device with 32+16mb of RAM with zram just fine.
- fulafel 5y agoThere does seem to be a Xtensa Linux port, but you need a Xtensa chip that has some more features than the ESP32 does. http://wiki.linux-xtensa.org/index.php/Supported_Processors http://wiki.linux-xtensa.org/index.php/Supported_Processors
- faisalhackshah 5y agoSimilar in the sense that both approaches essentially run Linux in a VM, virtualizing the typical hardware required such as the MMU. In essence, it's the esp32 version isn't much different, just faster as the core is faster. Would be cool to get no-MMU Linux running on it. I've seen that run on STM32F7's natively..
- jsight 5y agoLoading was super slow for me. Archived copy: https://archive.is/kx3o9 https://archive.is/kx3o9
- deleted 5y ago[deleted]
- codezero 5y agoThis is pretty amazing. I remember the first computer I installed Linux 1.x on had 12 megs of ram in around 1992 or 1993? The smallest system I built/ran it on even back then was probably a 386 with 4MB of ram and it was so slow. Kind of amazing that after so much work, even torn down to the bare minimum it can run the modern kernel on such minimal hardware! Edit: probably worth noting that esp32 cores are an order of magnitude higher frequency than those 90s computers.
- coupdejarnac 5y ago12 megs in 92? Fancy.
- macjohnmcc 5y agoThe computer I was using at work in 92 had a whopping 16mb! It was amazing. It might have been a 386 20MHz (before the cache was added to the systems so was very slow compared to a 25Mhz that came out soon afterwards).
- pjmlp 5y agoLucky you! In 1991, I moved from a Timex 2068 to PC, while the technical school was still using 8086 and 286 systems. A 386SX with 20MHz, 40 MB and 2MB, running Windows 3.0. 16MB was indeed another level!
- codezero 5y agoHaha, tell me about it. I think the 4MB upgrade cost around $300 or $400 at the time? Similar to my first 1GB hard disk which came a few years later that cost $500. I was a little spoiled since my dad worked for a telco, so we tended to have decently modern computers and modems for that reason. I was REALLY fancy when I got 128k ISDN in 1996.
- liketochill 5y agoI had 1.1 up /2.2 down mbit Adsl in 1997, was pretty awesome!
- qalmakka 5y agoWow, I always though this was unfeasible due to how limited the ESP32 MMU is.
- sudobash1 5y agoThe MMU is not really a requirement in this situation, a processor with a real MMU is emulated in software[1] on the ESP32 (this is the virtual machine referred to in the article and comments) 1: https://github.com/juiceRv/JuiceVm https://github.com/juiceRv/JuiceVm
- amelius 5y agoDoes this processor support privilege levels? And threads?
- monocasa 5y agoNo to privilege levels, yes to threads. But to answer your question more completely, it's running a RISC-V emulator which is then running the Linux kernel.
- dheera 5y agoThat's cool. Even CircuitPython doesn't support threads.
- nousermane 5y agoMicroPython (CircuitPython's upstream) does: MicroPython v1.16; ESP32 module with ESP32 Type "help()" for more information. >>> import _thread >>> _thread.start_new_thread <function>
- vbezhenar 5y agoWhat does it mean for processor to support threads? I thought that threads are OS-level abstraction.
- anaisbetts 5y agoYou need a programmable timer interrupt to be able to preempt running code, but in general you're right
- amelius 5y agoWell, the processor needs to be able to do the context-switching (switch all registers, i.e. the visible state of the cpu, with those of another thread). You can obviously do this in software (emulate it) but that would be too slow for most practical purposes. Hence the question.
- Taniwha 5y agoNote: this is for the new RISC-V ESP32 (not the older xtensa based one)
- seba_dos1 5y agoNope. > (...) one developer apparently managed to boot Linux 5.0.0 on a board with an ESP32 dual-core Xtensa processor (...) > The shortened boot log above shown the bootloader output with ESP32-D0WD dual-core Xtensa processor eventually booting Linux 5.0.0. It's booting to a RISC-V virtual machine which then boots Linux, which may have confused you.
- Taniwha 5y agoOK - that makes sense - it was OpenSBI which is a RISCV only thing that confused me
- agucova 5y agoThe article says that it's not, and according to the reddit post, it seems to be using a JuiceVM port to ESP-IDF, allowing it to run on the Xtensa version.
- xfer 5y agoThe repo link: https://github.com/juiceRv/JuiceVm https://github.com/juiceRv/JuiceVm It seems to be booting a riscv vm, which is capable of running linux. The hardware capabilities of ESP32 is not very important(except being fast enough).
- nousermane 5y ago"Fast" is relative here. According to the youtube link OP posted in CNX comments, it takes 6 minutes to boot to shell. Still, better than two hours @dmitrygr's ARMv5-on-AVR emulator took.
- dmitrygr 5y agoyeah, 240MHz 32-bit cpu does help compared to the 20-mhz 8-bitter :) Although, Xtensa can execute out of RAM, so here a JIT could be used for a larger speedup. Maybe i'll build a RiscV-to-xtensa jit some day when i'm bored
- charleover 5y agoThe video description states 30x speed so I suspect three hours is a more realistic expectation. https://youtu.be/w9UlZIYZtwI https://youtu.be/w9UlZIYZtwI
- xchip 5y agoNote: It uses a virtual machine
- deleted 5y ago[deleted]
- muti 5y agoVideo of the boot was linked in comments https://www.youtube.com/watch?v=w9UlZIYZtwI https://www.youtube.com/watch?v=w9UlZIYZtwI Note the description: video is sped up 30x
- GekkePrutser 5y agoWeird. It shouldn't be that slow. I've run Linux on a 486 16mhz which was definitely slower than an esp32 and it was performing just fine.
- tgsovlerkhgsel 5y agoIt probably wasn't Linux 5.0 though, was it? There likely were also some nasty, performance-sacrificing hacks involved. A comment above mentions "booting a riscv vm".
- tyingq 5y agoIt's running on a RISC-V emulator that's running on the ESP32 Xtensa. That would slow it down quite a lot.
- xutopia 5y agoPardon my question. Why is this significant?
- kache_ 5y agoi should finally start my esp32 project actually i work 9h a day i dont think i have time ;_;
- jdlyga 5y agoI read that as ESPN2