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

Re: [Minios-devel] [Unikraft] Support for KVM on ARM



https://github.com/nim-lang/Nim/issues/2620 suggests it might be due to (old) gcc version.

Any chance we can get the following via cross-compilation :

          * arm-options in menuconfig screen?
          * actually cross-compile for arm32 in unikraft ecosystem?

On Mon, Apr 30, 2018 at 12:25 PM, Ajay Garg <ajaygargnsit@xxxxxxxxx> wrote:
Hi Simon.




Right now, you can test Unikraft with Xen on arm32. Be aware that there is a open bug on the memory allocator for arm (see:https://wiki.xenproject.org/wiki/Category:Unikraft_Users). arm64 with Xen is currently not supported but we working on it. Same for KVM and baremetal.

We use cubieboard2/3 for arm32 tests. These boards are even officially supported by Debian and can run Xen.


So we bought a cubieboard2 :)

Brought the board up without xen.
Then brought the board up with xen.

At this point, "sudo xl list" lists "Domain-0" fine.


Now, we are wanting to run the helloworld-unikraft-unikernel.

To keep aside any cross-compilation issues, we are compiling on cubieboard2 itself.
Following is the .config file (majorly containing the "ukdebug" and "ukboot" changes  required for arm32) :

#################################################################################
#
# Automatically generated file; DO NOT EDIT.
# Unikraft/0.2~8b94640 Configuration
#

#
# Architecture Selection
#
# ARCH_X86_64 is not set
ARCH_ARM_32=y
# MARCH_CORTEXA7 is not set
MARCH_A20NEON=y

#
# Platform Support
#
PLAT_XEN=y
XEN_DBGEMERGENCY=y
PLAT_LINUXU=y
LINUXU_DEFAULT_HEAPMB=4

#
# Library Configuration
#
HAVE_BOOTENTRY=y
# HAVE_LIBC is not set
# HAVE_SCHED is not set
LIBUKBOOT=y
LIBUKBOOT_BANNER=y
LIBUKBOOT_MAXNBARGS=60
# LIBUKBOOT_INITALLOC is not set
LIBUKDEBUG=y
LIBUKDEBUG_PRINTK=y
LIBUKDEBUG_PRINTD=y
# LIBUKDEBUG_PRINTD_EXTRA is not set
# LIBUKDEBUG_PRINTD_INFO is not set
# LIBUKDEBUG_PRINTD_WARN is not set
LIBUKDEBUG_PRINTD_ERR=y
# LIBUKDEBUG_PRINTD_CRIT is not set
# LIBUKDEBUG_NOREDIR is not set
# LIBUKDEBUG_REDIR_PRINTD is not set
LIBUKDEBUG_REDIR_PRINTK=y
LIBUKDEBUG_ENABLE_ASSERT=y
LIBUKARGPARSE=y
LIBNOLIBC=y
LIBUKALLOC=y
# LIBUKALLOC_IFPAGES is not set
# LIBUKALLOC_IFSTATS is not set
# LIBUKALLOCBBUDDY is not set
# LIBUKSCHED is not set
# LIBUKSCHEDCOOP is not set
LIBFDT=y

#
# Build Options
#
# OPTIMIZE_NONE is not set
OPTIMIZE_PERF=y
# OPTIMIZE_SIZE is not set
# OPTIMIZE_DEADELIM is not set
# DEBUG_SYMBOLS is not set
OPTIMIZE_STRIP=y
# RECORD_BUILDTIME is not set
CROSS_COMPILE=""

#
# Application Options
#
APPHELLOWORLD_DEPENDENCIES=y
APPHELLOWORLD_PRINTARGS=y
UK_NAME="helloworld"
#################################################################################


However, upon compilation, following is observed :

#################################################################################
debian@debian-armhf:~/unikraft/apps/helloworld$ make
make[1]: Entering directory '/home/debian/unikraft/unikraft'
  CP      config
  CC      libxenplat: hypervisor.o
