Mezzano icon indicating copy to clipboard operation
Mezzano copied to clipboard

General Question about Mezzano

Open Outstep opened this issue 5 years ago • 17 comments

Hello,

I recently came across Mezzano and ran it in VirtualBox. Its pretty impressive, but I had a couple of questions that I hope to get answered if you will.

  1. Is Mezzano truly its own OS, or is it running on top of a stripped down Linux, or other?

  2. If the OS is completely in Lisp (which I really like, by the way) then how did you get Quake and Doom to run as they run on Windows & Linux, if I remember correctly.

Lastly, I am working on an AI project in which I will use Lisp and want to get Lisp as close to the metal as possible by getting rid of any OS below it.

Any information that you could provide would be greatly appreciated. Thanks, Lonnie

Outstep avatar Jun 14 '19 21:06 Outstep

  1. There is no Linux beneath. The OS itself is Lisp.
  2. Doom and Quake were compiled down to LLVM-IR which was then compiled into Common Lisp.

phoe avatar Jun 14 '19 21:06 phoe

Thanks so very much for the info. This may be just exactly what I need for my project.

I would like to learn how to compile it up into an ISO and am looking over what I can find, in particular the references to the MBuild process.

Also, I am wondering what it might take to compile a second version without some of the applications like Doom, Quake, etc.... This would be for the AI version in which probably I would just want the file manager and editor and GUI.... will look it over more. It actually might be nice to see if it is possible to get t-SNE or their viewer to run, but I can investigate that stuff later.

For now just a simple full compile, and compiling to leave out some applications will work to get me started. Thanks again. Lonnie

Outstep avatar Jun 14 '19 21:06 Outstep

Sorry, but just 2 more quick questions.

  1. Is there a Discord or Slack channel available for discussion on Mezzano development?

  2. Does Mezzano have GPU acceleration? I think that I recently read somewhere that one of the Lisp dialects, SBCL perhaps, had GPU acceleration, but could be wrong.

Also, I'm not even sure which dialect of Lisp Mezzano is using and need to crack open the books on which ever version this is as well.

I'm just now getting back into Lisp from a number of years ago and have always enjoyed working with this language so please forgive any dumb questions since I have not really used Lisp a lot since college. Best Lonnie

Outstep avatar Jun 14 '19 23:06 Outstep

Hi,

There's a channel (if that's the right word) on irc.freenode.net #mezzano. froggey is active there as well as a few other people. That is the best place for information/questions.

It's easy to build only the base system by pulling the tip using git. It doesn't include any of the apps or even mcclim (the implementation of the clim windowing system). It does include a simple window system, but it doesn't have much in the way of widgets. mcclim and other systems can be loaded separately. The go in MBuild/home/.

The Lisp dialect is common lisp - seems to be a pretty full implementation I haven't noticed it missing anything.

I don't know the status of using the GPU for compute.

As mentioned by phoe - it's Lisp on bare metal - no linux or other OS underneath. So there's not much in the way of drivers. The code does run standalone on real hardware - I've booted it on a laptop and there is a document about how to build a dual boot system (a linux partition and a mezzano partition).

Phil

fittestbits avatar Jun 15 '19 00:06 fittestbits

Thanks,

I have been following the steps on the MBuild and it is building the virtualbox vmdk now. Lets see if it has any errors during the compile.

How do I build an ISO?

Outstep avatar Jun 15 '19 03:06 Outstep

Also, what is the purpose of the file-server?

make run-file-server

Outstep avatar Jun 15 '19 03:06 Outstep

So then, it seemed to build from the MBuild directory a VirtualBox image "mezzano.vmdk", but when I run it in VB, it boots and then just shows a blank black screen with no user interface at all.

Any ideas on how to fix this?

Phil, you mentioned " ..tip using git" and I pulled MBuild with "git clone --recursive ......" to grab all of the modules which it did and then installed the QuickLisp and the needed modules after which I started the file-server and ran the whole build.

Everything seemed to compile fine from what I could tell, but still no user interface after it boots.

Outstep avatar Jun 15 '19 03:06 Outstep

git clone --recursive ... is fine. I'm not that used to talking about how to use git.

The image that is created by the make is only a partial system. When it boots, it compiles and loads the rest of the system. It uses the file server that make run-file-server starts up to access the files. So, make run-file-server needs to be running while mezzano is booting.

To access this file server from mezzano, mezzano needs to know the IP address of the host system, which is why you need to put the IP address in Makefile. The first boot does take a while because of this compiling and loading.

When booting, mezzano prints a lot of information to a "console log". I configure the VirtualBox system to connect com1 to a log file, and run tail -f on the file to watch the log messages go by (Settings -> Serial Ports -> Port 1: check enable, select com1, mode Raw file, supply desired pathname). I don't know where the info goes if com1 is not connected.

If boot finishes, mezzano saves the image in mezzano.vmdk so the next boot just picks up from there - no compiling or loading. I think it still needs the file server running, but I'm not sure. Also, if you want to load any apps from MBuild/home, you'll need the file server running.

I don't know how to make an iso, but take a look at Mezzano/doc/Dualboot.md for some info about extracting a bootable image from mezzano.vmdk. It also contains some info about a boot loader. I wrote that doc about a year ago and haven't done much with it since so I don't remember the details off the top of my head.

fittestbits avatar Jun 15 '19 12:06 fittestbits

Thanks for explaining more of the process that you know about Mezzano.

AI just did a fresh build and have the file-server running. Then started up the VB instance of Mezzano and waited.

After some time, I now see activity on the file-server console which seems to be sending data over to Mezzano which I suspect that it is loading components.

So then, if I understand what is now happening, the core MBuild sets up a skeleton core OS instance with just enough OS and Lisp to start contacting the file-server. The file-server then loads all required applications.

If this is true then, but adjusting what the file-server sends over, one can customize the applications that are loaded into Mezzano would be my guess.

Sound about right?

Outstep avatar Jun 15 '19 13:06 Outstep

Ok All,

I cannot tell if it is completely done, or not, since there is no real indication from the file-server as to if it has complete all of its uploads but I was able to see this UI show up at this point.

image

Outstep avatar Jun 15 '19 14:06 Outstep

Not sure what the "SYS.INT>" window is showing but it is progress none the less. Thanks

Outstep avatar Jun 15 '19 14:06 Outstep

Great progress! mezzano is up and running.

SYS.INT> is the "console" lisp listener (ie REPL). SYS.INT is the current package for the reader. I don't know how to get rid of it - I haven't tried.

Actually, mezzano pulls from the file server rather than the file server pushing code. Take a look at MBuild/Mezzano/ipl.lisp - that's the file that loads everything on startup. I'm don't know if there are other files that load things as well. If you modify ipl.lisp, you can remove lines like: (sys.int::cal "sys:source;applications;peek.lisp") which will get rid of the peek app. Or you can add things. Of course, you can always load things from the REPL and then run (mezzano.supervisor:snapshot) to save the image.

If you run "make cold-image-vmdk" again, you'll get an new minimum image that will reload everything again. But it won't recompile everything, so loading will go much faster. "make clean" deletes all of the "object" files, so everything will be recompiled. Occasionally, there are changes from froggey that require a "make clean", but quite often only "make cold-image-vmdk" is enough.

I'm not sure if all of the subsystems in froggey's version of MBuild/home are loaded. I know that I have a number of subsystems in my version of MBuild/home that are not included in the standard load, and have not added them to ipl.lisp. So if I want them I have to load them by hand.

The environment I use for development is mezzano on VirtualBox and emacs/slime on my linux host. It seems to work really well.

fittestbits avatar Jun 15 '19 15:06 fittestbits

I see that if the file-server is running then the "Filer" application calls it to serve available files.

What about looking at any type of local directory?

I'm coming from the Linux world (Ubuntu 18.04) and am trying to get a feel for what local commands are available to view things like local file system, etc..

Is there a list of commands available that you might use in the "Lisp REPL" console?

By the way, I wanted to thank you for all of the help that I have been receiving.

I am very excited about Mezzano and possibly using it for my project.

Outstep avatar Jun 15 '19 19:06 Outstep

The REPL will take any legal lisp form - which doesn't really answer your question.

In filer, at the top, you see two file systems: "LOCAL" and "REMOTE". remote is the file-server. Local is a local file system - which is just in the current virtual memory. So, unless you save it using the snapshot command when you reboot, the files will be gone. Also, if you rebuild the system the files will be lost.

There is code to support various fat file systems. I don't know the exact status of that code. I think you can add a partition to the virtual machine and make it be a fat file system (say fat32). I don't know what all you can do in terms of formatting, creating directories and reading and writing files. I'm pretty sure you can read and write files, but I don't know about creating directories or formatting. There's also code for ext4, but I think it's less complete than the code for fat.

I've generally been creating/editing files on the host side and then loading them via file-server. My interest is to get to the point where we can do standalone development on bare metal rather than on a virtual machine.

I started working on a "name-service" app that would support multiple disks/partitions and assigning host names to them. This would help with support of local file systems. I put together a document describing how local file systems would work and be "mounted" on boot. But, I was not happy with where I got with it. So I stopped working on it, but I'm still interested in it.

Lately I've been working on a USB driver so that I can use an external mouse. I've made some progress on it, but USB is pretty complicated. The architecture is basically a HW abstraction layer, a USB driver layer, and the a driver for each type of device (eg mouse, keyboard, mass storage, etc).

If my goal was to develop an app on top of mezzano, I would do the development on the virtual machine, then create an image that can be booted standalone on bare metal.

It would be good to move this conversation to #mezzano on irc.freenode.net so that other people will respond. For example, ebrasca did the fat and ext4 code, so he can respond about the status of that code and froggey can respond about other general questions. Don't know why they haven't responded here.

fittestbits avatar Jun 15 '19 21:06 fittestbits

Don't know why they haven't responded here.

I can't speak for them but I'm assuming they have finite resources.

This thread was created about 24 hours ago and responding substantially would take some investment, and you have been doing that beautifully...

Just my 2¢ as an unaffiliated third-party.

Hexstream avatar Jun 15 '19 22:06 Hexstream

Thanks again and it seems that I am off to a good start in learning ab Mezzano.

I'll see how to access #mezzano on irc.freenode.net since I really have never used it.

Outstep avatar Jun 16 '19 00:06 Outstep

  1. There is no Linux beneath. The OS itself is Lisp.
  2. Doom and Quake were compiled down to LLVM-IR which was then compiled into Common Lisp.

Hi, I have one question similar to @Outstep's Since Mezzano is running on bare metal, I wonder whether there is an assembler ?

siriusdemon avatar Aug 21 '20 03:08 siriusdemon