2010-08-26 07:13:14     ntpdate ntpdate error

Document created by Aaronwu Employee on Aug 22, 2013
Version 1Show Document
  • View in full screen mode

2010-08-26 07:13:14     ntpdate ntpdate error

Shyam sundar (INDIA)

Message: 92803   

 

Hello world,

 

When I give the following command in the BF537 EZkit (uclinux 2009)

 

ntpdate 0.in.pool.ntp.org

 

I do get the following error, any clue where am i going wrong?

 

Error : Name or service not known

18 Feb 07:48:06 ntpdate[294]: can't find host 0.in.pool.ntp.org

 

18 Feb 07:48:06 ntpdate[294]: no servers can be used, exiting

QuoteReplyEditDelete

 

 

2010-08-26 11:22:17     Re: ntpdate ntpdate error

Mike Frysinger (UNITED STATES)

Message: 92812   

 

did you set up your resolver ?  if the board cant do dns, then anything using hostnames isnt going to work.

QuoteReplyEditDelete

 

 

2010-08-28 04:20:50     Re: ntpdate ntpdate error

Shyam sundar (INDIA)

Message: 92894   

 

Thanks Mike, that worked !!!

 

I had commented that resolver !!!

 

I want to change the timezone, for that I selected the following in the menu config.

 

--- Library Configuration

 

[*] Support time zones

 

[*] Always load from file

 

I modified the TZ file during the boot time.

 

But not able to set the time to the required time zone!!

 

Any clues??

 

 

 

QuoteReplyEditDelete

 

 

2010-08-28 11:48:23     Re: ntpdate ntpdate error

Mike Frysinger (UNITED STATES)

Message: 92896   

 

please read the documentation:

  docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:timezones

QuoteReplyEditDelete

 

 

2010-08-29 23:49:24     Re: ntpdate ntpdate error

Shyam sundar (INDIA)

Message: 92915   

 

I had read that documentation!! I did know that the uclibc had to be recompiled,but then I thought, this provision would have been provided in the later versions of uclinux and I was missing something!!

QuoteReplyEditDelete

 

 

2010-08-30 00:11:07     Re: ntpdate ntpdate error

Mike Frysinger (UNITED STATES)

Message: 92917   

 

the documentation is up-to-date

QuoteReplyEditDelete

 

 

2010-09-01 08:22:46     Re: ntpdate ntpdate error

Shyam sundar (INDIA)

Message: 93021   

 

Hmmm!!

 

Ok !!

 

Can you please tell me which file do i need to edit for enabling the TZ feature?

QuoteReplyEditDelete

 

 

2010-09-01 11:39:02     Re: ntpdate ntpdate error

Mike Frysinger (UNITED STATES)

Message: 93036   

 

did you read the documentation ?  it tells you how to change the timezone on the board already.

QuoteReplyEditDelete

 

 

2010-09-03 03:54:51     Re: ntpdate ntpdate error

Shyam sundar (INDIA)

Message: 93102   

 

Hi Mike,

 

Can you please tell me which document are you referring to?

QuoteReplyEditDelete

 

 

2010-09-03 11:16:08     Re: ntpdate ntpdate error

Mike Frysinger (UNITED STATES)

Message: 93112   

 

the one i already posted for you

QuoteReplyEditDelete

 

 

2010-09-03 14:19:59     Re: ntpdate ntpdate error

Shyam sundar (INDIA)

Message: 93117   

 

Hi Michael,

 

I am not able to see any document reference made by you !!

 

Could you please post the link? !

QuoteReplyEditDelete

 

 

2010-09-03 14:24:17     Re: ntpdate ntpdate error

Mike Frysinger (UNITED STATES)

Message: 93118   

 

  blackfin.uclinux.org/gf/forummessage/92896

QuoteReplyEditDelete

 

 

2010-09-07 05:58:37     Re: ntpdate ntpdate error

Shyam sundar (INDIA)

