5 ms·
So uh, who's gonna be first to get it running on a Pi Pico?
by moffkalast 3y ago
So uh, who's gonna be first to get it running on a Pi Pico?
- vardump 3y agoNo one, unless you’re using a CPU emulator or a JIT with an SPI RAM. RP2040 doesn't have memory protection / virtual memory capability and has only 264 kB (or so) RAM.
- em3rgent0rdr 3y agoPico is a microcontroller whose Cortex-M0+ cores lack a memory management unit for virtual memory (considered essential for a full-fledged OS like Linux). But can run FreeRTOS on it...memory usages are 236 bytes for the scheduler, 76 bytes + queue storage area for each queue, and 64 bytes plus task stack size for each task, plus 5 to 10 KBytes of ROM.[1] [1] https://freertos.org/FAQMem.html https://freertos.org/FAQMem.html
- moffkalast 3y agoYeah I figured there might be a rub somewhere otherwise it would already be a thing, but since it's technically an ARM it sounded vaguely promising. What about a 32 bit build? I think those used to be able to work with without virtual addresses.
- NegativeLatency 3y agohttps://unix.stackexchange.com/questions/190350/mmu-less-kernel https://unix.stackexchange.com/questions/190350/mmu-less-ker...
- em3rgent0rdr 3y agoaha, and this reminds me about μClinux [1] which targets microcontrollers without a MMU. I installing it on 2005 iPod Classic 5G, and was able to then put a gameboy emulator on it. https://en.wikipedia.org/wiki/%CE%9CClinux https://en.wikipedia.org/wiki/%CE%9CClinux
- em3rgent0rdr 3y agoThough μClinux project seems dead, however the key component of that is a ELF to bFLT (binary flat) converter [1] for no-mmu Linux targets, which is alive on github [2]. [1] https://web.archive.org/web/20120301074213/https://retired.beyondlogic.org/uClinux/bflt.htm https://web.archive.org/web/20120301074213/https://retired.b... [2] https://github.com/uclinux-dev/elf2flt https://github.com/uclinux-dev/elf2flt
- yjftsjthsd-h 3y agoThere's also inferno, which is more or less a full unix-like that can run on the pico ( https://news.ycombinator.com/item?id=37393993 https://news.ycombinator.com/item?id=37393993 ) and on the Teensy and some other microcontrollers ( https://dboddie.gitlab.io/inferno-diary/index.html https://dboddie.gitlab.io/inferno-diary/index.html )
- rzzzt 3y agoELKS supported MMU-less operation on 8088 and 80286 machines, but I don't think an ARM port exists: https://github.com/ghaerr/elks https://github.com/ghaerr/elks
- gorkish 3y agoThe popular way to shorehorn modern linux onto a MMU-less microcontroller is to build a a RISC V system emulator and run uClinux on that; you can also emulate the MMU and run regular kernels if you have sufficient resources. It has been done on ESP32 with sufficient RAM; Pico would need additional hardware though in the form of something like QSPI RAM, and of course it would be very slow.
- mathiasgredal 3y agoNot possible, unless you want to do it using an emulator and external memory. The lowest you can go for Linux is probably an ESP32: https://web.archive.org/web/20230515075935/http://wiki.osll.ru/doku.php/etc:users:jcmvbkbc:linux-xtensa:esp32s3 https://web.archive.org/web/20230515075935/http://wiki.osll.... https://github.com/jcmvbkbc/linux-xtensa/commits/xtensa-6.4-esp32/ https://github.com/jcmvbkbc/linux-xtensa/commits/xtensa-6.4-...
- jrockway 3y agoYou don't need an ESP32. Someone made an AVR port: https://bit-tech.net/news/tech/cpus/linux-atmel-microcontrollers/1/ https://bit-tech.net/news/tech/cpus/linux-atmel-microcontrol... https://bit-tech.net/news/tech/cpus/linux-atmel-microcontrollers/1/ https://bit-tech.net/news/tech/cpus/linux-atmel-microcontrol... https://news.ycombinator.com/item?id=12537653 https://news.ycombinator.com/item?id=12537653