[ntp:questions] Help with cross-compiling NTP for the Raspberry Pi requested

Harlan Stenn stenn at ntp.org
Wed Mar 5 22:56:52 UTC 2014


David Taylor writes:
> I am trying to cross-compile NTP for the Raspberry Pi, and I am 
> following the instructions for NTP here:
> 
>    http://support.ntp.org/bin/view/Dev/Cross-compilingNTP
> 
> and the successful cross-compile I did for the RPi kernel here:
> 
>    http://www.satsignal.eu/raspberry-pi/kernel-cross-compile.html
> 
> Just following the "NTP" instructions, although I did end up with 
> executables, they did not run on the RPi (giving an error something like 
> "binary format error"), and their size is very similar to the 
> executables for the Intel Debian system on which I was cross compiling. 
>   So it seems to me that I have not cross-compiled but natively compiled.
> 
> With the RPi kernel compile, I needed to create a couple of environment 
> variables:
> 
>    CCPREFIX
>    PLATFORM
> 
> and run a make/compile command like:
> 
>    make ARCH=arm CROSS_COMPILE=${CCPREFIX}
> 
> whereas the NTP instructions suggest using just a "make" command.

One of those is apparently instructions on building an RPi kernel, and
the other instructions are for building NTP.

NTP's build system does not use CCPREFIX or PLATFORM.

> I also see differences in the make/install command between the two
> sets on instructions:
> 
> NTP:
>    make DESTDIR=`pwd`/:Built install
> 
> RPi:
>    MODULES_TEMP=~/modules
>    export MODULES_TEMP
>    make ARCH=arm CROSS_COMPILE=${CCPREFIX} 
> INSTALL_MOD_PATH=${MODULES_TEMP} modules_install
> 
> Now this could be due to the RPi command being for a Kernel compile, and 
> the NTP one being for a set of executables.  Perhaps there is no problem 
> here.
> 
> I am working right at the limit of my knowledge here, so any help in 
> using the right compiler would be most welcome!

What 'configure' line are you using for NTP?

H


More information about the questions mailing list