[Nut-upsuser] cross-compiling nut
nut at johnea.net
nut at johnea.net
Mon Jul 25 19:10:45 UTC 2011
On 07/24/2011 04:04 AM, Tilman Glotzner wrote:
> 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.
I'm not a buildroot expert. I've always run into quite a learning curve trying
to get any of those environments (buildroot, openembbeded, yocto, etc) to do
anything custom for me.
As I said, I run archlinux and have a host with the pacman/makepkg package
management system installed. I've found it useful to manually crossbuild and
intall pacman on embedded targets, then cross build packages on the development
host and install them on the embedded target using the crossbuilt pacman that I
Having a package management system makes it so much easier to upgrade, or
delete, the application files (in this case nut) on the target.
So if buildroot is too onerous, maybe try installing and using opkg:
Or, if it's just a one time thing, maybe just copying in the files manually is
The file list (that I attached earlier) shows the files and locations that nut
installs on the system here. (the difference will be that the package here are
configured with --prefix=/usr and yours will be --prefix=/usr/local. So modify
the directories you copy into accordingly)
> 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 ?
The --host config option should do this. But again, how this fits into the
buildroot framework i'm not sure. My experience is that autotool's files are
only slightly harder to read that ancient Sanskrit 8-)
> 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).
Come on man, it's your board, give yourself permission 8-)
You'll need root login for installing via package management systems.
> d1) What is the minimal set of files that I need to bring to the embeeded board to see nut working ?
Reference the directory listing previously attached. Convert /usr to /usr/local
> d2) And how can I change the directory in which upsdrvctl searches for its drivers ?
Looks like you need to rebuild with --prefix=/usr/local
Good Luck! Let me know how it works...
More information about the Nut-upsuser