All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com
Cc: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xen.org
Subject: [PATCH OSSTEST v2 15/19] Debian: grub2: Use GRUB_CMDLINE_LINUX_XEN_REPLACE(_DEFAULT)
Date: Thu, 18 Jun 2015 17:25:06 +0100	[thread overview]
Message-ID: <1434644710-28881-15-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1434644687.28264.53.camel@citrix.com>

This overrides GRUB_CMDLINE_LINUX(_DEFAULT) which we were previously
editing but only for the Xen entries, meaning that we don't switch to
console=hvc0 for the native cases (i.e. don't break them).

We do however want to edit GRUB_CMDLINE_LINUX(_DEFAULT) to remove
"quiet" if present, since it is useful to people, especially those
using standalone mode as a provisioning tool, wanting to e.g.  compare
a boot under Xen with the native case.

This has been supported since Wheezy but in any case we supply our own
20_linux_xen grub generator based on Wheezy which supports this.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 Osstest/Debian.pm | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index d2a7be9..31aa1e6 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -507,7 +507,7 @@ sub setupboot_grub2 ($$$$) {
                     $v =~ s/^\s*([\'\"])(.*)\1\s*$/$2/;
                     $k{$k}= $v;
                 }
-                next if m/^GRUB_CMDLINE_(?:XEN|LINUX).*\=|^GRUB_DEFAULT.*\=/;
+                next if m/^GRUB_CMDLINE_(?:XEN|LINUX(?:_XEN_REPLACE)?(?:_DEFAULT)?).*\=|^GRUB_DEFAULT.*\=/;
                 print ::EO;
             }
             print ::EO <<END or die $!;
@@ -521,11 +521,20 @@ GRUB_CMDLINE_XEN="$xenhopt"
 END
             foreach my $k (qw(GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT)) {
                 my $v= $k{$k};
+
+                # Tailor native case
                 $v =~ s/\bquiet\b//;
+                print ::EO "$k=\"$v\"\n" or die $!;
+
+                # Xen overrides
                 $v =~ s/\b(?:console|xencons)=[0-9A-Za-z,]+//;
                 $v .= " $xenkopt" if $k eq 'GRUB_CMDLINE_LINUX';
-                print ::EO "$k=\"$v\"\n" or die $!;
-            }
+                # Ensure variable isn't zero length, or 20_linux_xen will ignore it.
+                $v .= " ";
+                my $rk = $k;
+                $rk =~ s/LINUX/LINUX_XEN_REPLACE/;
+                print ::EO "$rk=\"$v\"\n" or die $!;
+	    }
         });
     };
 
-- 
2.1.4

  parent reply	other threads:[~2015-06-18 16:25 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-18 16:24 [PATCH OSSTEST v2 00/19] Initial support for ARM64 Ian Campbell
2015-06-18 16:24 ` [PATCH OSSTEST v2 01/19] Introduce mg-pxe-loader-update Ian Campbell
2015-06-18 17:42   ` Ian Jackson
2015-06-19 10:44     ` Ian Campbell
2015-06-18 16:24 ` [PATCH OSSTEST v2 02/19] Debian: Preseed a EFI system partition during host install Ian Campbell
2015-06-18 17:44   ` Ian Jackson
2015-06-18 16:24 ` [PATCH OSSTEST v2 03/19] ts-host-install: Split initrd out of @installcmdline Ian Campbell
2015-06-18 17:53   ` Ian Jackson
2015-06-18 16:24 ` [PATCH OSSTEST v2 04/19] ts-host-install: split the "di" from the "host" command line Ian Campbell
2015-06-18 17:53   ` Ian Jackson
2015-06-18 16:24 ` [PATCH OSSTEST v2 05/19] Refactor pxelinux configuration Ian Campbell
2015-06-18 17:49   ` Ian Jackson
2015-06-19  9:53     ` Ian Campbell
2015-06-19 10:45       ` Ian Jackson
2015-06-19 10:55         ` Ian Campbell
2015-06-18 16:24 ` [PATCH OSSTEST v2 06/19] ts-host-install: Support UEFI PXE boot using grub.efi Ian Campbell
2015-06-18 17:51   ` Ian Jackson
2015-06-18 16:24 ` [PATCH OSSTEST v2 07/19] Enable chain loading to local disk for UEFI PXE systems Ian Campbell
2015-06-18 17:52   ` Ian Jackson
2015-06-19  9:57     ` Ian Campbell
2015-06-18 16:24 ` [PATCH OSSTEST v2 08/19] Add arm64 build and test jobs Ian Campbell
2015-06-18 17:54   ` Ian Jackson
2015-06-18 16:25 ` [PATCH OSSTEST v2 09/19] ts-kernel-build: Additional kernel options for Mustang Ian Campbell
2015-06-18 17:55   ` Ian Jackson
2015-06-19 10:04     ` Ian Campbell
2015-06-18 16:25 ` [PATCH OSSTEST v2 10/19] ts-host-install: Set dtbs in the non-special kernel case too Ian Campbell
2015-06-18 17:56   ` Ian Jackson
2015-06-19 10:07     ` Ian Campbell
2015-06-19 10:46       ` Ian Jackson
2015-06-18 16:25 ` [PATCH OSSTEST v2 11/19] Debian: Fixup UEFI boot order during install Ian Campbell
2015-06-18 17:57   ` Ian Jackson
2015-06-19 10:22     ` Ian Campbell
2015-06-19 11:02       ` Ian Jackson
2015-06-19 11:15         ` Ian Campbell
2015-06-18 16:25 ` [PATCH OSSTEST v2 12/19] ts-kernel-build: Support --reuse to keep same build tree Ian Campbell
2015-06-18 17:58   ` Ian Jackson
2015-06-19  9:40     ` Ian Campbell
2015-06-18 16:25 ` [PATCH OSSTEST v2 13/19] standalone: Prefer ./standalone.config to $HOME/.xen-osstest/config Ian Campbell
2015-06-18 17:59   ` Ian Jackson
2015-06-19 10:22     ` Ian Campbell
2015-06-19 10:24       ` Ian Campbell
2015-06-19 11:04         ` Ian Jackson
2015-06-19 11:08           ` Ian Campbell
2015-06-18 16:25 ` [PATCH OSSTEST v2 14/19] Debian: grub2: Log full line range of menuentry and submenu entries Ian Campbell
2015-06-18 18:00   ` Ian Jackson
2015-06-18 16:25 ` Ian Campbell [this message]
2015-06-18 18:02   ` [PATCH OSSTEST v2 15/19] Debian: grub2: Use GRUB_CMDLINE_LINUX_XEN_REPLACE(_DEFAULT) Ian Jackson
2015-06-18 16:25 ` [PATCH OSSTEST v2 16/19] Collect xen.efi into xendist and install in appropriate place Ian Campbell
2015-06-18 18:04   ` Ian Jackson
2015-06-18 16:25 ` [PATCH OSSTEST v2 17/19] Debian: Ignore xen-syms entries in grub.cfg Ian Campbell
2015-06-18 18:04   ` Ian Jackson
2015-06-19  9:44     ` Ian Campbell
2015-06-18 16:25 ` [PATCH OSSTEST v2 18/19] Debian: Collect kernel command line from grub.cfg Ian Campbell
2015-06-18 18:05   ` Ian Jackson
2015-06-18 16:25 ` [PATCH OSSTEST v2 19/19] Debian: Arrange to be able to chainload a xen.efi from grub2 Ian Campbell
2015-06-18 18:11   ` Ian Jackson

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=1434644710-28881-15-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xen.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.