Message: 93220   

 

Sorry i should have asked my question precisely!!

 

I downloaded the following sources

 

svn checkout svn://blackfin.uclinux.org/uclinux-dist//branches/2009R1

 

renamed the downloaded folder 2009R1 to uclinux-dist

 

svn checkout svn://blackfin.uclinux.org/u-boot//branches/2009R1

 

renamed the downloaded folder 2009R1 to u-boot

 

svn checkout svn://blackfin.uclinux.org/toolchain//branches/toolchain_09r1_branch

 

renamed the downloaded folder toolchain_09r1_branch to toolchain

 

svn checkout svn://blackfin.uclinux.org/linux-kernel//branches/2009R1

 

renamed the downloaded folder 2009R1 to linux-kernel

 

On my desktop I created a folder called uc2009_source.

 

This directory has following folders

 

    * toolchain

    * u-boot

    * uClinux-dist

    * linux-kernel

 

The following are the SVN info

 

Path: .

URL: svn://blackfin.uclinux.org/toolchain/branches/toolchain_09r1_branch

Repository Root: svn://blackfin.uclinux.org/toolchain

Repository UUID: 2adf4935-75e9-4407-93b2-34b21a1880a4

Revision: 4877

Node Kind: directory

Schedule: normal

Last Changed Author: vapier

Last Changed Rev: 3973

Last Changed Date: 2010-03-03 00:08:00 +0530 (Wed, 03 Mar 2010)

 

Path: .

 

URL: svn://blackfin.uclinux.org/linux-kernel/branches/2009R1

Repository Root: svn://blackfin.uclinux.org/linux-kernel

Repository UUID: 526b6c2d-f592-4532-a319-5dd88ccb003d

Revision: 9126

Node Kind: directory

Schedule: normal

Last Changed Author: vapier

Last Changed Rev: 9078

Last Changed Date: 2010-08-12 02:50:04 +0530 (Thu, 12 Aug 2010)

 

 

Path: .

URL: svn://blackfin.uclinux.org/u-boot/branches/2009R1

Repository Root: svn://blackfin.uclinux.org/u-boot

Repository UUID: e8ad1c53-384c-47db-b5ce-66ae1f620dea

Revision: 2396

Node Kind: directory

Schedule: normal

Last Changed Author: vapier

Last Changed Rev: 2383

Last Changed Date: 2010-08-03 01:40:47 +0530 (Tue, 03 Aug 2010)

 

 

Path: .

URL: svn://blackfin.uclinux.org/uclinux-dist/branches/2009R1

Repository Root: svn://blackfin.uclinux.org/uclinux-dist

Repository UUID: 3e2a5524-39e8-4cb9-84a9-c49da69cba3a

Revision: 9810

Node Kind: directory

Schedule: normal

Last Changed Author: vapier

Last Changed Rev: 9778

Last Changed Date: 2010-08-13 03:36:56 +0530 (Fri, 13 Aug 2010)

 

 

 

 

I gave the following command

 

sudo apt-get install autoconf automake bash binutils bison bzip2 \

   coreutils flex gawk gcc gettext grep intltool iputils-ping libtool libz-dev \

   linux-libc-dev liblzo1 liblzo-dev liblzo2-dev liblzo2-2 libncurses5 libreadline5 \

   libreadline5-dev libncurses5-dev m4 make pax-utils pkg-config rpm texinfo zlib1g \

   zlib1g-dev

 

sudo apt-get install bc dejagnu expect psmisc rsh-client xvfb

 

When I give the BuildToolchain -p, i do get the following response  Checking for development packages (skip checks with the -D option)

Check   gcc.gnu.org/install/prerequisites.html for more information

   autoconf (GNU Autoconf) 2.65 License GPLv3+/Autoconf: GNU GPL version 3 or later

   automake (GNU automake) 1.11.1

   GNU Awk 3.1.6

** Could not find version of /bin/sh

