This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Compiling Xen for Juno

Hi,

I am trying to run Xen on Juno r0 board and while compiling the Xen code getting following error -

make xen XEN_ARCH_TARGET=arm64 debug=y CONFIG_EARLY_PRINTK=juno

make -C xen install

make[1]: Entering directory `/home/nishaj/Xen/xen/xen'

make -f Rules.mk _install

make[2]: Entering directory `/home/nishaj/Xen/xen/xen'

make -C tools

make[3]: Entering directory `/home/nishaj/Xen/xen/xen/tools'

make symbols

make[4]: Entering directory `/home/nishaj/Xen/xen/xen/tools'

make[4]: `symbols' is up to date.

make[4]: Leaving directory `/home/nishaj/Xen/xen/xen/tools'

make[3]: Leaving directory `/home/nishaj/Xen/xen/xen/tools'

make -f /home/nishaj/Xen/xen/xen/Rules.mk include/xen/compile.h

make[3]: Entering directory `/home/nishaj/Xen/xen/xen'

Xen 4.6-unstable

make[3]: Leaving directory `/home/nishaj/Xen/xen/xen'

[ -e include/asm ] || ln -sf asm-x86 include/asm

[ -e arch/x86/efi ] && for f in boot.c runtime.c compat.c efi.h;\

  do ln -nsf ../../../common/efi/$f arch/x86/efi/; done;\

  true

make -f /home/nishaj/Xen/xen/xen/Rules.mk -C include

make[3]: Entering directory `/home/nishaj/Xen/xen/xen/include'

mkdir -p compat

grep -v 'DEFINE_XEN_GUEST_HANDLE(long)' public/callback.h | \

  python /home/nishaj/Xen/xen/xen/tools/compat-build-source.py >compat/callback.c.new

mv -f compat/callback.c.new compat/callback.c

/home/nishaj/gcc-linaro-4.9-2014.11-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc -E -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -I/home/nishaj/Xen/xen/xen/include -I/home/nishaj/Xen/xen/xen/include/asm-x86/mach-generic -I/home/nishaj/Xen/xen/xen/include/asm-x86/mach-default -msoft-float -fno-stack-protector -fno-exceptions -Wnested-externs -mno-red-zone -mno-sse -fpic -fno-asynchronous-unwind-tables -DGCC_HAS_VISIBILITY_ATTRIBUTE -fno-builtin -fno-common -Werror -Wredundant-decls -Wno-pointer-arith -pipe -g -D__XEN__ -nostdinc -fno-optimize-sibling-calls -DCONFIG_SHADOW_PAGING -DVERBOSE -DHAS_ACPI -DHAS_GDBSX -DHAS_PASSTHROUGH -DHAS_MEM_ACCESS -DHAS_MEM_PAGING -DHAS_MEM_SHARING -DHAS_PCI -DHAS_IOPORTS -DHAS_PDX -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER -fno-optimize-sibling-calls -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -include public/xen-compat.h -m32 -o compat/callback.i compat/callback.c

aarch64-linux-gnu-gcc: error: unrecognized command line option '-m64'

aarch64-linux-gnu-gcc: error: unrecognized command line option '-msoft-float'

aarch64-linux-gnu-gcc: error: unrecognized command line option '-mno-red-zone'

aarch64-linux-gnu-gcc: error: unrecognized command line option '-mno-sse'

aarch64-linux-gnu-gcc: error: unrecognized command line option '-m64'

aarch64-linux-gnu-gcc: error: unrecognized command line option '-m32'

make[3]: *** [compat/callback.i] Error 1

rm compat/callback.c

make[3]: Leaving directory `/home/nishaj/Xen/xen/xen/include'

make[2]: *** [/home/nishaj/Xen/xen/xen/xen] Error 2

make[2]: Leaving directory `/home/nishaj/Xen/xen/xen'

make[1]: *** [install] Error 2

make[1]: Leaving directory `/home/nishaj/Xen/xen/xen'

make: *** [install-xen] Error 2

Please let me know how to resolve it ?

Thanks.

Parents Reply Children
  • Hi,

    Sorry, I forgot to mention that I used trusty rather than saucy. You can see the available distributions for Ubuntu here, and saucy isn't on the list.

    And yes, you'll want to be installing libpxman-1-0:arm64 and libpxman-1-dev:arm64 from inside the chroot environment.

    Hope that helps,

    Ash.

  • Hi Ash,

    I have successfully installed sbuild/schroot and cross compiling environment after using trusty as code name.

    But I am still getting below errors during compilation -

    #make xen CROSS_COMPILE=aarch64-linux-gnu- XEN_TARGET_ARCH=arm64

    make -C xen install

    make[1]: Entering directory `/home/username/Xen/xen/xen'

    make -f Rules.mk _install

    make[2]: Entering directory `/home/username/Xen/xen/xen'

    make -C tools

    make[3]: Entering directory `/home/username/Xen/xen/xen/tools'

    make symbols

    make[4]: Entering directory `/home/username/Xen/xen/xen/tools'

    make[4]: `symbols' is up to date.

    make[4]: Leaving directory `/home/username/Xen/xen/xen/tools'

    make[3]: Leaving directory `/home/username/Xen/xen/xen/tools'

    make -f /home/username/Xen/xen/xen/Rules.mk include/xen/compile.h

    make[3]: Entering directory `/home/username/Xen/xen/xen'

    Xen 4.4.0

    make[3]: Leaving directory `/home/username/Xen/xen/xen'

    [ -e include/asm ] || ln -sf asm-arm include/asm

    make -f /home/username/Xen/xen/xen/Rules.mk -C include

    make[3]: Entering directory `/home/username/Xen/xen/xen/include'

    make[3]: Nothing to be done for `all'.

    make[3]: Leaving directory `/home/username/Xen/xen/xen/include'

    make -f /home/username/Xen/xen/xen/Rules.mk -C arch/arm asm-offsets.s

    make[3]: Entering directory `/home/username/Xen/xen/xen/arch/arm'

    make[3]: *** No rule to make target `/home/username/Xen/xen/xen/include/asm/arm64/bug.h', needed by `asm-offsets.s'.  Stop.

    make[3]: Leaving directory `/home/username/Xen/xen/xen/arch/arm'

    make[2]: *** [/home/username/Xen/xen/xen/xen] Error 2

    make[2]: Leaving directory `/home/username/Xen/xen/xen'

    make[1]: *** [install] Error 2

    make[1]: Leaving directory `/home/username/Xen/xen/xen'

    make: *** [install-xen] Error 2

    Thanks

  • Hi,

    I'm not sure what's going wrong there. Out of interest, where are you getting the Xen sources from? These are the steps I take to compile Xen from inside the chroot environment:

    $ git clone git://xenbits.xen.org/xen.git

    $ cd xen

    $ git checkout stable-4.5

    $ cp /usr/share/misc/config.{sub,guess} .

    $ CONFIG_SITE=/etc/dpkg-cross/cross-config.arm64 ./configure --build=x86_64-unknown-linux-gnu --host=aarch64-linux-gnu

    $ make -j8 xen CROSS_COMPILE=aarch64-linux-gnu- XEN_TARGET_ARCH=arm64

    Can you try this?

  • Hi Ash,

    Thanks. I can build now Xen image using above steps.

    Can you please also let me know how to run this image on Juno r0 platform ?

    I was following below link and previously trying to build master and stable-4.4 branches.

    http://community.arm.com/groups/processors/blog/2014/03/28/virtualization-on-arm-with-xen

    I couldn't find any where else steps to run xen for Juno.

    Thanks.

  • Hi,

    With Xen being an open source project, this is going beyond the scope of what we can help you with (both in terms of this forum and also in terms of our official support channels i.e. support@arm.com).

    I recommend you consult the open source community for help with this. The following links on the Xen website may be of use to you: