[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 11/15] cross builds: ts-kernel-build: Support cross target armhf



Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
CC: Julien Grall <julien.grall@xxxxxxx>
CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 ts-kernel-build | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/ts-kernel-build b/ts-kernel-build
index 72ca98a1..29c6c43d 100755
--- a/ts-kernel-build
+++ b/ts-kernel-build
@@ -21,6 +21,7 @@ BEGIN { unshift @INC, qw(.); }
 use Osstest;
 use Osstest::TestSupport;
 use Osstest::BuildSupport;
+use Carp;
 
 tsreadconfig();
 
@@ -48,9 +49,24 @@ my $parms = $archparms->{ $r{arch} };
 
 sub enable_xen_config ();
 
+our $arch_envvars = '';
+
 sub cmd ($$) {
     my ($timeout, $script) = @_;
-    target_cmd_build($ho, $timeout, $builddir, $script);
+    target_cmd_build($ho, $timeout, $builddir, $arch_envvars.$script);
+}
+
+sub checkarch () {
+    return if $r{arch} eq $ho->{Arch};
+    my $cc = 'gcc';
+    if ($r{arch} eq 'armhf') {
+       target_install_packages($ho, "crossbuild-essential-$r{arch}");
+       $arch_envvars = <<END;
+    export ARCH=arm HOSTCC=$cc CROSS_COMPILE=arm-linux-gnueabihf-
+END
+    } else {
+       confess "unknown cross target (gnu 'host') $r{arch}";
+    }
 }
 
 sub checkout () {
@@ -450,6 +466,7 @@ sub fwinstall () {
 END
 }
 
+checkarch();
 checkout();
 config();
 build();
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.