|
From: | Riccardo Paolo Bestetti |
Subject: | Re: [Paparazzi-devel] Ar.Drone 2 session stuck at "Waiting for telemetry" |
Date: | Wed, 10 Aug 2016 02:02:25 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
Hello Felix. Compiler version: arm-linux-gnueabi-gcc (Ubuntu/Linaro
5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609. I think I now have a good grasp on the issue. As far as I understand, the "kernel too old" error happens when statically linking code to a glibc that was configured not to contain compatibility code. This can indeed be confirmed with the file command: address@hidden:~/paparazzi$ file var/aircrafts/ardrone2/ap/ap.elf ap.ef: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, for GNU/Linux 3.2.0, [...] On the Ar.Drone 2, software version v2.4.8: # uname -r 2.6.32.9-g980dab2 Which is a much older kernel version than 3.2.0. From what I gather from the glibc documentation [1], the solution would be linking against a glibc version configured and cross-compiled with the following option: ./configure --enable-kernel=2.6.32 Running the following commands (assuming a bare x86_64 Ubuntu 16.04 system with all Paparazzi's dependencies installed) gets me a libc.a that, if I'm not missing something, should be what I need to link against to get a working ap.elf on my Ar.Drone 2 running Linux 2.6.32: address@hidden:~/glibc_build$ wget http://ftp.gnu.org/gnu/libc/glibc-2.24.tar.xz address@hidden:~/glibc_build$ tar -xJf glibc-2.24.tar.xz address@hidden:~/glibc_build$ mkdir build && cd build address@hidden:~/glibc_build/build$ sudo apt-get install gawk address@hidden:~/glibc_build/build$ ../glibc-2.24/configure arm-linux-gnueabi --host=arm-linux-gnueabi --build=x86_64-pc-linux-gnu --prefix= --enable-kernel=2.6.32 address@hidden:~/glibc_build/build$ make Now I have: address@hidden:~/glibc_build/build$ ls -la | grep libc.a$ -rw-rw-r-- 1 paparazzi paparazzi 16964358 ago 10 01:39 libc.a How do I feed it to the cross-compiler in the Paparazzi build process? And if that really works, how can this be integrated in the Paparazzi build system? Note: sorry if the email feels disorganized, when I first started
writing it I had a much less specific understanding of the
problem. Regards, Il 09/08/2016 23:56, Felix Ruess ha scritto:
|
[Prev in Thread] | Current Thread | [Next in Thread] |