From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: passing options to grub in xen,openfirmware and efi
Date: Wed, 29 Apr 2015 17:02:49 +0200 [thread overview]
Message-ID: <5540F299.4020304@gmail.com> (raw)
In-Reply-To: <CAA91j0XL3zt9PkyquuQ89oB-R1Hs+d=gKd3RQg6SC_iLQ-GBrQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2489 bytes --]
On 23.04.2015 11:35, Andrei Borzenkov wrote:
> On Thu, Apr 23, 2015 at 11:03 AM, Olaf Hering <olaf@aepfle.de> wrote:
>>
>> Is there a way to pass options to grub in a Xen PV domU, in openfirmware
>> and in EFI environment?
>>
>> In a PV domU arguments can be passed to the specified
>> kernel="/path/file" with the extra="what ever" option.
>> In openfirmware the arguments may come from the /boot/chosen node.
>> In EFI it may be possible as well, not my area of expertise.
>> In the wellknown dumb i386 BIOS no such way exist.
>>
>> In case grub has code to evalute these things, how can such arguements
>> be used within grub.cfg? Where is that documented?
>>
>
> I believe the question briefly came up already but without any
> followup. IIRC it was in relation to how to pass real kernel name to
> grub in Xen.
>
> For OFW grub will parse bootargs property, interpret it as series of
> variable assignments separated by ";" and set these variables. There
> is nothing similar for Xen or EFI cases currently. For EFI we could
> fetch arguments using Loaded Image Protocol (LoadOptions). Another
> option (in addition, not either/or) is to define GUID for grub and set
> them in NVRAM.
>
> What I do not like is the possibility to blindly set any internal
> variable (consider overriding of $prefix). I'd prefer to set variables
> in separate namespace, like grub.arg.XXX=YYY for XXX=YYY argument and
> let user figure out what to do with them.
I'm aware of the problem and I fully agree with you. Automatic install
doesn't use those and I think the reason for it was to specify root in
early days of porting. I don't think it's used for anything nowadays.
Also unless there is a good usecase for having command line parsing, I'm
all for killing existing ieee1275 parsing altogether and not introducing
any parsing in the future.
>
> As long as variables are defined you of course can do whatever you
> like with them, including referencing them in grub.cfg. How you can
> use them in grub.cfg is limited only by your imagination then :)
>
> I do not think it is documented anywhere mostly because feature does
> not really exist; I suppose OFW was added mostly as prerequisite for
> something else. git blame may answer it.
>
> And of course patches are welcome :)
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]
next prev parent reply other threads:[~2015-04-29 15:02 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-23 8:03 passing options to grub in xen,openfirmware and efi Olaf Hering
2015-04-23 9:35 ` Andrei Borzenkov
2015-04-23 9:43 ` Olaf Hering
2015-04-23 9:54 ` Andrei Borzenkov
2015-04-23 11:25 ` Olaf Hering
2015-04-23 11:40 ` Andrei Borzenkov
2015-04-23 12:17 ` Olaf Hering
2015-04-29 15:02 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2015-04-29 15:10 ` Olaf Hering
2015-04-29 15:21 ` Vladimir 'phcoder' Serbinenko
2015-04-29 15:35 ` Olaf Hering
2015-04-29 15:41 ` Vladimir 'phcoder' Serbinenko
2015-04-29 15:48 ` Olaf Hering
2015-04-29 16:22 ` Vladimir 'phcoder' Serbinenko
2015-04-29 16:28 ` Olaf Hering
2015-04-29 16:37 ` Vladimir 'phcoder' Serbinenko
2015-04-29 16:49 ` Olaf Hering
2015-05-07 14:45 ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-05-07 14:54 ` Olaf Hering
2015-05-07 14:59 ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-05-07 15:03 ` Andrei Borzenkov
2015-05-07 15:21 ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-05-08 10:09 ` Olaf Hering
2015-05-08 10:57 ` Vladimir 'phcoder' Serbinenko
2015-05-08 11:06 ` Andrei Borzenkov
2015-05-08 11:17 ` Olaf Hering
2015-05-08 11:15 ` Olaf Hering
2015-05-08 11:33 ` Andrei Borzenkov
2015-05-08 11:46 ` Olaf Hering
2015-05-08 12:57 ` Vladimir 'phcoder' Serbinenko
2015-05-11 9:36 ` Olaf Hering
2015-05-11 10:22 ` Andrei Borzenkov
2015-05-11 10:43 ` Olaf Hering
2015-05-11 10:46 ` Vladimir 'phcoder' Serbinenko
2015-05-11 11:04 ` Olaf Hering
2015-05-11 11:22 ` Vladimir 'phcoder' Serbinenko
2015-05-11 14:10 ` Olaf Hering
2015-05-08 10:44 ` Michael Chang
2015-04-23 17:05 ` Curt Brune
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=5540F299.4020304@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.