User Tools

Site Tools


Navigation Menu

Fixes for chrony & RTC on Odroid C1 Linux 3.10.67 (ARMv7)

For a long time, all machines in Apollo-NG's infrastructure use chrony as a replacement for the usual ntpd package. chrony can be compared to ntpd like nginx can be compared to Apache, newer, much more lightweight approach and some additional very nice features. While nginx has replaced most of the Apache installations these days, chrony still isn't adopted as a good alternative by most people yet.

During the NTPD reflection attack time and the mysql/kernel/ntpd leap second bug, it was nice to see how chrony really saved a lot of time and grief by not being affected. It has been working here - and in many other scenarios - absolutely flawlessly until today.

Fixing the kernel

While setting up gentoo on an Odroid C1 quad-core ARMv7 as a replacement embedded system for picoprint, chronyd died as soon as it tried to sync the kernel time, like this:

2015-02-07T16:29:09Z chronyd version 1.31 starting
2015-02-07T16:31:20Z Selected source 129.70.132.35
2015-02-07T16:31:20Z Fatal error : adjtimex failed for set_frequency, freq_ppm=-1.6047e+00 required_freq=1.6047e+00 required_tick=10000

Deploying 2.0pre1 didn't fix the issue, baking new kernels with different dyn_ticks settings didn't help either but finally there was a break: https://bugzilla.redhat.com/show_bug.cgi?id=1188074#c3.

--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -634,9 +634,9 @@ int ntp_validate_timex(struct timex *txc)
                return -EPERM;
 
        if (txc->modes & ADJ_FREQUENCY) {
-               if (LONG_MIN / PPM_SCALE > txc->freq)
+               if (-MAXFREQ_SCALED / PPM_SCALE > txc->freq)
                        return -EINVAL;
-               if (LONG_MAX / PPM_SCALE < txc->freq)
+               if (MAXFREQ_SCALED / PPM_SCALE < txc->freq)
                        return -EINVAL;
        }

After patching the odroid sources with the recommended one from the bugtracker chronyd is working like a charm again.

Update

After linking the issue on github, kukabu delivered the link to the upstream kernel bug:

--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -634,9 +634,9 @@ int ntp_validate_timex(struct timex *txc)
                return -EPERM;
 
        if (txc->modes & ADJ_FREQUENCY) {
-               if (LONG_MIN / PPM_SCALE > txc->freq)
+               if (LLONG_MIN / PPM_SCALE > txc->freq)
                        return -EINVAL;
-               if (LONG_MAX / PPM_SCALE < txc->freq)
+               if (LLONG_MAX / PPM_SCALE < txc->freq)
                        return -EINVAL;
        }

This patch was tested and is solving chrony's sync problems as well. So if you're experiencing NTP issues with newer kernels (at least from an embedded perspective), that use dynamic or idle tick-less clocks, you might want to check/patch your kernel with this one.

Hacking a new RTC power supply with a goldcap capacitor

The Odroid C1 also came with another not so obvious pitfall: The RTC power supply. The optional RTC battery, you can usually buy wherever you can buy the Odroid itself, is the only power supply for the RTC. Meaning: When you don't have this battery, the RTC will not get powered at all (not even when your system is powered and running) so in order to get the RTC working at all, you need to feed power to the RTC Header. A quick glance into the schematics quickly revealed the secret:

U15 (XC6215B0927R-G) is a highly precise, low noise, positive voltage LDO regulator and it supplies the power to the VDD_RTC rail. And it's only connected to the RTC Battery PIN Header. So what to do now, when no battery is available? Just a quick hack to solve it:

Since using a battery seemed kinda backwards and there was a 5.5V 1F goldcap flying around here, this hack (second from the left minus the resistor) was used to supply 3.3V from Pin 1 of the Odroid C1 40 pin header through a 0.4V drop schottky diode (to get to about 2.9V which emulates a CR2032 Battery closely enough) and then fed to the goldcap to charge it and supply the RTC power header of the Odroid C1 board while running. GND is the pin towards the UART where it says RTC on the silkscreen, connected to (-) of the goldcap and also to GND of the 40 pin header. The VDD_RTC PIN is the one closer to the IR Receiver and is directly connected to the goldcap's (+).

