[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XenARM] [help] How to compile the unstable source for arm at sstabellini/xen-unstable.git/.git
On Tue, 2012-01-31 at 06:01 +0000, Frank, Chen wrote: > Hi experts, > > I am interested in XEN for ARM. I am trying to compile the unstable > source which I cloned from this repository, > sstabellini/xen-unstable.git and the branch is arm-v6. > > The environment is ubuntu-10.04 LTS. The cross-compiler for arm is > downloaded from codesourcery, the version : arm-2011.09. > > My steps: > 1) export XEN_COMPILE_ARCH=arm > 2) CROSS_COMPILE=arm-none-eabi- make xen This is approximately what I do, except I use XEN_TARGET_ARCH rather than XEN_COMPILE_ARCH and I pass both XEN_TARGET_ARCH and CROSS_COMPILE as make variables rather than setting then in my environment, e.g. I do: make -C xen XEN_TARGET_ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnueabi- xen I'm not sure if XEN_COMPILE_ARCH and XEN_TARGET_ARCH are the same thing (I think they are just synonyms) but the placement of the variable (env vs. command line) can have effects on what actually ends up getting set so it might be worth trying. > The error message is the following: > --- > make[4]: Entering directory > `/home/frank/workspace/xen/src/xen-arm-v6/xen/common' > arm-none-eabi-gcc -O1 -fno-omit-frame-pointer -marm -g > -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes > -Wdeclaration-after-statement -Wno-unused-but-set-variable > -fno-builtin -fno-common -Wredundant-decls -iwithprefix include > -Werror -Wno-pointer-arith -pipe > -I/home/frank/workspace/xen/src/xen-arm-v6/xen/include -msoft-float > -fno-stack-protector -fno-exceptions -Wnested-externs > -DGCC_HAS_VISIBILITY_ATTRIBUTE -march=armv7-a -mcpu=cortex-a15 > -fno-optimize-sibling-calls -g -D__XEN__ > -include /home/frank/workspace/xen/src/xen-arm-v6/xen/include/xen/config.h > -DVERBOSE -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER -MMD -MF > .version.o.d -c version.c -o version.o > make -f /home/frank/workspace/xen/src/xen-arm-v6/xen/Rules.mk -C > libelf built_in.o > make[5]: Entering directory > `/home/frank/workspace/xen/src/xen-arm-v6/xen/common/libelf' > arm-none-eabi-ld -marmelf_linux_eabi -r -o libelf-temp.o > libelf-tools.o libelf-loader.o libelf-dominfo.o > arm-none-eabi-ld: unrecognised emulation mode: armelf_linux_eabi > Supported emulations: armelf It's not clear whether our use of armelf_linux_eabi here is correct but both the cross compiler/ld I use and the native Debian armhf compiler support exactly armelf_linux_eabi and armelfb_linux_eabi but not armelf. This might be something we need to figure out going forward but for now it seems you also have arm-linux-gnueabi so I recommend using that. > make[5]: *** [libelf-temp.o] Error 1 > make[5]: Leaving directory > `/home/frank/workspace/xen/src/xen-arm-v6/xen/common/libelf' > make[4]: *** [libelf/built_in.o] Error 2 > --- > When I change CROSS_COMPILE from arm-none-eabi- to arm-linux-gnueabi-, > then rebuild, the error message is changed as the following: > --- > [ -e include/asm ] || ln -sf asm-arm include/asm > make -f /home/frank/workspace/xen/src/xen-arm-v6/xen/Rules.mk -C > include > make[3]: Entering directory > `/home/frank/workspace/xen/src/xen-arm-v6/xen/include' > for i in public/callback.h public/dom0_ops.h public/elfnote.h > public/event_channel.h public/features.h public/grant_table.h > public/kexec.h public/mem_event.h public/memory.h public/nmi.h > public/physdev.h public/platform.h public/sched.h public/tmem.h > public/trace.h public/vcpu.h public/version.h public/xen-compat.h > public/xen.h public/xencomm.h public/xenoprof.h public/hvm/e820.h > public/hvm/hvm_info_table.h public/hvm/hvm_op.h public/hvm/ioreq.h > public/hvm/params.h public/io/blkif.h public/io/console.h > public/io/fbif.h public/io/fsif.h public/io/kbdif.h > public/io/libxenvchan.h public/io/netif.h public/io/pciif.h > public/io/protocols.h public/io/ring.h public/io/tpmif.h > public/io/usbif.h public/io/vscsiif.h public/io/xenbus.h > public/io/xs_wire.h; do arm-linux-gnueabi-gcc -ansi -include stdint.h > -Wall -W -Werror -S -o /dev/null -xc $i || exit 1; echo $i; done > >headers.chk.new > public/callback.h:87:5: error: unknown type name 'xen_callback_t' At this point I get: [ -e include/asm ] || ln -sf asm-arm include/asm make -f /local/scratch/ianc/devel/arm/xen-unstable/xen/Rules.mk -C include make[3]: Entering directory `/local/scratch/ianc/devel/arm/xen-unstable/xen/include' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/local/scratch/ianc/devel/arm/xen-unstable/xen/include' Aha -- the difference is down to XEN_TARGET_ARCH vs. XEN_COMPILE_ARCH, see towards the end of xen/include/Makefile: ifeq ($(XEN_TARGET_ARCH),$(XEN_COMPILE_ARCH)) ... all: headers.chk ... I'm inferring from the Makefile that: XEN_COMPILE_ARCH == the host architecture -- e.g. the machine you are compiling on XEN_TARGET_ARCH == the target architecture -- e.g. the machine you want to run the resulting Xen on. And indeed if I do a native build on an arm system I see the same error as you do. We'll look at fixing this but in the meantime I suggest you use XEN_TARGET_ARCH and not XEN_COMPILE_ARCH. Ian. _______________________________________________ Xen-arm mailing list Xen-arm@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/mailman/listinfo/xen-arm
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |