OESF Portables Forum
Everything Else => Sharp Zaurus => Model Specific Forums => Distros, Development, and Model Specific Forums => Archived Forums => 6000 - Tosa => Topic started by: kmatthew on December 14, 2004, 01:21:28 am
-
Hi,
has anyone managed to locate or successfully compile a version of ntpdate or an ntp client that is broadcastclient capable.
I tried cross compiling one, but ran into all sorts of stupid ./configure problems.
Catch Ya
-
I tried the one from ZSI but couldn't make it work. I think it used to work on my 5500, but couldn't swear to it. So now I just go to time.gov and update manually every now and then.
-
The one from zsi (qpe ntpdate) does work on my 6000. I do notice that it takes a minute before the gui gets updated, but the commandline shows that it is instantaneous on the system.
BTW - I run it with root priv.
-
Yeah, I guess it *does* work... must be the "run as root" option.
-
There was one hiccup with the one I rolled myself - atd would lock the hardware clock, and I had to use hwclock or something to update the ntpdate into the cmos (boot survivable) clock after stopping atd (and restarting it afterward). The GUI clock did the same thing - killed and restarted atd if you changed the time.
-
Here is what I'm doing with ntpdate on my 6k. I built 4.2.0 and it should poke the hardware clock when appropriate. I'll leave the package for a while here in case anyone wants it:
ntpdate 4.2.0 (http://www.public.iastate.edu/~rose/zaurus/ntpdate_4.2.0_arm.ipk)
I prefer having this just run when I make a network connection so here is what I do to get that to happen:
(1) builtin wireless card
Edit /etc/hotplug/wlan.agent to include the following in the register/resume case after the interface is successfully brought up:
if [ -x /usr/bin/ntpdate ]; then
/usr/bin/ntpdate -s time.example.com >/dev/null 2>&1
fi
(2) CF wireless cards
Edit /etc/pcmcia/network to include a call to clock_adj () at the end of start case.
'start')
ifup
start_fn $DEVICE
clock_adj
;;
and add the clock_adj () function to the bottom of /etc/pcmcia/network.functions
clock_adj ()
{
if [ -x /usr/bin/ntpdate ]; then
/usr/bin/ntpdate -s time.example.com >/dev/null 2>&1
fi
}
Be sure to substitute an appropriate time server for time.example.com above.
John
-
I prefer having this just run when I make a network connection so here is what I do to get that to happen:
(1) builtin wireless card
(2) CF wireless cards
Any idea how to do that for the usb interface? I'm using ntpd at the moment, but just running ntpdate on connect would save a little memory.
Thanks.
-
Any idea how to do that for the usb interface? I'm using ntpd at the moment, but just running ntpdate on connect would save a little memory.
The only external USB NIC I have doesn't work with the 6k so I can't really test but given that the internal wireless is a USB device I would expect the instructions I gave for it would work with other USB NICs. Did you try it?
If you turn on syslog on your Z you should see the ntpdate message in /var/log/messages. If it doesn't work if you can send what does show up in /var/log/messages when you plug in your NIC I might be able to help.
John
-
The only external USB NIC I have doesn't work with the 6k so I can't really test but given that the internal wireless is a USB device I would expect the instructions I gave for it would work with other USB NICs. Did you try it?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=64095\"][{POST_SNAPBACK}][/a][/div]
Sorry, I wasn't clear. I actually meant the builtin usbd0 (ethernet over usb) interface. The interface is always up, so I can't just add stuff to /etc/hotplug/usbdnet. I guess that also means there's no event when the host at the other end configures the interface there (when the z is connected and shows up on the usb bus on the host) and makes the link available, so there's probably no easy way...
Thanks.
-
Sorry, I wasn't clear. I actually meant the builtin usbd0 (tcp over usb) interface. The interface is always up, so I can't just add stuff to /etc/hotplug/usbdnet. I guess that also means there's no event when the host at the other end configures the interface there (when the z is connected and shows up on the usb bus on the host) and makes the link available, so there's probably no easy way...
I needed an excuse to look at this sometime anyway, thanks.
One possibility that comes to mind is to hook it to lease renewal if you are using a dhcp client that supports hooks. Many I've used do support them. Perhaps this weekend I'll have time to take a look at this.
There is always cron too, but I don't know if the combination of cron + ntpdate would save space in the end or not. Off to add another project to my list now ...
John
-
I needed an excuse to look at this sometime anyway, thanks.
[chomp]
Off to add another project to my list now ...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=64141\"][{POST_SNAPBACK}][/a][/div]
don't let me spoil your fun or anything, but I just realised it doesn't actually need to be triggered from the z, so I just added ssh root@zaurus ntpdate 192.168.129.1
to my sync script on the desktop