Project

General

Profile

Actions

Bug #2721

closed

OsmoTRX build verification job for arm

Added by laforge over 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
-
Target version:
-
Start date:
12/07/2017
Due date:
% Done:

100%

Spec Reference:

Description

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.


Related issues

Related to OsmoTRX - Bug #2720: arm build comple crash :arm/convert codeResolvedpespin12/07/2017

Actions
Related to OsmoTRX - Bug #2826: osmo-trx: different output in convolve test between x86 vs neon vs neon-vfpv4Resolvedtnt01/11/2018

Actions
Actions #1

Updated by laforge over 6 years ago

  • Related to Bug #2720: arm build comple crash :arm/convert code added
Actions #2

Updated by laforge over 6 years ago

  • Assignee changed from 4368 to pespin
Actions #3

Updated by laforge over 6 years ago

  • Priority changed from Normal to High
Actions #4

Updated by pespin over 6 years ago

  • 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.

Next steps:
- 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.

Actions #5

Updated by pespin over 6 years ago

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 [1], 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

and 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" 

[1] https://lists.debian.org/debian-embedded/2011/04/msg00001.html

Actions #6

Updated by pespin over 6 years ago

  • Related to Bug #2826: osmo-trx: different output in convolve test between x86 vs neon vs neon-vfpv4 added
Actions #7

Updated by pespin over 6 years ago

  • Status changed from In Progress to Feedback
  • % Done changed from 0 to 80

Provided jenkins.sh working locally in https://gerrit.osmocom.org/#/c/5763/
Once osmo-ci https://gerrit.osmocom.org/#/c/5763/ is merged, we can test it in jenkins and once it's working fine, merge it.

Actions #8

Updated by pespin over 6 years ago

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.

Actions #9

Updated by pespin about 6 years ago

  • 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.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)