* /bin/sh: symbolic link to `dash'

* /bin/dash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped

   bison (GNU Bison) 2.4.1

   cp (GNU coreutils) 7.4

   echo seems to be a shell builtin

   flex 2.5.35

   gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3

   gettext (GNU gettext-runtime) 0.17

   GNU grep 2.5.4

   ln (GNU coreutils) 7.4

   m4 (GNU M4) 1.4.13

   GNU Make 3.81

!! makeinfo: could not be found

!! you need to install package which includes makeinfo before building the toolchain will be sucessful

   mkdir (GNU coreutils) 7.4

   msgfmt (GNU gettext-tools) 0.17

   mv (GNU coreutils) 7.4

   rm (GNU coreutils) 7.4

   GNU sed version 4.2.1 GNU sed home page: <  www.gnu.org/software/sed/>. Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.

   tail (GNU coreutils) 7.4

   wc (GNU coreutils) 7.4

** Could not find version of /usr/bin/which

* /usr/bin/which: symbolic link to `/bin/which'

* /bin/which: POSIX shell script text executable

** Could not find version of /usr/bin/pkg-config

* /usr/bin/pkg-config: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped

   ping utility, iputils-sss20071127

** Could not find version of /usr/bin/rsh

* /usr/bin/rsh: symbolic link to `/etc/alternatives/rsh'

* /etc/alternatives/rsh: symbolic link to `/usr/bin/netkit-rsh'

* /usr/bin/netkit-rsh: setuid ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped

** Could not find version of /usr/bin/rcp

* /usr/bin/rcp: symbolic link to `/etc/alternatives/rcp'

* /etc/alternatives/rcp: symbolic link to `/usr/bin/netkit-rcp'

* /usr/bin/netkit-rcp: setuid ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped

   bc 1.06.95

   kill seems to be a shell builtin

   killall (PSmisc) 22.10

   pstree (PSmisc) 22.10

   Expect version is 5.44.1.14 Tcl version is 8.5 Framework version is 1.4.99

** Could not find version of /usr/bin/Xvfb

* /usr/bin/Xvfb: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped

   SHELL = /bin/bash

Done checking for prerequisites

 

 

 

 

 

I am using Ubuntu 10.04. What am i missing?

 

 

 

In the following file uc2009_source/toolchain/uClibc/libc/misc/time/time.c

 

I have added the line #define __UCLIBC_HAS_TZ_FILE__

 

Do i need to make any other changes before compiling uclibc?

QuoteReplyEditDelete

 

 

2010-09-07 06:18:34     Re: ntpdate ntpdate error

Shyam sundar (INDIA)

Message: 93222   

 

Is the prerequisites log showing only warnings?

 

For example

 

** Could not find version of /bin/sh

