Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to get a full debian running on this? #39

Open
redhog opened this issue Jan 8, 2024 · 1 comment
Open

Possible to get a full debian running on this? #39

redhog opened this issue Jan 8, 2024 · 1 comment

Comments

@redhog
Copy link

redhog commented Jan 8, 2024

Heyas!

Would it be possible to get a full apt based distro running on this, e.g. https://github.com/yuzibo/riscv32/wiki ? Is using flat binaries instead of elf a requirement due to the lack of mmu? Does this mean no dynamic linking? If so this sounds hard...

Background:
My goal is a bit of a funny one:

I want to find / build a hardware emulator that can run a full modern linux distro (in text mode only), with the requirements that a) the emulator source code (not binary) is really small, b) that the emulator source code is in as small as possible subset of whatever programming language it is built in as possible and c) the rootfs and kernel can be appended to the emulator source as a b64 encoded string constant c)

The goal is for this subset programming language to be small enough to teach only by example (no explanations / comments, only code, input plus output, to someone who does not know anything about the language, or even english). That is, someone who reads this arcive should be able to see these examples and the emulator code with the kernel/rootfs in it, figure out how to run it with no help, and get a running full current day linux system.

Would your project be a good starting point? I've also been looking at https://github.com/sysprog21/semu but that is a considerably larger codebase.

@cnlohr
Copy link
Owner

cnlohr commented Feb 1, 2024

So, two issues:

No one's done an XIP kernel. It's hard to run Linux because it's going to have to load every copy of ever program all the way into memory, since it can't share any memory without XIP.

It's just really hard to run modern Linux without an MMU, since things like mmap are a little weird. While almost all features will work fine, there's likely to be a handful of oddities with things like shared memory.

Dynamic linking is one of those weird things. While there's no reason ELF's couldn't be loaded without an MMU, no one has written the MMU-less ELF loader.

There's nothing fundamentally blocking dynamic library usage (sharing code in memory) but people just haven't done it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants