Reputation: 11
I have added the ntp daemon on petalinux, but i am not getting ntpq command. Can someone guide me, how can I add/use the ntpq file on petalinux.
Upvotes: 0
Views: 1612
Reputation: 304
I got here from having a similar issue however the answer provided was insufficient for getting the rootfs
configuration. The full answer seems to be:
Locate project-spec/meta-user/conf/user-rootfsconfig
and add the following lines:
CONFIG_ntp
CONFIG_ntpq
Locate project-spec/meta-user/recipes-core/images/petalinux-image-full.bbappend
and add the following line:
IMAGE_INSTALL_append = "ntp ntpq"
Run petalinux-config -c rootfs
, navigate to the user packages
section. You will now see ntp
and ntpq
as separate line items. Enable them both.
Run petalinux-build
and you'll see NTP downloaded and compiled.
Upvotes: 0
Reputation: 356
ntpq exists as a separate package and requires that you explicitly call it out in your build.
open project-spec/meta-user/recipes-core/images/petalinux-image.bbappend
(filename may vary based on version of Petalinux you are using)
add this line
IMAGE_INSTALL_append = " ntpq"
petalinux-config -c rootfs
user packages --> [*] ntpq
petalinux-build
For how to use ntpq refer to the man pages or ntpq --help.
Upvotes: 0