I have a config from a 32-bit linux 3.12.18, and was trying to compile a 64 bit version with most settings like selected drivers etc. the same as in 32 bit version. For this I used make menuconfig with .config in source tree, and checked "64 bit kernel". After installation I rebooted with this shiny new kernel, and everything worked... well almost everything. For some reason I appeared to not have /dev/rtc*, which was present on 32 bit kernel, and of course hwclock utility didn't work, while it worked on 32 bits.

I've spend some time trying to figure out what the difference is, and found that the whole CONFIG_RTC_CLASS thing with its children was just not mentioned in 32-bit .config and set as is not set in 64 bit version. So it looks like the kernel's default config regarding RTC is different in 32 and 64 bit compilation modes.

Why such a difference? Is PC RTC normally superseded by something else on modern 64 bit systems, or what?


Check your .config for CONFIG_RTC_DRV_CMOS=y, CONFIG_RTC_INTF_DEV=y (create the /dev/rtcN device) and CONFIG_RTC_CLASS=y (which the other two depend on). In menuconfig, these are under Device Drivers -> Real Time Clock.

I do not a discrepancy in the default x86* configs, both of which set CONFIG_RTC_CLASS. When making a defconfig on x86_64 with v3.12 from git:

mario@gamma ~/dev/linux (git)-[v3.12] % mv .config .config-orig && make defconfig && grep RTC .config | grep -v '^#'
*** Default configuration is based on 'x86_64_defconfig'
# configuration written to .config

CONFIG_X86 (=y for 32-bit and 64-bit) selects CONFIG_RTC_DRV_CMOS (see here) and CONFIG_RTC_INTF_DEV is selected by CONFIG_RTC_CLASS (see here).

It sounds like you did not start with a blank .config. When starting with a blank configuration and configuring each, can you reproduce the issue? From what I can see, simply toggling CONFIG_X86_32=y and CONFIG_X86_64=y does not change the value of CONFIG_RTC_CLASS.

| improve this answer | |
  • Have you read the whole question? I've already checked these and found them to be the reason and successfully fixed this problem. The question is not how to fix, but why these options appear unchecked. – Ruslan Nov 9 '14 at 6:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.