BelaPlatform/bela-image-builder

Xenomai user space support is faulty

Closed this issue · 2 comments

Issue by giuliomoro
Monday Apr 24, 2017 at 23:56 GMT
Originally opened as LBDonovan/image-builder#10


I was getting EINVAL all over the place (see LBDonovan/image-builder#3 (comment) )

I configured with this on the BBB:

 $ /root/xenomai/configure --with-core=cobalt --enable-smp --enable-pshared CFLAGS="-fno-pie -no-pie" LDFLAGS="-no-pie -fno-pie"

then compiled and installed and it worked straight away.

Comment by LBDonovan
Tuesday Apr 25, 2017 at 07:17 GMT


Why --enable-smp? The kernel has SMP disabled, as the processor is single core and doesn't support it.

It's configured with this:

./configure CFLAGS="-march=armv7-a -mfpu=vfp3 -fno-pie -no-pie" LDFLAGS="-march=armv7-a -mfpu=vfp3 -fno-pie -no-pie" --disable-debug --with-core=cobalt --enable-pshared --build=arm

But its done in a qemu chroot which might be the problem (though I have had that working before!)

Comment by giuliomoro
Tuesday Apr 25, 2017 at 13:43 GMT


it does not work without --enable-smp. It may be because CONFIG_HAVE_SMP=y even though CONFIG_SMP is not set

root@beaglebone:~# grep SMP /boot/config-4.4.61-ti-xenomai-r98
CONFIG_BROKEN_ON_SMP=y
CONFIG_GENERIC_SMP_IDLE_THREAD=y
CONFIG_HAVE_SMP=y
# CONFIG_SMP is not set
CONFIG_SCSI_SAS_HOST_SMP=y
# CONFIG_VIDEO_VP27SMPX is not set

though actually
grep -RI HAVE_SMP /opt/source/xenomai-3 returns nothing
while grep'ing for CONFIG_SMP returns multiple entries.

Also there should be a check in place which should warn if you get the --enable-smp flag wrong:

lib/boilerplate/setup.c:523:			early_panic("running non-SMP libraries on SMP kernel?\n"

So it would seem that Xenomai only checks for CONFIG_SMP. I will post on the Xenomai mailing list about this, it may be a bug on their side.