* /bin/sh: symbolic link to `dash'

* /bin/dash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped

 

/bin/sh was not found but it was linked to dash

QuoteReplyEditDelete

 

 

2010-09-07 06:42:36     Re: ntpdate ntpdate error

Shyam sundar (INDIA)

Message: 93223   

 

Was able to correct the following display error by installing texinfo

 

!! makeinfo: could not be found

!! you need to install package which includes makeinfo before building the toolchain will be sucessful

QuoteReplyEditDelete

 

 

2010-09-07 11:55:29     Re: ntpdate ntpdate error

Mike Frysinger (UNITED STATES)

Message: 93226   

 

you should not be hacking the source code in random ways.  if you do, you're on your own.

 

if you want to enable support for the /etc/tz file, then you should be doing it through a uClibc config file and passing that to the buildscript.

QuoteReplyEditDelete

 

 

2010-09-08 01:01:38     Re: ntpdate ntpdate error

Shyam sundar (INDIA)

Message: 93232   

 

So accordingly, I need to do the following steps.

 

toolchain/uClibc> cp .config custom_config

 

Edit the custom_config file by replacing the following line

 

# UCLIBC_HAS_TZ_FILE is not set

 

with

 

UCLIBC_HAS_TZ_FILE=y

 

And then while building the toolchain include the custom_config file

 

-C /home/user/checkouts/toolchain/uClibc/custom_config

 

 

 

If I add the following lines in the file toolchain/uClibc/libc/misc/time/time.c

 

#define __UCLIBC_HAS_TZ_FILE__

#define __UCLIBC_TZ_FILE_PATH__ "/etc/TZ"

 

What could it result in? Curious and interested to know !

 

Is this a wrong way of doing? Sorry,if  this seems to be a silly question !

QuoteReplyEditDelete

 

 

2010-09-08 01:28:03     Re: ntpdate ntpdate error

Mike Frysinger (UNITED STATES)

Message: 93233   

 

no, you do not edit files by hand.  you use `make menuconfig` or similar to create a proper .config file.

 

as for modifying random files by hand, you'd have to experiment to find out.  either way, we dont want to hear about problems with that.

QuoteReplyEditDelete

 

 

2010-09-08 02:44:35     Re: ntpdate ntpdate error

Mike Sinkovsky (RUSSIAN FEDERATION)

Message: 93235   

 

I did that, edit files - "toolchain/uClibc/extra/Configs/Config.bfin.default " and "toolchain/uClibc/extra/Configs/Config.bfin.default":

 

UCLIBC_HAS_TZ_FILE=y

UCLIBC_HAS_TZ_FILE_READ_MANY=y

UCLIBC_TZ_FILE_PATH="/etc/TZ"

 

- and after recompiling toolchain timezones worked.

QuoteReplyEditDelete

 

 

2010-09-08 02:46:38     Re: ntpdate ntpdate error

Mike Sinkovsky (RUSSIAN FEDERATION)

Message: 93236   

 

Sorry, I mean second file toolchain/uClibc/extra/Configs/Config.bfinfdpic.default

 

(Cannot edit prev message)

QuoteReplyEditDelete

 

 

2010-09-09 02:01:29     Re: ntpdate ntpdate error

Mike Sinkovsky (RUSSIAN FEDERATION)

Message: 93281   

 

Btw, I do'nt undestand why precompiled toolchain supports TZ variable, and not "/etc/TZ" file?

 

Wiki page do not explain anyting, is here any objections?

QuoteReplyEditDelete

 

 

2010-09-09 02:23:05     Re: ntpdate ntpdate error

Mike Frysinger (UNITED STATES)

Message: 93282   

 

reading the file constantly adds runtime overhead.  there is no functionality lost by only supporting the env var.

 

QuoteReplyEditDelete

 

 

2010-09-09 03:23:45     Re: ntpdate ntpdate error

Mike Sinkovsky (RUSSIAN FEDERATION)

Message: 93295   

 

>  there is no functionality lost by only supporting the env var.

 

Ok, if user changed timezone (in web-interface) - changes will effect only after board rebooting?

How to change global env var without rebooting?

(maybe dumb question but I am relatively new in linux area and not very experienced)

QuoteReplyEditDelete

 

 

2010-09-09 12:37:47     Re: ntpdate ntpdate error

Mike Frysinger (UNITED STATES)

Message: 93305   

 

the env is only set when an application is executed.  after that, it's up to the app to update its own.  other apps cannot inject env changes.

QuoteReplyEditDelete

 

 

2010-09-09 16:25:16     Re: ntpdate ntpdate error

Mike Sinkovsky (RUSSIAN FEDERATION)

Message: 93312   

 

> other apps cannot inject env changes.

 

Then for me it is "functionality lost". I need global timezone varible, so I recompile toolchain for "/etc/TZ" file.

QuoteReplyEditDelete

 

 

2010-09-10 07:52:36     Re: ntpdate ntpdate error

Shyam sundar (INDIA)

Message: 93332   

 

Thanks Mike & Mike for the support !!

Attachments

    Outcomes