summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Luebbe <jlu@pengutronix.de>2012-05-25 17:14:41 +0200
committerJan Luebbe <jlu@pengutronix.de>2012-05-25 17:14:41 +0200
commit68751c07757b23468d888187cdd9b8ba98e6cd4e (patch)
tree61d220ee0e455ea767deb90fdcfa9ebead51705a
parentbbeef3d0c275185d801b4322d651fddd37a62f5a (diff)
downloadOSELAS.BSP-Pengutronix-BeagleBone-pps.tar.gz
OSELAS.BSP-Pengutronix-BeagleBone-pps.tar.xz
Configure for NTP&GPS&PPSpps
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
-rw-r--r--configs/platform-ti/kernelconfig-3.2.1615
-rw-r--r--configs/platform-ti/patches/linux-3.2.16/series2
-rw-r--r--configs/ptxconfig97
-rw-r--r--projectroot/etc/ntp.conf39
-rw-r--r--rules/ntp.in254
-rw-r--r--rules/ntp.make380
-rw-r--r--rules/ntp_nonparse.in184
-rw-r--r--rules/ntp_parse.in57
-rw-r--r--rules/pps-tools.in7
-rw-r--r--rules/pps-tools.make107
10 files changed, 1136 insertions, 6 deletions
diff --git a/configs/platform-ti/kernelconfig-3.2.16 b/configs/platform-ti/kernelconfig-3.2.16
index 649ee4c..326adf0 100644
--- a/configs/platform-ti/kernelconfig-3.2.16
+++ b/configs/platform-ti/kernelconfig-3.2.16
@@ -1562,19 +1562,26 @@ CONFIG_SPI_SPIDEV=m
#
# PPS support
#
-# CONFIG_PPS is not set
+CONFIG_PPS=m
+# CONFIG_PPS_DEBUG is not set
#
-# PPS generators support
+# PPS clients support
#
+# CONFIG_PPS_CLIENT_KTIMER is not set
+# CONFIG_PPS_CLIENT_LDISC is not set
+# CONFIG_PPS_CLIENT_PARPORT is not set
+CONFIG_PPS_CLIENT_GPIO=m
#
-# PTP clock support
+# PPS generators support
#
#
-# Enable Device Drivers -> PPS to see the PTP clock options.
+# PTP clock support
#
+CONFIG_PTP_1588_CLOCK=m
+# CONFIG_DP83640_PHY is not set
CONFIG_ARCH_REQUIRE_GPIOLIB=y
CONFIG_GPIOLIB=y
CONFIG_DEBUG_GPIO=y
diff --git a/configs/platform-ti/patches/linux-3.2.16/series b/configs/platform-ti/patches/linux-3.2.16/series
index c3fa90b..588f3f5 100644
--- a/configs/platform-ti/patches/linux-3.2.16/series
+++ b/configs/platform-ti/patches/linux-3.2.16/series
@@ -1 +1,3 @@
0000-arago-beaglebone.patch
+0001-PPS-GPIO-initial-BagleBone-PPS-support.patch
+0002-PPS-GPIO-implement-polling-for-second-edge.patch
diff --git a/configs/ptxconfig b/configs/ptxconfig
index 92b1cfc..8431a13 100644
--- a/configs/ptxconfig
+++ b/configs/ptxconfig
@@ -3,6 +3,7 @@
# PTXdist 2012.05.0
#
PTXCONF_MODULES=y
+PTXCONF_PPS_TOOLS=y
#
# ------------------------------------
@@ -1600,7 +1601,52 @@ PTXCONF_NETCAT=y
# PTXCONF_NFSUTILS is not set
# PTXCONF_NMAP is not set
# PTXCONF_NSS_MDNS is not set
-# PTXCONF_NTP is not set
+PTXCONF_NTP=y
+
+#
+# Compile Options
+#
+# PTXCONF_NTP_CLOCKCTL is not set
+# PTXCONF_NTP_DEBUGGING is not set
+PTXCONF_NTP_DST_MINUTES=60
+# PTXCONF_NTP_BANCOMM is not set
+# PTXCONF_NTP_GPSVME is not set
+# PTXCONF_NTP_KMEM is not set
+# PTXCONF_NTP_ACCURATE_ADJTIME is not set
+# PTXCONF_NTP_TICK_FORCE is not set
+# PTXCONF_NTP_TICKADJ_FORCE is not set
+# PTXCONF_NTP_SIMULATOR is not set
+# PTXCONF_NTP_UDP_WILDCARD is not set
+# PTXCONF_NTP_SLEW_ALWAYS is not set
+# PTXCONF_NTP_STEP_SLEW is not set
+# PTXCONF_NTP_NTPDATE_STEP is not set
+# PTXCONF_NTP_HOURLY_TODR_SYNC is not set
+# PTXCONF_NTP_KERNEL_FLL_BUG is not set
+# PTXCONF_NTP_IRIG_SAWTOOTH is not set
+# PTXCONF_NTP_NIST is not set
+# PTXCONF_NTP_CRYPTO is not set
+# PTXCONF_NTP_SNTP is not set
+# PTXCONF_NTP_ARLIB is not set
+
+#
+# Clock drivers
+#
+PTXCONF_NTP_ALL_CLOCK_DRIVERS=y
+
+#
+# PPS support requires installed kernel headers
+#
+
+#
+# Install Options
+#
+PTXCONF_NTP_NTPDATE=y
+PTXCONF_NTP_NTPD=y
+# PTXCONF_NTP_NTPD_STARTSCRIPT is not set
+PTXCONF_NTP_NTPDC=y
+# PTXCONF_NTP_NTPC_STARTSCRIPT is not set
+PTXCONF_NTP_NTPQ=y
+PTXCONF_NTP_NTPTIME=y
# PTXCONF_NTPCLIENT is not set
# PTXCONF_OPENNTPD is not set
PTXCONF_OPENSSH=y
@@ -1763,7 +1809,54 @@ PTXCONF_EXPAT=y
# PTXCONF_GETTEXT_DUMMY is not set
# PTXCONF_GETTEXT is not set
# PTXCONF_GPM is not set
-# PTXCONF_GPSD is not set
+PTXCONF_GPSD=y
+PTXCONF_GPSD_PYTHON=y
+# PTXCONF_GPSD_PROFILING is not set
+PTXCONF_GPSD_NTPSHM=y
+# PTXCONF_GPSD_PPS is not set
+# PTXCONF_GPSD_PPS_ON_CTS is not set
+PTXCONF_GPSD_USER="root"
+PTXCONF_GPSD_FIXED_PORT_SPEED=""
+# PTXCONF_GPSD_DBUS is not set
+PTXCONF_GPSD_MAX_CLIENTS=""
+PTXCONF_GPSD_MAX_DEVICES=""
+
+#
+# drivers
+#
+PTXCONF_GPSD_DRIVER_NMEA=y
+# PTXCONF_GPSD_DRIVER_SIRF is not set
+# PTXCONF_GPSD_DRIVER_TSIP is not set
+# PTXCONF_GPSD_DRIVER_FV18 is not set
+# PTXCONF_GPSD_DRIVER_TRIPMATE is not set
+# PTXCONF_GPSD_DRIVER_EARTHMATE is not set
+# PTXCONF_GPSD_DRIVER_ITRAX is not set
+# PTXCONF_GPSD_DRIVER_ASHTECH is not set
+# PTXCONF_GPSD_DRIVER_NAVCOM is not set
+# PTXCONF_GPSD_DRIVER_GARMIN is not set
+# PTXCONF_GPSD_DRIVER_GARMINTXT is not set
+# PTXCONF_GPSD_DRIVER_TNT is not set
+PTXCONF_GPSD_DRIVER_UBX=y
+# PTXCONF_GPSD_DRIVER_EVERMORE is not set
+# PTXCONF_GPSD_DRIVER_GPSCLOCK is not set
+# PTXCONF_GPSD_DRIVER_SUPERSTAR2 is not set
+# PTXCONF_GPSD_DRIVER_OCEANSERVER is not set
+# PTXCONF_GPSD_DRIVER_MKT3301 is not set
+PTXCONF_GPSD_DRIVER_NTRIP=y
+
+#
+# install options
+#
+PTXCONF_GPSD_GPSD=y
+PTXCONF_GPSD_GPSCTL=y
+PTXCONF_GPSD_GPSPIPE=y
+PTXCONF_GPSD_GPSFLASH=y
+PTXCONF_GPSD_GPXLOGGER=y
+PTXCONF_GPSD_CGPS=y
+PTXCONF_GPSD_GPSMON=y
+PTXCONF_GPSD_GPSCAT=y
+PTXCONF_GPSD_GPSFAKE=y
+PTXCONF_GPSD_GPSPROF=y
# PTXCONF_INOTIFY_TOOLS is not set
# PTXCONF_JSON_C is not set
# PTXCONF_LCMS is not set
diff --git a/projectroot/etc/ntp.conf b/projectroot/etc/ntp.conf
new file mode 100644
index 0000000..5bf5eb7
--- /dev/null
+++ b/projectroot/etc/ntp.conf
@@ -0,0 +1,39 @@
+# This is the most basic ntp configuration file
+# The driftfile must remain in a place specific to this
+# machine - it records the machine specific clock error
+driftfile /etc/ntp.drift
+
+# allow a larger distance between serial and PPS
+tos mindist 0.010
+
+# This obtains a random server which will be close
+# (in IP terms) to the machine. Add other servers
+# as required, or change this.
+#server 0.pool.ntp.org iburst
+#server 1.pool.ntp.org iburst
+#server 2.pool.ntp.org iburst
+#server 3.pool.ntp.org iburst
+
+# Low stratum server in germany
+server ntp1.ptb.de iburst
+server ntp2.ptb.de iburst
+
+# Using local hardware clock as fallback
+#server 127.127.1.0
+#fudge 127.127.1.0 stratum 14
+
+# Use local gps via serial (via gpsd SHM)
+server 127.127.28.0 minpoll 4 prefer
+fudge 127.127.28.0 refid GPS stratum 1
+# serial time per UBX
+fudge 127.127.28.0 time1 -0.875
+
+# Use linux pps
+server 127.127.22.0 minpoll 4 true
+fudge 127.127.22.0 refid GPSP stratum 0
+# use the clear edge to avoid interrupt latency
+fudge 127.127.22.0 time1 0.000 flag2 1
+
+# Defining a default security setting
+restrict default nomodify nopeer
+
diff --git a/rules/ntp.in b/rules/ntp.in
new file mode 100644
index 0000000..1bfe78f
--- /dev/null
+++ b/rules/ntp.in
@@ -0,0 +1,254 @@
+## SECTION=networking
+
+menuconfig NTP
+ tristate
+ prompt "ntp "
+ select OPENSSL if NTP_CRYPTO
+ select ROOTFS_VAR_CACHE if NTP_NTPD
+ select LIBC_M
+ select LIBC_RT
+ select GCCLIBS_GCC_S
+ select LIBMD
+ help
+ Build the standard NTP Daemon Process and supplementary programs.
+ This conflicts with BSD openntpd.
+
+# ----- Compile Options
+
+if NTP
+
+comment "Compile Options"
+
+config NTP_CLOCKCTL
+ bool
+ prompt "Use /dev/clockctl for non-root time control"
+ help
+ The clockctl device introduces alternative entry
+ points to these system calls, through a special
+ device file typically named /dev/clockctl
+ The access control is made upon this file: if a
+ user can write to it, then the user is allowed to
+ change system time. The goal is to enable daemons
+ such as ntpd to run in a chroot jail and hence to
+ enhance the security of the system.
+
+config NTP_DEBUGGING
+ bool
+ prompt "include debugging code"
+ help
+ Include a lot of debugging code.
+
+config NTP_DST_MINUTES
+ int
+ prompt "minutes per DST adjustment"
+ default 60
+ help
+ Enter here how many minutes should be added when
+ switching to daylight saving time.
+
+config NTP_BANCOMM
+ bool
+ prompt "Datum/Bancomm bc635/VME interface"
+ help
+ FIXME: This item needs to be documented
+
+config NTP_GPSVME
+ bool
+ prompt "TrueTime GPS receiver/VME interface"
+ help
+ FIXME: This item needs to be documented
+
+config NTP_KMEM
+ bool
+ prompt "read /dev/kmem for tick and/or tickadj"
+ help
+ This feature seems only required on non Linux based systems
+
+config NTP_ACCURATE_ADJTIME
+ bool
+ prompt "the adjtime () call is accurate"
+ help
+ The adjtime() call is accurate.
+
+config NTP_TICK_FORCE
+ bool
+ prompt "force a value for 'tick'"
+ help
+ FIXME: This item needs to be documented
+
+config NTP_TICK
+ int
+ prompt "value for 'tick'"
+ default 1
+ depends on NTP_TICK_FORCE
+ help
+ FIXME: This item needs to be documented
+
+config NTP_TICKADJ_FORCE
+ bool
+ prompt "force a value for 'tickadj'"
+ help
+ FIXME: This item needs to be documented
+
+config NTP_TICKADJ
+ bool
+ prompt "value for 'tickadj'"
+ default 1
+ depends on NTP_TICKADJ_FORCE
+ help
+ FIXME: This item needs to be documented
+
+config NTP_SIMULATOR
+ bool
+ prompt "build/install the NTPD simulator"
+ help
+ FIXME: This item needs to be documented
+
+config NTP_UDP_WILDCARD
+ bool
+ prompt "use UDP wildcard delivery"
+ help
+ FIXME: This item needs to be documented
+
+config NTP_SLEW_ALWAYS
+ bool
+ prompt "always slew the time"
+ help
+ Slew the clock back into line by making gradual adjustments to the
+ clock over a couple of minutes.
+
+config NTP_STEP_SLEW
+ bool
+ prompt "step and slew the time"
+ help
+ Slew the clock back into line by making step adjustments to the
+ clock over a couple of minutes.
+
+config NTP_NTPDATE_STEP
+ bool
+ prompt "ntpdate should step the time"
+ help
+ FIXME: This item needs to be documented
+
+config NTP_HOURLY_TODR_SYNC
+ bool
+ prompt "sync TODR hourly"
+ help
+ FIXME: This item needs to be documented
+
+config NTP_KERNEL_FLL_BUG
+ bool
+ prompt "avoid a kernel FLL bug"
+ help
+ If we should avoid a (Solaris) kernel FLL bug.
+
+config NTP_IRIG_SAWTOOTH
+ bool
+ prompt "enable the IRIG sawtooth filter"
+ help
+ FIXME: This item needs to be documented
+
+config NTP_NIST
+ bool
+ prompt "enable the NIST lockclock scheme"
+ help
+ FIXME: This item needs to be documented
+
+config NTP_CRYPTO
+ bool
+ prompt "use openssl"
+ help
+ FIXME: This item needs to be documented
+
+config NTP_SNTP
+ bool
+ prompt "build SNTP"
+ help
+ FIXME: This item needs to be documented
+
+config NTP_ARLIB
+ bool
+ prompt "compile the async resolver library"
+ help
+ FIXME: This item needs to be documented
+
+comment "Clock drivers"
+
+config NTP_ALL_CLOCK_DRIVERS
+ bool
+ prompt "build all clock drivers"
+ default y
+ help
+ Disabling this entry will only build a set of selected clock drivers.
+ Else all clock drivers are included into the ntpd.
+
+comment "PPS support requires installed kernel headers"
+ depends on !KERNEL_HEADER
+
+source "generated/networking_ntp.in"
+
+# ---------- Install Options
+
+comment "Install Options"
+depends on NTP
+
+config NTP_NTPDATE
+ bool
+ prompt "install ntpdate"
+ depends on NTP
+ help
+ ntpdate sets the local date and time by polling the Network
+ Time Protocol (NTP) server(s) given as the server arguments
+ to determine the correct time.
+
+config NTP_NTPD
+ bool
+ prompt "install ntpd"
+ depends on NTP
+ depends on !BUSYBOX_NTPD || ALLYES
+ help
+ The ntpd program is an operating system daemon which sets and
+ maintains the system time of day in synchronism with Internet
+ standard time servers.
+
+comment "BusyBox' ntpd is selected"
+ depends on BUSYBOX_NTPD
+
+config NTP_NTPD_STARTSCRIPT
+ bool
+ default y
+ depends on NTP_NTPD
+ prompt "install /etc/init.d/ntp-server"
+
+config NTP_NTPDC
+ bool
+ prompt "install ntpdc"
+ depends on NTP
+ help
+ ntpdc is used to query the ntpd daemon about its
+ current state and to request changes in that state.
+
+config NTP_NTPC_STARTSCRIPT
+ bool
+ default y
+ depends on NTP_NTPDC
+ prompt "install /etc/init.d/ntp-client"
+
+config NTP_NTPQ
+ bool
+ prompt "install ntpq"
+ depends on NTP
+ help
+ The ntpq utility program is used to monitor NTP daemon ntpd
+ operations and determine performance.
+
+config NTP_NTPTIME
+ bool
+ prompt "install ntptime"
+ depends on NTP
+
+endif
+
+comment "NTP conflicts with OpenNTPD"
+ depends on NTP && OPENNTPD
+
diff --git a/rules/ntp.make b/rules/ntp.make
new file mode 100644
index 0000000..de7466f
--- /dev/null
+++ b/rules/ntp.make
@@ -0,0 +1,380 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2003 by Benedikt Spranger
+# 2009 by Robert Schwebel
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_NTP) += ntp
+
+#
+# Paths and names
+#
+NTP_VERSION := 4.2.6p5
+NTP_MD5 := 00df80a84ec9528fcfb09498075525bc
+NTP := ntp-$(NTP_VERSION)
+NTP_SUFFIX := tar.gz
+NTP_URL := http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/$(NTP).$(NTP_SUFFIX)
+NTP_SOURCE := $(SRCDIR)/$(NTP).$(NTP_SUFFIX)
+NTP_DIR := $(BUILDDIR)/$(NTP)
+NTP_LICENSE := ntp
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+$(NTP_SOURCE):
+ @$(call targetinfo)
+ @$(call get, NTP)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+NTP_PATH := PATH=$(CROSS_PATH)
+NTP_ENV := \
+ $(CROSS_ENV) \
+ libopts_cv_test_dev_zero=yes
+
+#
+# autoconf
+#
+NTP_AUTOCONF := $(CROSS_AUTOCONF_USR) \
+ $(GLOBAL_IPV6_OPTION) \
+ --with-binsubdir=sbin \
+ --without-lineeditlibs \
+ --without-net-snmp-config \
+ --disable-linuxcaps
+
+ifdef PTXCONF_NTP_ALL_CLOCK_DRIVERS
+NTP_AUTOCONF += --enable-all-clocks
+else
+NTP_AUTOCONF += --disable-all-clocks
+endif
+
+#
+# NTP: options, we need lots of options ;-)
+# Note: Only if '--disable-all-clocks' is given, the additional clock driver
+# switches makes sense (else most of the clock drivers are enabled
+# by default)
+#
+ifdef PTXCONF_NTP_CLOCKCTL
+NTP_AUTOCONF += --enable-clockctl
+endif
+ifdef PTXCONF_NTP_DEBUGGING
+NTP_AUTOCONF += --enable-debugging
+endif
+ifdef PTXCONF_NTP_DST_MINUTES
+NTP_AUTOCONF += --enable-dst-minutes=$(PTXCONF_NTP_DST_MINUTES)
+endif
+ifdef PTXCONF_NTP_BANCOMM
+NTP_AUTOCONF += --enable-BANCOMM
+endif
+ifdef PTXCONF_NTP_GPSVME
+NTP_AUTOCONF += --enable-GPSVME
+endif
+ifdef PTXCONF_NTP_ACTS
+NTP_AUTOCONF += --enable-ACTS
+endif
+ifdef PTXCONF_NTP_ARBITER
+NTP_AUTOCONF += --enable-ARBITER
+endif
+ifdef PTXCONF_NTP_ARCRON_MSF
+NTP_AUTOCONF += --enable-ARCRON_MSF
+endif
+ifdef PTXCONF_NTP_AS2201
+NTP_AUTOCONF += --enable-AS2201
+endif
+ifdef PTXCONF_NTP_ATOM
+NTP_AUTOCONF += --enable-ATOM
+endif
+ifdef PTXCONF_NTP_CHRONOLOG
+NTP_AUTOCONF += --enable-CHRONOLOG
+endif
+ifdef PTXCONF_NTP_CHU
+NTP_AUTOCONF += --enable-CHU
+endif
+ifdef PTXCONF_NTP_AUDIO_CHU
+NTP_AUTOCONF += --enable-AUDIO-CHU
+endif
+ifdef PTXCONF_NTP_DATUM
+NTP_AUTOCONF += --enable-DATUM
+endif
+ifdef PTXCONF_NTP_DUMBCLOCK
+NTP_AUTOCONF += --enable-DUMBCLOCK
+endif
+ifdef PTXCONF_NTP_FG
+NTP_AUTOCONF += --enable-FG
+endif
+ifdef PTXCONF_NTP_HEATH
+NTP_AUTOCONF += --enable-HEATH
+endif
+ifdef PTXCONF_NTP_HOPFSERIAL
+NTP_AUTOCONF += --enable-HOPFSERIAL
+endif
+ifdef PTXCONF_NTP_HOPFPCI
+NTP_AUTOCONF += --enable-HOPFPCI
+endif
+ifdef PTXCONF_NTP_HPGPS
+NTP_AUTOCONF += --enable-HPGPS
+endif
+ifdef PTXCONF_NTP_IRIG
+NTP_AUTOCONF += --enable-IRIG
+endif
+ifdef PTXCONF_NTP_JJY
+NTP_AUTOCONF += --enable-JJY
+endif
+ifdef PTXCONF_NTP_JUPITER
+NTP_AUTOCONF += --enable-JUPITER
+endif
+ifdef PTXCONF_NTP_LEITCH
+NTP_AUTOCONF += --enable-LEITCH
+endif
+ifdef PTXCONF_NTP_LOCAL_CLOCK
+NTP_AUTOCONF += --enable-LOCAL-CLOCK
+endif
+ifdef PTXCONF_NTP_MSFEES
+NTP_AUTOCONF += --enable-MSFEES
+endif
+ifdef PTXCONF_NTP_MX4200
+NTP_AUTOCONF += --enable-MX4200
+endif
+ifdef PTXCONF_NTP_NEOCLOCK4X
+NTP_AUTOCONF += --enable-NEOCLOCK4X
+endif
+ifdef PTXCONF_NTP_NMEA
+NTP_AUTOCONF += --enable-NMEA
+endif
+ifdef PTXCONF_NTP_ONCORE
+NTP_AUTOCONF += --enable-ONCORE
+endif
+ifdef PTXCONF_NTP_PALISADE
+NTP_AUTOCONF += --enable-PALISADE
+endif
+ifdef PTXCONF_NTP_PCF
+NTP_AUTOCONF += --enable-PCF
+endif
+ifdef PTXCONF_NTP_PST
+NTP_AUTOCONF += --enable-PST
+endif
+ifdef PTXCONF_NTP_PTBACTS
+NTP_AUTOCONF += --enable-PTBACTS
+endif
+ifdef PTXCONF_NTP_RIPENCC
+NTP_AUTOCONF += --enable-RIPENCC
+endif
+ifdef PTXCONF_NTP_SHM
+NTP_AUTOCONF += --enable-SHM
+endif
+ifdef PTXCONF_NTP_SPECTRACOM
+NTP_AUTOCONF += --enable-SPECTRACOM
+endif
+ifdef PTXCONF_NTP_TPRO
+NTP_AUTOCONF += --enable-TPRO
+endif
+ifdef PTXCONF_NTP_TRAK
+NTP_AUTOCONF += --enable-TRAK
+endif
+ifdef PTXCONF_NTP_TRUETIME
+NTP_AUTOCONF += --enable-TRUETIME
+endif
+ifdef PTXCONF_NTP_TT560
+NTP_AUTOCONF += --enable-TT560
+endif
+ifdef PTXCONF_NTP_ULINK
+NTP_AUTOCONF += --enable-ULINK
+endif
+ifdef PTXCONF_NTP_USNO
+NTP_AUTOCONF += --enable-USNO
+endif
+ifdef PTXCONF_NTP_WWV
+NTP_AUTOCONF += --enable-WWV
+endif
+ifdef PTXCONF_NTP_ZYFER
+NTP_AUTOCONF += --enable-ZYFER
+endif
+ifdef PTXCONF_NTP_COMPUTIME
+NTP_AUTOCONF += --enable-COMPUTIME
+endif
+ifdef PTXCONF_NTP_DCF7000
+NTP_AUTOCONF += --enable-DCF7000
+endif
+ifdef PTXCONF_NTP_HOPF6021
+NTP_AUTOCONF += --enable-HOPF6021
+endif
+ifdef PTXCONF_NTP_MEINBERG
+NTP_AUTOCONF += --enable-MEINBERG
+endif
+ifdef PTXCONF_NTP_RAWDCF
+NTP_AUTOCONF += --enable-RAWDCF
+endif
+ifdef PTXCONF_NTP_RCC8000
+NTP_AUTOCONF += --enable-RCC8000
+endif
+ifdef PTXCONF_NTP_SCHMID
+NTP_AUTOCONF += --enable-SCHMID
+endif
+ifdef PTXCONF_NTP_TRIMTAIP
+NTP_AUTOCONF += --enable-TRIMTAIP
+endif
+ifdef PTXCONF_NTP_TRIMTSIP
+NTP_AUTOCONF += --enable-TRIMTSIP
+endif
+ifdef PTXCONF_NTP_WHARTON
+NTP_AUTOCONF += --enable-WHARTON
+endif
+ifdef PTXCONF_NTP_VARITEXT
+NTP_AUTOCONF += --enable-VARITEXT
+endif
+ifdef PTXCONF_NTP_KMEM
+NTP_AUTOCONF += --enable-kmem
+endif
+ifdef PTXCONF_NTP_ACCURATE_ADJTIME
+NTP_AUTOCONF += --enable-accurate-adjtime
+endif
+ifdef PTXCONF_NTP_TICK_FORCE
+NTP_AUTOCONF += --enable-tick=$(PTXCONF_NTP_TICK)
+endif
+ifdef PTXCONF_NTP_TICKADJ_FORCE
+NTP_AUTOCONF += --enable-tickadj=$(PTXCONF_NTP_TICKADJ)
+endif
+ifdef PTXCONF_NTP_SIMULATOR
+NTP_AUTOCONF += --enable-simulator
+endif
+ifdef PTXCONF_NTP_UDP_WILDCARD
+NTP_AUTOCONF += --enable-udp-wildcard
+endif
+ifdef PTXCONF_NTP_SLEW_ALWAYS
+NTP_AUTOCONF += --enable-slew-always
+endif
+ifdef PTXCONF_NTP_STEP_SLEW
+NTP_AUTOCONF += --enable-step-slew
+endif
+ifdef PTXCONF_NTP_NTPDATE_STEP
+NTP_AUTOCONF += --enable-ntpdate-step
+endif
+ifdef PTXCONF_NTP_HOURLY_TODR_SYNC
+NTP_AUTOCONF += --enable-hourly-todr-sync
+endif
+ifdef PTXCONF_NTP_KERNEL_FLL_BUG
+NTP_AUTOCONF += --enable-kernel-fll-bug
+endif
+ifdef PTXCONF_NTP_IRIG_SAWTOOTH
+NTP_AUTOCONF += --enable-irig-sawtooth
+endif
+ifdef PTXCONF_NTP_NIST
+NTP_AUTOCONF += --enable-nist
+endif
+ifdef PTXCONF_NTP_CRYPTO
+NTP_AUTOCONF += \
+ --enable-crypto \
+ --with-openssl-libdir=$(PTXDIST_SYSROOT_TARGET)/usr/lib \
+ --with-openssl-incdir=$(PTXDIST_SYSROOT_TARGET)/usr/include
+else
+NTP_AUTOCONF += --disable-crypto \
+ --without-openssl-libdir \
+ --without-openssl-incdir
+endif
+ifdef PTXCONF_NTP_SNTP
+NTP_AUTOCONF += --enable-sntp
+endif
+ifdef PTXCONF_NTP_ARLIB
+NTP_AUTOCONF += --enable-arlib
+endif
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/ntp.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, ntp)
+ @$(call install_fixup, ntp,PRIORITY,optional)
+ @$(call install_fixup, ntp,SECTION,base)
+ @$(call install_fixup, ntp,AUTHOR,"Robert Schwebel")
+ @$(call install_fixup, ntp,DESCRIPTION,missing)
+
+# #
+# # ntpdate
+# #
+ifdef PTXCONF_NTP_NTPDATE
+ @$(call install_copy, ntp, 0, 0, 0755, -, \
+ /usr/sbin/ntpdate)
+endif
+
+# #
+# # ntp server
+# #
+ifdef PTXCONF_NTP_NTPD
+ @$(call install_copy, ntp, 0, 0, 0755, -, \
+ /usr/sbin/ntpd)
+ @$(call install_alternative, ntp, 0, 0, 0644, /etc/ntp.conf)
+endif
+
+ifdef PTXCONF_INITMETHOD_BBINIT
+ifdef PTXCONF_NTP_NTPD_STARTSCRIPT
+ @$(call install_alternative, ntp, 0, 0, 0755, /etc/init.d/ntp-server)
+
+ifneq ($(call remove_quotes,$(PTXCONF_NTP_NTPD_BBINIT_LINK)),)
+ @$(call install_link, ntp, \
+ ../init.d/ntp-server, \
+ /etc/rc.d/$(PTXCONF_NTP_NTPD_BBINIT_LINK))
+endif
+endif
+endif
+
+# #
+# # ntpdc
+# #
+ifdef PTXCONF_NTP_NTPDC
+ @$(call install_copy, ntp, 0, 0, 0755, -, \
+ /usr/sbin/ntpdc)
+endif
+
+ifdef PTXCONF_INITMETHOD_BBINIT
+ifdef PTXCONF_NTP_NTPC_STARTSCRIPT
+ @$(call install_alternative, ntp, 0, 0, 0755, /etc/init.d/ntp-client)
+
+ifneq ($(call remove_quotes,$(PTXCONF_NTP_NTPC_BBINIT_LINK)),)
+ @$(call install_link, ntp, \
+ ../init.d/ntp-client, \
+ /etc/rc.d/$(PTXCONF_NTP_NTPC_BBINIT_LINK))
+endif
+endif
+endif
+
+# #
+# # ntpq
+# #
+ifdef PTXCONF_NTP_NTPQ
+ @$(call install_copy, ntp, 0, 0, 0755, -, \
+ /usr/sbin/ntpq)
+endif
+
+# #
+# # ntptime
+# #
+ifdef PTXCONF_NTP_NTPTIME
+ @$(call install_copy, ntp, 0, 0, 0755, -, \
+ /usr/sbin/ntptime)
+endif
+
+# #
+# # other dirs
+# #
+ @$(call install_copy, ntp, 0, 0, 0755, /var/log/ntpstats)
+ @$(call install_copy, ntp, 0, 0, 0755, /var/lib/ntp)
+
+ @$(call install_finish, ntp)
+
+ @$(call touch)
+
+# vim: syntax=make
diff --git a/rules/ntp_nonparse.in b/rules/ntp_nonparse.in
new file mode 100644
index 0000000..f2ecd7b
--- /dev/null
+++ b/rules/ntp_nonparse.in
@@ -0,0 +1,184 @@
+## SECTION=networking_ntp
+
+# --- non-PARSE clocks ---
+
+if !NTP_ALL_CLOCK_DRIVERS
+
+menu "select non-PARSE clock drivers"
+
+#if NTP_NONE_PARSE_CLOCKS
+
+config NTP_ACTS
+ bool
+ prompt "ACTS modem service"
+ help
+ NIST dialup clock
+
+config NTP_ARBITER
+ bool
+ prompt "Arbiter 1088A/B GPS receiver"
+
+config NTP_ARCRON_MSF
+ bool
+ prompt "Arcron MSF receiver"
+
+config NTP_AS2201
+ bool
+ prompt "Austron 2200A/2201A GPS receiver"
+
+config NTP_ATOM
+ bool
+ prompt "ATOM PPS interface"
+
+config NTP_CHRONOLOG
+ bool
+ prompt "Chrono-log K-series WWVB receiver"
+
+config NTP_CHU
+ bool
+ prompt "CHU modem/decoder"
+
+config NTP_AUDIO_CHU
+ bool
+ prompt "CHU audio/decoder"
+
+config NTP_DATUM
+ bool
+ prompt "Datum Programmable Time System"
+
+config NTP_DUMBCLOCK
+ bool
+ prompt "Dumb generic hh:mm:ss local clock"
+
+config NTP_FG
+ bool
+ prompt "Forum Graphic GPS"
+
+config NTP_HEATH
+ bool
+ prompt "Heath GC-1000 WWV/WWVH receiver "
+
+config NTP_HOPFSERIAL
+ bool
+ prompt "hopf serial clock device"
+
+config NTP_HOPFPCI
+ bool
+ prompt "hopf 6039 PCI board"
+
+config NTP_HPGPS
+ bool
+ prompt "HP 58503A GPS receiver"
+
+config NTP_IRIG
+ bool
+ prompt "IRIG audio decoder "
+
+config NTP_JJY
+ bool
+ prompt "JJY receiver"
+
+config NTP_JUPITER
+ bool
+ prompt "Rockwell Jupiter GPS receiver"
+
+config NTP_LEITCH
+ bool
+ prompt "Leitch CSD 5300 Master Clock System Driver"
+
+config NTP_LOCAL_CLOCK
+ bool
+ prompt "local clock reference"
+ default y
+ help
+ Enables the driver for the internal PC CMOS clock. This clock
+ is mostly unreliable, but suitable as a fall back time source.
+
+config NTP_MSFEES
+ bool
+ prompt "EES M201 MSF receiver"
+
+config NTP_MX4200
+ bool
+ prompt "Magnavox MX4200 GPS receiver "
+
+config NTP_NEOCLOCK4X
+ bool
+ prompt "NeoClock4X DCF77 / TDF receiver"
+
+config NTP_NMEA
+ bool
+ prompt "NMEA GPS receiver"
+
+config NTP_ONCORE
+ bool
+ prompt "Motorola VP/UT Oncore GPS receiver"
+
+config NTP_PALISADE
+ bool
+ prompt "Palisade clock"
+
+config NTP_PCF
+ bool
+ prompt "Conrad parallel port radio clock"
+
+config NTP_PST
+ bool
+ prompt "PST/Traconex 1020 WWV/WWVH receiver"
+
+config NTP_PTBACTS
+ bool
+ prompt "PTB modem service"
+
+config NTP_RIPENCC
+ bool
+ prompt "RIPENCC specific Trimble driver"
+
+config NTP_SHM
+ bool
+ prompt "SHM clock attached thru shared memory"
+ help
+ Clock attached through shared memory (runs in a
+ separate program).
+
+config NTP_SPECTRACOM
+ bool
+ prompt "Spectracom 8170/Netclock/2 WWVB receiver"
+
+config NTP_TPRO
+ bool
+ prompt "KSI/Odetics TPRO/S GPS receiver/IRIG interface [BROKEN]"
+ depends on BROKEN
+
+config NTP_TRAK
+ bool
+ prompt "TRAK 8810 GPS receiver"
+
+config NTP_TRUETIME
+ bool
+ prompt "Kinemetrics/TrueTime receivers"
+
+config NTP_TT560
+ bool
+ prompt "TrueTime 560 IRIG-B decoder [BROKEN]"
+ depends on BROKEN
+
+config NTP_ULINK
+ bool
+ prompt "Ultralink WWVB receiver"
+
+config NTP_USNO
+ bool
+ prompt "USNO modem service"
+
+config NTP_WWV
+ bool
+ prompt "WWV Audio receiver"
+
+config NTP_ZYFER
+ bool
+ prompt "Zyfer GPStarplus receiver"
+
+endmenu
+
+endif
diff --git a/rules/ntp_parse.in b/rules/ntp_parse.in
new file mode 100644
index 0000000..a8f8832
--- /dev/null
+++ b/rules/ntp_parse.in
@@ -0,0 +1,57 @@
+## SECTION=networking_ntp
+
+# --- PARSE clocks ---
+
+if !NTP_ALL_CLOCK_DRIVERS
+
+menu "select PARSE clock drivers "
+
+config NTP_COMPUTIME
+ bool
+ prompt "Diem Computime Radio Clock"
+
+config NTP_DCF7000
+ bool
+ prompt "ELV/DCF7000 clock"
+
+config NTP_HOPF6021
+ bool
+ prompt "HOPF 6021 clock"
+
+config NTP_MEINBERG
+ bool
+ prompt "Meinberg clocks"
+
+config NTP_RAWDCF
+ bool
+ prompt "DCF77 raw time code"
+ help
+ Enables the driver for a simple DCF77 signal forwarded to a UART port.
+
+config NTP_RCC8000
+ bool
+ prompt "RCC 8000 clock"
+
+config NTP_SCHMID
+ bool
+ prompt "Schmid DCF77 clock"
+
+config NTP_TRIMTAIP
+ bool
+ prompt "Trimble GPS receiver/TAIP protocol"
+
+config NTP_TRIMTSIP
+ bool
+ prompt "Trimble GPS receiver/TSIP protocol"
+
+config NTP_WHARTON
+ bool
+ prompt "WHARTON 400A Series clock"
+
+config NTP_VARITEXT
+ bool
+ prompt "VARITEXT clock"
+
+endmenu
+
+endif
diff --git a/rules/pps-tools.in b/rules/pps-tools.in
new file mode 100644
index 0000000..747b45a
--- /dev/null
+++ b/rules/pps-tools.in
@@ -0,0 +1,7 @@
+## SECTION=project_specific
+
+config PPS_TOOLS
+ tristate
+ prompt "pps-tools"
+ help
+ FIXME
diff --git a/rules/pps-tools.make b/rules/pps-tools.make
new file mode 100644
index 0000000..32c7e13
--- /dev/null
+++ b/rules/pps-tools.make
@@ -0,0 +1,107 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2012 by Jan Luebbe <jlu@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_PPS_TOOLS) += pps-tools
+
+#
+# Paths and names
+#
+PPS_TOOLS_VERSION := 5.3.6-git1
+PPS_TOOLS_REV := 0deb9c7
+PPS_TOOLS_MD5 := a4535053e55dfd4337bc927562cbfa18
+PPS_TOOLS := pps-tools-$(PPS_TOOLS_VERSION)
+PPS_TOOLS_SUFFIX := tar.gz
+PPS_TOOLS_URL := https://github.com/ago/pps-tools/tarball/$(PPS_TOOLS_REV)/$(PPS_TOOLS).$(PPS_TOOLS_SUFFIX)
+PPS_TOOLS_SOURCE := $(SRCDIR)/$(PPS_TOOLS).$(PPS_TOOLS_SUFFIX)
+PPS_TOOLS_DIR := $(BUILDDIR)/$(PPS_TOOLS)
+PPS_TOOLS_LICENSE := unknown
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+#$(STATEDIR)/pps-tools.extract:
+# @$(call targetinfo)
+# @$(call clean, $(PPS_TOOLS_DIR))
+# @$(call extract, PPS_TOOLS)
+# @$(call patchin, PPS_TOOLS)
+# @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#PPS_TOOLS_PATH := PATH=$(CROSS_PATH)
+PPS_TOOLS_CONF_TOOL := NO
+PPS_TOOLS_MAKE_ENV := $(CROSS_ENV)
+
+#$(STATEDIR)/pps-tools.prepare:
+# @$(call targetinfo)
+# @$(call world/prepare, PPS_TOOLS)
+# @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+#$(STATEDIR)/pps-tools.compile:
+# @$(call targetinfo)
+# @$(call world/compile, PPS_TOOLS)
+# @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+#$(STATEDIR)/pps-tools.install:
+# @$(call targetinfo)
+# @$(call world/install, PPS_TOOLS)
+# @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/pps-tools.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, pps-tools)
+ @$(call install_fixup, pps-tools,PRIORITY,optional)
+ @$(call install_fixup, pps-tools,SECTION,base)
+ @$(call install_fixup, pps-tools,AUTHOR,"Jan Luebbe <jlu@pengutronix.de>")
+ @$(call install_fixup, pps-tools,DESCRIPTION,missing)
+
+#
+# TODO: Add here all files that should be copied to the target
+# Note: Add everything before(!) call to macro install_finish
+#
+ @$(call install_copy, pps-tools, 0, 0, 0755, $(PPS_TOOLS_DIR)/ppsfind, /usr/bin/ppsfind)
+ @$(call install_copy, pps-tools, 0, 0, 0755, $(PPS_TOOLS_DIR)/ppstest, /usr/bin/ppstest)
+ @$(call install_copy, pps-tools, 0, 0, 0755, $(PPS_TOOLS_DIR)/ppsctl, /usr/bin/ppsctl)
+ @$(call install_copy, pps-tools, 0, 0, 0755, $(PPS_TOOLS_DIR)/ppswatch, /usr/bin/ppswatch)
+
+ @$(call install_finish, pps-tools)
+
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/pps-tools.clean:
+ @$(call targetinfo)
+ @-cd $(PPS_TOOLS_DIR) && \
+ $(PPS_TOOLS_ENV) $(PPS_TOOLS_PATH) $(MAKE) clean
+ @$(call clean_pkg, PPS_TOOLS)
+
+# vim: syntax=make