All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH OSSTEST v3 01/22] mg-*: Add mgi-common with fetch and fail helpers
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-24 15:59   ` Ian Jackson
  2015-06-24 15:32 ` [PATCH OSSTEST v3 02/22] mg-*: Make package fetching common in new mgi-debian Ian Campbell
                   ` (20 subsequent siblings)
  21 siblings, 1 reply; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

Taken from both mg-cpu-microcode-update and mg-debian-installer-update

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
v3: New patch
---
 mg-cpu-microcode-update    |  3 ++-
 mg-debian-installer-update |  8 +-------
 mgi-common                 | 26 ++++++++++++++++++++++++++
 3 files changed, 29 insertions(+), 8 deletions(-)
 create mode 100644 mgi-common

diff --git a/mg-cpu-microcode-update b/mg-cpu-microcode-update
index 759f676..c375a43 100755
--- a/mg-cpu-microcode-update
+++ b/mg-cpu-microcode-update
@@ -3,6 +3,7 @@
 set -e
 
 . cri-getconfig
+. mgi-common
 
 # iucode_tool is in /usr/sbin, see #788459.
 export PATH="/usr/local/sbin:$PATH:/sbin:/usr/sbin"
@@ -41,7 +42,7 @@ INTEL_TGZ='http://downloadmirror.intel.com/24661/eng/microcode-20150121.tgz'
 mkdir intel-ucode
 
 echo >&2 "Fetching Intel ucode"
-curl -s $INTEL_TGZ > intel-ucode/microcode.tgz
+fetch $INTEL_TGZ > intel-ucode/microcode.tgz
 
 tar -C intel-ucode -xaf intel-ucode/microcode.tgz microcode.dat
 
diff --git a/mg-debian-installer-update b/mg-debian-installer-update
index ba2fdc4..770022c 100755
--- a/mg-debian-installer-update
+++ b/mg-debian-installer-update
@@ -22,21 +22,15 @@
 set -e
 
 . cri-getconfig
+. mgi-common
 
 suite=$1
 arch=$2
 packages="$3"
 
-fail () { echo >&2 "$0: $1"; exit 1; }
-
 site=http://ftp.debian.org/debian/
 sbase=$site/dists/$suite
 
-fetch () {
-	# no-cache due to intercepting proxies messing things up.
-	curl -s -H 'Pragma: no-cache' $1
-}
-
 case ${suite}_${arch} in
     lenny_armhf|squeeze_armhf|lenny_arm64|squeeze_arm64|wheezy_arm64)
         # No such thing.
diff --git a/mgi-common b/mgi-common
new file mode 100644
index 0000000..de86e8d
--- /dev/null
+++ b/mgi-common
@@ -0,0 +1,26 @@
+# -*- bash -*-
+
+# Helpers for mg-*
+#
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2015 Citrix Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+fail () { echo >&2 "$0: $1"; exit 1; }
+
+fetch () {
+	# no-cache due to intercepting proxies messing things up.
+	curl -s -H 'Pragma: no-cache' $1
+}
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 02/22] mg-*: Make package fetching common in new mgi-debian
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
  2015-06-24 15:32 ` [PATCH OSSTEST v3 01/22] mg-*: Add mgi-common with fetch and fail helpers Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-24 16:00   ` Ian Jackson
  2015-06-24 15:32 ` [PATCH OSSTEST v3 03/22] Introduce mg-pxe-loader-update Ian Campbell
                   ` (19 subsequent siblings)
  21 siblings, 1 reply; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

This pattern appears several times in mg-debian-installer-update and
I'm about to add another script which uses it.

The centralised version always does "sort -n -r | head -n" to pick out
only the newest version, which only some of the open coded sites did.

Likewise the centralised version checks that $pkgfile is non-empty,
unlike some of the open coded sites.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
v3: New patch
---
 mg-debian-installer-update | 34 +++++++++-------------------------
 mgi-debian                 | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 25 deletions(-)
 create mode 100644 mgi-debian

diff --git a/mg-debian-installer-update b/mg-debian-installer-update
index 770022c..dcbe568 100755
--- a/mg-debian-installer-update
+++ b/mg-debian-installer-update
@@ -23,6 +23,7 @@ set -e
 
 . cri-getconfig
 . mgi-common
+. mgi-debian
 
 suite=$1
 arch=$2
@@ -59,8 +60,6 @@ case ${suite}_${arch} in
         ;;
 esac
 
-pfile=$sbase/non-free/binary-$arch/Packages.gz
-
 dstroot=`getconfig TftpPath`/`getconfig TftpDiBase`/
 date=`date +%Y-%m-%d`-$suite
 dst=$arch/$date
@@ -85,16 +84,13 @@ if [ "x$dtbs" != "x" ] ; then
     gzip -9nf dtbs.tar
 fi
 
+pfile=$sbase/non-free/binary-$arch/Packages.gz
+
 fetch $pfile >Packages.gz
 
 for p in $packages; do
-        set +e
         echo >&2 "collecting $p"
-        pkgfile=`zcat Packages.gz | grep-dctrl -PX $p -nsFilename`
-        rc=$?
-        set -e
-        if [ $rc != 0 ]; then fail "package $p not found"; fi
-        fetch "$site/$pkgfile" >$p.deb
+        fetch_package "$site" Packages.gz -PX $p >$p.deb
         rm -rf x
         dpkg-deb -x $p.deb x
         cd x; pax -x sv4cpio -s '%lib%/lib%' -w -M norm lib >../cpio; cd ..
@@ -117,30 +113,18 @@ if [ x$bpok != x ]; then
 
     if [ x$need_initramfs = xy ]; then
         # Newer kernel often needs a newer initramfs-tools. Make that
-        # available
+        # is available
         echo >&2 "collecting backports initramfs-tools"
-        pkgfile=`zcat Packages.gz \
-                 | grep-dctrl -PX initramfs-tools -nsFilename \
-                 | sort -n -r | head -n1`
-        rc=$?
-        set -e
-        if [ $rc -ne 0 ] || [ x$pkgfile = x ]; then
-	    fail "initramfs-tools package not found";
-	fi
-        fetch "$site/$pkgfile" >initramfs-tools.deb
+        fetch_package $site Packages.gz -PX initramfs-tools \
+                      >initramfs-tools.deb
     fi
 
     set +e
     echo >&2 "collecting backports kernel"
     # Be careful to pickup the actual kernel package from the 'linux'
     # source and not a meta package from 'linux-latest'
-    pkgfile=`zcat Packages.gz | grep-dctrl -S linux \
-             | grep-dctrl -Pe ^linux-image-.*-${bpok}$ -nsFilename \
-             | sort -n -r | head -n1`
-    rc=$?
-    set -e
-    if [ $rc != 0 ]; then fail "backports kernel package not found"; fi
-    fetch "$site/$pkgfile" >backports.deb
+    fetch_package $site Packages.gz -Pe ^linux-image-.*-${bpok}$ \
+                  >backports.deb
     dpkg-deb -x backports.deb x
     cp x/boot/vmlinuz-* linux.backports
     # The full set of modules is pretty large and not that
diff --git a/mgi-debian b/mgi-debian
new file mode 100644
index 0000000..3b2d2c5
--- /dev/null
+++ b/mgi-debian
@@ -0,0 +1,38 @@
+# -*- bash -*-
+
+# Helpers for mg-* dealing with Debian.
+#
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2015 Citrix Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Arguments: <Base URL> <Packages.gz> <grep-dctrl arguments>
+#
+# nb: -nsFilename argument to grep-dctrl is supplied here
+fetch_package () {
+    local site=$1 ; shift 1
+    local pgz=$1 ; shift 1
+
+    set +e
+    pkgfile=`zcat $pgz | grep-dctrl $@ -nsFilename | sort -n -r | head -n1`
+    rc=$?
+    set -e
+
+    if [ $rc -ne 0 ] || [ x$pkgfile = x ]; then
+	fail "package matching $@ not found";
+    fi
+
+    fetch "$site/$pkgfile"
+}
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 03/22] Introduce mg-pxe-loader-update
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
  2015-06-24 15:32 ` [PATCH OSSTEST v3 01/22] mg-*: Add mgi-common with fetch and fail helpers Ian Campbell
  2015-06-24 15:32 ` [PATCH OSSTEST v3 02/22] mg-*: Make package fetching common in new mgi-debian Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-24 16:02   ` Ian Jackson
  2015-06-24 15:32 ` [PATCH OSSTEST v3 04/22] Debian: Preseed a EFI system partition during host install Ian Campbell
                   ` (18 subsequent siblings)
  21 siblings, 1 reply; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

The story for PXE booting via UEFI (at least on arm64) is not so
straightforward as with pxelinux on x86. There seems to no good
bootloader to launch via UEFI+pxe, in fact all I could find was grub
(syslinux, and by extension pxelinux.efi, is x86 only).

Add mg-pxe-loader-update modelled on mg-debian-installer-update which
will download the necessary grub binaries and produce a grub image
which can be used to pxe boot.

grub lacks the convenient ability to search for config file based on
(substrings of) the MAC or IP address. So we arrange for the grub.cfg
in TftpGrubBase to chain load another config file from
TftpTmpDir/'$net_default_mac' where $net_default_mac is a grub
variable which is substituted at boot time.

