From: Mathew McBride Date: Mon, 3 Oct 2022 06:20:19 +0000 (+0000) Subject: initscripts: load RTC module (RX8025) for Ten64 board X-Git-Tag: v2.27-core171~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9745a212d4aff2b9cd50de34e30c79c624d21b3c;p=ipfire-2.x.git initscripts: load RTC module (RX8025) for Ten64 board For reasons I have not been able to determine, the RTC module for the Ten64 board (rtc-rx8025) is not automatically loaded at startup, despite every other relevant modules being loaded. modprobe it manually if we are on a Ten64 board. Signed-off-by: Mathew McBride Reviewed-by: Michael Tremer --- diff --git a/src/initscripts/system/setclock b/src/initscripts/system/setclock index b566eb7166..963507f9ac 100644 --- a/src/initscripts/system/setclock +++ b/src/initscripts/system/setclock @@ -29,6 +29,14 @@ case ${1} in boot_mesg "Setting system clock..." + FDT_COMPAT_FILE="/sys/firmware/devicetree/base/compatible" + # RTC may not be automatically loaded on some + # non-x86 machines + if [ -f "${FDT_COMPAT_FILE}" ] && \ + ( grep -q "traverse,ten64" "${FDT_COMPAT_FILE}" ); then + modprobe rtc-rx8025 + fi + # udev not create the rtc symlink if rtc is in the kernel if [ ! -e /dev/rtc ]; then if [ -e /dev/rtc0 ]; then