malik
malik

Reputation: 11

Adding NTP daemon on petalinux

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

Answers (2)

Alex Baum
Alex Baum

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:

  1. Locate project-spec/meta-user/conf/user-rootfsconfig and add the following lines:

    CONFIG_ntp

    CONFIG_ntpq

  2. Locate project-spec/meta-user/recipes-core/images/petalinux-image-full.bbappend and add the following line:

    IMAGE_INSTALL_append = "ntp ntpq"

  3. 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.

  4. Run petalinux-build and you'll see NTP downloaded and compiled.

Upvotes: 0

thelummox
thelummox

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

Related Questions