All the mail mirrored from 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 06/19] ts-host-install: Support UEFI PXE boot using grub.efi
Date: Thu, 18 Jun 2015 17:24:57 +0100	[thread overview]
Message-ID: <1434644710-28881-6-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1434644687.28264.53.camel@citrix.com>

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 Osstest/TestSupport.pm | 37 ++++++++++++++++++++++++++++++++++++-
 README                 |  1 +
 2 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 622f44d..1164a11 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -898,7 +898,7 @@ sub selecthost ($) {
     $ho->{Tftp} = { };
     $ho->{Tftp}{$_} = $c{"Tftp${_}_${tftpscope}"} || $c{"Tftp${_}"}
         foreach qw(Path TmpDir PxeDir PxeGroup PxeTemplates PxeTemplatesReal
-                   DiBase);
+                   DiBase GrubBase);
 
     #----- finalise -----
 
@@ -2138,6 +2138,41 @@ END
 sub setup_uboot_pxeboot ($$$$$;%) { return &setup_bios_pxeboot; }
 sub setup_uboot_pxeboot_local ($) { return &setup_bios_pxeboot_local; }
 
+sub setup_grub_efi_bootcfg ($$) {
+    my ($ho, $bootfile) = @_;
+    my $f = "grub.cfg-$ho->{Ether}";
+    my $grub= $ho->{Tftp}{Path}.'/'.$ho->{Tftp}{GrubBase}.'/'.$c{TftpGrubVersion}.
+	"/pxegrub-$r{arch}.efi";
+    my $pxe=$ho->{Tftp}{Path}.'/'.$ho->{Name}.'/pxe.img';
+
+    logm("Copy $grub => $pxe");
+    copy($grub, $pxe) or die "Copy $grub to $pxe failed: $!";
+
+    logm("grub_efi bootcfg into $f");
+    file_link_contents("$ho->{Tftp}{Path}$ho->{Tftp}{TmpDir}$f", $bootfile,
+		       "$ho->{Name}-pxegrub.cfg");
+}
+
+# UEFI systems PXE boot using grub.efi
+sub setup_uefi_pxeboot ($$$$$;%) {
+    my ($ho,$kern,$initrd,$dicmd,$hocmd,%xopts) = @_;
+    setup_grub_efi_bootcfg($ho, <<END);
+set default=0
+set timeout=5
+menuentry 'overwrite' {
+  linux $kern $dicmd -- $hocmd
+  initrd $initrd
+}
+END
+}
+
+sub setup_uefi_pxeboot_local ($) {
+    my ($ho) = @_;
+    setup_grub_efi_bootcfg($ho, <<END);
+echo Should do a local boot here, somehow
+END
+}
+
 sub setup_pxeboot_local ($) {
     my ($ho) = @_;
     my $firmware = get_host_property($ho, "firmware", "bios");
diff --git a/README b/README
index 503d15d..1351f49 100644
--- a/README
+++ b/README
@@ -455,6 +455,7 @@ TftpFoo_<scope> and TftpFoo
 
         DiBase        The path under `Path' to the root of the debian installer
                       images.
+        GrubBase      The path under `Path' to the root of the grub EFI PXE images.
 
     For hosts in scope "default", TftpFoo_default (if set) takes
     precedence over TftpFoo.  TftpFoo is used when the setting Foo is
-- 
2.1.4

  parent reply	other threads:[~2015-06-18 16:24 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 ` Ian Campbell [this message]
2015-06-18 17:51   ` [PATCH OSSTEST v2 06/19] ts-host-install: Support UEFI PXE boot using grub.efi 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 ` [PATCH OSSTEST v2 15/19] Debian: grub2: Use GRUB_CMDLINE_LINUX_XEN_REPLACE(_DEFAULT) Ian Campbell
2015-06-18 18:02   ` 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-6-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.