ARM64 softiron support
cover ARM64 softiron support
I currently have this working well enough to run d-i and install the host. I'm running a commissioning flight on both softiron boxes (laxton0, laxton1).
If this works well enough I will push this seris to osstest pretest and, assuming that it passes, put laxton* into production.
Note that I have not yet booted the Xen hypervisor. If the builds work, this will be tested by my commissioning flight. But I think it is probably better to put this new test code, and new hardware, into service, even if the actual hypervisor tests fail for some reason. We will then debug this in, and with the benefit of, the normal infrastructure.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
PATCH 1/35 Serial console: honour LinuxSerialConsole in bootloader setup
--- Osstest/Debian.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Osstest/Debian.pm +2 -1
@@ -67,8 +67,9 @@ sub debian_boot_setup ($$$$$;$) { my $kopt; my $console= target_var($ho,'console'); + $console ||= get_host_native_linux_console($ho); if (defined $console && length $console) { - $kopt= "console=$console"; + $kopt= $console eq 'NONE' ? '' : "console=$console"; } else { $kopt= "xencons=ttyS console=ttyS0,$c{Baud}n8"; }
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 2/35 ts-host-install: Expect "pool" in ntp.conf, not only "server"
In reply to Ian JacksonThis is helpful for playing around with stretch, which seems to use this option by default.
--- ts-host-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ts-host-install +1 -1
@@ -134,7 +134,7 @@ END target_editfile_root($ho, '/etc/ntp.conf', sub { my $done= 0; while (<EI>) { - if (m/^server\s/) { + if (m/^server\b|^pool\b\s/) { if ($ho->{Suite} =~ m/lenny|squeeze|wheezy|jessie/) { $_= $done ? "" : "server $ntpserver\n"; } else {
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 3/35 ts-host-install: NTP not honoured bug remains
In reply to Ian JacksonDebian #778564 remains open.
--- ts-host-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ts-host-install +1 -1
@@ -135,7 +135,7 @@ END my $done= 0; while (<EI>) { if (m/^server\b|^pool\b\s/) { - if ($ho->{Suite} =~ m/lenny|squeeze|wheezy|jessie/) { + if ($ho->{Suite} =~ m/lenny|squeeze|wheezy|jessie|stretch/) { $_= $done ? "" : "server $ntpserver\n"; } else { m/^server \Q$ntpserver\E\s/ or
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 4/35 mg-debian-installer-update: Break out default setting of src=
In reply to Ian JacksonNo functional change.
--- mg-debian-installer-update | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
mg-debian-installer-update +2 -3
@@ -31,17 +31,17 @@ packages="$3" site=http://ftp.debian.org/debian/ sbase=$site/dists/$suite +src=$sbase/main/installer-$arch/current/images/netboot/ + case ${suite}_${arch} in lenny_armhf|squeeze_armhf|lenny_arm64|squeeze_arm64|wheezy_arm64) # No such thing. exit 0 ;; *_i386|*_amd64) - src=$sbase/main/installer-$arch/current/images/netboot/ files="debian-installer/$arch/initrd.gz:initrd.gz debian-installer/$arch/linux:linux xen/vmlinuz:vmlinuz-xen xen/initrd.gz:initrd.gz-xen" ;; *_arm64) - src=$sbase/main/installer-$arch/current/images/netboot/ files="debian-installer/$arch/initrd.gz:initrd.gz \ debian-installer/$arch/linux:linux" dtbs=$sbase/main/installer-$arch/current/images/device-tree/
@@ -53,7 +53,6 @@ case ${suite}_${arch} in files='initrd.gz' # no kernel -- needs a newer kernel ;; *_armhf) - src=$sbase/main/installer-$arch/current/images/netboot files='vmlinuz:linux initrd.gz' dtbs=$sbase/main/installer-$arch/current/images/device-tree/ ;;
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 5/35 mg-debian-installer-update: Print working directory to stderr
In reply to Ian JacksonNo other change
--- mg-debian-installer-update | 1 + 1 file changed, 1 insertion(+)
mg-debian-installer-update +1 -0
@@ -70,6 +70,7 @@ esac cd $dstroot mkdir -p $dst cd $dst +echo >&2 "working in $dstroot/$dst" for f in $files; do echo >&2 "fetching $f"
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 6/35 mg-debian-installer-update: Log our version into our output
In reply to Ian Jackson--- mg-debian-installer-update | 4 ++++ 1 file changed, 4 insertions(+)
mg-debian-installer-update +4 -0
@@ -62,6 +62,7 @@ tftpdiversion=`getconfig_TftpDiVersion_suite $suite` dstroot=`getconfig TftpPath`/`getconfig TftpDiBase`/ date=`date +%Y-%m-%d` dst=$arch/$date-$suite +harness_rev=$(perl -e 'use Osstest; print get_harness_rev();') case "`getconfig HttpProxy`" in ?*) export http_proxy=`getconfig HttpProxy` ;;
@@ -72,6 +73,9 @@ mkdir -p $dst cd $dst echo >&2 "working in $dstroot/$dst" +now=$(date -R) +echo >>osstest-touched.log "$now: $harness_rev" + for f in $files; do echo >&2 "fetching $f" s=${f/:*} ; d=${f/*:}
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 7/35 mg-debian-installer-update: backports: Provide pps and ptp
In reply to Ian JacksonOur ARM64 softiron boxes need these to find their network and disks.
--- mg-debian-installer-update | 2 ++ 1 file changed, 2 insertions(+)
mg-debian-installer-update +2 -0
@@ -154,6 +154,8 @@ if [ x$bpok != x ]; then -path \*/kernel/drivers/i2c/busses/\* -o \ -path \*/kernel/drivers/md/\* -o \ -path \*/kernel/drivers/net/\* -o \ + -path \*/kernel/drivers/pps/\* -o \ + -path \*/kernel/drivers/ptp/\* -o \ -path \*/kernel/drivers/regulator/\* -o \ -path \*/kernel/drivers/scsi/\* -o \ -path \*/kernel/drivers/usb/dwc3/\* -o \
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 8/35 mg-debian-installer-update: backports: Add modules for EFI
In reply to Ian JacksonUEFI uses vfat for the boot partiton.
This also means we need some charset modules.
--- mg-debian-installer-update | 2 ++ 1 file changed, 2 insertions(+)
mg-debian-installer-update +2 -0
@@ -146,6 +146,8 @@ if [ x$bpok != x ]; then -path \*/kernel/fs/mbcache.ko -o \ -path \*/kernel/fs/ext\* -o \ -path \*/kernel/fs/jbd\* -o \ + -path \*/kernel/fs/fat\* -o \ + -path \*/kernel/fs/nls/\* -o \ -path \*/kernel/drivers/clk/\* -o \ -path \*/kernel/drivers/mmc/\* -o \ -path \*/kernel/drivers/phy/\* -o \
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 9/35 mg-debian-installer-update: backports: Provide crypto
In reply to Ian JacksonFilesystem drivers now refer to this.
--- mg-debian-installer-update | 1 + 1 file changed, 1 insertion(+)
mg-debian-installer-update +1 -0
@@ -146,6 +146,7 @@ if [ x$bpok != x ]; then -path \*/kernel/fs/mbcache.ko -o \ -path \*/kernel/fs/ext\* -o \ -path \*/kernel/fs/jbd\* -o \ + -path \*/kernel/fs/crypto\* -o \ -path \*/kernel/fs/fat\* -o \ -path \*/kernel/fs/nls/\* -o \ -path \*/kernel/drivers/clk/\* -o \
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 10/35 backports handling: Refactor kernel deb handling
In reply to Ian JacksonIntroduce private function $kdeb->(). No functional change.
--- Osstest/Debian.pm | 45 +++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 16 deletions(-)
Osstest/Debian.pm +29 -16
@@ -1114,32 +1114,45 @@ END $kp = "need-kernel-deb-wheezy-backports" if $kp eq "need-kernel-deb-armmp"; $kp =~ s/need-kernel-deb-$ho->{Suite}-// or next; - my $kern = "$d_i/$kp.deb"; - my $kurl = create_webfile($ho, "kernel", sub { - copy($kern, $_[0]) - or die "Copy kernel $kern failed: $!"; - }); - - my $ird = "$d_i/initramfs-tools.deb"; - my $iurl = create_webfile($ho, "initramfs-tools", sub { - copy($ird, $_[0]) - or die "Copy initramfs-tools $ird failed: $!"; - }); - - preseed_hook_command($ho, 'late_command', $sfx, <<END); + my $cmds = <<END; #!/bin/sh set -ex r=/target -$preseed_wget -O \$r/tmp/kern.deb $kurl -$preseed_wget -O \$r/tmp/initramfs-tools.deb $iurl +END + + my @kdebs; + my $kdeb = sub { + my ($what, $file) = @_; + + logm("for late_command using $what $file"); + my $furl = create_webfile($ho, $what, sub { + copy($file, $_[0]) or die "Copy $what $file failed: $!"; + }); + my $tmpfn = "/tmp/$what.deb"; + + $cmds .= <<END; +$preseed_wget -O \$r$tmpfn $furl +END + push @kdebs, $tmpfn; + }; + + my $kern = "$d_i/$kp.deb"; + $kdeb->("kernel", $kern); + + my $ird = "$d_i/initramfs-tools.deb"; + $kdeb->("initramfs-tools", $ird); + + $cmds .= <<END; # This will fail due to dependencies... -in-target dpkg -i /tmp/kern.deb /tmp/initramfs-tools.deb || true +in-target dpkg -i @kdebs || true # ... Now fix everything up... in-target apt-get install -f -y END + + preseed_hook_command($ho, 'late_command', $sfx, $cmds); } if ( $ho->{Flags}{'need-uboot-bootscr'} ) {
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 11/35 backports handling: Make backports initramfs-tools optional
In reply to Ian JacksonIf mg-debian-installer-update decided not to provide an initramfs.deb, just skip that.
No functional change with earlier d-i fetches produced by existing versions of mg-debian-installer-update.
--- Osstest/Debian.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Osstest/Debian.pm +5 -1
@@ -1142,7 +1142,11 @@ END $kdeb->("kernel", $kern); my $ird = "$d_i/initramfs-tools.deb"; - $kdeb->("initramfs-tools", $ird); + if (stat $ird) { + $kdeb->("initramfs-tools", $ird); + } else { + die "$ird $!" unless $!==ENOENT; + } $cmds .= <<END;
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 12/35 backports handling: Cope with dtbs in subdirs
In reply to Ian JacksonSome of the arm64 kernels have backports in subdirectories. So use a find rune instead of a plain mv.
--- mg-debian-installer-update | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
mg-debian-installer-update +2 -1
@@ -169,7 +169,8 @@ if [ x$bpok != x ]; then if [ -d x/usr/lib/linux-image-*-${bpok}/ ] ; then rm -rf backports-dtbs/ mkdir backports-dtbs/ - mv x/usr/lib/linux-image-*-${bpok}/*.dtb backports-dtbs/ + find x/usr/lib/linux-image-*-${bpok} -name '*.dtb' -print0 | \ + xargs -0r sh -ec 'mv -- "$@" backports-dtbs/' x tar --mtime=./x/usr/lib -cf backports-dtbs.tar backports-dtbs gzip -9nf backports-dtbs.tar fi
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 13/35 d-i: Cope if .ssh already exists (in /target/root/ and also /home/...)
In reply to Ian JacksonUse mkdir -p in both cases. Otherwise these late_commands may fail.
--- Osstest/Debian.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Osstest/Debian.pm +2 -2
@@ -735,13 +735,13 @@ r=/target/root cd \$r umask 022 -mkdir .ssh +mkdir -p .ssh $preseed_wget -O .ssh/authorized_keys '$authkeys_url' $preseed_wget -O .ssh/known_hosts '$knownhosts_url' u=osstest h=/home/\$u -mkdir /target\$h/.ssh +mkdir -p /target\$h/.ssh cp .ssh/authorized_keys /target\$h/.ssh chroot /target chown -R \$u.\$u \$h/.ssh END
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 14/35 d-i grub: Extend UEFI workaround to stretch
In reply to Ian JacksonDebian bug #789798 remains open. I have pinged the blocking bug in grub2, #792547.
--- Osstest/Debian.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Osstest/Debian.pm +1 -1
@@ -1276,7 +1276,7 @@ END preseed_microcode($ho,$sfx); if (get_host_property($ho, "firmware",'') eq "uefi") { - die unless $ho->{Suite} =~ m/jessie/; + die unless $ho->{Suite} =~ m/jessie|stretch/; # 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.
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 15/35 pxe templates: Do defaulting outside host_pxefile
In reply to Ian Jacksonhost_pxefile now returns undef if the specified $templatekey is not configured, rather than defaulting to the plain PxeTemplates.
This is going to useful because we want host_pxefile not to hardcode the default: with netgrub, the settings are all different.
If $templatekey is 'PxeTemplates' then this only has any effect if the PxeTempltes is not defined - ie, a broken case.
There is one place where $templatekey is not 'PxeTemplates', in mg-hosts. The defaulting to the value of PxeTemplates now occurs there.
So, overall, no functional change in non-broken cases.
--- Osstest/TestSupport.pm | 3 ++- mg-hosts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)
Osstest/TestSupport.pm +2 -1
@@ -2370,7 +2370,8 @@ sub host_pxefile ($;$) { my ($ho, $templatekey) = @_; my %v = %r; $templatekey //= 'PxeTemplates'; - my $templates = $ho->{Tftp}{$templatekey} || $ho->{Tftp}{PxeTemplates}; + my $templates = $ho->{Tftp}{$templatekey}; + return undef unless defined $templates; if (defined $ho->{Ether}) { my $eth = $v{'ether'} = $ho->{Ether}; $eth =~ y/A-Z/a-z/;
mg-hosts +1 -0
@@ -120,6 +120,7 @@ sub cmd_mkpxedir () { my $ho= selecthost("host=$hn"); my $pxefile = host_pxefile($ho); my $pxerealfile = host_pxefile($ho, 'PxeTemplatesReal'); + $pxerealfile //= $pxefile; my $dirname = dirname $pxefile; my $cmd = <<END; set -e
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 16/35 netboot: Rework interface to host_netboot_file (was host_pxefile)
In reply to Ian Jackson* Now it takes the tail of the template key (currently, normally Templates') rather than the whole of it (PxeTemplates'); the `Pxe' part is implied.
* Now it normally returns the whole path, including PxeDir, which the caller is no longer expected to prepend. In any case, it supplies the dir value.
* Rename it.
* All call sites adjusted.
Overall, no functional change.
--- Osstest/TestSupport.pm | 20 +++++++++++++------- mg-hosts | 6 +++--- 2 files changed, 16 insertions(+), 10 deletions(-)
Osstest/TestSupport.pm +13 -7
@@ -115,7 +115,7 @@ BEGIN { await_webspace_fetch_byleaf create_webfile file_link_contents get_timeout - setup_pxeboot_di setup_pxeboot_local host_pxefile + setup_pxeboot_di setup_pxeboot_local host_netboot_file ether_prefix
@@ -2366,12 +2366,18 @@ sub file_link_contents ($$$) { logm("wrote $fn". (defined $stash ? " (stashed as $stash)" : "")); } -sub host_pxefile ($;$) { - my ($ho, $templatekey) = @_; +sub host_netboot_file ($;$) { + my ($ho, $templatekeytail) = @_; + # returns the full netboot filename path + # in array context, returns (dir, pathtail) + # where dir does not depend on $templatekeytail my %v = %r; - $templatekey //= 'PxeTemplates'; + my $templatekeybase = 'Pxe'; + $templatekeytail //= 'Templates'; + my $templatekey = $templatekeybase.$templatekeytail; my $templates = $ho->{Tftp}{$templatekey}; return undef unless defined $templates; + my $dir = $ho->{Tftp}{$templatekeybase.'Dir'}; if (defined $ho->{Ether}) { my $eth = $v{'ether'} = $ho->{Ether}; $eth =~ y/A-Z/a-z/;
@@ -2396,7 +2402,7 @@ sub host_pxefile ($;$) { next; }ge; # and return the first pattern we managed to completely substitute - return $pat; + return wantarray ? ($dir,$pat) : $dir.$pat; } die "no pxe template ($templatekey) matched $templates ". (join ",", sort keys %v)." ?";
@@ -2404,8 +2410,8 @@ sub host_pxefile ($;$) { sub setup_pxelinux_bootcfg ($$) { my ($ho, $bootfile) = @_; - my $f= host_pxefile($ho); - file_link_contents("$ho->{Tftp}{Path}$ho->{Tftp}{PxeDir}$f", $bootfile, + my $f= host_netboot_file($ho); + file_link_contents("$ho->{Tftp}{Path}$f", $bootfile, hostnamepath($ho)."-pxelinux.cfg"); }
mg-hosts +3 -3
@@ -118,13 +118,13 @@ sub cmd_mkpxedir () { my $sudo = $ENV{'OSSTEST_SUDO'} // 'sudo'; foreach my $hn (@ARGV) { my $ho= selecthost("host=$hn"); - my $pxefile = host_pxefile($ho); - my $pxerealfile = host_pxefile($ho, 'PxeTemplatesReal'); + my ($dir, $pxefile) = host_netboot_file($ho); + my ($rdir, $pxerealfile) = host_netboot_file($ho, 'TemplatesReal'); $pxerealfile //= $pxefile; my $dirname = dirname $pxefile; my $cmd = <<END; set -e - cd $ho->{Tftp}{Path}$ho->{Tftp}{PxeDir} + cd $dir END $cmd .= <<END if $dirname ne '.'; $sudo mkdir -p $dirname
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 17/35 netboot: Rename pxeboot functions
In reply to Ian Jacksongit-ls-files | xargs perl -i~ -pe 's/\bsetup_pxeboot_/setup_netboot_/g' git-ls-files | xargs perl -i~ -pe 's/\bsetup_pxelinux_/setup_netboot_/g'
No functional change.
--- Osstest/TestSupport.pm | 28 ++++++++++++++-------------- ts-host-install | 8 ++++---- 2 files changed, 18 insertions(+), 18 deletions(-)
Osstest/TestSupport.pm +14 -14
@@ -115,7 +115,7 @@ BEGIN { await_webspace_fetch_byleaf create_webfile file_link_contents get_timeout - setup_pxeboot_di setup_pxeboot_local host_netboot_file + setup_netboot_di setup_netboot_local host_netboot_file ether_prefix
@@ -2408,7 +2408,7 @@ sub host_netboot_file ($;$) { (join ",", sort keys %v)." ?"; } -sub setup_pxelinux_bootcfg ($$) { +sub setup_netboot_bootcfg ($$) { my ($ho, $bootfile) = @_; my $f= host_netboot_file($ho); file_link_contents("$ho->{Tftp}{Path}$f", $bootfile,
@@ -2416,10 +2416,10 @@ sub setup_pxelinux_bootcfg ($$) { } # Systems using BIOS are configured to use pxelinux -sub setup_pxeboot_di_bios ($$$$$;%) { +sub setup_netboot_di_bios ($$$$$;%) { my ($ho,$kern,$initrd,$dicmd,$hocmd,%xopts) = @_; my $dtbs = $xopts{dtbs} ? "fdtdir $xopts{dtbs}" : ""; - setup_pxelinux_bootcfg($ho, <<END); + setup_netboot_bootcfg($ho, <<END); serial 0 $c{Baud} timeout 5 label overwrite
@@ -2433,9 +2433,9 @@ default overwrite END } -sub setup_pxeboot_local_bios ($) { +sub setup_netboot_local_bios ($) { my ($ho) = @_; - setup_pxelinux_bootcfg($ho, <<END); + setup_netboot_bootcfg($ho, <<END); serial 0 $c{Baud} timeout 5 label local
@@ -2445,8 +2445,8 @@ 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_netboot_di_uboot ($$$$$;%) { return &setup_netboot_di_bios; } +sub setup_netboot_local_uboot ($) { return &setup_netboot_local_bios; } sub setup_grub_efi_bootcfg ($$) { my ($ho, $bootfile) = @_;
@@ -2464,7 +2464,7 @@ sub setup_grub_efi_bootcfg ($$) { } # UEFI systems PXE boot using grub.efi -sub setup_pxeboot_di_uefi ($$$$$;%) { +sub setup_netboot_di_uefi ($$$$$;%) { my ($ho,$kern,$initrd,$dicmd,$hocmd,%xopts) = @_; setup_grub_efi_bootcfg($ho, <<END); set default=0
@@ -2476,7 +2476,7 @@ menuentry 'overwrite' { END } -sub setup_pxeboot_local_uefi ($) { +sub setup_netboot_local_uefi ($) { my ($ho) = @_; my %efi_archs = qw(amd64 X64 arm32 ARM
@@ -2499,20 +2499,20 @@ menuentry 'local' { END } -sub setup_pxeboot_local ($) { +sub setup_netboot_local ($) { my ($ho) = @_; my $firmware = get_host_property($ho, "firmware", "bios"); $firmware =~ s/-/_/g; no strict qw(refs); - return &{"setup_pxeboot_local_${firmware}"}($ho); + return &{"setup_netboot_local_${firmware}"}($ho); } -sub setup_pxeboot_di ($$$$$;%) { +sub setup_netboot_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, + return &{"setup_netboot_di_${firmware}"}($ho,$kern,$initrd, join(' ',@{$dicmd}), join(' ',@{$hocmd}), %xopts);
ts-host-install +4 -4
@@ -66,7 +66,7 @@ d-i netcfg/get_hostname string $ho->{Name} d-i netcfg/get_ipaddress string $ho->{Ip} END - setup_pxeboot_firstboot($ps_url); + setup_netboot_firstboot($ps_url); power_cycle_sleep($ho); my $logtailer= Osstest::Logtailer->new($c{WebspaceLog});
@@ -82,7 +82,7 @@ END exit 0; } - setup_pxeboot_local($ho); + setup_netboot_local($ho); await_tcp(get_timeout($ho,'reboot',$timeout{Sshd}), 14,$ho);
@@ -154,7 +154,7 @@ END logm('OK: install completed'); } -sub setup_pxeboot_firstboot($) { +sub setup_netboot_firstboot($) { my ($ps_url) = @_; my $d_i= $ho->{Tftp}{DiBase}.'/'.$r{arch}.'/'.$ho->{DiVersion}.'-'.$ho->{Suite};
@@ -275,7 +275,7 @@ END get_host_property($ho, "linux-boot-append $ho->{Suite} $r{arch}", ''); $xopts{ipappend} = $ipappend; - setup_pxeboot_di($ho, $kernel, "/$initrd", \@dicmdline, \@hocmdline, + setup_netboot_di($ho, $kernel, "/$initrd", \@dicmdline, \@hocmdline, %xopts); }
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 18/35 netboot: Change pxe to netboot in comments, docs and messages
In reply to Ian JacksonUEFI grub netbooting is not PXE. Indeed PXE is a BIOS thing only.
No functional change other than to messages.
--- INSTALL.production | 10 +++++----- Osstest/Debian.pm | 2 +- Osstest/TestSupport.pm | 6 +++--- README | 4 ++-- mg-hosts | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-)
INSTALL.production +5 -5
@@ -59,8 +59,8 @@ OwnerDaemonHost and QueueDaemonHost configuration options. If they happen to run on the same host then setting ControlDaemonHost will configure both in one go. -DHCP AND PXE ------------- +DHCP AND TFTP (eg PXE) +---------------------- osstest does not require a dedicated DHCP server but one must be present on the network and osstest requires access to its leases
@@ -69,9 +69,9 @@ to which will dump the lease file. This is configured via the DhcpWatchMethod host prop (default configured via HostProp_DhcpWatchMethod) -Likewise osstest does not require a dedicated PXE server but one must -exist on the network and be accessible via a local path on the osstest -control VM (e.g. over NFS) +Likewise osstest does not require a dedicated TFTP (netboot) server +but one must exist on the network and be accessible via a local path +on the osstest control VM (e.g. over NFS) CONFIGURATION =============
Osstest/Debian.pm +1 -1
@@ -1278,7 +1278,7 @@ END if (get_host_property($ho, "firmware",'') eq "uefi") { die unless $ho->{Suite} =~ m/jessie|stretch/; # Prevent grub-install from making a new Debian boot entry, so - # we always reboot from PXE. Debian bug #789798 proposes a + # we always reboot from the network. Debian bug #789798 proposes a # properly preseedable solution to this. preseed_hook_installscript($ho, $sfx, '/usr/lib/base-installer.d/',
Osstest/TestSupport.pm +3 -3
@@ -2332,7 +2332,7 @@ sub create_webfile ($$$) { return $wf_url; } -#---------- pxe handling ---------- +#---------- netboot handling ---------- sub file_link_contents ($$$) { my ($fn, $contents, $stash) = @_;
@@ -2404,7 +2404,7 @@ sub host_netboot_file ($;$) { # and return the first pattern we managed to completely substitute return wantarray ? ($dir,$pat) : $dir.$pat; } - die "no pxe template ($templatekey) matched $templates ". + die "no netboot template ($templatekey) matched $templates ". (join ",", sort keys %v)." ?"; }
@@ -2463,7 +2463,7 @@ sub setup_grub_efi_bootcfg ($$) { $bootfile, hostnamepath($ho)."-pxegrub.cfg"); } -# UEFI systems PXE boot using grub.efi +# UEFI systems netboot using grub.efi sub setup_netboot_di_uefi ($$$$$;%) { my ($ho,$kern,$initrd,$dicmd,$hocmd,%xopts) = @_; setup_grub_efi_bootcfg($ho, <<END);
README +2 -2
@@ -296,7 +296,7 @@ To run osstest in standalone mode: so you need to insert those missing runvars into standalone.db with sqlite3. - - Don't forget to set the machine to pxeboot in the BIOS. + - Don't forget to set the machine to netboot in the BIOS. - Currently you need a serial console at 115200 8n1; see TODO.
@@ -508,7 +508,7 @@ Tftp* TftpDiBase The path under `Path' to the root of the debian installer images. TftpGrubBase The path under `Path' to the root of the grub - EFI PXE images. + EFI netboot images. Tftp<setting>_<scope>
mg-hosts +1 -1
@@ -20,7 +20,7 @@ # Usages: # # ./mg-hosts mkpxedir HOST... -# Create directories for pxeboot as expected by the rest +# Create directories for netboot as expected by the rest # of osstest. Will use "sudo". The HOST(s) must be # allocated (via mg-allocate HOST). #
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 19/35 netboot: Change pxe to netboot in variable names
In reply to Ian JacksonNo functional change.
--- Osstest/TestSupport.pm | 6 +++--- mg-hosts | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-)
Osstest/TestSupport.pm +3 -3
@@ -2453,10 +2453,10 @@ sub setup_grub_efi_bootcfg ($$) { 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}.'/'.hostnamepath($ho).'/pxe.img'; + my $img=$ho->{Tftp}{Path}.'/'.hostnamepath($ho).'/pxe.img'; - logm("Copy $grub => $pxe"); - copy($grub, $pxe) or die "Copy $grub to $pxe failed: $!"; + logm("Copy $grub => $img"); + copy($grub, $img) or die "Copy $grub to $img failed: $!"; logm("grub_efi bootcfg into $f"); file_link_contents("$ho->{Tftp}{Path}$ho->{Tftp}{TmpDir}$f",
mg-hosts +7 -7
@@ -118,10 +118,10 @@ sub cmd_mkpxedir () { my $sudo = $ENV{'OSSTEST_SUDO'} // 'sudo'; foreach my $hn (@ARGV) { my $ho= selecthost("host=$hn"); - my ($dir, $pxefile) = host_netboot_file($ho); - my ($rdir, $pxerealfile) = host_netboot_file($ho, 'TemplatesReal'); - $pxerealfile //= $pxefile; - my $dirname = dirname $pxefile; + my ($dir, $file) = host_netboot_file($ho); + my ($rdir, $realfile) = host_netboot_file($ho, 'TemplatesReal'); + $realfile //= $file; + my $dirname = dirname $file; my $cmd = <<END; set -e cd $dir
@@ -133,10 +133,10 @@ END $sudo chown root.$ho->{Tftp}{PxeGroup} $dirname $sudo chmod 2775 $dirname END - if ($pxefile ne $pxerealfile) { - my $subdirs = "../" x $pxefile =~ m#/#; + if ($file ne $realfile) { + my $subdirs = "../" x $file =~ m#/#; $cmd .= <<END; - $sudo ln -sf $subdirs$pxefile $pxerealfile + $sudo ln -sf $subdirs$file $realfile END } print $cmd;
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 20/35 netboot: Rename mg-netgrub-loader-update
In reply to Ian JacksonThis used to be mg-pxe-loader-update, but it updates grub and not anything to do with PXE.
--- README | 2 +- mg-netgrub-loader-update | 84 ++++++++++++++++++++++++++++++++++++++++++++++++ mg-pxe-loader-update | 84 ------------------------------------------------ production-config | 2 +- 4 files changed, 86 insertions(+), 86 deletions(-) create mode 100755 mg-netgrub-loader-update delete mode 100755 mg-pxe-loader-update
README +1 -1
@@ -257,7 +257,7 @@ To run osstest in standalone mode: - Optional: ipmitool -- for hosts which use IPMI for power control - grub-common -- for mg-pxe-loader-update + grub-common -- for mg-netgrub-loader-update - Write a config file ~/.xen-osstest/config
mg-netgrub-loader-update new file +84 -0
84 lines not on this page · raw message
mg-pxe-loader-update deleted +0 -84
84 lines not on this page · raw message
production-config +1 -1
@@ -99,7 +99,7 @@ DebianImageVersion_jessie 8.2.0 MicrocodeUpdateAmd64 microcode.x86.2015-06-12.cpio MicrocodeUpdateI386 microcode.x86.2015-06-12.cpio -# Update with ./mg-pxe-loader-update +# Update with ./mg-netgrub-loader-update TftpGrubVersion XXXX-XX-XX XenUsePath /usr/groups/xencore/systems/bin/xenuse
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 21/35 netboot: Rename ./mg-hosts mknetbootdir subcommand
In reply to Ian JacksonWas ./mg-hosts mkpxedir, but it is more general.
--- README | 4 ++-- README.dev | 2 +- mg-hosts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-)
README +2 -2
@@ -538,8 +538,8 @@ TftpPxeTemplates are known is used, with TftpPath and TftpPxeDir prepended. TftpPxeTemplatesReal - Template filename which mg-hosts mkpxedir should make be a symlink to - the TftpPxeTemplates. Not used otherwise. + Template filename which mg-hosts mknetbootdir should make be a + symlink to the TftpPxeTemplates. Not used otherwise. Timezone Olson TZ name, used by host and guest installers
README.dev +1 -1
@@ -45,7 +45,7 @@ $ mg-hosts setprops marilith-n4 -- dhcp-watch-method 'leases dhcp3 dns-cam1.uk.x Handles multiple hosts: $ mg-hosts setprops HOSTA HOSTB -- "PROP" "VALUE" -$ mg-hosts mkpxedir HOSTA HOSTB +$ mg-hosts mknetbootdir HOSTA HOSTB Create a flight: $ FLIGHT=`OSSTEST_CONFIG=production-config ./cs-flight-create commission xen-unstable`
mg-hosts +2 -2
@@ -19,7 +19,7 @@ # Usages: # -# ./mg-hosts mkpxedir HOST... +# ./mg-hosts mknetbootdir HOST... # Create directories for netboot as expected by the rest # of osstest. Will use "sudo". The HOST(s) must be # allocated (via mg-allocate HOST).
@@ -111,7 +111,7 @@ sub checkhost ($) { sub l ($) { return split /,/, $_[0]; } -sub cmd_mkpxedir () { +sub cmd_mknetbootdir () { my $dryrun = 0; if (@ARGV && $ARGV[0] eq '-n') { shift @ARGV; $dryrun= 1; } die unless @ARGV>=1;
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 22/35 netboot: Break out subst_netboot_template
In reply to Ian JacksonNo functional change.
--- Osstest/TestSupport.pm | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-)
Osstest/TestSupport.pm +19 -12
@@ -116,6 +116,7 @@ BEGIN { await_webspace_fetch_byleaf create_webfile file_link_contents get_timeout setup_netboot_di setup_netboot_local host_netboot_file + subst_netboot_template ether_prefix
@@ -2366,6 +2367,22 @@ sub file_link_contents ($$$) { logm("wrote $fn". (defined $stash ? " (stashed as $stash)" : "")); } +sub subst_netboot_template ($$$) { + my ($templates, $v, $what) = (@_); + foreach my $pat (split /\s+/, $templates) { + # we skip patterns that contain any references to undefined %var%s + $pat =~ s{\%(\w*)\%}{ + $1 eq '' ? '%' : + defined($v->{$1}) ? $v->{$1} : + next; + }ge; + # and return the first pattern we managed to completely substitute + return $pat; + } + die "no netboot template ($what) matched $templates ". + (join ",", sort keys %$v)." ?"; +} + sub host_netboot_file ($;$) { my ($ho, $templatekeytail) = @_; # returns the full netboot filename path
@@ -2394,18 +2411,8 @@ sub host_netboot_file ($;$) { $v{'ipaddr'} = $ip; $v{'ipaddrhex'} = sprintf "%02X%02X%02X%02X", split /\./, $ip; } - foreach my $pat (split /\s+/, $templates) { - # we skip patterns that contain any references to undefined %var%s - $pat =~ s{\%(\w*)\%}{ - $1 eq '' ? '%' : - defined($v{$1}) ? $v{$1} : - next; - }ge; - # and return the first pattern we managed to completely substitute - return wantarray ? ($dir,$pat) : $dir.$pat; - } - die "no netboot template ($templatekey) matched $templates ". - (join ",", sort keys %v)." ?"; + my $got = subst_netboot_template($templates, \%v, $templatekey); + return wantarray ? ($dir,$got) : $dir.$got; } sub setup_netboot_bootcfg ($$) {
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 23/35 netboot: Introduce TftpNetGrub*
In reply to Ian Jackson* When expanding netboot filenames, look for NetGrub config keys rather than Pxe filenames. Currently this only affects mg-hosts because the files are created by setup_grub_efi_bootcfg, and the files are of course referred to only by the actual netboot grub image (which may be made by mg-netgrub-loader-update: neither of which honour these variables.
* Update the documentation, the default configs, and the production-config-*.
--- Osstest.pm | 2 ++ Osstest/TestSupport.pm | 6 ++++-- README | 23 +++++++++++++++++------ production-config | 3 +++ production-config-cambridge | 3 +++ 5 files changed, 29 insertions(+), 8 deletions(-)
Osstest.pm +2 -0
@@ -221,6 +221,8 @@ sub readglobalconfig () { $c{TftpPath} ||= "/tftpboot/"; $c{TftpPxeDir} ||= "pxelinux.cfg/"; $c{TftpPxeTemplates} ||= '%ipaddrhex% 01-%etherhyph%'; + $c{TftpNetGrubDir} ||= "Netgub.cfg/"; + $c{TftpNetGrubTemplates} ||= '%ether%'; $c{TftpPlayDir} ||= "$c{Username}/osstest/"; $c{TftpTmpDir} ||= "$c{TftpPlayDir}tmp/";
Osstest/TestSupport.pm +4 -2
@@ -994,7 +994,8 @@ sub selecthost ($) { $ho->{Tftp} = { }; $ho->{Tftp}{$_} = $c{"Tftp${_}_${tftpscope}"} || $c{"Tftp${_}"} foreach qw(Path TmpDir PxeDir PxeGroup PxeTemplates PxeTemplatesReal - DiBase GrubBase); + DiBase GrubBase + NetGrubDir NetGrubTemplates NetGrubTemplatesReal); #----- finalise -----
@@ -2389,7 +2390,8 @@ sub host_netboot_file ($;$) { # in array context, returns (dir, pathtail) # where dir does not depend on $templatekeytail my %v = %r; - my $templatekeybase = 'Pxe'; + my $firmware = get_host_property($ho, "firmware", "bios"); + my $templatekeybase = $firmware eq 'uefi' ? 'NetGrub' : 'Pxe'; $templatekeytail //= 'Templates'; my $templatekey = $templatekeybase.$templatekeytail; my $templates = $ho->{Tftp}{$templatekey};
README +17 -6
@@ -501,14 +501,21 @@ Tftp* TftpPxeDir The path under `Path' to the PXE configuration directory (e.g. pxelinux.cfg/). Include the trailing /. - TftpPxeGroup The Unix group which should own files under `PxeDir'. - TftpPxeTemplates See TftpPxeTemplates - TftpPxeTemplatesReal + TftpNetGrubDir The path under `Path' to the grub EFI netboot directory + Include the trailing /. + + TftpPxeGroup The Unix group which should own files under `PxeDir' + and NetGrubDir. + + TftpPxeTemplates } See below + TftpPxeTemplatesReal } + TftpNetGrubTemplates } + TftpNetGrubTemplatesReal } TftpDiBase The path under `Path' to the root of the debian installer images. TftpGrubBase The path under `Path' to the root of the grub - EFI netboot images. + EFI netboot (`netgrub') images. Tftp<setting>_<scope>
@@ -524,6 +531,7 @@ Tftp<setting>_<scope> Tftp<setting>_default is not defined. TftpPxeTemplates +TftpNetGrubTemplates List (space-separated) of template filenames for writing The templates contain variable substitutions %var% The variables are the runvars plus
@@ -535,11 +543,14 @@ TftpPxeTemplates Templates containing references to unknown %var%s - particularly, the host mac address when not known, or the guest's dynamic ip address - are skipped. The first template all of whose ingredients - are known is used, with TftpPath and TftpPxeDir prepended. + are known is used, with TftpPath and TftpPxeDir or TftpNetGrubDir + prepended. TftpPxeTemplatesReal +TftpNetGrubTemplatesReal Template filename which mg-hosts mknetbootdir should make be a - symlink to the TftpPxeTemplates. Not used otherwise. + symlink to the TftpPxeTemplates or TftpNetGrubTemplates. Not used + otherwise. Timezone Olson TZ name, used by host and guest installers
production-config +3 -0
@@ -84,6 +84,9 @@ TftpTmpDir osstest/tmp/ TftpPxeDir / TftpPxeTemplates %name%/pxelinux.cfg TftpPxeTemplatesReal pxelinux.cfg/%ipaddrhex% +TftpNetGrubDir / +TftpNetGrubTemplates %name%/netgrub.cfg +TftpNetGrubTemplatesReal Netgrub.cfg/%ether% TftpPxeGroup osstest # Update with ./mg-debian-installer-update(-all)
production-config-cambridge +3 -0
@@ -67,6 +67,9 @@ TftpTmpDir osstest/tmp/ TftpPxeDir / TftpPxeTemplates %name%/pxelinux.cfg TftpPxeTemplatesReal pxelinux.cfg/%ipaddrhex% +TftpNetGrubDir / +TftpNetGrubTemplates %name%/netgrub.cfg +TftpNetGrubTemplatesReal Netgrub.cfg/%ether% TftpPxeGroup osstest TftpDiVersion_wheezy 2016-06-08
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 24/35 netboot: Change stash file name to not be pxelinux-specific
In reply to Ian JacksonThis will be wrong when this is used for netgrub too.
Only functional change is to log outputs.
--- Osstest/TestSupport.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Osstest/TestSupport.pm +1 -1
@@ -2421,7 +2421,7 @@ sub setup_netboot_bootcfg ($$) { my ($ho, $bootfile) = @_; my $f= host_netboot_file($ho); file_link_contents("$ho->{Tftp}{Path}$f", $bootfile, - hostnamepath($ho)."-pxelinux.cfg"); + hostnamepath($ho)."-netboot.cfg"); } # Systems using BIOS are configured to use pxelinux
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 25/35 mg-netgrub-loader-update: Introduce $grubbase
In reply to Ian JacksonNo functional change.
--- mg-netgrub-loader-update | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
mg-netgrub-loader-update +3 -3
@@ -33,12 +33,12 @@ sbase=$site/dists/$suite archs="amd64 i386 arm64" -dstroot=`getconfig TftpPath`/`getconfig TftpGrubBase`/ +grubbase=`getconfig TftpGrubBase`/ +dstroot=`getconfig TftpPath`/$grubbase date=`date +%Y-%m-%d` dst=$date -grubpfx=`getconfig TftpGrubBase`/$date/grub -grubcfg=`getconfig TftpTmpDir`/grub.cfg-'$net_default_mac' +grubpfx=$grubbase/$date/grub mkdir -p $dstroot cd $dstroot
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 26/35 mg-netgrub-loader-update: Introduce $img
In reply to Ian JacksonNo functional change.
--- mg-netgrub-loader-update | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
mg-netgrub-loader-update +3 -1
@@ -74,9 +74,11 @@ for arch in $archs ; do rm Packages.gz + img=pxegrub-$arch.efi + grub-mkimage -O "$platform" \ -d ./grub/$platform \ - -o pxegrub-$arch.efi -p "$grubpfx" \ + -o $img -p "$grubpfx" \ search configfile normal efinet tftp net done
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 27/35 netboot: UEFI grub: Do it more like pxe
In reply to Ian Jackson* Abolish setup_grub_efi_bootcfg and use setup_netboot_bootcfg instead. The latter function now expects to be given a config file for the host's bootloader. For a UEFI host, that's a grub config file, which it will write to the configured NetGrub location for the specific host.
* Consequently, we no longer copy an actual grub image around every time we do a bootloader setup. Instead, we expect that the tftp server will be configured to point relevant hosts at a suitable fixed image, which will go to our config file.
* Also, consequently, write the NetGrubTemplate path when we want to setup the bootloader, rather than the ad-hoc grub-%ether%.
* Update mg-netgrub-loader-update jessie so that it writes the NetGrubTemplateReal from the config into the grub.cfg so that the grub image will read that file and then read the file created by setup_netboot_bootcfg.
* Document this in its head comment.
Currently this new mg-netgrub-loader-update is untested because jessie i386 grub (which is what we would run on the osstest controllers) does not understand the arm64-efi target. But the new Netgrub.cfg location is in use.
--- Osstest/TestSupport.pm | 19 ++----------------- mg-netgrub-loader-update | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 17 deletions(-)
Osstest/TestSupport.pm +2 -17
@@ -2457,25 +2457,10 @@ END sub setup_netboot_di_uboot ($$$$$;%) { return &setup_netboot_di_bios; } sub setup_netboot_local_uboot ($) { return &setup_netboot_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 $img=$ho->{Tftp}{Path}.'/'.hostnamepath($ho).'/pxe.img'; - - logm("Copy $grub => $img"); - copy($grub, $img) or die "Copy $grub to $img failed: $!"; - - logm("grub_efi bootcfg into $f"); - file_link_contents("$ho->{Tftp}{Path}$ho->{Tftp}{TmpDir}$f", - $bootfile, hostnamepath($ho)."-pxegrub.cfg"); -} - # UEFI systems netboot using grub.efi sub setup_netboot_di_uefi ($$$$$;%) { my ($ho,$kern,$initrd,$dicmd,$hocmd,%xopts) = @_; - setup_grub_efi_bootcfg($ho, <<END); + setup_netboot_bootcfg($ho, <<END); set default=0 set timeout=5 menuentry 'overwrite' {
@@ -2493,7 +2478,7 @@ sub setup_netboot_local_uefi ($) { i386 IA32); die "EFI arch" unless $efi_archs{ $r{arch} }; my $efi = $efi_archs{ $r{arch} }; - setup_grub_efi_bootcfg($ho, <<END); + setup_netboot_bootcfg($ho, <<END); set default=0 set timeout=5 menuentry 'local' {
mg-netgrub-loader-update +17 -0
@@ -3,6 +3,12 @@ # ./mg-netgrub-loader-update jessie # # Requires grub-mkimage (Debian package: grub-common) +# +# Creates $c{TftpPath}/$c{TftpGrubBase}/YYYY-MM-DD/grub/*.efi +# which expect to load .../YYYY-MM-DD/grub/grub.cfg +# which in turn loads .../Netgrub.cfg/EE:EE:EE:EE:EE:EE +# (where EE:EE:EE:EE:EE:EE is the MAC address) +# (or whatever else is specified in TftpNetGrubTemplates). # This is part of "osstest", an automated testing framework for Xen. # Copyright (C) 2015 Citrix Inc.
@@ -40,6 +46,17 @@ dst=$date grubpfx=$grubbase/$date/grub +grubcfg=$(perl -e ' + use Osstest; + use Osstest::TestSupport; + readglobalconfig; + my $k = qw(TftpNetGrubTemplatesReal); + my $file = subst_netboot_template $c{$k}, + { ether => qw(${net_default_mac}) }, + $k; + print $file, "\n" or die $!; +') + mkdir -p $dstroot cd $dstroot mkdir -p $dst
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 28/35 netboot: mg-netgrub-loader-update: Print sample dhcp config fragment
In reply to Ian Jackson--- mg-netgrub-loader-update | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
mg-netgrub-loader-update +8 -2
@@ -93,11 +93,17 @@ for arch in $archs ; do img=pxegrub-$arch.efi + output+=" filename \"$img\"; +" + grub-mkimage -O "$platform" \ -d ./grub/$platform \ -o $img -p "$grubpfx" \ search configfile normal efinet tftp net done -echo $date -echo >&2 "downloaded $dstroot/$date" +echo >&2 "downloaded $grubbase/$dst/ + +echo "host ... { + ... +$output}"
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 29/35 netboot: Rename TftpNetbootGroup (from TftpPxeGroup)
In reply to Ian JacksonThis applies to NetGrub too. Honour the old setting for compatibility.
--- Osstest/TestSupport.pm | 6 ++++-- README | 2 +- mg-hosts | 2 +- production-config | 2 +- production-config-cambridge | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-)
Osstest/TestSupport.pm +4 -2
@@ -993,9 +993,11 @@ sub selecthost ($) { logm("TftpScope is $tftpscope"); $ho->{Tftp} = { }; $ho->{Tftp}{$_} = $c{"Tftp${_}_${tftpscope}"} || $c{"Tftp${_}"} - foreach qw(Path TmpDir PxeDir PxeGroup PxeTemplates PxeTemplatesReal + foreach qw(Path TmpDir PxeDir NetbootGroup PxeTemplates PxeTemplatesReal DiBase GrubBase - NetGrubDir NetGrubTemplates NetGrubTemplatesReal); + NetGrubDir NetGrubTemplates NetGrubTemplatesReal + PxeGroup); + $ho->{TftpNetbootGroup} //= $ho->{TftpPxeGroup}; # compatibility #----- finalise -----
README +1 -1
@@ -504,7 +504,7 @@ Tftp* TftpNetGrubDir The path under `Path' to the grub EFI netboot directory Include the trailing /. - TftpPxeGroup The Unix group which should own files under `PxeDir' + TftpNetbootGroup The Unix group which should own files under `PxeDir' and NetGrubDir. TftpPxeTemplates } See below
mg-hosts +1 -1
@@ -130,7 +130,7 @@ END $sudo mkdir -p $dirname END $cmd .= <<END; - $sudo chown root.$ho->{Tftp}{PxeGroup} $dirname + $sudo chown root.$ho->{Tftp}{NetbootGroup} $dirname $sudo chmod 2775 $dirname END if ($file ne $realfile) {
production-config +1 -1
@@ -88,7 +88,7 @@ TftpNetGrubDir / TftpNetGrubTemplates %name%/netgrub.cfg TftpNetGrubTemplatesReal Netgrub.cfg/%ether% -TftpPxeGroup osstest +TftpNetbootGroup osstest # Update with ./mg-debian-installer-update(-all) TftpDiVersion_wheezy 2016-06-08 TftpDiVersion_jessie 2017-01-16
production-config-cambridge +1 -1
@@ -71,7 +71,7 @@ TftpNetGrubDir / TftpNetGrubTemplates %name%/netgrub.cfg TftpNetGrubTemplatesReal Netgrub.cfg/%ether% -TftpPxeGroup osstest +TftpNetbootGroup osstest TftpDiVersion_wheezy 2016-06-08 TftpDiVersion_jessie 2017-01-16
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 30/35 netboot: mg-netgrub-loader-update: Add some more docs
In reply to Ian Jackson--- mg-netgrub-loader-update | 12 ++++++++++++ 1 file changed, 12 insertions(+)
mg-netgrub-loader-update +12 -0
@@ -10,6 +10,18 @@ # (where EE:EE:EE:EE:EE:EE is the MAC address) # (or whatever else is specified in TftpNetGrubTemplates). +# Running this script is optional. Any approach will do which +# arranges for the dhcp server to provide `filename' referring to a +# copy of grub which will eventually load the config file specified by +# TftpNetGrubPattern. An example would be an appropriate +# debian-installer netboot grub image, which will load +# $c{TftpPath}/debian-installer/arm64/grub/grub.cfg +# which could for example be made to contain +# configfile Netgrub.cfg/${net_default_mac} + +# This script does not currently support non-default Tftp scopes. +# (See README.) + # This is part of "osstest", an automated testing framework for Xen. # Copyright (C) 2015 Citrix Inc. #
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 31/35 d-i: preseed_create_guest: Break out preseed_backports_packages
In reply to Ian JacksonNo functional change.
--- Osstest/Debian.pm | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-)
Osstest/Debian.pm +27 -12
@@ -927,6 +927,31 @@ END return $preseed; } +sub preseed_backports_packages ($$$$@) { + my ($ho, $sfx, $xopts, $suite, @pkgs) = @_; + + if (! $xopts->{BackportsSourcesAlreadyAdded}++) { + preseed_hook_command($ho, 'late_command', $sfx, <<END); +#!/bin/sh +set -ex + +cat <<EOF >>/target/etc/apt/sources.list + +# $suite backports +deb http://$c{DebianMirrorHost}/$c{DebianMirrorSubpath} $suite-backports main +EOF +in-target apt-get update +END + } + + preseed_hook_command($ho, 'late_command', $sfx, <<END); +#!/bin/sh +set -ex + +in-target apt-get install -y -t $suite-backports @pkgs +END +} + sub preseed_create_guest ($$$;@) { my ($ho, $arch, $sfx, %xopts) = @_;
@@ -948,18 +973,8 @@ sub preseed_create_guest ($$$;@) { # the Grub device.map isn't present at pkgsel/include time # but it is by late_command time. This was fixed by # version 1.3 which is in Jessie onwards. - preseed_hook_command($ho, 'late_command', $sfx, <<END); -#!/bin/sh -set -ex - -cat <<EOF >>/target/etc/apt/sources.list - -# $suite backports -deb http://$c{DebianMirrorHost}/$c{DebianMirrorSubpath} $suite-backports main -EOF -in-target apt-get update -in-target apt-get install -y -t wheezy-backports pv-grub-menu -END + preseed_backports_packages($ho, $sfx, \%xopts, $suite, + qw(pv-grub-menu)); } else { $extra_packages = "pv-grub-menu"; }
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 32/35 d-i: backports: When using backports kernel for a host, install linux-base
In reply to Ian JacksonNewer kernels may need a newer linux-base. This call has the happy side effect of adding backports to its sources.list, which is also generally needed.
--- Osstest/Debian.pm | 5 +++++ 1 file changed, 5 insertions(+)
Osstest/Debian.pm +5 -0
@@ -1129,6 +1129,11 @@ END $kp = "need-kernel-deb-wheezy-backports" if $kp eq "need-kernel-deb-armmp"; $kp =~ s/need-kernel-deb-$ho->{Suite}-// or next; + if ($kp eq 'backports') { + preseed_backports_packages($ho, $sfx, \%xopts, $suite, + qw(linux-base)); + } + my $cmds = <<END; #!/bin/sh set -ex
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 33/35 d-i: When using backports kernel, suppress kernel modules warning
In reply to Ian Jackson--- Osstest/Debian.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Osstest/Debian.pm +4 -1
@@ -1124,12 +1124,15 @@ in-target tar -C /boot -xaf /tmp/dtbs.tar.gz END } + my $backports_kernel; + 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; if ($kp eq 'backports') { + $backports_kernel = 1; preseed_backports_packages($ho, $sfx, \%xopts, $suite, qw(linux-base)); }
@@ -1322,7 +1325,7 @@ END $preseed_file .= preseed_hook_cmds(); - if ($ho->{Flags}{'no-di-kernel'}) { + if ($backports_kernel || $ho->{Flags}{'no-di-kernel'}) { $preseed_file .= <<END; d-i anna/no_kernel_modules boolean true d-i base-installer/kernel/skip-install boolean true
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 34/35 d-i: Add comment about interrupting the install
In reply to Ian Jackson--- Osstest/Debian.pm | 2 ++ 1 file changed, 2 insertions(+)
Osstest/Debian.pm +2 -0
@@ -890,6 +890,8 @@ d-i grub-installer/only_debian boolean true d-i grub-installer/bootdev string default d-i finish-install/keep-consoles boolean true + +# comment these out to get prompted at the end of the install: d-i finish-install/reboot_in_progress note d-i cdrom-detect/eject boolean false
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 35/35 ARM64: Create jobs, and provide the installer (with backports kernel)
In reply to Ian Jackson--- make-flight | 9 ++++++--- mfi-common | 27 +++++++++++++++++++++++---- mg-debian-installer-update | 1 + 3 files changed, 30 insertions(+), 7 deletions(-)
make-flight +6 -3
@@ -72,6 +72,8 @@ job_create_build_filter_callback () { build-amd64-libvirt) ;; build-armhf) ;; build-armhf-pvops) ;; + build-arm64) ;; + build-arm64-pvops) ;; *) return 1 ;; esac ;;
@@ -107,6 +109,7 @@ job_create_test_filter_callback () { case "$job" in test-amd64-amd64-libvirt) return 0 ;; test-armhf-armhf-xl) return 0 ;; + test-arm64-arm64-xl-xsm) return 0 ;; test-amd64-amd64-xl-qemuu-debianhvm-i386) return 0 ;; *) return 1 ;; esac
@@ -184,7 +187,7 @@ job_create_test_filter_callback () { arch_branch_filter_callback () { local arch=$1 case "$arch" in - armhf) + arm*) case "$branch" in linux-3.0) return 1;; linux-3.4) return 1;;
@@ -572,7 +575,7 @@ do_pv_debian_tests () { # Within each fmt we rotate through the list of arches # The starting list rotates once per ts, so that we try to # exercise each fmt on each arch family. - local fmtarches_outer="i386 armhf amd64 armhf" + local fmtarches_outer="i386 armhf amd64 arm64" local endfmt="do_pv_debian_tests-missing-ts-fmt-for-dom0arch=" for ts in xl libvirt ; do
@@ -628,7 +631,7 @@ test_matrix_do_one () { do_credit2_tests # No further arm tests at the moment - if [ $dom0arch = armhf ]; then + if [ $dom0arch = armhf -o $dom0arch = arm64 ]; then return fi
mfi-common +23 -4
@@ -109,7 +109,7 @@ 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
@@ -131,6 +131,16 @@ create_build_jobs () { kconfig_override_y=CONFIG_EXT4_FS " ;; + arm64) + case "$xenbranch" in + xen-3.*-testing) continue;; + xen-4.[0-6]-testing) continue;; + esac + pvops_kernel=" + tree_linux=$TREE_LINUX_ARM + revision_linux=${REVISION_LINUX_ARM:-${DEFAULT_REVISION_LINUX_ARM}} + " + ;; *) pvops_kernel=" tree_linux=$TREE_LINUX
@@ -316,7 +326,7 @@ create_build_jobs () { fi case "$arch" in - armhf) continue;; # don't do any other kernel builds + arm*) continue;; # don't do any other kernel builds esac if [ "x$REVISION_LINUX_OLD" != xdisable ]; then
@@ -410,7 +420,7 @@ test_matrix_iterate () { ;; 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
@@ -427,6 +437,14 @@ test_matrix_iterate () { *) ;; esac ;; + arm64) + # ARM64 from 4.6 onwards only + case "$xenbranch" in + xen-3.*-testing) continue;; + xen-4.[0-6]-testing) continue;; + *) ;; + esac + ;; i386) # 32-bit Xen is dropped from 4.3 onwards case "$xenbranch" in
@@ -460,13 +478,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
mg-debian-installer-update +1 -0
@@ -112,6 +112,7 @@ done # backports. case ${suite}_${arch} in wheezy_armhf) bpok=armmp; need_initramfs=y;; + jessie_arm64) bpok=arm64 ;; esac if [ x$bpok != x ]; then bp="$sbase-backports"
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel