[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH OSSTEST v4 10/25] distros: support booting Debian PV (d-i installed) guests with pvgrub.
This requires the use of the pv-grub-menu package which is in Jessie onwards. (it is in wheezy-backports which is the subject of a subsequent patch). The bootloader to use is specified via a runvar {Guest}_bootloader. Adjust make-distros-flight to use pvgrub for some subset of i386 and amd64 guests to get coverage. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- v3: Define and use arch_debian2xen and arch_xen2debian Avoid pv-grub-x86_64.gz on i386 dom0, we don't built it there. Fiddle with py vs pv grub stripy a bit. --- Osstest.pm | 7 +++++++ Osstest/Debian.pm | 2 +- make-distros-flight | 21 ++++++++++++++++++++- ts-debian-di-install | 11 +++++++++-- 4 files changed, 37 insertions(+), 4 deletions(-) diff --git a/Osstest.pm b/Osstest.pm index 7989129..c0e3ee7 100644 --- a/Osstest.pm +++ b/Osstest.pm @@ -38,6 +38,7 @@ BEGIN { db_begin_work ensuredir get_filecontents_core_quiet system_checked nonempty visible_undef show_abs_time + %arch_debian2xen %arch_xen2debian ); %EXPORT_TAGS = ( ); @@ -49,6 +50,12 @@ our $mjobdb; our $dbh_tests; +our %arch_debian2xen = qw(i386 x86_32 + amd64 x86_64 + armhf armhf); +our %arch_xen2debian; +$arch_xen2debian{$arch_debian2xen{$_}} = $_ foreach keys %arch_debian2xen; + #---------- static default config settings ---------- our %c = qw( diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index 993acc7..cbc7172 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -702,7 +702,7 @@ sub preseed_create_guest ($$;@) { my $suite= $xopts{Suite} || $c{DebianSuite}; - my $extra_packages; + my $extra_packages = "pv-grub-menu" if $xopts{PvMenuLst}; my $preseed_file= preseed_base($ho, $suite, $extra_packages, %xopts); $preseed_file.= (<<END); diff --git a/make-distros-flight b/make-distros-flight index 5067342..80df21b 100755 --- a/make-distros-flight +++ b/make-distros-flight @@ -55,14 +55,33 @@ test_matrix_branch_filter_callback () { } test_do_one_netboot () { + stripy bootloader pvgrub pygrub \ + "$xenarch" "amd64" \ + "$dom0arch" "i386" \ + "$domU" "amd64" \ + "$dist" "sid" + + case ${dom0arch}_${domU}_${dist} in + arm*_arm*_*) bootloader="pygrub";; # no pvgrub for arm + + # Needs a menu.lst, not present in Squeeze+ due to switch to grub2, + # workedaround in Jessie+ with pv-grub-menu package. + *_squeeze) bootloader="pygrub";; + *_wheezy) bootloader="pygrub";; + + # pv-grub-x86_64.gz is not built by 32-bit dom0 userspace build. + i386_amd64_*) bootloader="pygrub";; + esac + job_create_test \ - test-$xenarch$kern-$dom0arch-$domU-$dist-netboot-pygrub \ + test-$xenarch$kern-$dom0arch-$domU-$dist-netboot-$bootloader \ test-debian-di xl $xenarch $dom0arch \ kernbuildjob=${bfi}build-$dom0arch-$kernbuild \ debian_arch=$domU \ debian_dist=$dist \ debian_method=netboot \ debian_diver=current \ + debian_bootloader=$bootloader \ all_hostflags=$most_hostflags } diff --git a/ts-debian-di-install b/ts-debian-di-install index a829185..73cb43d 100755 --- a/ts-debian-di-install +++ b/ts-debian-di-install @@ -93,6 +93,8 @@ sub ginstall () { my $method= $r{"$gho->{Guest}_method"}; my $tmpdir= "/root/$flight-$job-di"; + my $bl= $r{"$gho->{Guest}_bootloader"}; + target_cmd_root($ho, <<END); rm -rf $tmpdir mkdir $tmpdir @@ -109,7 +111,7 @@ END $suite = "sid" if $suite eq "daily"; - $ps_url = preseed_create_guest($gho, '', Suite=>$suite); + $ps_url = preseed_create_guest($gho, '', Suite=>$suite, PvMenuLst=>($bl eq "pvgrub")); $extra_disk = ""; } @@ -150,7 +152,12 @@ END guest_await_shutdown($ho,$gho,3600); guest_destroy($gho); - my $blcfg = <<END; + my $xenarch = $arch_debian2xen{$arch}; + my $pvgrub = "/usr/local/lib/xen/boot/pv-grub-$xenarch.gz"; + my $blcfg = $bl eq "pvgrub" ? <<END : <<END; +kernel = "$pvgrub" +extra = "(hd0,0)/boot/grub/menu.lst" +END bootloader = "pygrub" END -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |