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

Harlan Stenn stenn at ntp.org
Fri Mar 7 22:46:21 UTC 2014

David Taylor writes:
> >> Harlan, I wish it were as easy as setting the path, but doing an "ls" on
> >> that directory shows that all the tools have the prefix in front of
> >> their normal file name, for example:
> >>
> >> $ ls
> >> /home/david/kernel/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin/
> >> arm-bcm2708hardfp-linux-gnueabi-addr2line     bcm2708hardfp-addr2line
> >> arm-bcm2708hardfp-linux-gnueabi-ar            bcm2708hardfp-ar
> >> arm-bcm2708hardfp-linux-gnueabi-as            bcm2708hardfp-as
> >> arm-bcm2708hardfp-linux-gnueabi-c++           bcm2708hardfp-c++
> >> arm-bcm2708hardfp-linux-gnueabi-cc            bcm2708hardfp-cc
> >> arm-bcm2708hardfp-linux-gnueabi-c++filt       bcm2708hardfp-c++filt
> >> arm-bcm2708hardfp-linux-gnueabi-cpp           bcm2708hardfp-cpp
> >> arm-bcm2708hardfp-linux-gnueabi-ct-ng.config  bcm2708hardfp-ct-ng.config
> >> arm-bcm2708hardfp-linux-gnueabi-elfedit       bcm2708hardfp-elfedit
> >> arm-bcm2708hardfp-linux-gnueabi-g++           bcm2708hardfp-g++
> >> arm-bcm2708hardfp-linux-gnueabi-gcc           bcm2708hardfp-gcc
> >> arm-bcm2708hardfp-linux-gnueabi-gcc-4.7.1     bcm2708hardfp-gcc-4.7.1
> >
> > Yes, and that's the --host value you should be using when you use the
> > instructions for cross-compiling NTP, once you have that directory in
> > your PATH.
> >
> > H
> There's a discrepancy here I am unsure about.  When I run the script:
>     sntp/libevent/build-aux/config.guess
> on the Raspberry Pi, for "host" I get:
>    armv6l-unknown-linux-gnueabihf
> but, as you will see, the prefix above is:
>    arm-bcm2708hardfp-linux-gnueabi-
> I did try adding the directory in front of the existing PATH, but I 
> still got the wrong sized executables.  Let me try with:
>    --host=arm-bcm2708hardfp-linux-gnueabi-
> No, still getting an ntpd which is 2.87 MB in size, whereas on the 
> Raspberry Pi native build it's 2.0 MB.  The Intel Debian version is 2.74 MB.

You don't want that trailing -, you want:

 --build=(whatver) --host=arm-bcm2708hardfp-linux-gnueabi

If you then run 'make V=1' you'll get more verbosity, and you should
check to be sure you are using the arm-bcm2708hardfp-linux-gnueabi-*
tools.  If some are not, it's because there is a bug somewhere, either
in the installed toolchain or in the autoconf/automake stuff.  Either is

There is a chance that there are some tests we are doing that will need
to be augmented to account for your specific toolchain, but I thought
that any cases like that where we could not *know* the answer were fatal
errors for configure, so you may be fine here.

As for config.guess saying armv6l-unknown-linux-gnueabihf and you are
seeing arm-bcm2708hardfp-linux-gnueabi, the difference between a CPU
specification of armv6l and arm may be insignificant.  The difference
betweena Vendor of unknown and bcm2708hardfp is almost always
insignificant.  From my POV, there is no useful information in the
4-argument from (the addition of -linux-), and the final field, OS, may
or may not matter either, so I'm not sure if there is any significant
difference between an OS of gnueabi and gnueabihf.

At some point further issues will have to be resolved by somebody who
can figure out exactly what tools are causing problems, and/or which
choices in configure need to be tweaked for your target.


More information about the questions mailing list