Skip to contentSkip to conversation

Roboot's BOF

DISCUSSION Eric Salomé 5 participants 7 messages May 26, 2006 – May 30, 2006

lore
Share & tools
lore
#0 lore raw

Roboot's birth of feather

Dear all,

I’d like to talk about some ideas that came to me a few months ago when I heard about Grub (legacy) and gave it a try on my PC (Linux + Windows).
I thought (like others) Grub needed some enhancements and I see most of them are already on their way with Grub 2.
Thoughts, ideas are like free software, they get better when shared, so let’s try this one :

Grub legacy’s lack of scripting feature, but also a need for modularity, expandability + a project I care for (and personal experience among other things), mix that and it gets :
why not try Grub + Forth to see how it goes ?

Let’s call it “Roboot”.

I’ve spend some free time doing a “thing that works for me” as a start. Technically, It turns out as a boot loader (using Grub’s stage1 – stage1.5) embedded with full ANSI Forth compiler/interpreter that calls Grub’s library routines to do keyboard/screen/disk input/output, etc. Calling Grub’s menu functions or any registered Grub C functions can be mixed in Forth scripts to get powerful scripting features. It computes 1 + 1 and it loads OS among other things.

Also works with underlying Linux OS on i386. And no, it doesn’t read/execute Fcode device drivers yet (if there is any sparc fan among us).

All of current Grub 2 development sources will be useful to next versions of “Roboot” if any, including :
- better memory management
- modularity in supported input/output devices
- support for dynamic loading of C routines (Roboot already have Forth modules dynamic loading)
- even scripting routines (though it won’t be used the same)

I still had some spare time to see how it goes. So that I have a running Grub 2 module, built on “BigForth” by Bernd Paysan, that adds a Forth engine to current version of Grub 2 development. It also runs on grub-emu under i386-pc.

I kind of believe that “Roboot” tries might be useful to current/next versions of Grub in some way. What’s your opinion ?

Best Regards,

Eric Salomé - Paris, France

#1 lore raw
Quoted 6 lines · Eric Salomé

Grub legacy's lack of scripting feature, but also a need for modularity, expandability + a project I care for (and personal experience among other things), mix that and it gets :
why not try Grub + Forth to see how it goes ?

Let's call it "Roboot".

Something very similar exists already. Its called OpenBIOS. See www.openbios.org for more details.

Stefan

Signature · 3 lines
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: [email protected]  • http://www.coresystems.de/
#2 lore raw

Hello!
Stefan, Eric, when I saw the earlier message, to which that you Stefan made your contribution I was about to bring to the list's, and of course Eric's attention your OpenBIOS project at www.openbios.org . Now seeing that you have done so, I am going to call it a coincidence. And also comment that like minds do think alike.

Yes, Eric, you should indeed in your spare time, do look at the items hosted on the OpenBIOS project pages, they make for an interesting application of the Forth language to the world of the BIOS and its methods. --
Gregg C Levine [email protected]
---
"Remember the Force will be with you. Always." Obi-Wan Kenobi

Quoted 31 lines

-----Original Message-----
From: [email protected] [mailto:grub- [email protected]] On Behalf Of Stefan Reinauer
Sent: Friday, May 26, 2006 11:57 AM
To: The development of GRUB 2
Subject: Re: Roboot's BOF

Quoted 6 lines · Eric Salomé

Grub legacy's lack of scripting feature, but also a need for modularity, expandability + a project I care for (and personal experience among other things), mix that and it gets :
why not try Grub + Forth to see how it goes ?

Let's call it "Roboot".

Something very similar exists already. Its called OpenBIOS. See www.openbios.org for more details.

Stefan

--
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.

      Tel.: +49 761 7668825 • Fax: +49 761 7664613

Email: [email protected] • http://www.coresystems.de/

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

#3 lore raw
In reply to Stefan Reinauer
Quoted 6 lines
Quoted 1 line

Let's call it "Roboot".

Something very similar exists already. Its called OpenBIOS. See www.openbios.org for more details.

Stefan

