OsmoTRX build verification job for arm
As OsmoTRX contains some neon optimizied ARM code, we should test whether this builds (and passes tests, if any?) on those platforms as part of our jenkins verification.
- Status changed from New to In Progress
So far I cleaned up some parts to remove libsqlite dependency in order to make it easier if we need to cross-compile for ARM with a toolchain.
I also did set up the autotest infra to have tests run during make check, and cleaned the existing test to run nicely with it. I also fixed a UDD socket bug that appeared while doing so.
- Add (if not exist yet) a test to check that the optimized instruction set parts work fine.
- Add script to build quemu machines for the different architectures with optimized instruction set.
- Run the tests in each different arch using make check.
I pushed some patches which check convolute for x85 (SSSE3 + SSE4.1).
I am now working on ading support to test the NEON ones by using qemu. After some investgation and trials, I found there's 2 main ways of doing it:
- Building debian image with debootstrap into a directory and using chroot + qemu-arm-static to run anything in there (so no real VM running, but enough for our tests I think).
- Building debian image with debootstrap into a directory mounted from an .img file, then running a VM with qemu-arm, and modify the image to run some script we want.
So far, the easiest (and quickest runtime wise) is the first one. The main issue I'm facing right now is trying to remove any root access required to do the job, since it's going to run inside jenkins. debootstrap and chroot require root permissions. I tried using fakechroot+fakeroot as explained here , but it has the limitation that it only works if the arch (so loader) is the same both inside and outisde the chroot, which is not the case for us. We could make it to work by linking the /lib dir inside the chroot into the outside /etc/qemu-binfmt/arm/ in the jenkins slave, but that's really hacky and difficult to maintain.
I think I'll instead keep using usual chroot and run the script inside a user container using unshare.
Something like: unshare -U prepare_vm.sh
qemu-debootstrap --foreign --include="linux-image-armmp-lpae,libusb-dev,fakeroot" --arch=armhf stretch qemu-img/ http://ftp.de.debian.org/debian/ # requires sudo test -f qemu-img/usr/bin/qemu-arm-static || cp "`which qemu-arm-static`" qemu-img/usr/bin/ chroot qemu-img "/debootstrap/debootstrap --second-stage" chroot qemu-img "apt-get update"
- Status changed from In Progress to Feedback
- % Done changed from 0 to 80
I finally enabled some parts in jenkin.sh to download a prebuilt image from somewhere else instead of building it with debootstrap, but still using proot to be able to chroot and run everything in there as a non-root user. I was able to run the complete script (with debootstrap) in my local workstation, but not in debian9-lxc inside buildserver1. In there it fails while configuring systemd pkg which runs "adduser" which runs "chfn" which fails with "PAM: System Error". All I read so far points to a kernel change in 3.15 which changed how AUDIT works inside/outside containers, so it may work if running outside an lxc.
- Status changed from Feedback to Resolved
- % Done changed from 80 to 100
Closing this one, as building for ARM in gerrit/master+jenkins has been ongoing for a few days already. Issue with having the convolve_test disabled for non x86_64 is being tracked separately in #2826.