1 2 Previous Next 19 Replies Latest reply on Nov 25, 2015 8:27 AM by SpiderKenny

    NTP client


      I am running my BSP Linux image with an added wifi driver, so I am on the internet. Not that I can figure out something useful to do without a package repository to download from. I miss apt-get... I want to get time from an NTP server. There is a yocto recipe in the Ollie branch, but I could sure use some help on how to add additional recipes to our build. I would really like to do an LS B Linux, but I am not willing to lose Arduino sketch support. I would never have gotten this far without Sergey's blog.

        • 1. Re: NTP client



          Here are three ways to get NTP into your image:


          1) The fastest way. Download, unpack & copy the attached files to your Galileo board's /tmp directory, using scp and then install them using the below command (that's a single command line):

          cd /tmp && opkg install ntpdate_4.2.6p5-r6.0_i586.ipk ntp-tickadj_4.2.6p5-r6.0_i586.ipk ntp_4.2.6p5-r6.0_i586.ipk ntp-utils_4.2.6p5-r6.0_i586.ipk

          These packages were built using BSP 0.8.0 sources, but I think they should work if you're using image built from 0.7.5 too.


          The next two assume that you know how to rebuild the image-full using bitbake (see BSP Build Guide for details, or ask here)

          2) Quick-and-dirty way:

               a) Add  the below line to meta-clanton_v0.8.0/meta-clanton-distro/recipes-core/images/image-full.bb

          IMAGE_INSTALL += "ntp-tickadj ntp ntpdate ntp-utils"

               b) Add the below line to meta-clanton_v0.8.0/yocto_build/conf/bblayers.conf (generated by setup.sh if you follow the BSP Build guide)

          /<path to dir where you unpacked meta-clanton_0.8.0.tar.gz>/meta-clanton_v0.8.0/meta-oe/meta-networking \

               c) Source the environment and build the image-full target using bitbake image-full.

          3) The Right Way (tm) (same as 2 above, but more Yocto-correct):

               a) Pull my Yocto layer from https://github.com/alext-mkrs/meta-alext-galileo, enable it and its dependency by adding the below two lines into meta-clanton_v0.8.0/yocto_build/conf/bblayers.conf and build the image using bitbake image-full

          /<path to dir where you unpacked meta-clanton_0.8.0.tar.gz>/meta-clanton_v0.8.0/meta-oe/meta-networking \

          /<path to dir where you unpacked meta-clanton_0.8.0.tar.gz>/meta-clanton_v0.8.0/meta-alext-galileo \


          As a result of (2) and (3) NTP packages will be included into the image, you'll need to update the image-full-clanton.ext3 on your SD card with the one just built.


          Message was edited by: AlexT_Intel: Added a note about unpacking, looks like the forum engine automatically compresses all attachments to ZIP format.

          1 of 1 people found this helpful
          • 2. Re: NTP client

            Dang - that is a 4 point answer for sure!


            Be careful though - you have identified yourself as a 0.8.0 user. I may hit you with my

            intl_dgettext undefined errors on Ubuntu 12.04. I have been forced to drop back to 0.7.5 as a possible workaround.


            Thanks again for the NTP help!

            • 3. Re: NTP client

              You are welcome, glad to help :-)


              Feel free to start a new thread on those errors - I've tried 12.04 and haven't faced any problems, but we can check it out.

              • 4. Re: NTP client

                Thanks, that works great ... AC/.

                • 5. Re: NTP client


                  Do you have similar solution for the CIFS/Samba or NFS support ???

                  Thanks in advance. Your solution for NTP works great.


                  • 6. Re: NTP client



                    You're welcome :-)


                    You mean server or client part here? I don't have my board or my dev system at hand to tell you, but you can check in the repo, using "opkg list |grep nfs" or "opkg list |grep samba" or "opkg list |grep smb" commands.

                    • 7. Re: NTP client

                      Related to the NTP client:

                      Did you guys noted the here in Europe the time is one hour off since last week ???

                      I think that is related to the change of the time in the States to the daylight savings time that in will not be reflected in this side of the pond until the end of the month.

                      It looks that the logic of the dates of when occur the change of the time is not well adapted to this side of the Atlantic.



                      • 8. Re: NTP client


                        I was able to figure out how it works on this side of the pond:


                        root@Galileo1:~# date

                        Wed Mar 19 16:10:29 CET 2014

                        root@Galileo1:~# echo $TZ






                        1 of 1 people found this helpful
                        • 9. Re: NTP client

                          Are there packages for Edison?

                          • 10. Re: NTP client

                            There's none yet, but I'm working on setting up a dedicated package repo for Edison, watch the forums Time is the main problem, as usual.

                            • 11. Re: NTP client

                              As part of that, can you also give guidelines for changing partition sizes?


                              I tried to increase my root and failed



                              • 12. Re: NTP client

                                I haven't looked into that yet, but I can show you the direction Partitions are setup right after flashing, when OS boots into a special target called first_install (after that one it boots into multi_user, which is a normal boot). There's a script with a similar name somewhere in /bin or /sbin or /usr/bin (can't recall right away and don't have the board at hand), which does the partition setup. Take a look there and it may give you a clue to changing it to your needs, feel free to ask (better in a separate thread) if unsure.


                                Root can be tricky because it's mounted and used after a normal boot, but there's that first_install target and also a rescue one, probably one of them could be used for this.

                                Or editing the first_install script and building your own image could be the answer.

                                • 13. Re: NTP client

                                  Will look -- Please also look at my other threads, I've had an "interesting" time, including with things like mkimage, etc.


                                  I'm using a Fedora 20 system to build on if that matters.

                                  • 14. Re: NTP client

                                    lrosenman, if you haven't yet - take a look at this thread where I posted some further results of my exploration in this direction and @intel_dan was able to implement this in his custom-built image.

                                    In short - the first-install script only sets up the file systems, partitions themselves are setup by the u-boot script.


                                    Oh, and I think mkimage is something, which is going to be fixed in the next software release. I personally just installed it from the Ubuntu package repo, made a symlink and it worked fine.

                                    1 of 1 people found this helpful
                                    1 2 Previous Next