Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


alix_voyage_linux_ntp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
alix_voyage_linux_ntp [2015/01/06 08:46] – [Compile NTP] adminalix_voyage_linux_ntp [2020/01/01 14:05] admin
Line 1: Line 1:
-{{tag>[hardware alix ntp]}} +=====PC Engines APU1 Hopf NTP Server=====
-~~TOC~~ +
- +
-=====PC Engines Alix 1E - NTP Server=====+
  
 ====Create device symlinks==== ====Create device symlinks====
 ===Hopf=== ===Hopf===
 <code> <code>
-cd /etc/udev/rules.d/ + 
-cat hopf.rules+cat > /etc/udev/rules.d/hopf.rules <<EOF
 KERNEL=="ttyS0", SYMLINK+="hopfclock0" KERNEL=="ttyS0", SYMLINK+="hopfclock0"
-KERNEL=="ttyS0", RUN+="/bin/setserial -/dev/%k low_latency"+KERNEL=="ttyS0", RUN+="stty -/dev/%k 9600 cs8 -cstopb -parenb"
 KERNEL=="rtc", OWNER="root", GROUP="tty", MODE="0664" KERNEL=="rtc", OWNER="root", GROUP="tty", MODE="0664"
 +EOF
 </code> </code>
  
-===GPS / PPS===+====Compile NTP====
 <code> <code>
-cat pps.rules +(apt-get remove ntp)
-KERNEL=="ttyS0", SYMLINK+="gps0" +
-KERNEL=="ttyS0", RUN+="/bin/setserial -v /dev/%k low_latency" +
-KERNEL=="ttyS0", RUN+="/usr/sbin/ldattach pps /dev/%k" +
-KERNEL=="pps0", OWNER="root", GROUP="tty", MODE="0660", SYMLINK+="gpspps0" +
-KERNEL=="rtc", OWNER="root", GROUP="tty", MODE="0664" +
-</code>+
  
-====Compile NTP==== +cd /root 
-  * Remove old ntp software: <code>apt-get remove ntp</code> +apt-get install dpkg-dev dialog devscripts fakeroot pps-tools 
-  * Mark official packages to not update<code>apt-mark hold ntp ntp-doc</code> +   
-  * Install tools and depedencies:<code>apt-get install pps-tools</code> +apt-get source ntp && apt-get build-dep ntp 
-  * Download newest source from ntp.org. +   
-  * Extract source code:<code>tar zxvf ntp-4.2.8.tar.gz</code> +cd ntp<directory
-  * Create user and group:<code>groupadd -g 87 ntp && +   
-useradd -c "Network Time Protocol" -d /var/lib/ntp -u 87 \ +debuild -us -uc 
-        -g ntp -s /bin/false ntp</code  +   
-  * Configure:<code>./configure --prefix=/usr         \ +dpkg --install ntp....deb 
-            --bindir=/usr/sbin    \ +</code>  
-            --sysconfdir=/etc     \ +
-            --enable-linuxcaps    \ +
-            --with-lineeditlibs=readline \ +
-            --docdir=/usr/share/doc/ntp-4.2.8</code> +
-  * Compile:<code>make</code> +
-  * Test:<code>make check</code> +
-  * Install:<code>make install && +
-install -v -o ntp -g ntp -d /var/lib/ntp</code>+
  
 ====Configuration==== ====Configuration====
   * Allow write to drift file, edit **/etc/default/voyage-util**. <code>VOYAGE_SYNC_DIRS="var/lib/ntp"</code>   * Allow write to drift file, edit **/etc/default/voyage-util**. <code>VOYAGE_SYNC_DIRS="var/lib/ntp"</code>
-  * Set hwclock, edit **/etc/default/hwclock**. <code>HCTOSYS_DEVICE=rtc0</code>+  * Set hwclock, edit **/etc/default/hwclock**. <code>HCTOSYS_DEVICE=rtc</code>
   * Load module rtc. <code>#vi /etc/modules   * Load module rtc. <code>#vi /etc/modules
 rtc</code> rtc</code>
Line 195: Line 179:
 ## ntp 2.4.7 removed monlist in favour of ntpq's mrulist ## ntp 2.4.7 removed monlist in favour of ntpq's mrulist
 ntpq -c "mrulist"</code> ntpq -c "mrulist"</code>
 +
 +{{tag>[hardware alix ntp]}}