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

Need help with figuring out how I am supposed to add other distros to the image builder #203

Open
FunnyCorgi opened this issue Nov 20, 2024 · 8 comments

Comments

@FunnyCorgi
Copy link

I want to open a PR for this, but I don't know exactly how the image build works.
What I think I understand so far:

When an image is built, it uses a 9p filesystem, and creates a docker image.
This also gets compiled with the Anura Mouse driver files to allow the mouse to interact with the command line(for example, in htop). It also links the x server into the xfrog app and manager so x86 apps can be drawn on-screen.

What I want to know is how to make this work for something like the i386/ubuntu:bionic or i386/ubuntu:xenial (or both) base images off of docker, so then Anura can run ubuntu.
I also think that there should be documentation on this for developers.

@ProgrammerIn-wonderland
Copy link
Collaborator

Xenial? In the big 2024?

Xenial is what I used as a child, you don't want that these days it's almost a decade out of date.

Anura's v86 Filesystem integration works best with Linux kernel 5.15+ so I would choose a more recent distro with that.

Your realistic options boil down to

  • archlinux32 - we had this in the past but phased it out. It's okayish in usability
  • Debian 12 i386 - same as archlinux, we phased this out because the package manager was super slow on v86, not very usable.
  • Gentoo - less of a joke than you think, but don't expect to install any packages inside of anura.x86 itself, you'd really need to bundle all the applications you plan to use
  • Ubuntu 18.04 - last Ubuntu with 32 but but it's super old now, I wouldn't use it, and filesystem performance would be bad with the older kernel
  • Damn Small Linux - not the original 50MB version but the modern version could work

Realistically to build a anura.x86 compatible rootfs you only need one thing (initially). You need epoxy-server in twisp mode (or twisp the application itself) starting on boot with wisp V2 over /dev/hvc0, and you need virtio console support in the kernel. Once you get that done, for x86 support you only really need to start anura mouse after X11 starts, and you just need X11. Everything else should just mostly work

@ProgrammerIn-wonderland
Copy link
Collaborator

I have considered making a separate repo with builders for these images but never got around to it. It's not exactly difficult as much as it's annoying

@FunnyCorgi
Copy link
Author

@ProgrammerIn-wonderland So basically I just need to adapt the dockerfile for the alpine image to another linux image(definitely not xenial because as you said it has too old of a kernel)?

@ProgrammerIn-wonderland
Copy link
Collaborator

Xenial is possible, you'll just find it's very slow.

But for the most part, yes you can just adapt the dockerfile

@FunnyCorgi
Copy link
Author

So I am assuming that I just need to adapt distro specific commands(like the package manager, etc.) and leave the stuff dealing with epoxy and 9p?

@ProgrammerIn-wonderland
Copy link
Collaborator

Pretty much

@FunnyCorgi
Copy link
Author

And there is nothing that I need to change in the directory of the dockerfile? No configs, no Anura Mouse drivers, none of that(basically I am asking if I can just copy the directory x86_image_wizard/alpine directory and just change the dockerfile)?
(Also sorry to bother you again)

@ProgrammerIn-wonderland
Copy link
Collaborator

Mostly, yeah. At most you might need to add a symlink for /bin/ash -> /bin/bash

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