Actually using this requires that bootp/dhcp provide a next-file so
UEFI knows what to boot (usually this would be pxelinux.0 which we
can't use here). Locally we have configured this as $name/pxe.img, so
we can use different loaders.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
v3: Use mgi-common and mgi-debian
---
 Osstest.pm           |  3 ++
 README               |  4 ++-
 mg-pxe-loader-update | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 production-config    |  5 ++++
 4 files changed, 96 insertions(+), 1 deletion(-)
 create mode 100755 mg-pxe-loader-update

diff --git a/Osstest.pm b/Osstest.pm
index c89c941..142ea49 100644
--- a/Osstest.pm
+++ b/Osstest.pm
@@ -200,6 +200,9 @@ sub readglobalconfig () {
     $c{TftpDiBase} ||= "$c{TftpPlayDir}debian-installer";
     $c{TftpDiVersion} ||= 'current';
 
+    $c{TftpGrubBase} ||= "$c{TftpPlayDir}grub";
+    $c{TftpGrubVersion} ||= 'current';
+
     $c{WebspaceFile} ||= "$ENV{'HOME'}/public_html/";
     $c{WebspaceUrl} ||= "http://$myfqdn/~$whoami/";
     $c{WebspaceCommon} ||= 'osstest/';
diff --git a/README b/README
index 44e2989..503d15d 100644
--- a/README
+++ b/README
@@ -206,7 +206,9 @@ To run osstest in standalone mode:
      netcat
      chiark-utils-bin
 
- - Optional: ipmitool
+ - Optional:
+     ipmitool -- for hosts which use IPMI for power control
+     grub-common -- for mg-pxe-loader-update
 
  - Write a config file
     ~/.xen-osstest/config
diff --git a/mg-pxe-loader-update b/mg-pxe-loader-update
new file mode 100755
index 0000000..272010d
--- /dev/null
+++ b/mg-pxe-loader-update
@@ -0,0 +1,85 @@
+#!/bin/bash
+# usage
+#   ./mg-pxe-loader-update jessie
+#
+# Requires grub-mkimage (Debian package: grub-common)
+
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2015 Citrix Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+set -e
+
+. cri-getconfig
+. mgi-common
+. mgi-debian
+
+suite=$1
+
+site=http://ftp.debian.org/debian/
+sbase=$site/dists/$suite
+
+archs="amd64 i386 arm64"
+
+dstroot=`getconfig TftpPath`/`getconfig TftpGrubBase`/
+date=`date +%Y-%m-%d`
+dst=$date
+
+grubpfx=`getconfig TftpGrubBase`/$date/grub
+grubcfg=`getconfig TftpTmpDir`/grub.cfg-'$net_default_mac'
+
+mkdir -p $dstroot
+cd $dstroot
+mkdir -p $dst
+cd $dst
+rm -rf grub
+mkdir grub
+
+cat >grub/grub.cfg <<EOF
+set stage1=yes
+configfile $grubcfg
+EOF
+for arch in $archs ; do
+    case $arch in
+	amd64) grubdeb=grub-efi-amd64-bin; platform=x86_64-efi;;
+	i386)  grubdeb=grub-efi-ia32-bin;  platform=i386-efi;;
+	arm64) grubdeb=grub-efi-arm64-bin; platform=arm64-efi;;
+	*) echo "No grub on $arch" >&2; exit 0;;
+    esac
+
+    pfile=$sbase/main/binary-$arch/Packages.gz
+
+    fetch $pfile >Packages.gz
+
+    echo >&2 "collecting $grubdeb"
+    fetch_packages $site Packages.gz -PX $grubdeb >$grubdeb.deb
+
+    dpkg-deb -x $grubdeb.deb x
+
+    mv x/usr/lib/grub/* grub/
+
+    rm -rf x
+
+    rm Packages.gz
+
+    grub-mkimage -O "$platform" \
+		 -d ./grub/$platform \
+		 -o pxegrub-$arch.efi -p "$grubpfx" \
+		 search configfile normal efinet tftp net
+done
+
+echo $date
+echo >&2 "downloaded $dstroot/$date"
diff --git a/production-config b/production-config
index 50466ce..0a528e7 100644
--- a/production-config
+++ b/production-config
@@ -82,12 +82,17 @@ TftpPxeTemplates %name%/pxelinux.cfg
 TftpPxeTemplatesReal pxelinux.cfg/%ipaddrhex%
 
 TftpPxeGroup osstest
+# Update with ./mg-debian-installer-update(-all)
 TftpDiVersion 2015-06-23
 
 # These should normally be the same.
+# Update with ./mg-cpu-microcode-update
 MicrocodeUpdateAmd64 microcode.x86.2015-06-12.cpio
 MicrocodeUpdateI386 microcode.x86.2015-06-12.cpio
 
+# Update with ./mg-pxe-loader-update
+TftpGrubVersion XXXX-XX-XX
+
 XenUsePath /usr/groups/xencore/systems/bin/xenuse
 XenUseUser osstest
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 04/22] Debian: Preseed a EFI system partition during host install
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
                   ` (2 preceding siblings ...)
  2015-06-24 15:32 ` [PATCH OSSTEST v3 03/22] Introduce mg-pxe-loader-update Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-24 15:32 ` [PATCH OSSTEST v3 05/22] ts-host-install: Split initrd out of @installcmdline Ian Campbell
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

AIUI the runes used will only result in an ESP if the system was
booted via UEFI. IOW I don't think there should be any change for
existing systems.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest.pm        | 1 +
 Osstest/Debian.pm | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/Osstest.pm b/Osstest.pm
index 142ea49..bf90153 100644
--- a/Osstest.pm
+++ b/Osstest.pm
@@ -68,6 +68,7 @@ our %c = qw(
     TestHostKeypairPath id_rsa_osstest
     HostProp_GenEtherPrefixBase 5e:36:0e:f5
 
+    HostDiskESP    300
     HostDiskBoot   300
     HostDiskRoot 10000
     HostDiskSwap  2000
diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 929d22e..ded8575 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -987,6 +987,12 @@ d-i partman-basicmethods/method_only boolean false
 
 d-i partman-auto/expert_recipe string					\\
 	boot-root ::							\\
+		$c{HostDiskESP} 60 $c{HostDiskESP} free			\\
+			\$iflabel{ gpt }				\\
+			reusemethod{ }					\\
+			method{ efi }					\\
+			format{ }					\\
+		.							\\
 		$c{HostDiskBoot} 50 $c{HostDiskBoot} ext3		\\
 			\$primary{ } \$bootable{ }			\\
 			method{ format } format{ }			\\
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 00/22] Initial support for ARM64
@ 2015-06-24 15:32 Ian Campbell
  2015-06-24 15:32 ` [PATCH OSSTEST v3 01/22] mg-*: Add mgi-common with fetch and fail helpers Ian Campbell
                   ` (21 more replies)
  0 siblings, 22 replies; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

The following adds support for testing on arm64 systems.

Since arm64 was only added in Debian Jessie this requires Wei's "Debian
Jessie patches" as a base line, which are currently in osstest. This is
therefore based on those, specifically 6e37f849f4b0.

The main development here is support for UEFI PXE booting, which is not
particular to arm64, but is more prominent there. Hopefully this work
would be useful for UEFI only x86 systems too.

Since last time I've adjust according to review comments and closed the
UEFI boot order race!

N	mg-*: Add mgi-common with fetch and fail helpers
N	mg-*: Make package fetching common in new mgi-debian
 M	Introduce mg-pxe-loader-update
  A	Debian: Preseed a EFI system partition during host install
  A	ts-host-install: Split initrd out of @installcmdline
  A	ts-host-install: split the "di" from the "host" command line
 M	Refactor pxelinux configuration
 M	ts-host-install: Support UEFI PXE boot using grub.efi
	Enable chain loading to local disk for UEFI PXE systems.
  A	Add arm64 build and test jobs
 M	ts-kernel-build: Additional kernel options for Mustang
N	ts-kernel-build: Enable CONFIG_EFI_VARS
 MA	ts-host-install: Set dtbs in the non-special kernel case too.
N	Debian: Do not add Debian to UEFI boot order on install
 M	standalone: Prefer ./local-config to $HOME/.xen-osstest/config
  A	Debian: grub2: Log full line range of menuentry and submenu entries
  A	Debian: grub2: Use GRUB_CMDLINE_LINUX_XEN_REPLACE(_DEFAULT)
  A	Collect xen.efi into xendist and install in appropriate place
  A	Debian: Ignore xen-syms entries in grub.cfg.
  A	Debian: Collect kernel command line from grub.cfg
 M	Debian: Arrange to be able to chainload a xen.efi from grub2
  !	Enable CONFIG_SPARSEMEM_VMEMMAP, arm64 seems to needs it (crashes).

A -- Acked
M -- Modified
N -- New
! -- please ignore the man behind the curtain.

Ian.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 05/22] ts-host-install: Split initrd out of @installcmdline
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
                   ` (3 preceding siblings ...)
  2015-06-24 15:32 ` [PATCH OSSTEST v3 04/22] Debian: Preseed a EFI system partition during host install Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-24 15:32 ` [PATCH OSSTEST v3 06/22] ts-host-install: split the "di" from the "host" command line Ian Campbell
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

Other bootloaders handle this with an explicit separate option rather
than parsing it out of the command line as pxelinux does. Prepare for
supporting these.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-host-install | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/ts-host-install b/ts-host-install
index 04d5487..04f065f 100755
--- a/ts-host-install
+++ b/ts-host-install
@@ -265,9 +265,7 @@ END
     my $initrd= "$ho->{Tftp}{TmpDir}$ho->{Name}--initrd.gz";
     system_checked("cat -- @initrds >$ho->{Tftp}{Path}$initrd");
     
-    push @installcmdline, ("initrd=/$initrd",
-                           "domain=$c{TestHostDomain}",
-                           );
+    push @installcmdline, "domain=$c{TestHostDomain}";
     push @installcmdline,
         get_host_property($ho, "install-append $ho->{Suite}", ''),
         get_host_property($ho, "install-append $ho->{Suite} $r{arch}", '');
@@ -295,7 +293,7 @@ label overwrite
 	menu label ^Overwrite
 	menu default
 	kernel $kernel
-	append $installcmdline
+	append initrd=/$initrd $installcmdline
 	ipappend $ipappend
 	$dtbs
 default overwrite
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 06/22] ts-host-install: split the "di" from the "host" command line
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
                   ` (4 preceding siblings ...)
  2015-06-24 15:32 ` [PATCH OSSTEST v3 05/22] ts-host-install: Split initrd out of @installcmdline Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-24 15:32 ` [PATCH OSSTEST v3 07/22] Refactor pxelinux configuration Ian Campbell
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

(i.e. the bit before/after the -- marker). When abstracting over
different bootloaders in a future patch this will be convenient since
it allows the code to add to either.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-host-install | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/ts-host-install b/ts-host-install
index 04f065f..57a6b3f 100755
--- a/ts-host-install
+++ b/ts-host-install
@@ -175,8 +175,8 @@ sub setup_pxeboot_firstboot($) {
     
     my $d_i= $ho->{Tftp}{DiBase}.'/'.$r{arch}.'/'.$c{TftpDiVersion}.'-'.$ho->{Suite};
     
-    my @installcmdline= qw(vga=normal);
-    push @installcmdline, di_installcmdline_core($ho, $ps_url, %xopts);
+    my @dicmdline= qw(vga=normal);
+    push @dicmdline, di_installcmdline_core($ho, $ps_url, %xopts);
 
     my $src_initrd= "$d_i/initrd.gz";
     my @initrds= "$ho->{Tftp}{Path}/$src_initrd";
@@ -265,26 +265,27 @@ END
     my $initrd= "$ho->{Tftp}{TmpDir}$ho->{Name}--initrd.gz";
     system_checked("cat -- @initrds >$ho->{Tftp}{Path}$initrd");
     
-    push @installcmdline, "domain=$c{TestHostDomain}";
-    push @installcmdline,
+    push @dicmdline, "domain=$c{TestHostDomain}";
+    push @dicmdline,
         get_host_property($ho, "install-append $ho->{Suite}", ''),
         get_host_property($ho, "install-append $ho->{Suite} $r{arch}", '');
 
     my $console = get_host_native_linux_console($ho);
 
-    push @installcmdline, "console=$console" unless $console eq "NONE";
+    push @dicmdline, "console=$console" unless $console eq "NONE";
 
-    push @installcmdline, qw(--);
+    my @hocmdline;
 
     # See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762007 for
     # why this is repeated.
-    push @installcmdline, "console=$console" unless $console eq "NONE";
+    push @hocmdline, "console=$console" unless $console eq "NONE";
 
-    push @installcmdline,
+    push @hocmdline,
         get_host_property($ho, "linux-boot-append $ho->{Suite}", ''),
         get_host_property($ho, "linux-boot-append $ho->{Suite} $r{arch}", '');
 
-    my $installcmdline= join ' ', @installcmdline;
+    my $dicmd= join ' ', @dicmdline;
+    my $hocmd= join ' ', @hocmdline;
 
     setup_pxeboot($ho, <<END);
 serial 0 $c{Baud}
@@ -293,7 +294,7 @@ label overwrite
 	menu label ^Overwrite
 	menu default
 	kernel $kernel
-	append initrd=/$initrd $installcmdline
+	append initrd=/$initrd $dicmd -- $hocmd
 	ipappend $ipappend
 	$dtbs
 default overwrite
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 07/22] Refactor pxelinux configuration
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
                   ` (5 preceding siblings ...)
  2015-06-24 15:32 ` [PATCH OSSTEST v3 06/22] ts-host-install: split the "di" from the "host" command line Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-24 16:04   ` Ian Jackson
  2015-06-24 15:32 ` [PATCH OSSTEST v3 08/22] ts-host-install: Support UEFI PXE boot using grub.efi Ian Campbell
                   ` (14 subsequent siblings)
  21 siblings, 1 reply; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

The mechanism used to PXE boot can differ depending on the firmware
type. Therefore refactor into Osstest::TestSupport and key off a new
host property "firmware".

Currently supported is "bios" (the default) and "uboot", both of which
use pxelinux.cfg style files.

The default for the firmware property is "bios", hence no change for
any existing system (including those which use uboot, regardless of
whether they are now configured with the firmware proprty or not)

As part of this "setup_pxeboot" becomes "setup_pxeboot_di" since it is
somewhat d-i specific.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
v3: reorder setup_${firmware}_pxeboot to setup_pxeboot_${firmware}
    join $dicmd in setup_pxeboot instead of caller
---
 Osstest/TestSupport.pm | 49 +++++++++++++++++++++++++++++++++++++++++++++----
 ts-host-install        | 23 ++++++-----------------
 2 files changed, 51 insertions(+), 21 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 66a0d81..512efd2 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -104,7 +104,7 @@ BEGIN {
 
                       await_webspace_fetch_byleaf create_webfile
                       file_link_contents get_timeout
-                      setup_pxeboot setup_pxeboot_local host_pxefile
+                      setup_pxeboot_di setup_pxeboot_local host_pxefile
 
                       ether_prefix
 
@@ -2098,16 +2098,34 @@ sub host_pxefile ($;$) {
         (join ",", sort keys %v)." ?";
 }
 
-sub setup_pxeboot ($$) {
+sub setup_pxelinux_bootcfg ($$) {
     my ($ho, $bootfile) = @_;
     my $f= host_pxefile($ho);
     file_link_contents("$ho->{Tftp}{Path}$ho->{Tftp}{PxeDir}$f", $bootfile,
 	"$ho->{Name}-pxelinux.cfg");
 }
 
-sub setup_pxeboot_local ($) {
+# Systems using BIOS are configured to use pxelinux
+sub setup_pxeboot_di_bios ($$$$$;%) {
+    my ($ho,$kern,$initrd,$dicmd,$hocmd,%xopts) = @_;
+    my $dtbs = "fdtdir $xopts{dtbs}" if $xopts{dtbs};
+    setup_pxelinux_bootcfg($ho, <<END);
+    serial 0 $c{Baud}
+timeout 5
+label overwrite
+	menu label ^Overwrite
+	menu default
+	kernel $kern
+	append $dicmd initrd=$initrd -- $hocmd
+	ipappend $xopts{ipappend}
+	$dtbs
+default overwrite
+END
+}
+
+sub setup_pxeboot_local_bios ($) {
     my ($ho) = @_;
-    setup_pxeboot($ho, <<END);
+    setup_pxelinux_bootcfg($ho, <<END);
 serial 0 $c{Baud}
 timeout 5
 label local
@@ -2116,6 +2134,29 @@ default local
 END
 }
 
+# uboot emulates pxelinux, so reuse BIOS stuff
+sub setup_pxeboot_di_uboot ($$$$$;%) { return &setup_pxeboot_di_bios; }
+sub setup_pxeboot_local_uboot ($) { return &setup_pxeboot_local_bios; }
+
+sub setup_pxeboot_local ($) {
+    my ($ho) = @_;
+    my $firmware = get_host_property($ho, "firmware", "bios");
+    $firmware =~ s/-/_/g;
+    no strict qw(refs);
+    return &{"setup_pxeboot_local_${firmware}"}($ho);
+}
+
+sub setup_pxeboot_di ($$$$$;%) {
+    my ($ho,$kern,$initrd,$dicmd,$hocmd,%xopts) = @_;
+    my $firmware = get_host_property($ho, "firmware", "bios");
+    $firmware =~ s/-/_/g;
+    no strict qw(refs);
+    return &{"setup_pxeboot_di_${firmware}"}($ho,$kern,$initrd,
+					     join(' ',@{$dicmd}),
+					     join(' ',@{$hocmd}),
+					     %xopts);
+}
+
 #---------- ISO images ----------
 sub iso_create_genisoimage ($$$$;@) {
     my ($ho,$iso,$dir,$isotimeout,@xopts) = @_;
diff --git a/ts-host-install b/ts-host-install
index 57a6b3f..632bac7 100755
--- a/ts-host-install
+++ b/ts-host-install
@@ -244,13 +244,14 @@ SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="$ho->{Ether}", A
 END
     }
 
-    my $dtbs = "";
+    my %xopts;
+
     foreach my $kp (keys %{ $ho->{Flags} }) {
 	# Backwards compatibility
 	$kp = "need-kernel-deb-wheezy-backports" if $kp eq "need-kernel-deb-armmp";
 	$kp =~ s/need-kernel-deb-$ho->{Suite}-// or next;
 
-	$dtbs = "fdtdir /$d_i/$kp-dtbs"
+	$xopts{dtbs} = "/$d_i/$kp-dtbs"
 	    if -e "$ho->{Tftp}{Path}/$d_i/$kp-dtbs";
     }
 
@@ -284,21 +285,9 @@ END
         get_host_property($ho, "linux-boot-append $ho->{Suite}", ''),
         get_host_property($ho, "linux-boot-append $ho->{Suite} $r{arch}", '');
 
-    my $dicmd= join ' ', @dicmdline;
-    my $hocmd= join ' ', @hocmdline;
-
-    setup_pxeboot($ho, <<END);
-serial 0 $c{Baud}
-timeout 5
-label overwrite
-	menu label ^Overwrite
-	menu default
-	kernel $kernel
-	append initrd=/$initrd $dicmd -- $hocmd
-	ipappend $ipappend
-	$dtbs
-default overwrite
-END
+    $xopts{ipappend} = $ipappend;
+    setup_pxeboot_di($ho, $kernel, "/$initrd", \@dicmdline, \@hocmdline,
+		     %xopts);
 }
 
 install();
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 08/22] ts-host-install: Support UEFI PXE boot using grub.efi
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
                   ` (6 preceding siblings ...)
  2015-06-24 15:32 ` [PATCH OSSTEST v3 07/22] Refactor pxelinux configuration Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-24 16:06   ` Ian Jackson
  2015-06-24 15:32 ` [PATCH OSSTEST v3 09/22] Enable chain loading to local disk for UEFI PXE systems Ian Campbell
                   ` (13 subsequent siblings)
  21 siblings, 1 reply; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

(Wrap DiBase entry in README too for consistency)

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
v3: Reindent README (fix DiBase too for consistency)
    Adjust for reordering of setup_{firmware}_pxeboot to put
      {firmware} at end
    Rewrap setup_grub_efi_bootcfg
    Adjust for setup_pxeboot -> setup_pxeboot_di
---
 Osstest/TestSupport.pm | 37 ++++++++++++++++++++++++++++++++++++-
 README                 |  6 ++++--
 2 files changed, 40 insertions(+), 3 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 512efd2..94a7c27 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_pxeboot_di_uboot ($$$$$;%) { return &setup_pxeboot_di_bios; }
 sub setup_pxeboot_local_uboot ($) { return &setup_pxeboot_local_bios; }
 
+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_pxeboot_di_uefi ($$$$$;%) {
+    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_pxeboot_local_uefi ($) {
+    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..0f503c5 100644
--- a/README
+++ b/README
@@ -453,8 +453,10 @@ TftpFoo_<scope> and TftpFoo
         PxeTemplates  See TftpPxeTemplates
         PxeTemplatesReal
 
-        DiBase        The path under `Path' to the root of the debian installer
-                      images.
+        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

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 09/22] Enable chain loading to local disk for UEFI PXE systems.
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
                   ` (7 preceding siblings ...)
  2015-06-24 15:32 ` [PATCH OSSTEST v3 08/22] ts-host-install: Support UEFI PXE boot using grub.efi Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-24 16:07   ` Ian Jackson
  2015-06-24 15:32 ` [PATCH OSSTEST v3 10/22] Add arm64 build and test jobs Ian Campbell
                   ` (12 subsequent siblings)
  21 siblings, 1 reply; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

First arrange for bootloader to be installed to removable media path,
by using a new in Jessie preseed option. Then use that to chainload a
bootloader from the disk.

The removable media path is well known (part of the UEFI spec) which
saves us having to worry about which OS is on the host (so long as the
OS can be configured to populate the removable media path)

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

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index ded8575..9e1e69e 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -757,6 +757,8 @@ d-i apt-setup/contrib boolean false
 
 d-i pkgsel/include string openssh-server, ntp, ntpdate, ethtool, chiark-utils-bin, $extra_packages
 
+d-i grub-installer/force-efi-extra-removable boolean true
+
 $xopts{ExtraPreseed}
 
 END
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 94a7c27..699be7e 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -2168,8 +2168,24 @@ END
 
 sub setup_pxeboot_local_uefi ($) {
     my ($ho) = @_;
+    my %efi_archs = qw(amd64 X64
+                       arm32 ARM
+                       arm64 AARCH64
+                       i386  IA32);
+    die "EFI arch" unless $efi_archs{ $r{arch} };
+    my $efi = $efi_archs{ $r{arch} };
     setup_grub_efi_bootcfg($ho, <<END);
-echo Should do a local boot here, somehow
+set default=0
+set timeout=5
+menuentry 'local' {
+  insmod chain
+  insmod part_gpt
+  insmod part_msdos
+  set root=(hd0,gpt1)
+  echo "Chainloading (\${root})/EFI/BOOT/BOOTAA64.EFI"
+  chainloader (\${root})/EFI/BOOT/BOOTAA64.EFI
+  boot
+}
 END
 }
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 10/22] Add arm64 build and test jobs
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
                   ` (8 preceding siblings ...)
  2015-06-24 15:32 ` [PATCH OSSTEST v3 09/22] Enable chain loading to local disk for UEFI PXE systems Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-24 15:32 ` [PATCH OSSTEST v3 11/22] ts-kernel-build: Additional kernel options for Mustang Ian Campbell
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

Runvars:
	build-arm64                                   arch                        arm64
	build-arm64                                   build_lvextend_max          50
	build-arm64                                   enable_ovmf                 true
	build-arm64                                   enable_xend                 false
	build-arm64                                   enable_xsm                  false
	build-arm64                                   host_hostflags              share-build-jessie-arm64,arch-arm64,suite-jessie,purpose-build
	build-arm64                                   revision_ovmf
	build-arm64                                   revision_qemu
	build-arm64                                   revision_qemuu              b2da824bc5ad35fb9f1e74a203d7be96a7b0345e
	build-arm64                                   revision_seabios
	build-arm64                                   revision_xen                e13013dbf1d5997915548a3b5f1c39594d8c1d7b
	build-arm64                                   tree_ovmf
	build-arm64                                   tree_qemu                   git://xenbits.xen.org/staging/qemu-xen-unstable.git
	build-arm64                                   tree_qemuu                  git://xenbits.xen.org/staging/qemu-upstream-unstable.git
	build-arm64                                   tree_seabios
	build-arm64                                   tree_xen                    git://xenbits.xen.org/xen.git
	build-arm64-libvirt                           arch                        arm64
	build-arm64-libvirt                           build_lvextend_max          50
	build-arm64-libvirt                           buildjob                    build-arm64
	build-arm64-libvirt                           host_hostflags              share-build-jessie-arm64,arch-arm64,suite-jessie,purpose-build
	build-arm64-libvirt                           revision_libvirt            fd74e231751334b64af0934b680c5cc62f652453
	build-arm64-libvirt                           tree_libvirt                git://xenbits.xen.org/libvirt.git
	build-arm64-libvirt                           tree_xen                    git://xenbits.xen.org/xen.git
	build-arm64-pvops                             arch                        arm64
	build-arm64-pvops                             build_lvextend_max          50
	build-arm64-pvops                             host_hostflags              share-build-jessie-arm64,arch-arm64,suite-jessie,purpose-build
	build-arm64-pvops                             kconfig_override_y          CONFIG_EXT4_FS
	build-arm64-pvops                             kconfighow                  xen-enable-xen-config
	build-arm64-pvops                             revision_linux              ec18c9fc039971041d854e0d58551f1f1a32ff8f
	build-arm64-pvops                             revision_linuxfirmware      c530a75c1e6a472b0eb9558310b518f0dfcd8860
	build-arm64-pvops                             tree_linux                  git://xenbits.xen.org/linux-pvops.git
	build-arm64-pvops                             tree_linuxfirmware          git://xenbits.xen.org/osstest/linux-firmware.git
	build-arm64-pvops                             treevcs_linux               git
	build-arm64-xsm                               arch                        arm64
	build-arm64-xsm                               build_lvextend_max          50
	build-arm64-xsm                               enable_ovmf                 true
	build-arm64-xsm                               enable_xend                 false
	build-arm64-xsm                               enable_xsm                  true
	build-arm64-xsm                               host_hostflags              share-build-jessie-arm64,arch-arm64,suite-jessie,purpose-build
	build-arm64-xsm                               revision_ovmf
	build-arm64-xsm                               revision_qemu
	build-arm64-xsm                               revision_qemuu              b2da824bc5ad35fb9f1e74a203d7be96a7b0345e
	build-arm64-xsm                               revision_seabios
	build-arm64-xsm                               revision_xen                e13013dbf1d5997915548a3b5f1c39594d8c1d7b
	build-arm64-xsm                               tree_ovmf
	build-arm64-xsm                               tree_qemu                   git://xenbits.xen.org/staging/qemu-xen-unstable.git
	build-arm64-xsm                               tree_qemuu                  git://xenbits.xen.org/staging/qemu-upstream-unstable.git
	build-arm64-xsm                               tree_seabios
	build-arm64-xsm                               tree_xen                    git://xenbits.xen.org/xen.git
	test-arm64-arm64-libvirt                      all_hostflags               arch-arm64,arch-xen-arm64,suite-jessie,purpose-test
	test-arm64-arm64-libvirt                      arch                        arm64
	test-arm64-arm64-libvirt                      buildjob                    build-arm64
	test-arm64-arm64-libvirt                      debian_arch                 arm64
	test-arm64-arm64-libvirt                      debian_kernkind             pvops
	test-arm64-arm64-libvirt                      enable_xsm                  false
	test-arm64-arm64-libvirt                      kernbuildjob                build-arm64-pvops
	test-arm64-arm64-libvirt                      kernkind                    pvops
	test-arm64-arm64-libvirt                      libvirtbuildjob             build-arm64-libvirt
	test-arm64-arm64-libvirt                      toolstack                   libvirt
	test-arm64-arm64-libvirt                      xenbuildjob                 build-arm64
	test-arm64-arm64-libvirt-xsm                  all_hostflags               arch-arm64,arch-xen-arm64,suite-jessie,purpose-test
	test-arm64-arm64-libvirt-xsm                  arch                        arm64
	test-arm64-arm64-libvirt-xsm                  buildjob                    build-arm64-xsm
	test-arm64-arm64-libvirt-xsm                  debian_arch                 arm64
	test-arm64-arm64-libvirt-xsm                  debian_kernkind             pvops
	test-arm64-arm64-libvirt-xsm                  enable_xsm                  true
	test-arm64-arm64-libvirt-xsm                  kernbuildjob                build-arm64-pvops
	test-arm64-arm64-libvirt-xsm                  kernkind                    pvops
	test-arm64-arm64-libvirt-xsm                  libvirtbuildjob             build-arm64-libvirt
	test-arm64-arm64-libvirt-xsm                  toolstack                   libvirt
	test-arm64-arm64-libvirt-xsm                  xenbuildjob                 build-arm64-xsm
	test-arm64-arm64-xl                           all_hostflags               arch-arm64,arch-xen-arm64,suite-jessie,purpose-test
	test-arm64-arm64-xl                           arch                        arm64
	test-arm64-arm64-xl                           buildjob                    build-arm64
	test-arm64-arm64-xl                           debian_arch                 arm64
	test-arm64-arm64-xl                           debian_kernkind             pvops
	test-arm64-arm64-xl                           enable_xsm                  false
	test-arm64-arm64-xl                           kernbuildjob                build-arm64-pvops
	test-arm64-arm64-xl                           kernkind                    pvops
	test-arm64-arm64-xl                           toolstack                   xl
	test-arm64-arm64-xl                           xenbuildjob                 build-arm64
	test-arm64-arm64-xl-credit2                   all_hostflags               arch-arm64,arch-xen-arm64,suite-jessie,purpose-test
	test-arm64-arm64-xl-credit2                   arch                        arm64
	test-arm64-arm64-xl-credit2                   buildjob                    build-arm64
	test-arm64-arm64-xl-credit2                   debian_arch                 arm64
	test-arm64-arm64-xl-credit2                   debian_kernkind             pvops
	test-arm64-arm64-xl-credit2                   guests_vcpus                4
	test-arm64-arm64-xl-credit2                   kernbuildjob                build-arm64-pvops
	test-arm64-arm64-xl-credit2                   kernkind                    pvops
	test-arm64-arm64-xl-credit2                   toolstack                   xl
	test-arm64-arm64-xl-credit2                   xen_boot_append             sched=credit2
	test-arm64-arm64-xl-credit2                   xenbuildjob                 build-arm64
	test-arm64-arm64-xl-multivcpu                 all_hostflags               arch-arm64,arch-xen-arm64,suite-jessie,purpose-test
	test-arm64-arm64-xl-multivcpu                 arch                        arm64
	test-arm64-arm64-xl-multivcpu                 buildjob                    build-arm64
	test-arm64-arm64-xl-multivcpu                 debian_arch                 arm64
	test-arm64-arm64-xl-multivcpu                 debian_kernkind             pvops
	test-arm64-arm64-xl-multivcpu                 guests_vcpus                4
	test-arm64-arm64-xl-multivcpu                 kernbuildjob                build-arm64-pvops
	test-arm64-arm64-xl-multivcpu                 kernkind                    pvops
	test-arm64-arm64-xl-multivcpu                 toolstack                   xl
	test-arm64-arm64-xl-multivcpu                 xenbuildjob                 build-arm64
	test-arm64-arm64-xl-sedf                      all_hostflags               arch-arm64,arch-xen-arm64,suite-jessie,purpose-test
	test-arm64-arm64-xl-sedf                      arch                        arm64
	test-arm64-arm64-xl-sedf                      buildjob                    build-arm64
	test-arm64-arm64-xl-sedf                      debian_arch                 arm64
	test-arm64-arm64-xl-sedf                      debian_kernkind             pvops
	test-arm64-arm64-xl-sedf                      guests_vcpus                4
	test-arm64-arm64-xl-sedf                      kernbuildjob                build-arm64-pvops
	test-arm64-arm64-xl-sedf                      kernkind                    pvops
	test-arm64-arm64-xl-sedf                      linux_boot_append           loglevel=9 debug
	test-arm64-arm64-xl-sedf                      toolstack                   xl
	test-arm64-arm64-xl-sedf                      xen_boot_append             sched=sedf loglvl=all
	test-arm64-arm64-xl-sedf                      xenbuildjob                 build-arm64
	test-arm64-arm64-xl-sedf-pin                  all_hostflags               arch-arm64,arch-xen-arm64,suite-jessie,purpose-test
	test-arm64-arm64-xl-sedf-pin                  arch                        arm64
	test-arm64-arm64-xl-sedf-pin                  buildjob                    build-arm64
	test-arm64-arm64-xl-sedf-pin                  debian_arch                 arm64
	test-arm64-arm64-xl-sedf-pin                  debian_kernkind             pvops
	test-arm64-arm64-xl-sedf-pin                  guests_vcpus                4
	test-arm64-arm64-xl-sedf-pin                  kernbuildjob                build-arm64-pvops
	test-arm64-arm64-xl-sedf-pin                  kernkind                    pvops
	test-arm64-arm64-xl-sedf-pin                  linux_boot_append           loglevel=9 debug
	test-arm64-arm64-xl-sedf-pin                  toolstack                   xl
	test-arm64-arm64-xl-sedf-pin                  xen_boot_append             sched=sedf loglvl=all dom0_vcpus_pin
	test-arm64-arm64-xl-sedf-pin                  xenbuildjob                 build-arm64
	test-arm64-arm64-xl-xsm                       all_hostflags               arch-arm64,arch-xen-arm64,suite-jessie,purpose-test
	test-arm64-arm64-xl-xsm                       arch                        arm64
	test-arm64-arm64-xl-xsm                       buildjob                    build-arm64-xsm
	test-arm64-arm64-xl-xsm                       debian_arch                 arm64
	test-arm64-arm64-xl-xsm                       debian_kernkind             pvops
	test-arm64-arm64-xl-xsm                       enable_xsm                  true
	test-arm64-arm64-xl-xsm                       kernbuildjob                build-arm64-pvops
	test-arm64-arm64-xl-xsm                       kernkind                    pvops
	test-arm64-arm64-xl-xsm                       toolstack                   xl
	test-arm64-arm64-xl-xsm                       xenbuildjob                 build-arm64-xsm

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

---
---
 make-flight     |  4 ++--
 mfi-common      | 23 ++++++++++++++++++-----
 ts-kernel-build |  1 +
 3 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/make-flight b/make-flight
index 78ace52..c821833 100755
--- a/make-flight
+++ b/make-flight
@@ -107,7 +107,7 @@ job_create_test_filter_callback () {
 
 test_matrix_branch_filter_callback () {
   case "$xenarch" in
-  armhf)
+  armhf|arm64)
         case "$branch" in
         linux-3.0) return 1;;
         linux-3.4) return 1;;
@@ -366,7 +366,7 @@ test_matrix_do_one () {
   do_credit2_tests
 
   # No further arm tests at the moment
-  if [ $dom0arch = armhf ]; then
+  if [ $dom0arch = armhf ] || [ $dom0arch = arm64 ]; then
       return
   fi
 
diff --git a/mfi-common b/mfi-common
index a9e966f..ffb6775 100644
--- a/mfi-common
+++ b/mfi-common
@@ -67,12 +67,12 @@ create_build_jobs () {
      BUILD_RUNVARS+=" build_lvextend_max=$BUILD_LVEXTEND_MAX "
   fi
 
-  for arch in ${BUILD_ARCHES- i386 amd64 armhf }; do
+  for arch in ${BUILD_ARCHES- i386 amd64 armhf arm64 }; do
 
     if [ "x$arch" = xdisable ]; then continue; fi
 
     case "$arch" in
-    armhf)
+    armhf|arm64)
       case "$branch" in
       linux-3.0) continue;;
       linux-3.4) continue;;
@@ -247,7 +247,7 @@ create_build_jobs () {
     fi
 
     case "$arch" in
-    armhf) continue;; # don't do any other kernel builds
+    armhf|arm64) continue;; # don't do any other kernel builds
     esac
 
     if [ "x$REVISION_LINUX_OLD" != xdisable ]; then
@@ -319,13 +319,25 @@ test_matrix_iterate () {
   *)                    onetoolstack=xl ;;
   esac
 
-  for xenarch in ${TEST_ARCHES- i386 amd64 armhf } ; do
+  for xenarch in ${TEST_ARCHES- i386 amd64 armhf arm64 } ; do
 
     if [ "x$xenarch" = xdisable ]; then continue; fi
 
     test_matrix_branch_filter_callback || continue
 
     case "$xenarch" in
+    arm64)
+          # Arm64 from 4.5 onwards only
+          case "$xenbranch" in
+          xen-3.*-testing) continue;;
+          xen-4.0-testing) continue;;
+          xen-4.1-testing) continue;;
+          xen-4.2-testing) continue;;
+          xen-4.3-testing) continue;;
+          xen-4.4-testing) continue;;
+          *) ;;
+          esac
+          ;;
     armhf)
           # Arm from 4.3 onwards only
           case "$xenbranch" in
@@ -370,13 +382,14 @@ test_matrix_iterate () {
       *)          echo >&2 "kernkind ?  $kern"; exit 1 ;;
       esac
 
-      for dom0arch in i386 amd64 armhf; do
+      for dom0arch in i386 amd64 armhf arm64; do
 
         case ${xenarch}_${dom0arch} in
             amd64_amd64) ;;
             amd64_i386) ;;
             i386_i386) ;;
             armhf_armhf) ;;
+            arm64_arm64) ;;
             *) continue ;;
         esac
 
diff --git a/ts-kernel-build b/ts-kernel-build
index 1da8294..9b43e73 100755
--- a/ts-kernel-build
+++ b/ts-kernel-build
@@ -39,6 +39,7 @@ builddirsprops();
 
 my $archparms = {
     'armhf' => { DefConfig => 'multi_v7_defconfig', KernelImage => 'arch/arm/boot/zImage' },
+    'arm64' => { DefConfig => 'defconfig',          KernelImage => 'arch/arm64/boot/Image' },
     'i386'  => { DefConfig => 'defconfig',          KernelImage => 'arch/x86/boot/bzImage' },
     'amd64' => { DefConfig => 'defconfig',          KernelImage => 'arch/x86/boot/bzImage' }
 };
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 11/22] ts-kernel-build: Additional kernel options for Mustang
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
                   ` (9 preceding siblings ...)
  2015-06-24 15:32 ` [PATCH OSSTEST v3 10/22] Add arm64 build and test jobs Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-24 16:08   ` Ian Jackson
  2015-06-26 11:05   ` Ian Campbell
  2015-06-24 15:32 ` [PATCH OSSTEST v3 12/22] ts-kernel-build: Enable CONFIG_EFI_VARS Ian Campbell
                   ` (10 subsequent siblings)
  21 siblings, 2 replies; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
Note: ARM testing currently uses a 3.16 based linux-arm-xen kernel
(compared to 3.14 currently used as the default). In order to support
Mustang something newer is needed, I've been testing 4.1 (next LTS
kernel), 3.18 (the intervening LTS kernel) might be sufficient but I
haven't tried it. We should plan to either update linux-arm-xen or the
default kernel version at some point before we get Mustang h/w.

v3: Set CONFIG_NET_XGENE (was commented out before)
    Remove setting of CONFIG_SPARSEMEM_VMEMMAP
---
 ts-kernel-build | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/ts-kernel-build b/ts-kernel-build
index 9b43e73..8a254e4 100755
--- a/ts-kernel-build
+++ b/ts-kernel-build
@@ -542,6 +542,13 @@ setopt CONFIG_BLK_CPQ_CISS_DA m
 
 setopt CONFIG_FHANDLE y
 
+# APM XGENE
+setopt CONFIG_PHY_XGENE y
+setopt CONFIG_NET_XGENE y
+setopt CONFIG_AHCI_XGENE y
+setopt CONFIG_POWER_RESET_XGENE y
+setopt CONFIG_RTC_DRV_XGENE y
+
 case ${XEN_TARGET_ARCH} in
     x86_32) setopt CONFIG_64BIT n ;;
     x86_64)
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 12/22] ts-kernel-build: Enable CONFIG_EFI_VARS
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
                   ` (10 preceding siblings ...)
  2015-06-24 15:32 ` [PATCH OSSTEST v3 11/22] ts-kernel-build: Additional kernel options for Mustang Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-24 16:08   ` Ian Jackson
  2015-06-24 15:32 ` [PATCH OSSTEST v3 13/22] ts-host-install: Set dtbs in the non-special kernel case too Ian Campbell
                   ` (9 subsequent siblings)
  21 siblings, 1 reply; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

Which makes efibootmgr work when running our kernel.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
v3: New patch
---
 ts-kernel-build | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ts-kernel-build b/ts-kernel-build
index 8a254e4..8d19482 100755
--- a/ts-kernel-build
+++ b/ts-kernel-build
@@ -542,6 +542,9 @@ setopt CONFIG_BLK_CPQ_CISS_DA m
 
 setopt CONFIG_FHANDLE y
 
+# Needed for efibootmgr
+setopt CONFIG_EFI_VARS y
+
 # APM XGENE
 setopt CONFIG_PHY_XGENE y
 setopt CONFIG_NET_XGENE y
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 13/22] ts-host-install: Set dtbs in the non-special kernel case too.
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
                   ` (11 preceding siblings ...)
  2015-06-24 15:32 ` [PATCH OSSTEST v3 12/22] ts-kernel-build: Enable CONFIG_EFI_VARS Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-24 15:32 ` [PATCH OSSTEST v3 14/22] Debian: Do not add Debian to UEFI boot order on install Ian Campbell
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

When DTB support was added for armhf it required a backports kernel
for use with Wheezy and therefore DTBs were only collected for that
special case. However as we move forward to newer kernels it should
be possible to run using the proper kernel (e.g. Jessie should work
for armhf). Therefore we will need the DTBs for those kernels too.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v3: Improved commit message
---
 ts-host-install | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ts-host-install b/ts-host-install
index 632bac7..f734a9c 100755
--- a/ts-host-install
+++ b/ts-host-install
@@ -255,6 +255,9 @@ END
 	    if -e "$ho->{Tftp}{Path}/$d_i/$kp-dtbs";
     }
 
+    $xopts{dtbs} = "/$d_i/dtbs"
+	if !$xopts{dtbs} && -e "$ho->{Tftp}{Path}/$d_i/dtbs";
+
     file_simple_write_contents("$initrd_overlay.cpio", sub {
         contents_make_cpio($_[0], 'newc', "$initrd_overlay.d");
     });
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 14/22] Debian: Do not add Debian to UEFI boot order on install
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
                   ` (12 preceding siblings ...)
  2015-06-24 15:32 ` [PATCH OSSTEST v3 13/22] ts-host-install: Set dtbs in the non-special kernel case too Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-24 16:11   ` Ian Jackson
  2015-06-24 15:32 ` [PATCH OSSTEST v3 15/22] standalone: Prefer ./local-config to $HOME/.xen-osstest/config Ian Campbell
                   ` (7 subsequent siblings)
  21 siblings, 1 reply; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

By default Debian inserts itself before any existing entries,
including the PXE one, meaning we otherwise cannot remotely regroove
the box.

Add a hook to /usr/lib/base-installer.d/ which installs a diversion of
/usr/sbin/grub-install and installs a wrapper which adds the
--no-nvram argument which prevents grub-install from adding the boot
entries.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
v3: New patch replacing "Debian: Fixup UEFI boot order during install"
---
 Osstest/Debian.pm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 9e1e69e..437faab 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -1018,6 +1018,31 @@ END
 
     preseed_microcode($ho,$sfx);
 
+    if (get_host_property($ho, "firmware") eq "uefi" &&
+	$ho->{Suite} =~ m/jessie/) {
+	# Prevent grub-install from making a new Debian boot entry, so
+	# we always reboot from PXE. Debian bug #789798 proposes a
+	# properly preseedable solution to this.
+	preseed_hook_installscript($ho, $sfx,
+		'/usr/lib/base-installer.d/',
+		'osstest-disable-grub-nvram', <<'END');
+#!/bin/sh
+set -ex
+
+logger -t osstest-disable-grub-nvram "Adding our grub-install wrapper"
+
+t=/usr/sbin/grub-install
+
+in-target dpkg-divert --divert $t.osstest --rename --add $t
+
+cat >/target/$t <<EOF
+#!/bin/sh
+exec $t.osstest --no-nvram \$@
+EOF
+chmod +x /target/$t
+END
+    }
+
     $preseed_file .= preseed_hook_cmds();
 
     if ($ho->{Flags}{'no-di-kernel'}) {
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 15/22] standalone: Prefer ./local-config to $HOME/.xen-osstest/config
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
                   ` (13 preceding siblings ...)
  2015-06-24 15:32 ` [PATCH OSSTEST v3 14/22] Debian: Do not add Debian to UEFI boot order on install Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-24 16:12   ` Ian Jackson
  2015-06-24 15:32 ` [PATCH OSSTEST v3 16/22] Debian: grub2: Log full line range of menuentry and submenu entries Ian Campbell
                   ` (6 subsequent siblings)
  21 siblings, 1 reply; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

OSSTEST_CONFIG still trumps both.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
v3: local-config not standalone.config
---
 standalone | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/standalone b/standalone
index 17fa40c..0fb5ca4 100755
--- a/standalone
+++ b/standalone
@@ -68,7 +68,13 @@ TEMP=$(getopt -o c:f:h:rRs --long config:,flight:,host:,reuse,noreuse,reinstall,
 
 eval set -- "$TEMP"
 
-config=${OSSTEST_CONFIG-$HOME/.xen-osstest/config}
+if [ -n "${OSSTEST_CONFIG}" ]; then
+    config=${OSSTEST_CONFIG}
+elif [ -f local-config ]; then
+    config=local-config
+else
+    config=$HOME/.xen-osstest/config
+fi
 flight="standalone"
 host=
 reuse=1 # Don't blow away machines by default
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 16/22] Debian: grub2: Log full line range of menuentry and submenu entries
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
                   ` (14 preceding siblings ...)
  2015-06-24 15:32 ` [PATCH OSSTEST v3 15/22] standalone: Prefer ./local-config to $HOME/.xen-osstest/config Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-24 15:32 ` [PATCH OSSTEST v3 17/22] Debian: grub2: Use GRUB_CMDLINE_LINUX_XEN_REPLACE(_DEFAULT) Ian Campbell
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

Is useful when debugging.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/Debian.pm | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 437faab..27179d5 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -412,8 +412,7 @@ sub setupboot_grub2 ($$$$) {
             if (m/^\s*\}\s*$/) {
                 die unless $entry || $submenu;
                 if (!defined $entry && defined $submenu) {
-                    logm("Met end of a submenu starting from ".
-                        "$submenu->{StartLine}. ".
+                    logm("Met end of a submenu $submenu->{StartLine}..$.. ".
                         "Our want kern is $want_kernver");
                     $submenu=undef;
                     pop @offsets;
@@ -426,14 +425,14 @@ sub setupboot_grub2 ($$$$) {
 			 ? qw(Title Hv KernDom0 KernVer)
 			 : qw(Title Hv KernOnly KernVer));
 		if (@missing) {
-		    logm("(skipping entry at $entry->{StartLine};".
+		    logm("(skipping entry at $entry->{StartLine}..$.;".
 			 " no @missing)");
 		} elsif (defined $want_kernver &&
 			 $entry->{KernVer} ne $want_kernver) {
-		    logm("(skipping entry at $entry->{StartLine};".
+		    logm("(skipping entry at $entry->{StartLine}..$.;".
 			 " kernel $entry->{KernVer}, not $want_kernver)");
 		} elsif ($want_xsm && !defined $entry->{Xenpolicy}) {
-		    logm("(skipping entry at $entry->{StartLine};".
+		    logm("(skipping entry at $entry->{StartLine}..$.;".
 			 " XSM policy file not present)");
 		} else {
 		    # yes!
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 17/22] Debian: grub2: Use GRUB_CMDLINE_LINUX_XEN_REPLACE(_DEFAULT)
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
                   ` (15 preceding siblings ...)
  2015-06-24 15:32 ` [PATCH OSSTEST v3 16/22] Debian: grub2: Log full line range of menuentry and submenu entries Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-24 15:32 ` [PATCH OSSTEST v3 18/22] Collect xen.efi into xendist and install in appropriate place Ian Campbell
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

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>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/Debian.pm | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 27179d5..3415a4d 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

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 18/22] Collect xen.efi into xendist and install in appropriate place
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
                   ` (16 preceding siblings ...)
  2015-06-24 15:32 ` [PATCH OSSTEST v3 17/22] Debian: grub2: Use GRUB_CMDLINE_LINUX_XEN_REPLACE(_DEFAULT) Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-24 15:32 ` [PATCH OSSTEST v3 19/22] Debian: Ignore xen-syms entries in grub.cfg Ian Campbell
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

Previously these binaries would have been included in the regular
("tools") dist file, whereas they really belong in the xen one.

Install into /boot/efi/EFI/osstest ready for use when chainloading.

Note that /boot/efi is (or should be) a VFAT filesystem. So a bit of
care is needed WRT symlinks etc. This is also what prevents us from
just including /boot/efi/EFI/osstest/xen.efi in the dist tarball since
untarring over a VFAT needs a little care WRT the case of directories
etc.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-xen-build   | 7 +++++++
 ts-xen-install | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/ts-xen-build b/ts-xen-build
index 353a82c..cebfaf3 100755
--- a/ts-xen-build
+++ b/ts-xen-build
@@ -172,6 +172,13 @@ sub divide () {
                 mv \$mvfiles xeninstall/boot/.
             fi
         fi
+	if test -d install/usr/lib64/efi/; then
+            if test -f install/usr/lib64/efi/xen.efi; then
+                mkdir -p xeninstall/usr/lib64/efi
+                mvfiles=`find install/usr/lib64/efi -name 'xen[a-z]*' -prune -o -name 'xen*' -print`
+                mv \$mvfiles xeninstall/usr/lib64/efi/.
+            fi
+	fi
 END
 }
 
diff --git a/ts-xen-install b/ts-xen-install
index 69478ce..0f53382 100755
--- a/ts-xen-install
+++ b/ts-xen-install
@@ -77,6 +77,13 @@ sub extract () {
         target_extract_jobdistpath($ho, $part, "path_${part}dist",
 				   $r{"${part}buildjob"}, \%distpath);
     }
+    if (target_file_exists($ho, "/usr/lib64/efi/xen.efi")) {
+	target_cmd_root($ho,<<END);
+	    mkdir -p /boot/efi/EFI/osstest
+	    # /boot/efi is VFAT, so dereference the symlink
+	    cp -vL /usr/lib64/efi/xen.efi /boot/efi/EFI/osstest
+END
+    }
     target_cmd_root($ho, '/sbin/ldconfig');
 }
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 19/22] Debian: Ignore xen-syms entries in grub.cfg.
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
                   ` (17 preceding siblings ...)
  2015-06-24 15:32 ` [PATCH OSSTEST v3 18/22] Collect xen.efi into xendist and install in appropriate place Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-24 15:32 ` [PATCH OSSTEST v3 20/22] Debian: Collect kernel command line from grub.cfg Ian Campbell
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

These can't (in general?) actually be booted.

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

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 3415a4d..62551ac 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -427,6 +427,9 @@ sub setupboot_grub2 ($$$$) {
 		if (@missing) {
 		    logm("(skipping entry at $entry->{StartLine}..$.;".
 			 " no @missing)");
+		} elsif ($entry->{Hv} =~ m/xen-syms/) {
+		    logm("(skipping entry at $entry->{StartLine}..$.;".
+			 " is xen-syms)");
 		} elsif (defined $want_kernver &&
 			 $entry->{KernVer} ne $want_kernver) {
 		    logm("(skipping entry at $entry->{StartLine}..$.;".
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 20/22] Debian: Collect kernel command line from grub.cfg
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
                   ` (18 preceding siblings ...)
  2015-06-24 15:32 ` [PATCH OSSTEST v3 19/22] Debian: Ignore xen-syms entries in grub.cfg Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-24 15:32 ` [PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2 Ian Campbell
  2015-06-24 15:32 ` [PATCH OSSTEST v3 22/22] Enable CONFIG_SPARSEMEM_VMEMMAP, arm64 seems to needs it (crashes) Ian Campbell
  21 siblings, 0 replies; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

I'm going to want it in a subsequent patch

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/Debian.pm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 62551ac..d7f8e9c 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -460,15 +460,17 @@ sub setupboot_grub2 ($$$$) {
                 die unless $entry;
                 $entry->{Hv}= $1;
             }
-            if (m/^\s*multiboot\s*(?:\/boot)?\/(vmlinu[xz]-(\S+))/) {
+            if (m/^\s*multiboot\s*(?:\/boot)?\/(vmlinu[xz]-(\S+))\s+(.*)/) {
                 die unless $entry;
                 $entry->{KernOnly}= $1;
                 $entry->{KernVer}= $2;
+                $entry->{KernOpts}= $3;
             }
-            if (m/^\s*module\s*(?:\/boot)?\/(vmlinu[xz]-(\S+))/) {
+            if (m/^\s*module\s*(?:\/boot)?\/(vmlinu[xz]-(\S+))\s+(.*)/) {
                 die unless $entry;
                 $entry->{KernDom0}= $1;
                 $entry->{KernVer}= $2;
+                $entry->{KernOpts}= $3;
             }
             if (m/^\s*module\s*(?:\/boot)?\/(initrd\S+)/) {
                 $entry->{Initrd}= $1;
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
                   ` (19 preceding siblings ...)
  2015-06-24 15:32 ` [PATCH OSSTEST v3 20/22] Debian: Collect kernel command line from grub.cfg Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-25 10:33   ` Ian Jackson
  2015-06-24 15:32 ` [PATCH OSSTEST v3 22/22] Enable CONFIG_SPARSEMEM_VMEMMAP, arm64 seems to needs it (crashes) Ian Campbell
  21 siblings, 1 reply; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

Xen cannot (currently) be booted directly via the usual multiboot
path on EFI systems of any arch. Instead it is necessary to either
launch xen.efi direct from the UEFI shell or to chainload it from
grub. In both cases the Xen command line as well as what would
normally be the multiboot modules (kernel+command line, XSM policy,
initrd) must be configured in a Xen configuration file.

By patching overlay/etc/grub.d/20_linux_xen that if a suitable xen.efi
is found in the EFI System Partition (as arrange by a previous patch)
a suitable entry is created in grub.cfg as well.

When parsing the grub.cfg look for such an entry into addition to the
regular/multiboot one and when necessary write the configuration file
based on the regular entry and return the chainload one such that it
gets booted.

This is currently enabled only for Jessie ARM64 systems.

Note that the 20_linux_xen change here is a bit specific to us and not
really generic enough to go upstream IMHO, hence I haven't.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
v3: Rewrap and reindent to avoid long lines
---
 Osstest/Debian.pm               | 77 +++++++++++++++++++++++++++++++++++++++--
 overlay/etc/grub.d/20_linux_xen | 21 +++++++++++
 2 files changed, 96 insertions(+), 2 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index d7f8e9c..669cd36 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -400,12 +400,18 @@ sub setupboot_grub2 ($$$$) {
 
     my $rmenu= '/boot/grub/grub.cfg';
     my $kernkey= (defined $xenhopt ? 'KernDom0' : 'KernOnly');
- 
+
+    # Grub2 on Jessie/arm* doesn't do multiboot, so we must chainload.
+    my $need_uefi_chainload =
+        get_host_property($ho, "firmware") eq "uefi" &&
+        $ho->{Suite} =~ m/jessie/ && $r{arch} =~ m/^arm/;
+
     my $parsemenu= sub {
         my $f= bl_getmenu_open($ho, $rmenu, "$stash/$ho->{Name}--grub.cfg.1");
     
         my @offsets = (0);
         my $entry;
+        my $chainentry;
         my $submenu;
         while (<$f>) {
             next if m/^\s*\#/ || !m/\S/;
@@ -424,7 +430,13 @@ sub setupboot_grub2 ($$$$) {
 		        (defined $xenhopt
 			 ? qw(Title Hv KernDom0 KernVer)
 			 : qw(Title Hv KernOnly KernVer));
-		if (@missing) {
+		if ($need_uefi_chainload && $entry->{Chainload}) {
+		    # Needs to be before check of @missing, since a
+		    # chained entry doesn't have anything useful in it
+		    logm("Found chainload entry at $entry->{StartLine}..$.");
+		    die "already got one" if $chainentry;
+		    $chainentry = $entry;
+		} elsif (@missing) {
 		    logm("(skipping entry at $entry->{StartLine}..$.;".
 			 " no @missing)");
 		} elsif ($entry->{Hv} =~ m/xen-syms/) {
@@ -456,9 +468,15 @@ sub setupboot_grub2 ($$$$) {
                 $submenu={ StartLine =>$., MenuEntryPath => join ">", @offsets };
                 push @offsets,(0);
             }
+            if (m/^\s*chainloader\s*\/EFI\/osstest\/xen.efi/) {
+                die unless $entry;
+                $entry->{Hv}= $1;
+                $entry->{Chainload} = 1;
+            }
             if (m/^\s*multiboot\s*(?:\/boot)?\/(xen\S+)/) {
                 die unless $entry;
                 $entry->{Hv}= $1;
+                $entry->{Chainload} = 0;
             }
             if (m/^\s*multiboot\s*(?:\/boot)?\/(vmlinu[xz]-(\S+))\s+(.*)/) {
                 die unless $entry;
@@ -490,13 +508,68 @@ sub setupboot_grub2 ($$$$) {
 	    die unless $entry->{Hv};
 	}
 
+	if ($need_uefi_chainload) {
+	    die 'chainload entry not found' unless $chainentry;
+
+            # Propagate relevant fields of the main entry over to the
+            # chain entry for use of subsequent code.
+            foreach (qw(KernVer KernDom0 KernOnly KernOpts
+                        Initrd Xenpolicy)) {
+		next unless $entry->{$_};
+		die if $chainentry->{$_};
+		$chainentry->{$_} = $entry->{$_};
+            }
+
+            $entry = $chainentry;
+	}
+
         return $entry;
     };
 
 
     $bl->{UpdateConfig}= sub {
 	my ( $ho ) = @_;
+
+        target_editfile_root($ho, '/etc/default/grub', sub {
+            while (<::EI>) {
+                next if m/^export GRUB_ENABLE_XEN_UEFI_CHAINLOAD\=/;
+                print ::EO;
+            }
+	    print ::EO "export GRUB_ENABLE_XEN_UEFI_CHAINLOAD=\"osstest\"\n"
+		if $need_uefi_chainload;
+	});
+
 	target_cmd_root($ho, "update-grub");
+
+	if ($need_uefi_chainload) {
+	    my $entry= $parsemenu->();
+	    my $xencfg = <<END;
+[global]
+default=osstest
+
+[osstest]
+options=$xenhopt
+kernel=vmlinuz $entry->{KernOpts}
+END
+            $xencfg .= "ramdisk=initrd.gz\n" if $entry->{Initrd};
+            $xencfg .= "xsm=xenpolicy\n" if $entry->{Xenpolicy};
+
+            target_putfilecontents_root_stash($ho,30,$xencfg,
+				"/boot/efi/EFI/osstest/xen.cfg");
+
+            # /boot/efi should be a mounted EFI system partition, and
+            # /boot/efi/EFI/osstest/xen.efi should already exist. Hence no mkdir
+            # here.
+            target_cmd_root($ho,
+	        <<END.($entry->{Initrd}?<<END:"").($entry->{Xenpolicy}?<<END:""));
+set -ex
+cp -vL /boot/$entry->{KernDom0} /boot/efi/EFI/osstest/vmlinuz #/
+END
+cp -vL /boot/$entry->{Initrd} /boot/efi/EFI/osstest/initrd.gz #/
+END
+cp -vL /boot/$entry->{Xenpolicy} /boot/efi/EFI/osstest/xenpolicy #/
+END
+	}
     };
 
     $bl->{GetBootKern}= sub { return $parsemenu->()->{$kernkey}; };
diff --git a/overlay/etc/grub.d/20_linux_xen b/overlay/etc/grub.d/20_linux_xen
index aaead1b..30bdfc8 100755
--- a/overlay/etc/grub.d/20_linux_xen
+++ b/overlay/etc/grub.d/20_linux_xen
@@ -142,6 +142,27 @@ EOF
 }
 EOF
 }
+chain_xen_entry () {
+    vendor="$1"
+    if [ ! -f /boot/efi/EFI/$vendor/xen.efi ] ; then
+	return
+    fi
+    title=$(gettext_quoted "Chainload $vendor Xen")
+    xmessage="$(gettext_printf "Chainloading $vendor Xen ...")"
+    printf "menuentry '${title}' ${CLASS} {\n"
+    prepare_grub_to_access_device \
+	`${grub_probe} --target=device /boot/efi/EFI/$vendor/xen.efi` \
+	| grub_add_tab
+    cat <<EOF
+	echo	'$xmessage'
+	chainloader	/EFI/$vendor/xen.efi
+}
+EOF
+}
+
+for i in ${GRUB_ENABLE_XEN_UEFI_CHAINLOAD} ; do
+    chain_xen_entry $i
+done
 
 linux_list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do
     if grub_file_is_not_garbage "$i"; then
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* [PATCH OSSTEST v3 22/22] Enable CONFIG_SPARSEMEM_VMEMMAP, arm64 seems to needs it (crashes).
  2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
                   ` (20 preceding siblings ...)
  2015-06-24 15:32 ` [PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2 Ian Campbell
@ 2015-06-24 15:32 ` Ian Campbell
  2015-06-26  8:53   ` Ian Campbell
  21 siblings, 1 reply; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 15:32 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

TODO: Find out why!

This is just a placeholder/reminder, do not apply.
---
 ts-kernel-build | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ts-kernel-build b/ts-kernel-build
index 8d19482..67be9d9 100755
--- a/ts-kernel-build
+++ b/ts-kernel-build
@@ -552,6 +552,9 @@ setopt CONFIG_AHCI_XGENE y
 setopt CONFIG_POWER_RESET_XGENE y
 setopt CONFIG_RTC_DRV_XGENE y
 
+#arm64 crashes without -- determine why
+setopt CONFIG_SPARSEMEM_VMEMMAP y
+
 case ${XEN_TARGET_ARCH} in
     x86_32) setopt CONFIG_64BIT n ;;
     x86_64)
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 01/22] mg-*: Add mgi-common with fetch and fail helpers
  2015-06-24 15:32 ` [PATCH OSSTEST v3 01/22] mg-*: Add mgi-common with fetch and fail helpers Ian Campbell
@ 2015-06-24 15:59   ` Ian Jackson
  0 siblings, 0 replies; 48+ messages in thread
From: Ian Jackson @ 2015-06-24 15:59 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("[PATCH OSSTEST v3 01/22] mg-*: Add mgi-common with fetch and fail helpers"):
> Taken from both mg-cpu-microcode-update and mg-debian-installer-update

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 02/22] mg-*: Make package fetching common in new mgi-debian
  2015-06-24 15:32 ` [PATCH OSSTEST v3 02/22] mg-*: Make package fetching common in new mgi-debian Ian Campbell
@ 2015-06-24 16:00   ` Ian Jackson
  2015-06-25  9:17     ` Ian Campbell
  0 siblings, 1 reply; 48+ messages in thread
From: Ian Jackson @ 2015-06-24 16:00 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("[PATCH OSSTEST v3 02/22] mg-*: Make package fetching common in new mgi-debian"):
> This pattern appears several times in mg-debian-installer-update and
> I'm about to add another script which uses it.
> 
> The centralised version always does "sort -n -r | head -n" to pick out
> only the newest version, which only some of the open coded sites did.
> 
> Likewise the centralised version checks that $pkgfile is non-empty,
> unlike some of the open coded sites.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Although, another option would be to put this in mgi-common and call
it "fetch_debian_package".

Ian.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 03/22] Introduce mg-pxe-loader-update
  2015-06-24 15:32 ` [PATCH OSSTEST v3 03/22] Introduce mg-pxe-loader-update Ian Campbell
@ 2015-06-24 16:02   ` Ian Jackson
  0 siblings, 0 replies; 48+ messages in thread
From: Ian Jackson @ 2015-06-24 16:02 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("[PATCH OSSTEST v3 03/22] Introduce mg-pxe-loader-update"):
> The story for PXE booting via UEFI (at least on arm64) is not so
> straightforward as with pxelinux on x86. There seems to no good
> bootloader to launch via UEFI+pxe, in fact all I could find was grub
> (syslinux, and by extension pxelinux.efi, is x86 only).
> 
> Add mg-pxe-loader-update modelled on mg-debian-installer-update which
> will download the necessary grub binaries and produce a grub image
> which can be used to pxe boot.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 07/22] Refactor pxelinux configuration
  2015-06-24 15:32 ` [PATCH OSSTEST v3 07/22] Refactor pxelinux configuration Ian Campbell
@ 2015-06-24 16:04   ` Ian Jackson
  0 siblings, 0 replies; 48+ messages in thread
From: Ian Jackson @ 2015-06-24 16:04 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("[PATCH OSSTEST v3 07/22] Refactor pxelinux configuration"):
> The mechanism used to PXE boot can differ depending on the firmware
> type. Therefore refactor into Osstest::TestSupport and key off a new
> host property "firmware".

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 08/22] ts-host-install: Support UEFI PXE boot using grub.efi
  2015-06-24 15:32 ` [PATCH OSSTEST v3 08/22] ts-host-install: Support UEFI PXE boot using grub.efi Ian Campbell
@ 2015-06-24 16:06   ` Ian Jackson
  0 siblings, 0 replies; 48+ messages in thread
From: Ian Jackson @ 2015-06-24 16:06 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("[PATCH OSSTEST v3 08/22] ts-host-install: Support UEFI PXE boot using grub.efi"):
> (Wrap DiBase entry in README too for consistency)
...
> +sub setup_pxeboot_local_uefi ($) {
> +    my ($ho) = @_;
> +    setup_grub_efi_bootcfg($ho, <<END);
> +echo Should do a local boot here, somehow
> +END
> +}

OK, I get the picture that EFI is strange, but surely there should be
some comments or something about this ?  Does this actually work like
this ?

Ian.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 09/22] Enable chain loading to local disk for UEFI PXE systems.
  2015-06-24 15:32 ` [PATCH OSSTEST v3 09/22] Enable chain loading to local disk for UEFI PXE systems Ian Campbell
@ 2015-06-24 16:07   ` Ian Jackson
  2015-06-24 17:58     ` Ian Campbell
  0 siblings, 1 reply; 48+ messages in thread
From: Ian Jackson @ 2015-06-24 16:07 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("[PATCH OSSTEST v3 09/22] Enable chain loading to local disk for UEFI PXE systems."):
> First arrange for bootloader to be installed to removable media path,
> by using a new in Jessie preseed option. Then use that to chainload a
> bootloader from the disk.
> 
> The removable media path is well known (part of the UEFI spec) which
> saves us having to worry about which OS is on the host (so long as the
> OS can be configured to populate the removable media path)

Ah here we are.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

> -echo Should do a local boot here, somehow

If you change this print to a die instead, in the previous patch, you
can put my ack on that one too.

Ian.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 11/22] ts-kernel-build: Additional kernel options for Mustang
  2015-06-24 15:32 ` [PATCH OSSTEST v3 11/22] ts-kernel-build: Additional kernel options for Mustang Ian Campbell
@ 2015-06-24 16:08   ` Ian Jackson
  2015-06-26 11:05   ` Ian Campbell
  1 sibling, 0 replies; 48+ messages in thread
From: Ian Jackson @ 2015-06-24 16:08 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("[PATCH OSSTEST v3 11/22] ts-kernel-build: Additional kernel options for Mustang"):
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 12/22] ts-kernel-build: Enable CONFIG_EFI_VARS
  2015-06-24 15:32 ` [PATCH OSSTEST v3 12/22] ts-kernel-build: Enable CONFIG_EFI_VARS Ian Campbell
@ 2015-06-24 16:08   ` Ian Jackson
  0 siblings, 0 replies; 48+ messages in thread
From: Ian Jackson @ 2015-06-24 16:08 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("[PATCH OSSTEST v3 12/22] ts-kernel-build: Enable CONFIG_EFI_VARS"):
> Which makes efibootmgr work when running our kernel.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 14/22] Debian: Do not add Debian to UEFI boot order on install
  2015-06-24 15:32 ` [PATCH OSSTEST v3 14/22] Debian: Do not add Debian to UEFI boot order on install Ian Campbell
@ 2015-06-24 16:11   ` Ian Jackson
  2015-06-24 17:59     ` Ian Campbell
  0 siblings, 1 reply; 48+ messages in thread
From: Ian Jackson @ 2015-06-24 16:11 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("[PATCH OSSTEST v3 14/22] Debian: Do not add Debian to UEFI boot order on install"):
> By default Debian inserts itself before any existing entries,
> including the PXE one, meaning we otherwise cannot remotely regroove
> the box.

Right.

> +    if (get_host_property($ho, "firmware") eq "uefi" &&
> +	$ho->{Suite} =~ m/jessie/) {

I think you mean

  +    if (get_host_property($ho, "firmware") eq "uefi")
  +	die unless $ho->{Suite} =~ m/jessie/;

or this will expose us to broken boxes beyond jessie.


The rest looks plausible (although a bit unpleasant).

Ian.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 15/22] standalone: Prefer ./local-config to $HOME/.xen-osstest/config
  2015-06-24 15:32 ` [PATCH OSSTEST v3 15/22] standalone: Prefer ./local-config to $HOME/.xen-osstest/config Ian Campbell
@ 2015-06-24 16:12   ` Ian Jackson
  0 siblings, 0 replies; 48+ messages in thread
From: Ian Jackson @ 2015-06-24 16:12 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("[PATCH OSSTEST v3 15/22] standalone: Prefer ./local-config to $HOME/.xen-osstest/config"):
> OSSTEST_CONFIG still trumps both.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 09/22] Enable chain loading to local disk for UEFI PXE systems.
  2015-06-24 16:07   ` Ian Jackson
@ 2015-06-24 17:58     ` Ian Campbell
  2015-06-25 10:18       ` Ian Jackson
  0 siblings, 1 reply; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 17:58 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Wed, 2015-06-24 at 17:07 +0100, Ian Jackson wrote:
> Ian Campbell writes ("[PATCH OSSTEST v3 09/22] Enable chain loading to local disk for UEFI PXE systems."):
> > First arrange for bootloader to be installed to removable media path,
> > by using a new in Jessie preseed option. Then use that to chainload a
> > bootloader from the disk.
> > 
> > The removable media path is well known (part of the UEFI spec) which
> > saves us having to worry about which OS is on the host (so long as the
> > OS can be configured to populate the removable media path)
> 
> Ah here we are.
> 
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
> 
> > -echo Should do a local boot here, somehow
> 
> If you change this print to a die instead, in the previous patch, you
> can put my ack on that one too.

I guess you mean to change the surrounding call to be die "that message"
rather than to put die into the grub.cfg file (i.e. a strict s/echo/die/
on the line you quoted), so that is what I'll do.

Ian.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 14/22] Debian: Do not add Debian to UEFI boot order on install
  2015-06-24 16:11   ` Ian Jackson
@ 2015-06-24 17:59     ` Ian Campbell
  0 siblings, 0 replies; 48+ messages in thread
From: Ian Campbell @ 2015-06-24 17:59 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Wed, 2015-06-24 at 17:11 +0100, Ian Jackson wrote:
> Ian Campbell writes ("[PATCH OSSTEST v3 14/22] Debian: Do not add Debian to UEFI boot order on install"):
> > By default Debian inserts itself before any existing entries,
> > including the PXE one, meaning we otherwise cannot remotely regroove
> > the box.
> 
> Right.
> 
> > +    if (get_host_property($ho, "firmware") eq "uefi" &&
> > +	$ho->{Suite} =~ m/jessie/) {
> 
> I think you mean
> 
>   +    if (get_host_property($ho, "firmware") eq "uefi")
>   +	die unless $ho->{Suite} =~ m/jessie/;
> 
> or this will expose us to broken boxes beyond jessie.

Ah yes, that's a good idea indeed.

> The rest looks plausible (although a bit unpleasant).

Indeed, hopefully it will be easier in Stretch...

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 02/22] mg-*: Make package fetching common in new mgi-debian
  2015-06-24 16:00   ` Ian Jackson
@ 2015-06-25  9:17     ` Ian Campbell
  2015-06-25 10:22       ` Ian Jackson
  0 siblings, 1 reply; 48+ messages in thread
From: Ian Campbell @ 2015-06-25  9:17 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Wed, 2015-06-24 at 17:00 +0100, Ian Jackson wrote:
> Ian Campbell writes ("[PATCH OSSTEST v3 02/22] mg-*: Make package fetching common in new mgi-debian"):
> > This pattern appears several times in mg-debian-installer-update and
> > I'm about to add another script which uses it.
> > 
> > The centralised version always does "sort -n -r | head -n" to pick out
> > only the newest version, which only some of the open coded sites did.
> > 
> > Likewise the centralised version checks that $pkgfile is non-empty,
> > unlike some of the open coded sites.
> 
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
> 
> Although, another option would be to put this in mgi-common and call
> it "fetch_debian_package".

I'm happy either way, which would you prefer?

Ian.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 09/22] Enable chain loading to local disk for UEFI PXE systems.
  2015-06-24 17:58     ` Ian Campbell
@ 2015-06-25 10:18       ` Ian Jackson
  0 siblings, 0 replies; 48+ messages in thread
From: Ian Jackson @ 2015-06-25 10:18 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("Re: [PATCH OSSTEST v3 09/22] Enable chain loading to local disk for UEFI PXE systems."):
> On Wed, 2015-06-24 at 17:07 +0100, Ian Jackson wrote:
> > If you change this print to a die instead, in the previous patch, you
> > can put my ack on that one too.
> 
> I guess you mean to change the surrounding call to be die "that message"
> rather than to put die into the grub.cfg file (i.e. a strict s/echo/die/
> on the line you quoted), so that is what I'll do.

Yes, that is what I meant.

Thanks,
Ian.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 02/22] mg-*: Make package fetching common in new mgi-debian
  2015-06-25  9:17     ` Ian Campbell
@ 2015-06-25 10:22       ` Ian Jackson
  0 siblings, 0 replies; 48+ messages in thread
From: Ian Jackson @ 2015-06-25 10:22 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("Re: [PATCH OSSTEST v3 02/22] mg-*: Make package fetching common in new mgi-debian"):
> On Wed, 2015-06-24 at 17:00 +0100, Ian Jackson wrote:
...
> > Although, another option would be to put this in mgi-common and call
> > it "fetch_debian_package".
> 
> I'm happy either way, which would you prefer?

I'd marginally prefer it all in mgi-common.

Ian.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2
  2015-06-24 15:32 ` [PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2 Ian Campbell
@ 2015-06-25 10:33   ` Ian Jackson
  2015-06-25 11:46     ` Ian Campbell
  0 siblings, 1 reply; 48+ messages in thread
From: Ian Jackson @ 2015-06-25 10:33 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("[PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2"):
> Note that the 20_linux_xen change here is a bit specific to us and not
> really generic enough to go upstream IMHO, hence I haven't.

So if we accept this patch, we are committing to always having
20_linux_xen (and perhaps updating it to cope with new versions of
grub).  Originally having this file in osstest was intended as a
stopgap, pending inclusion of a suitable file upstream.

Is there some upstream-friendly way of achieving the same thing ?

I'm not really sure what is `specific to us' (or what `us' here means
- osstest, or Xen on arm64, or ...?)

Thanks,
Ian.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2
  2015-06-25 10:33   ` Ian Jackson
@ 2015-06-25 11:46     ` Ian Campbell
  2015-06-25 12:36       ` Ian Jackson
  0 siblings, 1 reply; 48+ messages in thread
From: Ian Campbell @ 2015-06-25 11:46 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Thu, 2015-06-25 at 11:33 +0100, Ian Jackson wrote:
> Ian Campbell writes ("[PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2"):
> > Note that the 20_linux_xen change here is a bit specific to us and not
> > really generic enough to go upstream IMHO, hence I haven't.
> 
> So if we accept this patch, we are committing to always having
> 20_linux_xen (and perhaps updating it to cope with new versions of
> grub).  Originally having this file in osstest was intended as a
> stopgap, pending inclusion of a suitable file upstream.

I originally considered writing NN_osstest_uefi, but it looked like it
was going to involve copying a fair bit of boilerplate from
20_linux_xen.

However, I've changed the approach I was using since then and now I
suspect there wouldn't actually be much duplication. So unless you think
otherwise I'll try that for next time around.

> Is there some upstream-friendly way of achieving the same thing ?

Not AFAIK. I could try upstreaming this but given that a) the user still
needs to manually copy things to the ESP and create a suitable xen.cfg
and b) people are working on a better way which will just work with the
existing non-UEFI grub.cfg file entries, I'm not sure how much point
there is.

> I'm not really sure what is `specific to us' (or what `us' here means
> - osstest, or Xen on arm64, or ...?)

All the paths are basically specific to us, just the general shape of
the entry is more generically applicable.

http://wiki.xen.org/wiki/Xen_EFI already documents how to do things
FWIW.

Ian.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2
  2015-06-25 11:46     ` Ian Campbell
@ 2015-06-25 12:36       ` Ian Jackson
  2015-06-25 13:01         ` Ian Campbell
  2015-06-25 17:31         ` Konrad Rzeszutek Wilk
  0 siblings, 2 replies; 48+ messages in thread
From: Ian Jackson @ 2015-06-25 12:36 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("Re: [PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2"):
> On Thu, 2015-06-25 at 11:33 +0100, Ian Jackson wrote:
> > Is there some upstream-friendly way of achieving the same thing ?
> 
> Not AFAIK. I could try upstreaming this but given that a) the user still
> needs to manually copy things to the ESP and create a suitable xen.cfg
> and b) people are working on a better way which will just work with the
> existing non-UEFI grub.cfg file entries, I'm not sure how much point
> there is.

I think "people are working on a better way" is what I was looking
for.  When that change comes along, we can remove 20_linux_xen ?

> > I'm not really sure what is `specific to us' (or what `us' here means
> > - osstest, or Xen on arm64, or ...?)
> 
> All the paths are basically specific to us, just the general shape of
> the entry is more generically applicable.

`us' = osstest ?  Xen ?

Ian.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2
  2015-06-25 12:36       ` Ian Jackson
@ 2015-06-25 13:01         ` Ian Campbell
  2015-06-25 13:02           ` Ian Jackson
  2015-06-25 17:31         ` Konrad Rzeszutek Wilk
  1 sibling, 1 reply; 48+ messages in thread
From: Ian Campbell @ 2015-06-25 13:01 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Thu, 2015-06-25 at 13:36 +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2"):
> > On Thu, 2015-06-25 at 11:33 +0100, Ian Jackson wrote:
> > > Is there some upstream-friendly way of achieving the same thing ?
> > 
> > Not AFAIK. I could try upstreaming this but given that a) the user still
> > needs to manually copy things to the ESP and create a suitable xen.cfg
> > and b) people are working on a better way which will just work with the
> > existing non-UEFI grub.cfg file entries, I'm not sure how much point
> > there is.
> 
> I think "people are working on a better way" is what I was looking
> for.  When that change comes along, we can remove 20_linux_xen ?

OK.

> > > I'm not really sure what is `specific to us' (or what `us' here means
> > > - osstest, or Xen on arm64, or ...?)
> > 
> > All the paths are basically specific to us, just the general shape of
> > the entry is more generically applicable.
> 
> `us' = osstest ?  Xen ?

Mostly osstest.

> 
> Ian.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2
  2015-06-25 13:01         ` Ian Campbell
@ 2015-06-25 13:02           ` Ian Jackson
  2015-06-25 14:16             ` Ian Campbell
  0 siblings, 1 reply; 48+ messages in thread
From: Ian Jackson @ 2015-06-25 13:02 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("Re: [PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2"):
> On Thu, 2015-06-25 at 13:36 +0100, Ian Jackson wrote:
> > I think "people are working on a better way" is what I was looking
> > for.  When that change comes along, we can remove 20_linux_xen ?
> 
> OK.

By `OK' do you mean `yes' ?

Ian.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2
  2015-06-25 13:02           ` Ian Jackson
@ 2015-06-25 14:16             ` Ian Campbell
  0 siblings, 0 replies; 48+ messages in thread
From: Ian Campbell @ 2015-06-25 14:16 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Thu, 2015-06-25 at 14:02 +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2"):
> > On Thu, 2015-06-25 at 13:36 +0100, Ian Jackson wrote:
> > > I think "people are working on a better way" is what I was looking
> > > for.  When that change comes along, we can remove 20_linux_xen ?
> > 
> > OK.
> 
> By `OK' do you mean `yes' ?

I did, yes.

I'm still considering to split this stuff out anyway, but I'll talk to
you f2f about that...

Ian.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2
  2015-06-25 12:36       ` Ian Jackson
  2015-06-25 13:01         ` Ian Campbell
@ 2015-06-25 17:31         ` Konrad Rzeszutek Wilk
  2015-06-26  7:07           ` Ian Campbell
  1 sibling, 1 reply; 48+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-06-25 17:31 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Ian Campbell, xen-devel

On Thu, Jun 25, 2015 at 01:36:29PM +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2"):
> > On Thu, 2015-06-25 at 11:33 +0100, Ian Jackson wrote:
> > > Is there some upstream-friendly way of achieving the same thing ?
> > 
> > Not AFAIK. I could try upstreaming this but given that a) the user still
> > needs to manually copy things to the ESP and create a suitable xen.cfg
> > and b) people are working on a better way which will just work with the
> > existing non-UEFI grub.cfg file entries, I'm not sure how much point
> > there is.
> 
> I think "people are working on a better way" is what I was looking
> for.  When that change comes along, we can remove 20_linux_xen ?

Not sure if he speaks of Daniel and me doing things in that arena?

There is one outstanding patch for 20_linux_xen that adds the proper
'multiboot2' for the Xen?
> 
> > > I'm not really sure what is `specific to us' (or what `us' here means
> > > - osstest, or Xen on arm64, or ...?)
> > 
> > All the paths are basically specific to us, just the general shape of
> > the entry is more generically applicable.
> 
> `us' = osstest ?  Xen ?
> 
> Ian.
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2
  2015-06-25 17:31         ` Konrad Rzeszutek Wilk
@ 2015-06-26  7:07           ` Ian Campbell
  0 siblings, 0 replies; 48+ messages in thread
From: Ian Campbell @ 2015-06-26  7:07 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: Ian Jackson, xen-devel

On Thu, 2015-06-25 at 13:31 -0400, Konrad Rzeszutek Wilk wrote:
> On Thu, Jun 25, 2015 at 01:36:29PM +0100, Ian Jackson wrote:
> > Ian Campbell writes ("Re: [PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2"):
> > > On Thu, 2015-06-25 at 11:33 +0100, Ian Jackson wrote:
> > > > Is there some upstream-friendly way of achieving the same thing ?
> > > 
> > > Not AFAIK. I could try upstreaming this but given that a) the user still
> > > needs to manually copy things to the ESP and create a suitable xen.cfg
> > > and b) people are working on a better way which will just work with the
> > > existing non-UEFI grub.cfg file entries, I'm not sure how much point
> > > there is.
> > 
> > I think "people are working on a better way" is what I was looking
> > for.  When that change comes along, we can remove 20_linux_xen ?
> 
> Not sure if he speaks of Daniel and me doing things in that arena?

Yes, plus Fu Wei from Linaro's work on multiboot_xen for arm64.

> There is one outstanding patch for 20_linux_xen that adds the proper
> 'multiboot2' for the Xen?

My assumption was that once these things landed that just running
"update-grub" would result in a working grub.cfg config, which I would
assume would need something in upstream grub's 20_linux_xen at least for
the x86 case, yes.

Ian.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 22/22] Enable CONFIG_SPARSEMEM_VMEMMAP, arm64 seems to needs it (crashes).
  2015-06-24 15:32 ` [PATCH OSSTEST v3 22/22] Enable CONFIG_SPARSEMEM_VMEMMAP, arm64 seems to needs it (crashes) Ian Campbell
@ 2015-06-26  8:53   ` Ian Campbell
  0 siblings, 0 replies; 48+ messages in thread
From: Ian Campbell @ 2015-06-26  8:53 UTC (permalink / raw)
  To: ian.jackson; +Cc: xen-devel

On Wed, 2015-06-24 at 16:32 +0100, Ian Campbell wrote:
> TODO: Find out why!
> 
> This is just a placeholder/reminder, do not apply.

This turned out to be a known upstream issue (thanks to Mark Rutland for
the tip) which has just been fixed for 4.2 and tagged for stable
backport.

Ian.

> ---
>  ts-kernel-build | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/ts-kernel-build b/ts-kernel-build
> index 8d19482..67be9d9 100755
> --- a/ts-kernel-build
> +++ b/ts-kernel-build
> @@ -552,6 +552,9 @@ setopt CONFIG_AHCI_XGENE y
>  setopt CONFIG_POWER_RESET_XGENE y
>  setopt CONFIG_RTC_DRV_XGENE y
>  
> +#arm64 crashes without -- determine why
> +setopt CONFIG_SPARSEMEM_VMEMMAP y
> +
>  case ${XEN_TARGET_ARCH} in
>      x86_32) setopt CONFIG_64BIT n ;;
>      x86_64)

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PATCH OSSTEST v3 11/22] ts-kernel-build: Additional kernel options for Mustang
  2015-06-24 15:32 ` [PATCH OSSTEST v3 11/22] ts-kernel-build: Additional kernel options for Mustang Ian Campbell
  2015-06-24 16:08   ` Ian Jackson
@ 2015-06-26 11:05   ` Ian Campbell
  1 sibling, 0 replies; 48+ messages in thread
From: Ian Campbell @ 2015-06-26 11:05 UTC (permalink / raw)
  To: ian.jackson; +Cc: xen-devel

On Wed, 2015-06-24 at 16:32 +0100, Ian Campbell wrote:
> Note: ARM testing currently uses a 3.16 based linux-arm-xen kernel
> (compared to 3.14 currently used as the default). In order to support
> Mustang something newer is needed, I've been testing 4.1 (next LTS
> kernel), 3.18 (the intervening LTS kernel) might be sufficient but I
> haven't tried it. We should plan to either update linux-arm-xen or the
> default kernel version at some point before we get Mustang h/w.

FTR 3.18 seemed to work when I tried it again today, not sure what was
up the last time (there has been a point release since though). Maybe I
was confused by the sparsemem thing, which is now also understood.

Ian.

^ permalink raw reply	[flat|nested] 48+ messages in thread

end of thread, other threads:[~2015-06-26 11:05 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-24 15:32 [PATCH OSSTEST v3 00/22] Initial support for ARM64 Ian Campbell
2015-06-24 15:32 ` [PATCH OSSTEST v3 01/22] mg-*: Add mgi-common with fetch and fail helpers Ian Campbell
2015-06-24 15:59   ` Ian Jackson
2015-06-24 15:32 ` [PATCH OSSTEST v3 02/22] mg-*: Make package fetching common in new mgi-debian Ian Campbell
2015-06-24 16:00   ` Ian Jackson
2015-06-25  9:17     ` Ian Campbell
2015-06-25 10:22       ` Ian Jackson
2015-06-24 15:32 ` [PATCH OSSTEST v3 03/22] Introduce mg-pxe-loader-update Ian Campbell
2015-06-24 16:02   ` Ian Jackson
2015-06-24 15:32 ` [PATCH OSSTEST v3 04/22] Debian: Preseed a EFI system partition during host install Ian Campbell
2015-06-24 15:32 ` [PATCH OSSTEST v3 05/22] ts-host-install: Split initrd out of @installcmdline Ian Campbell
2015-06-24 15:32 ` [PATCH OSSTEST v3 06/22] ts-host-install: split the "di" from the "host" command line Ian Campbell
2015-06-24 15:32 ` [PATCH OSSTEST v3 07/22] Refactor pxelinux configuration Ian Campbell
2015-06-24 16:04   ` Ian Jackson
2015-06-24 15:32 ` [PATCH OSSTEST v3 08/22] ts-host-install: Support UEFI PXE boot using grub.efi Ian Campbell
2015-06-24 16:06   ` Ian Jackson
2015-06-24 15:32 ` [PATCH OSSTEST v3 09/22] Enable chain loading to local disk for UEFI PXE systems Ian Campbell
2015-06-24 16:07   ` Ian Jackson
2015-06-24 17:58     ` Ian Campbell
2015-06-25 10:18       ` Ian Jackson
2015-06-24 15:32 ` [PATCH OSSTEST v3 10/22] Add arm64 build and test jobs Ian Campbell
2015-06-24 15:32 ` [PATCH OSSTEST v3 11/22] ts-kernel-build: Additional kernel options for Mustang Ian Campbell
2015-06-24 16:08   ` Ian Jackson
2015-06-26 11:05   ` Ian Campbell
2015-06-24 15:32 ` [PATCH OSSTEST v3 12/22] ts-kernel-build: Enable CONFIG_EFI_VARS Ian Campbell
2015-06-24 16:08   ` Ian Jackson
2015-06-24 15:32 ` [PATCH OSSTEST v3 13/22] ts-host-install: Set dtbs in the non-special kernel case too Ian Campbell
2015-06-24 15:32 ` [PATCH OSSTEST v3 14/22] Debian: Do not add Debian to UEFI boot order on install Ian Campbell
2015-06-24 16:11   ` Ian Jackson
2015-06-24 17:59     ` Ian Campbell
2015-06-24 15:32 ` [PATCH OSSTEST v3 15/22] standalone: Prefer ./local-config to $HOME/.xen-osstest/config Ian Campbell
2015-06-24 16:12   ` Ian Jackson
2015-06-24 15:32 ` [PATCH OSSTEST v3 16/22] Debian: grub2: Log full line range of menuentry and submenu entries Ian Campbell
2015-06-24 15:32 ` [PATCH OSSTEST v3 17/22] Debian: grub2: Use GRUB_CMDLINE_LINUX_XEN_REPLACE(_DEFAULT) Ian Campbell
2015-06-24 15:32 ` [PATCH OSSTEST v3 18/22] Collect xen.efi into xendist and install in appropriate place Ian Campbell
2015-06-24 15:32 ` [PATCH OSSTEST v3 19/22] Debian: Ignore xen-syms entries in grub.cfg Ian Campbell
2015-06-24 15:32 ` [PATCH OSSTEST v3 20/22] Debian: Collect kernel command line from grub.cfg Ian Campbell
2015-06-24 15:32 ` [PATCH OSSTEST v3 21/22] Debian: Arrange to be able to chainload a xen.efi from grub2 Ian Campbell
2015-06-25 10:33   ` Ian Jackson
2015-06-25 11:46     ` Ian Campbell
2015-06-25 12:36       ` Ian Jackson
2015-06-25 13:01         ` Ian Campbell
2015-06-25 13:02           ` Ian Jackson
2015-06-25 14:16             ` Ian Campbell
2015-06-25 17:31         ` Konrad Rzeszutek Wilk
2015-06-26  7:07           ` Ian Campbell
2015-06-24 15:32 ` [PATCH OSSTEST v3 22/22] Enable CONFIG_SPARSEMEM_VMEMMAP, arm64 seems to needs it (crashes) Ian Campbell
2015-06-26  8:53   ` Ian Campbell

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.