Discussion

LIVE CASINO, 2023/11/06 06:04

Thank you very much for sharing such a useful article. Will definitely saved and revisit your site live casino games

color game, 2024/01/03 07:44

Isang hindi kapani-paniwalang mahusay na post sa blog. Taos-puso kaming nagpapasalamat sa iyong naiambag. Maraming diskarte ang iyong matutuklasan pagbisita sa iyong post. mga bonus sa casino na live.

playground, 2024/02/07 04:15

The patch essentially adjusts melon playground the handling of frequency values to prevent potential integer overflow issues.

25fox, 2024/02/12 23:19

Buy a driver's license Hello, welcome to the world's largest online driver's license organization. We sell authentic and registered driving licenses and we have several driving schools with which we collaborate.

https://origineelrijbewijskopen.com/

https://origineelrijbewijskopen.com/2023/11/10/rijbewijs-kopen-telegram/

https://origineelrijbewijskopen.com/2023/10/24/rijbewijs-kopen-nederland/

https://origineelrijbewijskopen.com/2023/11/01/rijbewijs-kopen-belgie/

https://origineelrijbewijskopen.com/2023/11/07/rijbewijs-a-kopen/

https://origineelrijbewijskopen.com/2023/11/07/rijbewijs-kopen-prijs/

https://origineelrijbewijskopen.com/2023/11/07/rijbewijs-te-koop-belgie/

https://origineelrijbewijskopen.com/2023/11/10/belgisch-rijbewijs-kopen/

https://origineelrijbewijskopen.com/2023/11/10/rijbewijs-kopen-duitsland/

https://origineelrijbewijskopen.com/2023/11/10/rijbewijs-examens-kopen/

https://origineelrijbewijskopen.com/2023/11/10/rijbewijs-kopen-hongarije/

What a nice post! I'm so happy to read this. What you wrote was very helpful to me. Thank you. Actually, I run a site similar to yours. If you have time, could you visit my site? Please leave your comments after reading what I wrote. If you do so, I will actively reflect your opinion. I think it will be a great help to run my site. Have a good day.

https://cf-cc-qualitylab.com/

https://cf-cc-qualitylab.com/product/american-dollars-for-sale/

https://cf-cc-qualitylab.com/product/buy-counterfeit-aud-online/

https://cf-cc-qualitylab.com/product/buy-fake-british-pounds-online/

https://cf-cc-qualitylab.com/product/buy-fake-euro-banknotes-online/

https://cf-cc-qualitylab.com/product/buy-new-zealand-dollars-online/

https://cf-cc-qualitylab.com/product/buy-undetected-canadian-dollars/

It is incredibly average to see the best inconspicuous components presented in a basic and seeing way Thank you. Actually, I run a site similar to yours. If you have time, could you visit my site? Please leave your comments after reading what I wrote. If you do so, I will actively reflect your opinion. I think it will be a great help to run my site. Have a good day.

https://cf-cc-qualitylab.com/product/paypal-flip/

https://cf-cc-qualitylab.com/product/western-union-flip/

https://cf-cc-qualitylab.com/product/cash-app-flip/

https://cf-cc-qualitylab.com/product/western-union-flip-sale/

https://cf-cc-qualitylab.com/product/legit-paypal-flip/

https://cf-cc-qualitylab.com/product/legit-cash-app-flip/

https://cf-cc-qualitylab.com/product/buy-cloned-cards/

https://cf-cc-qualitylab.com/product/buy-credit-card-dumps-online/

https://cf-cc-qualitylab.com/product/cloned-credit-cards-for-sale/

https://cf-cc-qualitylab.com/product/legit-paypal-money-transfer/

https://cf-cc-qualitylab.com/product/legit-paypal-money-transfer/

https://cf-cc-qualitylab.com/product/western-union-money-flip/

https://cf-cc-qualitylab.com/product/hacked-cash-app/

