QEMU on replit!
Ever wanted to make an OS on repl.it but couldn't get an emulator running? Now you can!
Developing, Compiling, Linking an OS is up to you!
Simply fork the repl and do whatever you want with qemu.
what a legend
Would their be a way to run something like Linux or maybe a lighter os like this one that I found called Kolibrios
@MrSnippy If you can fit the iso on the repl yes
I just forked it and its broken. :(
https://replit.com/@deliciouscupcak/QEMU-Replit
@deliciouscupcak its not broken, the repl just doesn't run any OS with it since its just a blank repl that installs qemu in a way to make it work.
now that nix exists you can simply tell nix to install qemu and it will do it correctly without having to upload a bunch of files or anything
@CSharpIsGud replit runs a linux vm, and locks the guest user (us) into it's terminal, which is why SUDO works
@PikadaveStudios it will run, but you won't actually get root permissions.
@CSharpIsGud I know, im just saying it runs linux
@PikadaveStudios 99% of replit knows that
@CSharpIsGud i didnt lol
Thanks! i was looking for something to help me try and install a os in nix
How could I use a disk image with it? I want to use an operating system like Linux, or maybe Ubuntu
@Seven7Four4 i got the same question
@CSharpIsGud could you help
I forked and ran the repl, but it shows:
qemu-system-x86_64: error while loading shared libraries: libbrlapi.so.0.6: cannot open shared object file: No such file or directory
I tried it on this repl, and another repl of mine. Any clues?
@mrman314 I had put the fix on the other ones with it I just forgot to do it with this one. it should work now
@CSharpIsGud Thanks for the quick reply, It works now, Thanks!
Nice! Do you know how to get qemu-system-i386 working on repl? Because the code I made works only on i386.
Here are the fantastic error messages that I get when I try to run it:
qemu-system-i386: error while loading shared libraries: libbrlapi.so.0.6: cannot open shared object file: No such file or directory exit status 127
Here is the link by the way: https://repl.it/@LucasAllori/theOS
Thanks!
@LucasAllori Fork the repl this post attached, I uploaded all the things it requires from my own computer.
@CSharpIsGud Thanks! Now I don't have to download the OS and run it on my computer
Nice work!
Don't know how to use this but I'll learn :)
O.o
mov eax, nice int 69 cli hlt nice: db 'Nice'
Nice! I have tried a few times to get this to work, but I never could. I can write an OS, now I just have to get one working!
@sugarfi I have an OS with segmentation, keyboard input and vga output, Once I finish up "userland"(I didn't use paging) im going to put it on repl talk.
@CSharpIsGud nice! I started once and got as far as GRUB and paging, then I tried again later and I set up my own 4-stage bootloader that entered protected mode. Then I accidentally deleted all my code.
@sugarfi How did you get paging, by the time I got to that part of the book I was reading I had already done a lot and I couldn't actually identity map anything.
@CSharpIsGud I basically followed a tutorial, with a couple of modifications: https://wiki.osdev.org/Setting_Up_Paging. Once you enable it and set up a table and directory, you just have to use table[vaddr >> 12] = phyaddr
to map addresses.
@sugarfi Oh yeah thats essentially what I had, at one point I managed to make it work without faults but the addresses weren't accurately mapped and I couldn't use the framebuffer anymore.
@CSharpIsGud yeah, the mapping goes by pages, not addresses, so it can be inaccurate. I don't know why you couldn't see the framebuffer, though. Did you map the whole lower 1mb?
@sugarfi Pretty sure that part got mapped otherwise it probably would of just exploded
@CSharpIsGud if you try to access unmapped memory, at least in qemu, there is a segfault or triple fault or something and the machine reboots.
@sugarfi My most working solution didn't crash, its just the framebuffer wasn't at the spot I wanted it to be in, just writing a huge chunk of data somewhere would eventually write into the framebuffer at some point
@CSharpIsGud ok
how do you load a os into it?
@LiamDonohue Assuming you have one just run qemu like you normally would like qemu-system-x86_64 IMAGE.iso
or qemu-system-x86_64 -kernel KERNELIMAGE
why did you turn the first 2 lines into comments
@RobertFurr The first line wasn't supposed to be a comment, I fixed that. I need to find some way to keep it from reinstalling qemu every time if its already installed and I was testing it.
the second line is actually a comment, you can put whatever there like commands to compile a kernel
@CSharpIsGud okay. Can you put a comment with an example as to what someone should do so they don't have to figure it out yourself?
@RobertFurr I thought of adding an example OS, but the point of the post is to show qemu working on repl.it not developing an OS.
Didn’t work but still it’s very cool
@CodeSalvageON Why didn't it work what did it say
@CSharpIsGud it said command not found
@CodeSalvageON oh, uncomment install-pkg qemu
@CSharpIsGud thanks! Works great now!
Now we can make a ReplOS XD
@Highwayman unfunny joke smh :/
oof I feel ashamed of myself lol
@Wefd
@Highwayman
Bad Joke, Nice Idea!
i mean, it had some context, so it's not necessarily gonna be a generally funny joke.. @AaryanAnsh
@Highwayman
Lol. I am actually gonna try to make it
Sick, is it gonna be your first OS or have you done it before?
@AaryanAnsh