Building Genode for Linux/ARM

Alexander Senier alex at ...331...
Tue May 19 10:26:17 CEST 2015


Hi Christian,

that explains the issue. Would be nice if the build system could stop
if I ask it to cross-build for linux_arm. (Or even better, to have a cross toolchain ;-)

I don't have a suitable host to build natively right now, but managed to
create a "cross" toolchain using qemu-user like this (most of it is taken from [1]):

   # apt-get install binfmt-support qemu qemu-user-static debootstrap
   # mkdir debian_armel_jessie
   # debootstrap --foreign --arch armel jessie debian_armel_jessie http://ftp.de.debian.org/debian/
   # cp /usr/bin/qemu-arm-static debian_armel_jessie/usr/bin
   # DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANGUAGE=C LANG=C chroot debian_armel_jessie
/debootstrap/debootstrap --second-stage
   # DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANGUAGE=C LANG=C chroot debian_armel_jessie dpkg --configure -a
   # sudo  git clone git://github.com/genodelabs/genode.git debian_armel_jessie/build/genode
   # LC_ALL=C LANGUAGE=C LANG=C chroot debian_armel_jessie

Inside the chroot:

   # apt-get update
   # apt-get install build-essential autoconf2.64 libncurses-dev texinfo autogen sudo expect
   # cd /build/genode/tool/
   # ./tool_chain arm
   # ./create_builddir linux_arm

Note, that building the toolchain will take VERY long.

Building from inside the chroot does not yet succeed. Not sure whether
this is due to my special setup or whether there's another issue:

   # cd ../build/linux_arm
   # VERBOSE= make core
   checking library dependencies...
     Library platform
     Library cxx
       COMPILE  guard.o
   /usr/local/genode-gcc/bin/genode-arm-g++  -Wno-psabi -Wno-psabi -ffunction-sections -fno-strict-aliasing -nostdinc -g  -O2 -MMD -MP -MT
'guard.o guard.d' -Wall  -ffunction-sections -fno-strict-aliasing -nostdinc -g  -O2 -MMD -MP -MT 'guard.o guard.d' -Wall  -fPIC -std=gnu++11
-Wno-psabi -Wno-psabi -ffunction-sections -fno-strict-aliasing -nostdinc -g  -O2 -MMD -MP -MT 'guard.o guard.d' -Wall  -ffunction-sections
-fno-strict-aliasing -nostdinc -g  -O2 -MMD -MP -MT 'guard.o guard.d' -Wall  -fPIC -std=gnu++11 -I.
-I/build/genode/repos/base-linux/src/platform/arm -I/build/genode/repos/base/src/platform/arm -I/build/genode/repos/base/include/arm
-I/build/genode/repos/base/include/32bit -I/build/genode/repos/base/include/arm_v7 -I/build/genode/repos/os/include/arm_v7
-I/build/genode/repos/base/include/arm -I/build/genode/repos/base/include/32bit -I/build/genode/repos/base-linux/include
-I/build/genode/repos/base/include -I/build/genode/repos/os/include -I/build/genode/repos/demo/include
-I/usr/local/genode-gcc/bin/../lib/gcc/arm-elf-eabi/4.7.4/include -c /build/genode/repos/base/src/base/cxx/guard.cc -o guard.o
   /tmp/cc4ojSu0.s: Assembler messages:
   /tmp/cc4ojSu0.s:45: Error: selected processor does not support ARM mode `ldrex ip,[r0]'
   /tmp/cc4ojSu0.s:48: Error: selected processor does not support ARM mode `strexeq ip,r2,[r0]'
   /tmp/cc4ojSu0.s:62: Error: selected processor does not support ARM mode `dmb'
   /build/genode/repos/base/mk/generic.mk:56: recipe for target 'guard.o' failed

Adding -march=armv7-a manually to the above g++ invocation succeed, but I don't see where to set the architecture in the build config.

Cheers,
Alex


[1] https://wiki.debian.org/EmDebian/CrossDebootstrap

On 18.05.2015 22:56, Christian Prochaska wrote:
> the Linux platforms don't support cross-compiling at this stage, which means that 'linux_arm' only works on an ARM Linux host system.




More information about the users mailing list