https://projects.osmocom.org/https://projects.osmocom.org/favicon.ico?16647414092017-12-07T09:11:12ZOpen Source Mobile CommunicationsOsmoTRX - Bug #2721: OsmoTRX build verification job for armhttps://projects.osmocom.org/issues/2721?journal_id=65922017-12-07T09:11:12Zlaforge
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-3 priority-2 priority-default closed" href="/issues/2720">Bug #2720</a>: arm build comple crash :arm/convert code</i> added</li></ul> OsmoTRX - Bug #2721: OsmoTRX build verification job for armhttps://projects.osmocom.org/issues/2721?journal_id=70172018-01-04T10:44:58Zlaforge
<ul><li><strong>Assignee</strong> changed from <i>4368</i> to <i>pespin</i></li></ul> OsmoTRX - Bug #2721: OsmoTRX build verification job for armhttps://projects.osmocom.org/issues/2721?journal_id=70422018-01-04T11:10:35Zlaforge
<ul><li><strong>Priority</strong> changed from <i>Normal</i> to <i>High</i></li></ul> OsmoTRX - Bug #2721: OsmoTRX build verification job for armhttps://projects.osmocom.org/issues/2721?journal_id=70852018-01-09T19:41:48Zpespin
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li></ul><p>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.</p>
<p>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.</p>
<p>Next steps:<br />- Add (if not exist yet) a test to check that the optimized instruction set parts work fine.<br />- Add script to build quemu machines for the different architectures with optimized instruction set.<br />- Run the tests in each different arch using make check.</p> OsmoTRX - Bug #2721: OsmoTRX build verification job for armhttps://projects.osmocom.org/issues/2721?journal_id=70942018-01-10T18:23:16Zpespin
<ul></ul><p>I pushed some patches which check convolute for x85 (SSSE3 + SSE4.1).</p>
<p>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:<br />- 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).<br />- 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.</p>
<p>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.<br />I think I'll instead keep using usual chroot and run the script inside a user container using unshare.</p>
<p>Something like: unshare -U prepare_vm.sh</p>
<p>and prepare_vm.sh:<br /><pre>
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"
</pre></p>
<p>[1] <a class="external" href="https://lists.debian.org/debian-embedded/2011/04/msg00001.html">https://lists.debian.org/debian-embedded/2011/04/msg00001.html</a></p> OsmoTRX - Bug #2721: OsmoTRX build verification job for armhttps://projects.osmocom.org/issues/2721?journal_id=71222018-01-11T17:22:52Zpespin
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-3 priority-3 priority-high3 closed" href="/issues/2826">Bug #2826</a>: osmo-trx: different output in convolve test between x86 vs neon vs neon-vfpv4</i> added</li></ul> OsmoTRX - Bug #2721: OsmoTRX build verification job for armhttps://projects.osmocom.org/issues/2721?journal_id=71242018-01-11T18:53:32Zpespin
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Feedback</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>80</i></li></ul><p>Provided jenkins.sh working locally in <a class="external" href="https://gerrit.osmocom.org/#/c/5763/">https://gerrit.osmocom.org/#/c/5763/</a><br />Once osmo-ci <a class="external" href="https://gerrit.osmocom.org/#/c/5763/">https://gerrit.osmocom.org/#/c/5763/</a> is merged, we can test it in jenkins and once it's working fine, merge it.</p> OsmoTRX - Bug #2721: OsmoTRX build verification job for armhttps://projects.osmocom.org/issues/2721?journal_id=71462018-01-15T16:15:05Zpespin
<ul></ul><p>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.</p> OsmoTRX - Bug #2721: OsmoTRX build verification job for armhttps://projects.osmocom.org/issues/2721?journal_id=72252018-01-22T11:55:13Zpespin
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>80</i> to <i>100</i></li></ul><p>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 <a class="issue tracker-1 status-3 priority-3 priority-high3 closed" title="Bug: osmo-trx: different output in convolve test between x86 vs neon vs neon-vfpv4 (Resolved)" href="https://projects.osmocom.org/issues/2826">#2826</a>.</p>