Closed imuguruza closed 7 years ago
Hi @imuguruza,
I would like to compile this recipes in order to create a Yocto image with
Ardupilot, in order to fly the PXFmini with the ZynqBerry :-)
I am glad to hear that ;).
But I'm facing a cross-compiling issue that you might have solved some how.
I have added to my build conf/bblayer.conf the layers you have created, as said in the README and try to compile using the next command:
First I have exported the cross-compiler using the script under build/tmp/deploy/sdk, called poky-glibc-x86_64-meta- toolchain-cortexa9hf-neon-toolchain-2.1.2.sh and install the toolchain under /opt. And sourced its environment variable with source /opt/poky/2.1.2/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
You don't need to source the toolchain. Only sourcing the environment,
source oe-init-build-env
in poky directory is easier to setup all the environment variables.
Now, I try to run: bitbake core-image-zynqberry-pxfmini
But I face next error:
ERROR: ardupilot-git-r0 do_configure: Function failed: do_configure (log file is located at /home/erle/erle/new_yocto/poky/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/ardupilot/git-r0/temp/log.do_configure.7119) ERROR: Logfile of failure stored in: /home/erle/erle/new_yocto/poky/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/ardupilot/git-r0/temp/log.do_configure.7119 Log data follows: | DEBUG: Executing python function sysroot_cleansstate | DEBUG: Python function sysroot_cleansstate finished | DEBUG: Executing shell function do_configure | Setting top to : /home/erle/erle/new_yocto/poky/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/ardupilot/git-r0/git | Setting out to : /home/erle/erle/new_yocto/poky/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/ardupilot/git-r0/git/build | Autoconfiguration : enabled | Setting board to : sitl | Checking for 'g++' (C++ compiler) : arm-poky-linux-gnueabi-g++ -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/home/erle/erle/new_yocto/poky/build/tmp/sysroots/zynqberry | Checking for 'gcc' (C compiler) : arm-poky-linux-gnueabi-gcc -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/home/erle/erle/new_yocto/poky/build/tmp/sysroots/zynqberry | Checking for need to link with librt : not necessary | Checking for HAVE_CMATH_ISFINITE : yes | Checking for HAVE_CMATH_ISINF : yes | Checking for HAVE_CMATH_ISNAN : yes | Checking for NEED_CMATH_ISFINITE_STD_NAMESPACE : yes | Checking for NEED_CMATH_ISINF_STD_NAMESPACE : yes | Checking for NEED_CMATH_ISNAN_STD_NAMESPACE : yes | Checking for header endian.h : yes | Checking for header byteswap.h : yes | Checking for program 'python' : /opt/poky/2.1.2/sysroots/x86_64-pokysdk-linux/usr/bin/python2.7 | Checking for python version >= 2.7.0 : 2.7.11 | Source is git repository : yes | Update submodules : yes | Checking for program 'git' : /usr/bin/git | Checking for program 'size' : /usr/bin/size | Benchmarks : disabled | Unit tests : enabled | 'configure' finished successfully (0.750s) | Setting top to : /home/erle/erle/new_yocto/poky/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/ardupilot/git-r0/git | Setting out to : /home/erle/erle/new_yocto/poky/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/ardupilot/git-r0/git/build | Autoconfiguration : enabled | Setting board to : zynqberry_pxfmini | Checking for program 'arm-poky-linux-gnueabi-ar' : arm-poky-linux-gnueabi-ar | Using toolchain : arm-poky-linux-gnueabi | Checking for 'g++' (C++ compiler) : arm-poky-linux-gnueabi-g++ -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/home/erle/erle/new_yocto/poky/build/tmp/sysroots/zynqberry | Checking for 'gcc' (C compiler) : arm-poky-linux-gnueabi-gcc -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/home/erle/erle/new_yocto/poky/build/tmp/sysroots/zynqberry | Checking for program 'arm-poky-linux-gnueabi-pkg-config' : not found | Could not find the program ['arm-poky-linux-gnueabi-pkg-config'] | (complete log in /home/erle/erle/new_yocto/poky/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/ardupilot/git-r0/git/build/config.log) | WARNING: /home/erle/erle/new_yocto/poky/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/ardupilot/git-r0/temp/run.do_configure.7119:1 exit 1 from '/home/erle/erle/new_yocto/poky/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/ardupilot/git-r0/git/waf configure --prefix=/usr --board=zynqberry_pxfmini' | ERROR: Function failed: do_configure (log file is located at /home/erle/erle/new_yocto/poky/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/ardupilot/git-r0/temp/log.do_configure.7119) ERROR: Task 385 (/home/erle/erle/new_yocto/poky/meta-zynqberry-pxfmini/recipes-ardupilot/ardupilot/ardupilot_git.bb, do_configure) failed with exit code '1' NOTE: Tasks Summary: Attempted 2504 tasks of which 2503 didn't need to be rerun and 1 failed. No currently running tasks (1680 of 2518)
Which means is finding the cross-compiler but not arm-poky-linux-gnueabi-pkg-config. I have decided to run waf into the subdirectory that creates bitbake to compile the code: cd /build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/ardupilot/git-r0/git There is placed Ardupilot, now I source the cross-compiler as before and execute the same command as bitbake does:
$ ./waf configure --prefix=/usr --board=zynqberry_pxfmini Setting top to : /home/erle/erle/new_yocto/poky/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/ardupilot/git-r0/git Setting out to : /home/erle/erle/new_yocto/poky/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/ardupilot/git-r0/git/build Autoconfiguration : enabled Setting board to : zynqberry_pxfmini Checking for program 'arm-poky-linux-gnueabi-ar' : arm-poky-linux-gnueabi-ar Using toolchain : arm-poky-linux-gnueabi Checking for 'g++' (C++ compiler) : arm-poky-linux-gnueabi-g++ -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/opt/poky/2.1.2/sysroots/cortexa9hf-neon-poky-linux-gnueabi Checking for 'gcc' (C compiler) : arm-poky-linux-gnueabi-gcc -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/opt/poky/2.1.2/sysroots/cortexa9hf-neon-poky-linux-gnueabi Checking for program 'arm-poky-linux-gnueabi-pkg-config' : not found Could not find the program ['arm-poky-linux-gnueabi-pkg-config']
I'm using the version 2.1.2 of the cross compiler, but I have seen more in the net. Have you made any symlink to a previous version of the toolchain, i.e. 1.8 or 1.2?
Yes, I created this link to solve this,
sudo ln -s pkg-config /usr/bin/arm-poky-linux-gnueabi-pkg-config
If you have more issues do not hesitate to write here.
That worked!
I have another question, I have seen that you include a kernel defconfig
file under recipes-kernel
to tunrn into RT the Yocto kernel.
I have set into the conf/local.conf
a variable to set RT kernel:
PREFERRED_PROVIDER_virtual/kernel = "linux-xlnx"
I have compiled the image and see that is not RT at all:
root@zynqberry:/usr/bin# uname -a
Linux zynqberry 4.4.0-xilinx #1 SMP PREEMPT Thu Apr 6 13:50:14 CEST 2017 armv7l armv7l armv7l GNU/Linux
Do I miss any config or variable?
Hi @imuguruza,
I will close this issue and open a new one to answer your last post and have this organized.
Hi @jlamperez,
First of all, great job porting all this stuff to Yocto & Xilinx Zynq!
I would like to compile this recipes in order to create a Yocto image with Ardupilot and to fly the PXFmini with the ZynqBerry :-) But I'm facing a cross-compiling issue that you might have solved some how.
I have added to my
build
conf/bblayer.conf
the layers you have created, as said in the README and try to compile using the next steps:First, I have exported the cross-compiler using the script under
build/tmp/deploy/sdk
, calledpoky-glibc-x86_64-meta-toolchain-cortexa9hf-neon-toolchain-2.1.2.sh
and install the toolchain under/opt
. And sourced its environment variable withsource /opt/poky/2.1.2/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
Now, I try to run:
bitbake core-image-zynqberry-pxfmini
But I face next error:
Which means is finding the cross-compiler but not
arm-poky-linux-gnueabi-pkg-config
. I have decided to runwaf
into the subdirectory that creates bitbake to compile the code:cd build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/ardupilot/git-r0/git
There is placed Ardupilot, now I source the cross-compiler as before and execute the same command asbitbake
does:I'm using the version
2.1.2
of the cross compiler, but I have seen more in the net. Have you made any symlink to a previous version of the toolchain, i.e. 1.8 or 1.2? I'm running under Ubuntu 14.04.3Any thoughs? Thanks!