Such an especially significant article. To a great degree charming to examine this article.I should need to thank you for the undertakings you had made for creating this astonishing article.

https://cf-cc-qualitylab.com/product/automated-money-developer-machines/

https://cf-cc-qualitylab.com/product/high-quality-automatic-solution/

https://cf-cc-qualitylab.com/product/ssd-chemical-solution-packaging-materials/

https://cf-cc-qualitylab.com/product/vector-paste-ssd-solution/

https://cf-cc-qualitylab.com/product/humine-activation-powder/

https://cf-cc-qualitylab.com/product/99-99-pure-gallium-metal-alloy-for-mercury-replacement/

https://cf-cc-qualitylab.com/product/automated-money-developer-machines/

I am another client of this site so here I saw different articles and posts posted by this site,I inquisitive more enthusiasm for some of them trust you will give more data on this points in your next articles.

https://cf-cc-qualitylab.com/2024/02/01/western-union-uberweisen-umdrehen/

https://cf-cc-qualitylab.com/2024/02/01/kaufen-sie-western-union-umdrehen/

https://cf-cc-qualitylab.com/product/automated-money-developer-machines/

https://cf-cc-qualitylab.com/2024/02/01/koop-western-union-omzet/

https://cf-cc-qualitylab.com/2024/01/31/acquistare-lanciare-western-union/

https://cf-cc-qualitylab.com/2024/01/31/contanti-ribaltabili-della-western-union/

https://cf-cc-qualitylab.com/2024/01/30/volteo-de-dinero-de-western-union/

https://cf-cc-qualitylab.com/2024/01/30/comprar-voltear-de-western-union/

https://cf-cc-qualitylab.com/2024/01/28/transfert-dargent-western-union/

https://cf-cc-qualitylab.com/2024/01/28/retournement-de-western-union/

https://cf-cc-qualitylab.com/2024/01/27/online-kredietkaart-dumps-kopen/

https://cf-cc-qualitylab.com/2024/01/27/gekloonde-kredietkaarten-te-koop/

https://cf-cc-qualitylab.com/2024/01/27/gekloonde-kaarten-kopen/

https://cf-cc-qualitylab.com/2024/01/27/kaufen-sie-kreditkarten-dumps-online/

https://cf-cc-qualitylab.com/2024/01/27/geklonte-karten-dumps-zum-verkauf/

All things considered I read it yesterday yet I had a few musings about it and today I needed to peruse it again in light of the fact that it is extremely elegantly composed.

https://cf-cc-qualitylab.com/2024/01/27/kaufen-sie-geklonte-karten/

https://cf-cc-qualitylab.com/2024/01/27/acquistare-scarico-di-carte-di-credito-in-linea/

https://cf-cc-qualitylab.com/2024/01/27/carte-di-credito-clonate-in-vendita/

https://cf-cc-qualitylab.com/2024/01/27/carte-clonate-in-vendita/

https://cf-cc-qualitylab.com/2024/01/26/comprar-volcados-de-tarjetas-de-credito/

https://cf-cc-qualitylab.com/2024/01/26/tarjetas-de-credito-clonadas-a-la-venta/

https://cf-cc-qualitylab.com/2024/01/25/comprar-tarjetas-clonadas/

https://cf-cc-qualitylab.com/2024/01/25/acheter-des-dumps-de-cartes-de-credit-en-ligne/

https://cf-cc-qualitylab.com/2024/01/25/cartes-de-credit-clonees-a-vendre/

https://cf-cc-qualitylab.com/2024/01/25/cartes-clonees-a-vendre/

https://cf-cc-qualitylab.com/2024/01/23/requisitengeld-zum-verkauf/

https://cf-cc-qualitylab.com/2024/01/23/falschgeld-kaufen/

https://cf-cc-qualitylab.com/2024/01/23/gefalschter-euro-zum-verkauf/

https://cf-cc-qualitylab.com/2024/01/21/koop-valse-polymeerbiljetten/

