diff mbox

[2/2] Use grub-file to figure out whether multiboot2 should be used for Xen.gz

Message ID 1503945615-1720-3-git-send-email-konrad.wilk@oracle.com (mailing list archive)
State New, archived
Headers show

Commit Message

Konrad Rzeszutek Wilk Aug. 28, 2017, 6:40 p.m. UTC
The multiboot2 is much more preferable than multiboot. Especiall
if booting under EFI where multiboot does not have the functionality
to pass ImageHandler.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
v2: Rebase on top of  d33045ce7ffcb7c1e4a60c14d5ca64b36e3c5abe
---
 util/grub.d/20_linux_xen.in | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Daniel Kiper Aug. 29, 2017, 7:04 p.m. UTC | #1
On Mon, Aug 28, 2017 at 02:40:15PM -0400, Konrad Rzeszutek Wilk wrote:
> The multiboot2 is much more preferable than multiboot. Especiall
> if booting under EFI where multiboot does not have the functionality
> to pass ImageHandler.
>
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> v2: Rebase on top of  d33045ce7ffcb7c1e4a60c14d5ca64b36e3c5abe
> ---
>  util/grub.d/20_linux_xen.in | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
> index 083bcef..29e015b 100644
> --- a/util/grub.d/20_linux_xen.in
> +++ b/util/grub.d/20_linux_xen.in
> @@ -212,6 +212,10 @@ while [ "x${xen_list}" != "x" ] ; do
>      else
>  	xen_loader="multiboot"
>  	module_loader="module"

Could you put these two lines into else below?

> +	if ($grub_file --is-x86-multiboot2 $current_xen); then
> +		xen_loader="multiboot2"
> +		module_loader="module2"

Too much tabs. It should be one tab and four spaces.

Daniel
diff mbox

Patch

diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
index 083bcef..29e015b 100644
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
@@ -212,6 +212,10 @@  while [ "x${xen_list}" != "x" ] ; do
     else
 	xen_loader="multiboot"
 	module_loader="module"
+	if ($grub_file --is-x86-multiboot2 $current_xen); then
+		xen_loader="multiboot2"
+		module_loader="module2"
+	fi
     fi
     while [ "x$list" != "x" ] ; do
 	linux=`version_find_latest $list`