tak to mam, kompletni postup (pro collectd 5.5.2):
1] install openwrt toolchain (with all feeds) -
https://wiki.openwrt.org/doc/howto/buildroot.exigencegit clone https://git.openwrt.org/15.05/openwrt.git
cd openwrt/
./scripts/feeds update -a
./scripts/feeds install -a
2] openwrt default config
make menuconfig # select target system
make defconfig
3] collectd/libgcrypt menuconfig
make menuconfig
* Utilities -> collectd # select your modules (for dependecies)
* Libraries -> libgcrypt
4] compile toolchain
make [-j4]
5] collectd-5.5.2 compilation script
# build opts
export OWRT_DIR=/export/shared/src/openwrt
export COLECTD_SRC=/export/shared/src/collectd/collectd-5.5.2
export COLECTD_PREFIX=/opt/collectd-ok
export COLLECTD_ARCH="--build=mips-openwrt-linux-gnu --host=mips-openwrt-linux-uclibc"
export COLLECTD_PATHS="--prefix=$COLECTD_PREFIX --sysconfdir=/etc --localstatedir=/var"
export COLLECTD_MISC="--with-nan-emulation --with-fp-layout=endianflip --with-libgcrypt-prefix=$TARGET_DIR/usr"
export COLECTD_PULGINS="--enable-all-plugins=no --enable-conntrack --enable-cpu --enable-df --enable-disk --enable-dns --enable-ethstat --enable-interface --enable-iptables --
enable-load --enable-logfile --enable-memory --enable-netlink --enable-network --enable-ntpd --enable-ping --enable-processes --enable-protocols --enable-tcpconns --enable-uni
xsock --enable-uptime --enable-users --enable-write_log --enable-iwinfo --with-libgcrypt --with-libiptc --with-liboping --with-libpcap"
# paths and environment for cross compiling for openwrt
export STAGING_DIR=$OWRT_DIR/staging_dir
export TOOLCHAIN_DIR=$STAGING_DIR/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2
export TARGET_DIR=$STAGING_DIR/target-mips_34kc_uClibc-0.9.33.2
export PATH=$TOOLCHAIN_DIR/bin:$PATH
# compiler opts
export LD_LIBRARY_PATH=$TARGET_DIR/usr/lib
export LIBRARY_PATH=$TARGET_DIR/usr/lib
export INCLUDE_DIR=$TARGET_DIR/usr/include
export CPATH=$TARGET_DIR/usr/include
export CC=mips-openwrt-linux-uclibc-gcc
export LD=mips-openwrt-linux-uclibc-ld
export CFLAGS="-I$TARGET_DIR/usr/include"
export LDFLAGS="-L$TARGET_DIR/usr/lib"
export LIBS="-lgpg-error -lm -lgcrypt -luci -lubox -lnl-tiny"
cd $COLECTD_SRC
# cleaning
make distclean &> /dev/null
# rm -rf $COLECTD_PREFIX
./configure $COLLECTD_ARCH $COLLECTD_PATHS $COLLECTD_MISC $COLECTD_PULGINS
# check config.log for errors!
make [-j4]
#make install
works for me...
PS:
* puvodni chybu "undefined reference to __isnan" jsem odstanil/obesel pridanim parametru "-lm" do $LIBS
* wireless/mad80211 plugin pro collectd mi nefunguje, ale nasel jsem plugin "iwinfo" pouze pro OWRT, ktery funguje, ale bude potreba patchnout configure.ac - kdyztak jeste doplnim...