@@ -51,6 +51,7 @@ $dashdashdash //= -1;
builddirsprops();
my $enable_xsm = ($r{enable_xsm}//'false') =~ m/true/ ? 1 : 0;
+my $enable_livepatch = ($r{enable_livepatch}//'false') =~ m/true/ ? 1 : 0;
$buildcmd_global_prefix= <<END;
export XEN_CONFIG_EXPERT=y
@@ -95,6 +96,12 @@ sub checkout () {
echo >>.config LIBLEAFDIR_x86_64=lib
echo >>.config KERNELS=''
END
+ (${enable_livepatch} ? <<END : '').
+ if test -f xen/Kconfig; then
+ echo >>xen/.config CONFIG_LIVEPATCH=y
+ echo >>xen/.config CONFIG_FAST_SYMBOL_LOOKUP=y
+ fi
+END
(nonempty($r{enable_xsm}) ? <<END : '').
if test -f xen/Kconfig; then
echo >>xen/.config CONFIG_XSM='${build_xsm}'
@@ -164,6 +171,12 @@ END
END
store_runvar("flaskpolicy", "xenpolicy-" . $xen_version);
}
+
+ if ($enable_livepatch) {
+ buildcmd_stamped_logged(600, 'xen', 'xenlpt', '',<<END,'')
+ $make_prefix make $makeflags dist-tests
+END
+ }
}
sub divide () {
@@ -193,6 +206,12 @@ sub divide () {
mv \$mvfiles xeninstall/boot/.
fi
fi
+ lp=usr/lib/debug/xen-livepatch
+ mkdir -p xenlpt/\$lp
+ if test -d install/\$lp; then
+ mvfiles=`find install/\$lp '(' -name 'xen-syms*' -o -name '*.map' -o -name '*.livepatch' ')' -print`
+ mv \$mvfiles xenlpt/\$lp/.
+ 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
@@ -209,6 +228,8 @@ sub stash () {
"xen/dist/${part}install",
"${part}dist");
}
+ built_stash($ho, $builddir, "xen/dist/xenlpt", "xenlptdist")
+ if $enable_livepatch;
built_stash_file($ho, $builddir, "xen-syms", "xen/xen/xen-syms", 1);
built_stash_file($ho, $builddir, "xen-config", "xen/.config", 1);
built_stash_file($ho, $builddir, "xen-hv-config", "xen/xen/.config", 1);