cc1: error: bad value (cortex-a7) for -mcpu switch
cc1: error: bad value (cortex-a7) for -mtune switch
/home/debian/unikraft/unikraft/support/build/Makefile.build:48: recipe for target '/home/debian/unikraft/apps/helloworld/build/libxenplat/hypervisor.o' failed
make[1]: *** [/home/debian/unikraft/apps/helloworld/build/libxenplat/hypervisor.o] Error 1
make[1]: Leaving directory '/home/debian/unikraft/unikraft'
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 2
debian@debian-armhf:~/unikraft/apps/helloworld$
#################################################################################



So, we proceed to remove the -mtune=cortex-a7 and -mcpu=cortex-a7 flags from unikraft/unikraft/arch/arm/Makefile.uk.
Thereafter, upon recompiling, we get

#################################################################################
debian@debian-armhf:~/unikraft/apps/helloworld$ make
make[1]: Entering directory '/home/debian/unikraft/unikraft'
  CP      config
  CC      libxenplat: hypervisor.o
In file included from /home/debian/unikraft/unikraft/plat/xen/hypervisor.c:43:0:
/home/debian/unikraft/unikraft/include/uk/arch/atomic.h: In function ‘ukarch_test_and_clr_bit’:
/home/debian/unikraft/unikraft/include/uk/arch/atomic.h:90:2: warning: implicit declaration of function ‘__atomic_fetch_and’ [-Wimplicit-function-declaration]
/home/debian/unikraft/unikraft/include/uk/arch/atomic.h:90:40: error: ‘__ATOMIC_RELAXED’ undeclared (first use in this function)
/home/debian/unikraft/unikraft/include/uk/arch/atomic.h:90:40: note: each undeclared identifier is reported only once for each function it appears in
/home/debian/unikraft/unikraft/include/uk/arch/atomic.h: In function ‘ukarch_test_and_set_bit’:
/home/debian/unikraft/unikraft/include/uk/arch/atomic.h:105:2: warning: implicit declaration of function ‘__atomic_fetch_or’ [-Wimplicit-function-declaration]
/home/debian/unikraft/unikraft/include/uk/arch/atomic.h:105:38: error: ‘__ATOMIC_RELAXED’ undeclared (first use in this function)
/home/debian/unikraft/unikraft/include/uk/arch/atomic.h: In function ‘ukarch_test_and_clr_bit_sync’:
/home/debian/unikraft/unikraft/include/uk/arch/atomic.h:148:40: error: ‘__ATOMIC_SEQ_CST’ undeclared (first use in this function)
/home/debian/unikraft/unikraft/include/uk/arch/atomic.h: In function ‘ukarch_test_and_set_bit_sync’:
/home/debian/unikraft/unikraft/include/uk/arch/atomic.h:161:38: error: ‘__ATOMIC_SEQ_CST’ undeclared (first use in this function)
/home/debian/unikraft/unikraft/plat/xen/hypervisor.c: In function ‘do_hypervisor_callback’:
/home/debian/unikraft/unikraft/plat/xen/hypervisor.c:71:2: warning: implicit declaration of function ‘__atomic_exchange_n’ [-Wimplicit-function-declaration]
/home/debian/unikraft/unikraft/plat/xen/hypervisor.c:71:7: error: ‘__ATOMIC_SEQ_CST’ undeclared (first use in this function)
/home/debian/unikraft/unikraft/support/build/Makefile.build:48: recipe for target '/home/debian/unikraft/apps/helloworld/build/libxenplat/hypervisor.o' failed
make[1]: *** [/home/debian/unikraft/apps/helloworld/build/libxenplat/hypervisor.o] Error 1
make[1]: Leaving directory '/home/debian/unikraft/unikraft'
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 2
#################################################################################


What are we missing?


Thanks and Regards,
Ajay

Thanks and Regards,
Ajay



Thanks,

Simon



--
Regards,
Ajay



--
Regards,
Ajay
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

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