Created
December 28, 2012 07:04
-
-
Save nekoya/4395240 to your computer and use it in GitHub Desktop.
Hardware clock patch for kernel-ml http://elrepo.org/tiki/kernel-lt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /etc/rc.sysinit 2012-02-22 23:47:49.000000000 +0900 | |
+++ rc.sysinit 2012-12-28 15:36:17.000000000 +0900 | |
@@ -271,2 +271,15 @@ | |
+### ELREPO: See if the RTC driver is built-in, otherwise load it | |
+if [ ! -f /proc/driver/rtc ]; then | |
+ action $"Loading rtc_cmos driver: " /sbin/modprobe rtc_cmos | |
+fi | |
+ | |
+### ELREPO: Make the newer device nodes to accomodate hwclock | |
+RTC_MAJOR_NO=`/bin/awk '/rtc/ { print $1 }' /proc/devices` | |
+if [ -n "$RTC_MAJOR_NO" ]; then | |
+ action $"Creating /dev/rtc0: " /bin/mknod /dev/rtc0 c $RTC_MAJOR_NO 0 | |
+ action $"Creating /dev/rtc: " /bin/ln -sf /dev/rtc0 /dev/rtc | |
+ [ -n "$SELINUX_STATE" ] && restorecon /dev/rtc0 /dev/rtc >/dev/null 2>&1 | |
+fi | |
+ | |
# Set the system clock. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment