SqueakNOS is back!
Posted 16 May 2006 by geraAfter almost 5 years of official inactivity, SqueakNOS, apparently, has come back from its ashes. This article will try to describe what we are releasing today as a bootable ISO image, talk a little bit about how we got here and a little bit about what's coming next. And quite probably, about some other related things too.
Today, in SqueakNOS-16-May-2006.iso you'll find:
a bootable ISO image for PC computers (better playable with vmware). the .image and .chages files corresponding to that SqueakNOS. the C sources and everything you should need to rebuild it. During this 5 years SqueakNOS has seen some activity from people not originally related to it, and although we never forgot about this project, this activity was what finally helped us move forward. Thanks a lot to everybody who sent emails and kind words, and specially to those who got dirty into our ugly code and successfully tried to make it come back.
Lots of things happened in the world, and we thought we would take advantage of them. First, and most important, GRUB, and of course, vmware. Also the Squeak source tree is quite nicely arranged, and the community is much more organized with SqueakPeople, SqueakMap, Monticello, etc. Some of this things we already took advantage from, and some we still have to learn how they work.
GRUB
The original bootloader was a mutant born from LILO, linux boot loader and our fingers. It was really a mess, we changed it to overcome an image size limit it impossed, and modified it to initialize the video mode before jumping to the interpreter. Now, we are using GRUB (Legacy) instead of this mutant. We also had to modify GRUB Legacy, but it's a lot cleaner than our original code, and if GRUB Legacy was not dead, our code would make into the standard GRUB release. We'll work on using GRUB2, but there are some things that we need which are still missing (we'll probably implement them).
Why GRUB?
GRUB already did all this, except for a small detail.- we need the bootloader to jump into protected mode and map 4G of RAM
- we need the bootloader to load the .image from disk for us and put it in memory.
- we need the bootloader to set the right video mode for us.
- we need the bootloader to be able to handle a big bootable disk.
VMWare
We were using VMWare originally in 2001, but now it's more easy to use (VMPlayer is even free to use and quite small for what it does). We are testing everything with VMWare player on Linux, but we successfuly tried it on VMWare on windows and Virtual PC on Mac OSX. We also booted it natively on some boxes, with different results.
Squeak native sourcecode
We are so incredibly happy that we started it all again from scratch (no kidding). Already changing to a new bootloader was big enough a change to push us start from scratch. But also the rearrangement of the sourcecode in subversion was so nice that we wanted to join it. We tried not to touch anything in the Common sources, nor in the generated code. And we managed to do it! We created a new platform (SqueakNOS) next to unix, Max OS, RiscOS, Common and win32 in our local copy of the main trunk. To createa a new image we open Squeak and with VMMaker generate everything (only internal plugins are supported of course), and compile. This results in a SqueakNOS.obj which we move to a boot directory where we just "make SqueakNOS.iso". If you want to change the .image, you just move the new one to boot/iso.template, and that's it. As you can see, recompiling SqueakNOS and rebuilding an .iso must be really easy.
We'd love to get help here, specially in rearranging our source code so it looks more like other Squeak ports, and to check if the platform support is Ok as we implemented it (we know some things are not Ok).
Squeak community
Here we got lost. We asked around a few friends, and all recomended to start with a release and an article in SqueakPeople. Latter we'll update the swiki (this time in Squeak's main swiki, so it doesn't get lost), and upload the sources and other things somewhere, but we first need to understand what goes where. So all this'll take some time.
What's already here?
Not much yet, but already enough :-)
SqueakNOS is booting, GRUB gives us a nice 1024x768x32 color screen (this is hardcoded somewhere in the .c source code, so even if you change it with GRUB, SqueakNOS will think it's still that resolution). It already has all the primitives it has in its previous life, and some more. IRQs are handled correctly, and can be handled from Squeak (in fact, that's the only way to do it). When you boot the image you should see a quite standard Squeak (Squeak3.8-6665full), with some add ons. You can open this very same image from a real squeak, and wonder around. There you'll find the source for the SqueakNOSPlugin implementing the primitives, and the class Computer. Although the IRQs and hardware port access are working correctly, keyboard and mouse are not yet implemented (sorry). It'll take a bit more (unless you do it!). It shouldn't bee too complicated, and in fact, it could be ported from the older version quite easily (although we prefer to reimplement it, at least in part).
When you open SqueakNOS, you'll see lots of things, and you'll see also that if you press a key its scancode will show up in the Transcript. This is what we used to verify that IRQs and ioports are working.
This is pretty much it. We believe that everything needed to start playing inside Squeak is already done, and now everything missing should be done inside Squeak!
Near future
Of course, make it available in a more Squeakish form (SqueakMap? Monticello? Subversion? ???) Write a serie of small articles, or diary entries describing most of what we did to reimplement it. We did it all in small steps, so we think it'll be a nice serie of articles. Implement PCKeyboard and mouse first! Implement serial port support Implement some kind of file system support over serial ports (vmware lets you set up virtual serial ports, which can be used to connect the inner world to the outer world) Our final short term goal is to be able to develop SqueakNOS from within SqueakNOS. With sources, changes and everything. Although we think this could be contributed, we saddly think it'll be a lot easier for us to do it given that it involves going out and in of Squeak for every small test.
Mid term future
Add support for other hardware devices. Start trying with other hardware platforms (PowerPCs on Powerbooks/eBooks) Add networking capabilities (independently of the hardware support) Here's where we think the community can help a lot.
How to try it
If you have VMWare (player or other), get the ISO and boot it, it should just work. We included a VMWare configuration file in the package. It takes a while to load the image, after this you should see the video mode changing. If you are going to try it in a different "hardware", there's something you may need to change.
The video mode must be set using GRUB, and depending on the hardware, video memory's address may change.
To know what video mode you should set, enter GRUB's console (press Esc before GRUB starts), and then in GRUB use 'c' to get a console. The command vbeprobe will list all available video modes. Find one saying 1024x768x32, take note of the mode number (left) and the video address (right). In vmware they should be 0x141 and 0xf0000000 respectively. Exit GRUB's command shell and edit ('e') the entry saying (Squeak.image+Graphics mode), in the first line change the video address, and in the line starting with setvbe change the video mode. That should be all you need.
No promesses are done here, please, as usual, don't believe anything we say...
The New Announcements List, posted 17 May 2006 by KenCausey
Just in case you aren't aware of it yet we now have an Announcements List to which you may want to send a summary of this information. This is still a new list and not yet subscribed to by much of the community so in general also Cc the squeak-dev list.Also, of course, Welcome Back!
Ken
Damned cool!, posted 18 May 2006 by mikevdg
It just worked! I downloaded the VMWare "Player" for Linux, had to set LD_LIBRARY_PATH (Ubuntu on AMD64 is broken like that...) and next thing I know, I'm looking at Squeak in 1024x768 glory! I haven't managed to play with it properly yet.It won't boot using bochs though - bochs gets stuck on some math co-processor exception.
Fantastic work, otherwise! I'm certainly impressed.
Hurray!, posted 19 May 2006 by cdegroot
Subject says all :-)QEMU, posted 19 May 2006 by Jecel
I got SqueakNOS to run on Qemu with the -std-vga option (the default Cirrus Logic video emulation doesn't have 32 bit modes). The vbeprobe program from Grub didn't return any results do I had to look at the Qemu sources, but as it only includes binaries for its BIOSes I had to then look through the vgabios sources.The base address is 0xe0000000 and the video mode (called VBE_OWN_1024X768X8888 in the sources) is 0x144. Changing these as described above did the trick.
This is the command I used (I keep my Qemu disk images in /opt):
qemu -std-vga -cdrom /opt/SqueakNOS.iso -boot d
Congrats!, posted 25 May 2006 by rca
I'm a long time admirer of SqueakNOS, and am very happy that you have released a new and better version! I attempted several times to compile the old version but I found it too difficult to get the environment right :(I have got the new SqueakNOS to run on Qemu on Mac OS X using Jecel's instructions and on VMWare on XP.
I don't know what resources Gerardo and the other SqueakNOS devs want or need (it might be better to keep everything within the scope of minnow and squeaksource.com), but I can offer an account on a server I have available to host a seaside site, squeaksource Monticello repository, wiki etc if that is wanted.
Anyway, as Mike says above SqueakNOS is damned cool. Thanks for restarting it.
More new, posted 28 May 2006 by gera
take a look at my diary entries to see how SqueakNOS moves. I have just made a new release with Keyboard, Mouse and Serial port support.I hope to be posting something longer to explain how to use remoting on top of the Serial port to access files et. al.
I know making binary releases of 14MB is not kind, and we are working on mounting a Monticello server.
Any ideas regarding distribution of new releases and changes, or anything else are highly wellcome.
Feedback, posted 29 May 2006 by rca
The new release works fine on VMWare on XP (although the cursor doesn't clean up after itself properly).The settings for the QEMU option in GRUB aren't right - they are still the old VMWare settings. (Also, can I request a little bit more of a delay before the default setting is booted? It's too easy to miss the opportunity to enter the GRUB menu).
After fixing the QEMU settings, boot went OK but Squeak dropped straight away into an emergency debugger with a problem in OldKeyboard>>SimpleTranslation (i'm guessing it is receiving a keypress it doesn't know what to do with).
I personally don't mind a 14MB release size; it's only a short download for me.
May I suggest that you open a blog or something to announce releases on and get feedback? Or move it all to minnow? The problem with SqueakPeople is that you have to log on and be certified to reply; which places a barrier to people responding.
Thanks for feedback!, posted 29 May 2006 by gera
The GRUB menu is fixed now (I have not released it yet), sorry about that, 100% my fault.I've seen the bug with the keyboard a couple of times, but always when doing weird tests, I will try to fix it or at least catch the Error, I'll see to install QEMU too. I thought on making a generic error catching on IRQs, but I'm afraid that if the error is recurring the screen may feel up with error messages or something like that. I'm not really sure what's better :-( Although in the case of keyboard it's obvious that something must be done.
I am mantaining a diary where I report what I'm doing, and I have also updated the page on minnow and mantaining it updated, take a look, and if you think we need more, let me know.
Thanks a lot for all the feedback!
[ Home | Articles | Login/Account | People | Projects ]