I'm developing a yocto-base Linux distribution by the zeus yocto release. I need to install a NTP client into the distribution and I don't want to install the NTP server inside the image.
In zeus yocto release I have found the following recipe:
meta-openembedded/meta-networking/recipes-support /ntp/ntp_4.2.8p15.bb
that is relative to Network Time Protocol (NTP).
The recipe contains following info about itself:
SUMMARY = "Network Time Protocol daemon and utilities"
DESCRIPTION = "The Network Time Protocol (NTP) is used to synchronize the time of a computer client or server to another server or reference time source, such as a radio or satellite receiver or modem."
Previous information don't explain if the recipe can be use to install, in the distribution, a NTP Server, a NTP Client or both.
What I need is a NTP client application that is able to connect to an external NTP server.
The following instruction:
IMAGE_INSTALL += "ntp"
is not suitable because adds to the Linux distribution the NTP Server which is called ntpd
.
What's the package that I have to add to the image to include a client NTP? Is it included in the previous recipe or I have to find a different recipe?
Thanks
The answer of the post ntp recipe didn't install ntpdate files is perfect to solve this problem.
By the instruction:
IMAGE_INSTALL += "ntpdate"
in the distribution, are installed only ntpdate
and the service ntpdate.service
without installing ntpd
and its service.
To avoid the installation of the ntpd
program (NTP Server) it must be removed the instruction:
IMAGE_INSTALL += "ntp"
from the distribution.
Very useful the followed comment present in the post: ntp recipe didn't install ntpdate files:
Explanation: Take a look at the recipe, and at the
PACKAGES
variable:PACKAGES += "ntpdate sntp ${PN}-tickadj ${PN}-utils"
It means that the ntp recipe contains the packages:
ntp
(default${PN}
),ntpdate
,sntp
,ntp-tickadj
,ntp-utils
.
This comment helps to learn that in general a recipe can define many packages and every package contains many programs, configuration files, and so on.
The assignment IMAGE_INSTALL += ...
depends on what must be installed.
In the context of this post, where the OP need to install only the NTP client, it must be excluded the default package ntp
and it must be included the package ntpdate
.