Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Who sets the symlink /dev/rtc => /dev/rtc0 ?
Date: Mon, 26 Aug 2013 06:03:42
Message-Id: 521AEEE0.5010908@gmail.com
In Reply to: Re: [gentoo-user] Who sets the symlink /dev/rtc => /dev/rtc0 ? by meino.cramer@gmx.de
1 On 26/08/2013 05:30, meino.cramer@×××.de wrote:
2 > Philip Webb <purslow@××××××××.net> [13-08-26 04:35]:
3 >> 130825 Pavel Volkov suggested:
4 >>> On Sunday 25 August 2013 20:26:32 meino.cramer@×××.de asked:
5 >>>> So...which ghost in my system dares to set the symlink /dev/rtc
6 >>>> to point to /dev/rtc0 instead of /dev/rtc1 ???
7 >>> I bet it's /usr/lib64/udev/rules.d/50-udev-default.rules
8 >>
9 >> I have /usr/udev/rules.d/50-udev-default.rules (on a 64-bit system),
10 >> which contains the lines :
11 >>
12 >> # select "system RTC" or just use the first one
13 >> SUBSYSTEM=="rtc", ATTR{hctosys}=="1", SYMLINK+="rtc"
14 >> SUBSYSTEM=="rtc", KERNEL=="rtc0", SYMLINK+="rtc", OPTIONS+="link_priority=-100"
15 >>
16 >> However, in /dev I have :
17 >>
18 >> crw------- 1 root root 10, 135 Aug 25 07:39 /dev/rtc
19 >>
20 >> ie it's not a symlink. I'm using udev-204 .
21 >>
22 >> HTH
23 >>
24 >> --
25 >> ========================,,============================================
26 >> SUPPORT ___________//___, Philip Webb
27 >> ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
28 >> TRANSIT `-O----------O---' purslowatchassdotutorontodotca
29 >>
30 >>
31 >
32 > Hi,
33 >
34 > I finally found the culprit:
35 >
36 > There udev-related files under /lib, where I did not search for it.
37 > I had expected them under /etc...
38 > I fixed one of the rules and now there is the correct link.
39 >
40 > Nonetheless, ls -l /proc shows:
41 > beagleboneblack:/root>ls -l /proc
42 > total 0
43 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 1
44 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 10
45 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 11
46 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 12
47 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 13
48 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 14
49 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 15
50 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 16
51 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 17
52 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 18
53 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 188
54 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 19
55 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 196
56 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 2
57 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 20
58 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 21
59 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 24
60 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 27
61 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 3
62 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 36
63 > dr-xr-xr-x 8 root root 0 2013-08-26 05:12 362
64 > dr-xr-xr-x 8 root root 0 2013-08-26 05:12 363
65 > dr-xr-xr-x 8 root root 0 2013-08-26 05:12 364
66 > dr-xr-xr-x 8 root root 0 2013-08-26 05:12 365
67 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 38
68 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 39
69 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 40
70 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 41
71 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 42
72 > dr-xr-xr-x 8 messagebus messagebus 0 2013-08-26 05:12 436
73 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 45
74 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 46
75 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 5
76 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 53
77 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 55
78 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 56
79 > dr-xr-xr-x 8 root root 0 2013-08-26 05:12 612
80 > dr-xr-xr-x 8 root root 0 2013-08-26 05:12 632
81 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 69
82 > dr-xr-xr-x 8 root root 0 2013-08-26 05:12 698
83 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 7
84 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 70
85 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 71
86 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 74
87 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 75
88 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 76
89 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 79
90 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 8
91 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 80
92 > dr-xr-xr-x 8 root root 0 2013-08-26 05:12 800
93 > dr-xr-xr-x 8 root root 0 2013-08-26 05:12 855
94 > dr-xr-xr-x 8 root root 0 2013-08-26 05:13 882
95 > dr-xr-xr-x 8 root root 0 2013-08-26 05:13 883
96 > dr-xr-xr-x 8 root root 0 2013-08-26 05:13 884
97 > dr-xr-xr-x 8 root root 0 2013-08-26 05:13 885
98 > dr-xr-xr-x 8 root root 0 2013-08-26 05:13 886
99 > dr-xr-xr-x 8 root root 0 2013-08-26 05:13 887
100 > dr-xr-xr-x 8 root root 0 2013-08-26 05:13 896
101 > dr-xr-xr-x 8 root root 0 1970-01-01 01:00 9
102 > dr-xr-xr-x 8 root root 0 2013-08-26 05:13 900
103 > dr-xr-xr-x 8 root root 0 2013-08-26 05:28 917
104 > dr-xr-xr-x 8 root root 0 2013-08-26 05:28 955
105 > dr-xr-xr-x 8 root root 0 2013-08-26 05:28 966
106 > dr-xr-xr-x 4 root root 0 2013-08-26 05:28 asound
107 > -r--r--r-- 1 root root 0 2013-08-26 05:28 buddyinfo
108 > dr-xr-xr-x 3 root root 0 2013-08-26 05:28 bus
109 > -r--r--r-- 1 root root 0 2013-08-26 05:28 cgroups
110 > -r--r--r-- 1 root root 0 2013-08-26 05:28 cmdline
111 > -r--r--r-- 1 root root 26642 2013-08-26 05:28 config.gz
112 > -r--r--r-- 1 root root 0 2013-08-26 05:28 consoles
113 > dr-xr-xr-x 2 root root 0 2013-08-26 05:28 cpu
114 > -r--r--r-- 1 root root 0 2013-08-26 05:28 cpuinfo
115 > -r--r--r-- 1 root root 0 2013-08-26 05:28 crypto
116 > dr-xr-xr-x 12 root root 0 2013-08-26 05:28 device-tree
117 >
118 > There are still files stamped with the UNIX's big bang moment.
119 > But the kernel is configured to use rtc1 instead of rtc0.
120 >
121 > The journey isn't at its end, still.
122 >
123 > ANy further ideas ?
124 >
125 > Best regards,
126 > mcc
127
128 Does it really matter ?
129
130 Those files with Epoch timestamps are PIDs started very early. They are
131 probably kernel threads exposed as PIDs anyway, and there's serious
132 magic going on to make that all work. It all happens after init starts
133 but before your rtc gets set and ntp starts.
134
135 You seem to have accomplished the bits that matter and are now chasing
136 after other bits that don't. I say it's time to stop and say it's good
137 enough
138
139 Consider this: that cpu has an rtc on-board, it has no battery. Every OS
140 in existence is going to have the same issue in some form or other, and
141 yet it doesn't seem to matter as stuff works.
142
143
144 --
145 Alan McKinnon
146 alan.mckinnon@×××××.com