I've glanced over the Internet looking for OpenBIOS and other software. I've found an OpenBIOS version 1.1 that fullfills well its goals. (Can't open www.openbios.org on my PC :-( so I don't know what's new).

Using Forth at boot time isn't a fresh new idea, but I believe (as you do) it's a very good one.

As a start, I thought it might be interesting to have a Forth engine make use of the Grub 2's commands.
Let's say it can be thought of as a script helper for situations that won't be handled by the scripting language of Grub 2.

Well, it's done.

But there is more than that. In fact my belief is there is a life before booting OS, and a life after the OS gives up (on user’s request or when it can’t go on any more (windows’ blue screen)). A life full of many things to do:

-         boot an (other) OS
-         connect to the net to request for Roboot’s Web assistance
-         partition disks and other flavours
-         examine current configuration, diagnostic misfits
-         add a new OS in the PC 
-         advertise central server of boot events
-         look for email incoming and decide not to boot if there’s

nothing new
- have a calculator, play cards, etc.

You might be interested in ?

I don't know what Marco, Yoshinori and others would like to do for Grub 3 to X, so I just ask.

Even if it happens to be two different projects, I kind of believe one will gain from the other.

_________________________________________
Eric Salomé - Paris - France

#4 lore raw
Quoted 11 lines · Eric Salomé

But there is more than that. In fact my belief is there is a life before booting OS, and a life after the OS gives up (on user’s request or when it can’t go on any more (windows’ blue screen)). A life full of many things to do:

(quoted diff) +0 -7
-         boot an (other) OS
-         connect to the net to request for Roboot’s Web assistance
-         partition disks and other flavours
-         examine current configuration, diagnostic misfits
-         add a new OS in the PC 
-         advertise central server of boot events
-         look for email incoming and decide not to boot if there’s
Quoted 2 lines

nothing new
- have a calculator, play cards, etc.

Personally, I do not see how this will add anything to what GRUB 2 is capable of, or what we planned to change in GRUB. With the scripting support planned (and partially implemented), you can do most of these things. Some other more fancy things can be done by writing a module in C or whatever. Please tell me if I misunderstood your goals.

It would be easy to add a command to GRUB 2 that makes it possible to parse other languages. What you need is a new parser. You could create some new AST nodes or so and add all this to GRUB 2 from within your module. All this should integrate quite well. This way, you would be able to create new commands, functions, etc in another language.

Personally I prefer to see an add-in module, even one maintained outside of GRUB, than a complete fork. But you would have to keep in mind that we can make interface changes when we see the need for this.

Quoted 2 lines

I don't know what Marco, Yoshinori and others would like to do for Grub 3 to X, so I just ask.

First I would like to see GRUB 2 being finished. It is not there yet. :-)

--
Marco

#5 lore raw
Quoted 8 lines

It would be easy to add a command to GRUB 2 that makes it possible to parse other languages. What you need is a new parser. You could create some new AST nodes or so and add all this to GRUB 2 from within your module. All this should integrate quite well. This way, you would be able to create new commands, functions, etc in another language.

I give this "integrate work" a try and so far so good. Had found nothing that would have been *mandatory* to change in grub 2's kernel. If I find on the way some good ideas to share I'll express them on this mailing-list for comments.

Quoted 3 lines

Personally I prefer to see an add-in module, even one maintained outside of GRUB, than a complete fork. But you would have to keep in mind that we can make interface changes when we see the need for this.

That's what roboot aim to be, an add-in module.
I understand we will have to face some interface changes from time to time but I am ready for that too ... and that will make things even better.

Quoted 1 line
Quoted 1 line

I don't know what Marco, Yoshinori and others would like to do for

Grub

Quoted 8 lines
Quoted 1 line

3 to X, so I just ask.

First I would like to see GRUB 2 being finished. It is not there yet. :-)

--
Marco

Well, we are all working on that part too ! and I am full of hope we are going to make it.
I am quite confused with drivers dealing with BIOS, but I don't want to feel helpless, so I'll try to do something useful with grub-emu and let you know if I can work on grub's kernel (is there anything missing you'd like to add ?).
By the way, is there anybody working on having the vbe interface working on grub-emu ? Any hint to help me start work on it ?

Best regards,
_________________________________________
Eric Salomé - Paris - France

#6 lore raw
Quoted 2 lines · Eric Salomé

By the way, is there anybody working on having the vbe interface working on grub-emu ? Any hint to help me start work on it ?

Not that I know.

Write video driver for it. See video/ folder for more details and in wiki (when it comes back):
http://grub.enbug.org/VideoSubsystem

Video API is still being fine tuned, so try to keep in sync of it.