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

Re: [Xen-devel] I was able to cross-compile the hypervisor on an amd64 host for the aarch64 target ... However, I can't build the Xen toolset



Hello Nick,

Can you please configure your e-mail client to quote properly? This is quite difficult to follow the conversation.

On 07/06/2017 11:56 PM, Nick Garnett wrote:
Sent: Thursday, July 06, 2017 13:48
Sent: Thursday, July 06, 2017 12:26

From: Julien Grall [mailto:julien.grall@xxxxxxx]
Sent: Tuesday, July 04, 2017 09:47

On 07/04/2017 05:42 PM, Nick Garnett wrote:
I tried installing the tools with an ARM64 chroot also and had a
similar issue.  In that case, the package "crossbuild_essential_arm64" wouldn't 
install because it depended on a package that was not installable.

I don't use crossbuild within the chroot. My chroot contains ARM64 binaries 
only and QEMU is used to run ARM64 binaries.

In that case, you don't need to install crossbuild_essential_arm64.
Compiling in that chroot is like compiling directly on an ARM platforms.

My runes are usually:

./configure
make -j install-tools

This will install the tools in /usr/local/

I think the list of dependencies on the CrossCompiling page is still valid:

https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions/CrossCompiling#Configuring_an_arm64_crossbuild_chroot

____________________________________________________________________________________
[nickgarnett:170706-1225PDT]
Julian, you state:
        In that case, you don't need to install crossbuild_essential_arm64.
        Compiling in that chroot is like compiling directly on an ARM platform.

I assume you mean if I use crossbuild it would be "like compiling directly on an ARM 
platform".  Correct?

No, crossbuild would be building from an x86 host and target an ARM platform. Compiling directly on an ARM platform would be native build or use QEMU user-mode.


What should I do (or not do), following the HOWTO in 
"https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions/CrossCompiling";?
        Should I use "multiarch"?

____________________________________________________________________________________
[nickgarnett:170706-1345PDT]
Following the HOWTO 
"https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions/CrossCompiling";, 
resulted in the following error in the "apt-get update" step:

        #created the chroot and fixed the chroot.d descriptor file

        (zesty-arm64-cross)root# apt-get install vim-tiny wget sudo less 
pkgbinarymangler

        #(zesty-arm64-cross)root# vi /etc/apt/sources.list
        # added ...
        #deb [arch=arm64] http://ports.ubuntu.com/ saucy main universe

        #Since this is a cross-build chroot Recommended and Suggested packages 
are largely unnecessary,
        # created /etc/apt/apt.conf.d/30norecommends containing:
        #APT::Install-Recommends "0";
        #APT::Install-Suggests "0";

        (zesty-arm64-cross)root# dpkg --add-architecture arm64
        (zesty-arm64-cross)root# apt-get update

        Resulted in:
        Err:3 http://archive.ubuntu.com/ubuntu zesty/main arm64 Packages
          404  Not Found [IP: 91.189.88.149 80]
        Ign:5 http://archive.ubuntu.com/ubuntu zesty/universe arm64 Packages
        Reading package lists... Done
        E: Failed to fetch 
http://archive.ubuntu.com/ubuntu/dists/zesty/main/binary-arm64/Packages
                 404  Not Found [IP: 91.189.88.149 80]
        E: Some index files failed to download. They have been ignored, or old 
ones used instead.

I am assuming you were able to fix this give the configure below?

____________________________________________________________________________________
[nickgarnett:170706-1555PDT]

Got "configure: error: ./configure: line 6930: /usr/bin/python: cannot execute
binary file: Exec format error is too old, minimum required version is 2.3"
         ./configure --host=aarch64-linux-gnu
        checking build system type... x86_64-unknown-linux-gn
I am a bit confused, on a previous mail you mentioned you were using QEMU user-mode. But this looks like you are doing cross-build. Maybe I am lost because of the quoting. The error "exec format error" below seem to confirm you are mixing both.

If you have a rootfs with only arm64 binaries, you could use qemu user-mode. As soon as you call chroot in you rootfs your environment will be like running on an ARM64 platform. You should never see the word x86_64 anymore.

For crossbuild, I haven't done in a while and would need to brush up a bit before giving any help here. A good start would be:

https://wiki.debian.org/CrossCompiling

Let me know which way you want to use.

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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