All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Serbinenko <phcoder@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: [DISCUSSION] Scripts and menus
Date: Sun, 14 Aug 2005 11:18:11 +0200	[thread overview]
Message-ID: <42FF0C53.1070601@gmail.com> (raw)

IMHO. Current system with title command is ugly because:
    -grub.cfg requires the separate parser. IMHO it should be
parsed the same way as user input.
    -Even when scripting support will be ready it's impossible
to create multiple menus of the same kind by just a loop
(like
    for x in /boot/vmlinuz-*;
       do
          menuitem name="linux-$x" title="Linux with kernel $x"
             linux $x [....]
          endmenuitem;
       done;
)
    - if in future menu entrys will have more parameters
    (e.g: name, keyboard shortcut) how could we specify them?

As arisen in discussion about serial console multiple menus could be
useful. I propose to split munu.c in general (e.g: run_entry) and
menu-specific (like run_menu) and then make multiple menu support like
done with terminals. Then we could add other menus: like lilo menu
(additional parameters could be stored in variable: then boot function
could also look at this variable for parameters (of course parameters from
unauthorized users will be ignored)), vesa menu
(and 3rd party programmers could write vesa menus then it would be like
skin support), x-menu over ssh/network, ...

IMHO grub2 needs scripting support to be more powerful I propose to
use bison translating commands in the structures like:
struct command
{
    enum type {SCRIPT_CMD_NORMAL, SCRIPT_CMD_IF, [...]}; /* type of
command*/
    enum link {SCRIPT_LINK_NORMAL, SCRIPT_LINK_AND, [...]}; /* Was there
a &&, ||, ... before command?*/
    union
    {
       char *command;
       struct command *if_jump; /* Bison could translate the condition
as preceding command*/
       [...]
    }  
};

then menu-entrys could be
menuentry name=<name> title=<title> [key-shortcut=<..>] [picture=<...>]
    <....>
endmenuentry

I'm ready to make the work of menu-splitting, lilo-menu and scripting

What do you think about it?

                                                                        
                  Vladimir



             reply	other threads:[~2005-08-14  9:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-14  9:18 Vladimir Serbinenko [this message]
2005-08-14 13:29 ` [DISCUSSION] Scripts and menus Douglas Wade Needham
2005-08-14 13:53   ` Vladimir Serbinenko
2005-08-14 15:12   ` Yoshinori K. Okuji
2005-08-14 22:54     ` Douglas Wade Needham
2005-08-14 23:09       ` Yoshinori K. Okuji
2005-08-15  7:27       ` [DISCUSSION] Grub2 Improvements marm.mm
2005-08-15  8:37         ` Yoshinori K. Okuji
2005-08-14 14:35 ` [DISCUSSION] Scripts and menus Yoshinori K. Okuji
2005-08-14 16:03   ` Vladimir Serbinenko
2005-08-14 18:01     ` Yoshinori K. Okuji
2005-08-14 18:30       ` Vladimir Serbinenko
2005-08-15 17:37         ` Marco Gerards
2005-08-24  9:36           ` [Patch] Scripting engine Vladimir Serbinenko
2005-08-28 12:55             ` Yoshinori K. Okuji
2005-08-28 14:11               ` Vladimir Serbinenko
2005-09-25 11:40               ` Vladimir Serbinenko
2005-08-31 19:22             ` Marco Gerards
2005-09-04 13:23               ` Vladimir Serbinenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42FF0C53.1070601@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.