Tinkerboard w/ TinkerOS 2.0.1

Achim Gratz Stromeko at nexgo.de
Sun Sep 10 17:11:15 UTC 2017


[resent and expanded, the original posting did not make it to Gmane NNTP]

Achim Gratz via devel writes:
> Still no sign of PPS via GPIO, I might try Armbian later to see if it's
> available there since I don't need the GPU and WLAN anyway.  I've

Some kind soul read this and sent me some hints on how to compile a
kernel that has PPS enabled (thank you!).  Just creating the node in the
device tree (with an overlay) is not enough since the kernel does not
have the device compiled in.  Anyway, compiling the kernel on the
Tinkerboard takes only about half an hour (maybe less if you use active
cooling so it doesn't throttle due to running up to the thermal
thresholds).

Here's what I did (it's mostly gleaned from
http://qiita.com/mt08/items/890a71d0b399ac1a9b49) and the two patches
that have been applied (based on the information posted in
https://tinkerboarding.co.uk/forum/thread-594.html).

Patches on top of the upstream kernel sources:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-indentation-warnings-due-to-whitespace-mixup.patch
Type: text/x-patch
Size: 5840 bytes
Desc: not available
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170910/c1fd11c4/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Enable-PPS-on-GPIO-pin-22-for-Asus-TinkerBoard.patch
Type: text/x-patch
Size: 1708 bytes
Desc: not available
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170910/c1fd11c4/attachment-0001.bin>
-------------- next part --------------

--8<---------------cut here---------------start------------->8---
    - git clone --depth 1 -b linux4.4-rk3288 https://github.com/TinkerBoard/debian_kernel.git
    - cd debian_kernel
    - git am patchfiles # fix kernel sources and change config to include PPS on GPIO Pin#22
    - make ARCH=arm miniarm-rk3288_defconfig
    - time make ARCH=arm -j6 zImage 2>&1 | tee zImage.log
    - time make ARCH=arm -j6 modules 2>&1 | tee modules.log
    - time make ARCH=arm -j6 dtbs 2>&1 | tee dtbs.log
    - sudo make ARCH=arm modules_install
    - sudo cp -v /boot/zImage{,.bak}
    - sudo cp -v /boot/rk3288-miniarm.dtb{,.bak}
    - sudo cp -v arch/arm/boot/{zImage,dts/rk3288-miniarm.dtb} /boot
    - ls -al /boot /lib/modules
    - sudo reboot
--8<---------------cut here---------------end--------------->8---

Also I finally found the reason for the unexpectedly high latency (it's
interrupt coalescing in the Gigabit interface, the impact on NTP shown
here https://blog.dan.drown.org/nic-interrupt-coalesce-impact-on-ntp).
The default coalesce interval on the TinkerBoard is over 0.5ms and I've
set it to the minimum of 69?s now.  To make that setting permanent
accross reboots:

--8<---------------cut here---------------start------------->8---
    - echo -e "iface eth0 inet dhcp\n    hardware-irq-coalesce-rx-usecs 69" | sudo tee /etc/network/interfaces.d/eth0
--8<---------------cut here---------------end--------------->8---

Also, my script that regulates the temperature and load uses interval
timers with short intervals and that only really works if "nohz=off"
gets added to the kernel command line in /boot/extlinux/extlinux.conf.

I've switched the TinkerBoard to PPS and starting to collect PPS
statistics.  Everything looks pretty good so far, I've also started
ovenizing the XTAL, but it will be some time before I get enough
statistics to extract the parameters from for a proper control loop.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada


More information about the devel mailing list