]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
busybox: move hwclock init earlier in startup
authorChris Elledge <celledge@siteworx.io>
Fri, 31 Mar 2023 20:44:09 +0000 (16:44 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 5 Apr 2023 16:26:49 +0000 (17:26 +0100)
hwclock.sh had default update-rc parameters which made it run after
other tasks that work with the clock such as connman. This causes a
time obtained by NTP to be clobbered by a potentially incorrect time
in the RTC.

Provide non-default INITSCRIPT_PARAMS to have hwclock.sh run during
the rc startup before runlevel initscripts start.

Signed-off-by: Chris Elledge <celledge@siteworx.io>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/busybox/busybox.inc

index 4569acd475c73852ef0e83949020f0489abf52e4..582d87949e9425539839078e7073c34a456a9690 100644 (file)
@@ -34,6 +34,7 @@ INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-mdev ${PN}-hw
 
 INITSCRIPT_NAME:${PN}-httpd = "busybox-httpd"
 INITSCRIPT_NAME:${PN}-hwclock = "hwclock.sh"
+INITSCRIPT_PARAMS:${PN}-hwclock = "start 40 S . stop 20 0 1 6 ."
 INITSCRIPT_NAME:${PN}-mdev = "mdev"
 INITSCRIPT_PARAMS:${PN}-mdev = "start 04 S ."
 INITSCRIPT_NAME:${PN}-syslog = "syslog"