[meta-intel] [PATCH RFC] systemd-boot_%.bbappend: Add stub command line modifications patch

Wold, Saul saul.wold at intel.com
Mon Jun 19 08:11:31 PDT 2017


On Mon, 2017-06-19 at 13:19 +0200, Patrick Ohly wrote:
> On Wed, 2017-06-14 at 18:47 -0700, California Sullivan wrote:
> > 
> > Allows you to modify the command line when called from EFI shell
> > instead of the entire command line getting replaced.
> > 
> > Signed-off-by: California Sullivan <california.l.sullivan at intel.com
> > >
> > ---
> > I liked this idea so I gave it a shot. Let me know what you think.
> > Commit message is a WIP. Its getting late but I'd like some
> > feedback.
> > 
> >  ...ub-allow-smarter-command-line-modificatio.patch | 132
> > +++++++++++++++++++++
> >  .../systemd-boot/systemd-boot_%.bbappend           |   1 +
> >  2 files changed, 133 insertions(+)
> >  create mode 100644 common/recipes-bsp/systemd-boot/systemd-
> > boot/0001-boot-efi-stub-allow-smarter-command-line-
> > modificatio.patch
> > 
> > diff --git a/common/recipes-bsp/systemd-boot/systemd-boot/0001-
> > boot-efi-stub-allow-smarter-command-line-modificatio.patch
> > b/common/recipes-bsp/systemd-boot/systemd-boot/0001-boot-efi-stub-
> > allow-smarter-command-line-modificatio.patch
> > new file mode 100644
> > index 0000000..9cc92c9
> > --- /dev/null
> > +++ b/common/recipes-bsp/systemd-boot/systemd-boot/0001-boot-efi-
> > stub-allow-smarter-command-line-modificatio.patch
> > @@ -0,0 +1,132 @@
> > +From 47a4ce351911625f227b8b29d9c307d5c32fd32f Mon Sep 17 00:00:00
> > 2001
> > +From: California Sullivan <california.l.sullivan at intel.com>
> > +Date: Wed, 14 Jun 2017 17:33:30 -0700
> > +Subject: [PATCH] boot: efi: stub: allow smarter command line
> > modifications
> > +
> > +Currently, the command line is replaced with anything that ends up
> > in
> > +LoadOptions. LoadOptions gets populated by the firmware, and EFI
> > shell
> > +command line information when running a binary. This includes the
> > name
> > +of the binary itself, so it will usually break booting from the
> > EFI
> > +shell.
> > +
> > +Instead, have LoadOptions modify the command line in the following
> > way:
> > +
> > +bootx64 root=/dev/sda -> prepend the command line (default)
> > +bootx64 ^console=/dev/tty0 -> prepend the command line (explicit)
> > +bootx64 $console=/dev/tty0 -> append the command line
> > +bootx64 !console=/dev/tty0 root=/dev/sda -> replace the command
> > line
> > +
> > +The '^', '$' and '!' characters act as sentinel values, telling
> > the EFI
> > +stub how to handle LoadOptions values, as well as indicating where
> > +command line modifications in LoadOptions should begin.
> > +
> > +Note that with the default case, bootx64 will end up in the kernel
> > +command line, as we use the sentinel values to decide where to
> > begin the
> > +command line modifications.
> 
> As I was the one who proposed the syntax above, I should refrain from
> commenting on it ;-} Someone else should say "yay" or "nay".
> 
I generally agree with this syntax it's succinct and models RE syntax

> Regarding the code, I think this is something that should be
> submitted
> upstream once we agree that we want this. The code review and perhaps
> even merging can happen upstream.
> 
Agreed, it would be nice for upstream also, but should not block the
implementation and usage here in meta-intel (or maybe in OE).  I guess
that's another discussion point.

Sau!
> -- 
> Best Regards, Patrick Ohly
> 
> The content of this message is my personal opinion only and although
> I am an employee of Intel, the statements I make here in no way
> represent Intel's position on the issue, nor am I authorized to speak
> on behalf of Intel on this matter.
> 
> 
> 


More information about the meta-intel mailing list