https://cf-cc-qualitylab.com/2024/01/21/koop-valse-bankbiljetten/

 Actually, I run a site similar to yours. If you have time, could you visit my site? Please leave your comments after reading what I wrote. If you do so, I will actively reflect your opinion. I think it will be a great help to run my site. Have a good day.

https://cf-cc-qualitylab.com/2024/01/21/koop-valse-euro-bankbiljetten/

https://cf-cc-qualitylab.com/2024/01/21/comprar-dinero-falso-en-linea/

https://cf-cc-qualitylab.com/2024/01/21/comprar-dinero-falso/

https://cf-cc-qualitylab.com/2024/01/21/billetes-de-euro-a-la-venta/

https://cf-cc-qualitylab.com/2024/01/17/soldi-realistici-in-vendita/

https://cf-cc-qualitylab.com/2024/01/17/acquistare-denaro-falso/

https://cf-cc-qualitylab.com/2024/01/17/banconote-in-euro-in-vendita/

https://cf-cc-qualitylab.com/2024/01/17/argent-accessoire-a-vendre/

https://cf-cc-qualitylab.com/2024/01/17/acheter-des-billets-indetectables/

https://cf-cc-qualitylab.com/2024/01/17/faux-euros-a-vendre-en-ligne/

https://cf-cc-qualitylab.com/2024/01/09/buy-euros-online-cyprus/

https://cf-cc-qualitylab.com/2024/01/09/fake-polymer-notes-for-sale/

https://cf-cc-qualitylab.com/2024/01/09/counterfeit-money-for-sale/

https://cf-cc-qualitylab.com/2024/01/09/buy-fake-dollar-bills/

https://cf-cc-qualitylab.com/2024/01/09/buy-prop-money-canada/

https://cf-cc-qualitylab.com/2024/01/09/buy-fake-polymer-notes/

Sapna Mathur, 2024/04/18 05:16

Escorting in Dwarka is a service where people pay for Escorts In Dwarka companionship. It can involve anything from going out to dinner, dancing, or simply talking and spending time together. Escorts are usually attractive and well-groomed individuals who provide these services.

https://chutpatti.com/read-blog/12648_best-dwarka-escorts-with-free-hotel-delivery-under-rs-3500.html https://thehealthbridges.com/read-blog/14949_dwarka-escorts-service-2000-call-girls-near-me.html https://www.wowonder.xyz/read-blog/46990 https://www.meisterbook.com/read-blog/2914_dwarka-escort-service-for-hot-and-sexy-call-girls.html https://kryza.network/read-blog/15839_dwarka-escorts-service-with-hot-and-sexy-call-girls-near.html https://bresdel.com/blogs/451662/Call-Girls-Dwarka-Escorts-Service-2500-Cash-Payment https://www.vevioz.com/read-blog/110027 https://www.wowonder.xyz/read-blog/48123 https://connected.linkspreed.com/read-blog/42182 https://hallbook.com.br/blogs/203112/Call-Girls-in-Dwarka-Escorts-Book-Only-2499 https://justpaste.it/c9dn3 https://nextsocial.net/read-blog/34147 https://menagerie.media/index.php?link1=read-blog&id=46652_dwarka-escorts-offer-great-source-of-enjoyment.html https://click4r.com/posts/g/15964480/sensation-dwarka-escorts-enjoy-uninterrupted-erotica https://webyourself.eu/blogs/281878/Dwarka-Call-Girls-are-Very-Famous-on-Social-Media https://www.djjmeets.com/blogs/148102/Enjoy-your-days-and-nights-with-the-outstanding-girls-of https://geoamor.com/read-blog/10862_dwarka-escort-service-with-the-most-cooperative-escorts.html https://intgez.com/read-blog/28800_the-female-escorts-dwarka-delhi-keep-some-eminent-background.html https://www.kaisanba.com/read-blog/37352 https://www.owink.com/read-blog/65914_dwarka-escorts-define-intensity-in-a-different-method.html http://social.marksedgwick.net/blogs/54188/Explore-Range-of-Professional-Dwarka-escorts-in-Delhi

Enter your comment. Wiki syntax is allowed:
Q R​ M X H