ntpd

Discussing all-round firmware compilation

Moderators: Joyce, Laura, Eminent-Admin

ntpd

Postby MartinHerrman » 30 Jan 2011, 20:45

Why does the official firmware provide ntpd?
User avatar
MartinHerrman
Forum Supporter
 
Posts: 99
Joined: 08 May 2010, 11:24

Re: ntpd

Postby jurgen1976 » 30 Jan 2011, 21:46

I've checked the 1.00.9 firmware for the DTS version, which doesn't provide ntpd

I only found a scipt called ntpd.sh, which is used for the ntp updates.
But as far i can see this script doesn't run for 2 reasons.

call to this script from /bin/run_all
Code: Select all
if [ -f /bin/ntpdate ]; then
        exec ntpd.sh &
fi

but the file /bin/ntpdate doesn't exist, so i think this script will never run.

reason 2
-- snapshot from ntpd.sh script --
Code: Select all
while true; do
        /usr/sbin/rtc -s -w -g pool.ntp.org;
        if [ $? -eq 0 ]; then
                break
        else
                /usr/sbin/rtc -s -w -g 172.19.10.99;
                if [ $? -eq 0 ]; then
                        break
                fi
        fi
        sleep 5;
done


The script executes /usr/sbin/rtc, this binary also doesn't exist.

which in my opinion explains the date/time after a reboot "Sat Jan 1 00:01:52 UTC 2000"
jurgen1976
User
 
Posts: 21
Joined: 28 Dec 2010, 22:53

Re: ntpd

Postby MartinHerrman » 30 Jan 2011, 22:29

thanks for that, I didn't look into these scripts :-)

If it is not being used for anything, it should be removed. It consumes space which could be used for something better.
User avatar
MartinHerrman
Forum Supporter
 
Posts: 99
Joined: 08 May 2010, 11:24

Re: ntpd

Postby Alex » 30 Jan 2011, 23:08

You might find several things in the firmware that look out of place, wrong, or odd.
That's because of several reasons, the build process being one. Under NDA i cannot discuss the exact details, but some leftover bits of something might be found inside.
I will not discuss or comment on those items further as it might disturb our Asian partner. If you find things that are not needed, feel free to remove them.
Forum rules: viewtopic.php?t=4
Using Mediainfo: viewtopic.php?t=1110
Telnet: viewtopic.php?t=1873
Alex
Forum Goddess
 
Posts: 1799
Joined: 12 Nov 2009, 13:05

Re: ntpd

Postby Goner » 31 Jan 2011, 14:38

jurgen1976 wrote:I've checked the 1.00.9 firmware for the DTS version, which doesn't provide ntpd

For what it's worth ; in 1.00.6 NTP was still working, but as of 1.00.07-t1 it no longer sets date/time at start-up ... (confirmed by Eminent).

I hope they restore it, as I like files (on external USB devices) that were downloaded using Transmission or copied to have a valid time-stamp, not midnight on January 1st, 2000 or something ...
User avatar
Goner
User
 
Posts: 41
Joined: 17 Nov 2010, 23:56
Location: Rotterdam, Netherlands

Re: ntpd

Postby MartinHerrman » 31 Jan 2011, 14:52

Goner, thanks for your input.

Why is this so important for you?
User avatar
MartinHerrman
Forum Supporter
 
Posts: 99
Joined: 08 May 2010, 11:24

Re: ntpd

Postby Goner » 31 Jan 2011, 15:17

Oh, nothing critical ... I just like to know when I downloaded specific files. Or edited settings files or something ...

Funny that mediaplayer manufacturers don't think it's important, even for ones that come with a HD and torrent/usenet clients. I had the same 'problem' on BRAND X but someone edited the startup script to get the time from a webpage he set up ...
he uses 'date' and 'wget' to get the time from this site : http://calcitapp.com/gettime.php?TZ=CET (you can specify your TZ)
not as nice as NTP, but it works ... ;-)

Edit by Eminent-Admin: Read forum rules please (#8) thanks.
User avatar
Goner
User
 
Posts: 41
Joined: 17 Nov 2010, 23:56
Location: Rotterdam, Netherlands

Re: ntpd

Postby Eminent-Admin » 31 Jan 2011, 15:31

You could add this one manually. There are some caveats to keep in mind, wait untill the system has finished init before setting local clocks..

http://doolittle.icarus.com/ntpclient/ (builds a 17752 bytes big binary, edit makefile to build it properly and remove -DENABLE_DEBUG and -DENABLE_REPLAY)

Edit: It's 14452 bytes after strip, and 9792 bytes after upx -9.

This is not properly tested and/or supported. Hint: If you set clocks after some programs start, they do not like it if they appear to have been running for 10 years suddenly..
User avatar
Eminent-Admin
Site Admin
 
Posts: 18
Joined: 13 Aug 2009, 15:14

Re: ntpd

Postby Alex » 31 Jan 2011, 15:41

I'd like to point out that Martin does not work for Eminent and is doing this all in his free time.

Also, trolling is not going to get you a ntp client any quicker. It was removed for a reason, and exact details i cannot disclose because i am under NDA as stated before and in several other topics now.
Forum rules: viewtopic.php?t=4
Using Mediainfo: viewtopic.php?t=1110
Telnet: viewtopic.php?t=1873
Alex
Forum Goddess
 
Posts: 1799
Joined: 12 Nov 2009, 13:05

Re: ntpd

Postby MartinHerrman » 31 Jan 2011, 15:42

Goner, I'm working on a custom firmware and might include a working ntp if there is a good reason. The problem I have is that there is 32 MB storage and limited memory/cpu available, so if ntp is not required for a correct functional working of the other applications, this seems to be only a very nice to have for me.

Another option can be to provide a .bin package that you can put on your external harddrive, and the firmware detect, load and start it from there. Then it's in control of the end-user.

Let me see about how things work out.. ntp might be a small binary anyway :-)
User avatar
MartinHerrman
Forum Supporter
 
Posts: 99
Joined: 08 May 2010, 11:24

Next

Return to EM7075 - Firmware customizing / modding

Who is online

Users browsing this forum: No registered users and 1 guest

cron