AnsweredAssumed Answered

Cross compiling libiio with buildroot

Question asked by LeroyKii on Dec 28, 2016
Latest reply on Jan 9, 2017 by pcercuei

Hello everyone,

(PicoZed SDR + breakout carrier + Kernel v4.6.0)
I've been trying to cross-compile a few days. I'm able to cross-compile any application that doesn't use iio.h library, following the wiki instructions. I saw that in order to use iio.h I also have to cross compile the libiio library. I'm trying to use buildroot, but it only has the following defconfigs (there's no Picozed defconfig):
> make zynq_zc706_defconfig     (ZC706) 
> make zynq_zed_defconfig       (Zedboard)  
> make zynq_microzed_defconfig  (MicroZed) 


I've tried compiling buildroot with all of them, and then trying to cmake inside libiio sourcecode:

  • cmake -DCMAKE_TOOLCHAIN_FILE=/home/[user]/buildroot-2016.1/output/host/usr/share/buildroot/toolchainfile.cmake .

And it always outputs the same error:

-- Could NOT find LibXml2 (missing:  LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
-- Configuring incomplete, errors occurred!
See also "/home/bares/PicoZedGrg/libiio/CMakeFiles/CMakeOutput.log".
See also "/home/bares/PicoZedGrg/libiio/CMakeFiles/CMakeError.log".

Is this because I'm using a deconfig that is not the one I should use for PicoZed? Any tip in how I should proceed?


P.S: I also have Xilinx tools (with SDK) installed, I don't know if it can be used instead of buildroot