[Nut-upsuser] cross-compiling nut

Tilman Glotzner tilmanglotzner at hotmail.com
Sun Jul 24 11:04:56 UTC 2011


Hello
 
 
a) The compiler chain that came with the board uses buildroot. I tried to integrate nut into the buildroot tool chain, but it fails building. 
 
Here the content of the package/nut/Config.in (that I added)
 
config BR2_PACKAGE_NUT
        bool "nut"
        help
          The primary goal of the Network UPS Tools (NUT) project is to provide           support for Power Devices, such as Uninterruptible Power Supplies,
          Power Distribution Units and Solar Controllers.
          http://www.networkupstools.org/
 
 
===================================================================
 
 
And here the content of nut.mk file (that I also added to package/nut)
#############################################################
#
# nut
#
#############################################################
NUT_VERSION = 2.6.1
NUT_SOURCE = nut-$(NUT_VERSION).tar.gz
NUT_SITE = http://www.networkupstools.org/source/2.6/
NUT_INSTALL_STAGING = NO
NUT_INSTALL_TARGET = YES

===================================================================
Here the output on the console. Buildroot tries to apply a patch for whatever reason...
 
>>> nut 2.6.1 Extracting
>>> nut 2.6.1 Patching package/nut
for file in config.guess config.sub; do for i in $(find /mnt/vol5/lcu1/buildroot/output/build/nut-2.6.1 -name $file); do cp package/gnuconfig/$file $i; done; done
>>>   Patching libtool
Applying buildroot-libtool.patch using plaintext:
patching file ltmain.sh
Hunk #1 FAILED at 273.
Hunk #2 succeeded at 5416 (offset 3008 lines).
Hunk #3 FAILED at 5560.
Hunk #4 FAILED at 5904.
Hunk #5 succeeded at 8076 with fuzz 1 (offset 2453 lines).
Hunk #6 FAILED at 8401.
4 out of 6 hunks FAILED -- saving rejects to file ltmain.sh.rej
Patch failed!  Please fix buildroot-libtool.patch!
make: *** [/mnt/vol5/lcu1/buildroot/output/build/nut-2.6.1/.stamp_patched] Error 1

 
b)  How can I verify that the cross compiler (arm-linux)  was correctly detected by autoconf? Is ther a .config file or something alike in output/build/nut-2.6.1 which I can check ?
 
c) man packages: The configure script seems not allow to suppress the installation of the man pages. Can I  supply 
NUT_CONF_OPT = --mandir=/tmp
in nut.mk as a workaround? The idea is to install the man packages in a "nirvana", i.e. outside the root file system for the embedded board, since  I can not suppress their installation.
 
d) To test the manually build nut (i.e. not using buildroot), I copied some binaries via ssh to the embedded board to /usr/local (besides /tmp this is the only place where I have write permission). I then set NUT_CONFPATH to /usr/local/etc
 The binary all start (the binary is hence compiled OK), but they do not find components they require:
/usr/local/bin/upsdrvctl   start
Network UPS Tools - UPS driver controller 2.6.1
Can't start /tmp/lcu1root_root/bin/apcsmart: No such file or directory
 
upsd does  not start either -- I assumes it is because it cannot connect to the driver:
/usr/local/bin/upsd
Network UPS Tools upsd 2.6.1
ACL in upsd.conf is no longer supported - switch to LISTEN
ACL in upsd.conf is no longer supported - switch to LISTEN
ACCEPT in upsd.conf is no longer supported - switch to LISTEN
REJECT in upsd.conf is no longer supported - switch to LISTEN
listening on 127.0.0.1 port 3493
getaddrinfo: Name or service not known
 
 
d1) What is the minimal set of files that I need to bring to the embeeded board  to see nut working ? I was thinking of 
 
/etc/nut/*.conf
upsdrvctl  
upsd 
apcsmart (as I am using a APC UPS)
 
d2) And  how can I change the directory in which upsdrvctl  searches for its drivers ?
 
 
Thanks

Tilman
 
 
 

_______________________________________________ Nut-upsuser mailing list Nut-upsuser at lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20110724/0beeaf84/attachment-0001.html>


More information about the Nut-upsuser mailing list