Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 444932 - sys-kernel/genkernel-3.4.45.1: no rtc support with newer kernels
Summary: sys-kernel/genkernel-3.4.45.1: no rtc support with newer kernels
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: Bug, InVCS, PATCH
: 472590 (view as bug list)
Depends on: 472470
Blocks:
  Show dependency tree
 
Reported: 2012-11-27 12:49 UTC by sf
Modified: 2014-02-27 23:08 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (file_444932.txt,5.26 KB, text/plain)
2012-11-27 12:49 UTC, sf
Details
genkernel-config-rtc-class.patch (genkernel-config-rtc-class.patch,852 bytes, patch)
2013-06-09 15:38 UTC, Ben Kohler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description sf 2012-11-27 12:49:19 UTC
Created attachment 330728 [details]
emerge --info

From /var/log/genkernel.log:

scripts/kconfig/conf --oldconfig Kconfig
.config:2860:warning: symbol value 'm' invalid for RTC_LIB
.config:2861:warning: symbol value 'm' invalid for RTC_CLASS

Output from grep RTC /etc/kernels/kernel-config-x86_64-3.5.7-gentoo:

# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
# CONFIG_RTC_CLASS is not set

Output from hwclock --debug:

hwclock from util-linux 2.21.2
hwclock: Open of /dev/rtc failed: No such file or directory
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.

Output from ls /dev/rtc* :

ls: cannot access /dev/rtc*: No such file or directory

If you need the full genkernel.log etc. just ask.
Comment 1 sf 2012-12-13 12:00:46 UTC
Same bug with (now stable) genkernel-3.4.45:

From /var/log/genkernel.log:

scripts/kconfig/conf --oldconfig Kconfig
.config:2861:warning: symbol value 'm' invalid for RTC_LIB
.config:2862:warning: symbol value 'm' invalid for RTC_CLASS

Output from grep RTC /etc/kernels/kernel-config-x86_64-3.5.7-gentoo:

# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
# CONFIG_RTC_CLASS is not set

I did not bother to reboot...

I updated the bug's summary.
Comment 2 Patrick Lauer gentoo-dev 2013-02-20 03:36:21 UTC
Change seems to be from 3.4 to 3.5+ kernels.

Some or all of these options may need to be set:

CONFIG_RTC=y

CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
# CONFIG_RTC_DEBUG is not set
# RTC interfaces
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y


# Platform RTC drivers
CONFIG_RTC_DRV_CMOS=y


that last one is the most common for x86-family machines. There's a few other options that might be useful, but since I have no use for them I can't tell
Comment 3 hammackj 2013-03-02 15:47:13 UTC
The lack of the default missing realtime clock has bitten me twice. I would love to see the realtime clock support by default in genkernel.
Comment 4 Ben Kohler gentoo-dev 2013-06-08 16:00:18 UTC
*** Bug 472590 has been marked as a duplicate of this bug. ***
Comment 5 Ben Kohler gentoo-dev 2013-06-08 16:01:54 UTC
Adding info from other bug:

Although the shipping kernel-config with genkernel has ~10 of these various RTC hardware drivers marked as modules, the resulting built kernel & initramfs has these things disabled.  Here's an excerpt from arch/x86_64/kernel-config:

CONFIG_RTC_CLASS=m
CONFIG_RTC_DRV_DS1374=m
CONFIG_RTC_DRV_MAX6900=m
CONFIG_RTC_DRV_M41T80=m
CONFIG_RTC_DRV_CMOS=m
CONFIG_RTC_DRV_DS1553=m
CONFIG_RTC_DRV_DS1742=m
CONFIG_RTC_DRV_STK17TA8=m
CONFIG_RTC_DRV_M48T86=m
CONFIG_RTC_DRV_M48T59=m
CONFIG_RTC_DRV_V3020=m

The problem is that CONFIG_RTC_CLASS is a boolean, not tristate, so =m is not valid, and so all things depending on RTC_CLASS get dropped from the config.  Changing this to CONFIG_RTC_CLASS=y should fix the issue, I have tested this locally with success.
Comment 6 Richard Yao (RETIRED) gentoo-dev 2013-06-09 15:32:32 UTC
I am grouping this and others together in bug #472470 mainly because of lack of time. If anyone makes a good patch to do this, it will likely be committed ahead of bug #472470's resolution.
Comment 7 Ben Kohler gentoo-dev 2013-06-09 15:38:35 UTC
Created attachment 350532 [details, diff]
genkernel-config-rtc-class.patch
Comment 8 Richard Yao (RETIRED) gentoo-dev 2013-06-09 16:01:24 UTC
(In reply to Ben Kohler from comment #7)
> Created attachment 350532 [details, diff] [details, diff]
> genkernel-config-rtc-class.patch

You missed the generic-config. Anyway, the patch is now queued for the next release in GIT.

http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=3817a4959faa3d93df9d1340364f77020271d1f2
Comment 9 sf 2013-06-20 11:00:15 UTC
Results for genkernel-3.4.45.1 and gentoo-sources-3.8.13:

From /var/log/genkernel.log:

scripts/kconfig/conf --oldconfig Kconfig
.config:2863:warning: symbol value 'm' invalid for RTC_LIB

Output from grep RTC /etc/kernels/kernel-config-x86_64-3.8.13-gentoo:

CONFIG_HPET_EMULATE_RTC=y
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
# CONFIG_RTC_DEBUG is not set
# RTC interfaces
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y
CONFIG_RTC_INTF_DEV_UIE_EMUL=y
# CONFIG_RTC_DRV_TEST is not set
# I2C RTC drivers
# CONFIG_RTC_DRV_DS1307 is not set
CONFIG_RTC_DRV_DS1374=m
# CONFIG_RTC_DRV_DS1672 is not set
# CONFIG_RTC_DRV_DS3232 is not set
CONFIG_RTC_DRV_MAX6900=m
# CONFIG_RTC_DRV_RS5C372 is not set
# CONFIG_RTC_DRV_ISL1208 is not set
# CONFIG_RTC_DRV_ISL12022 is not set
# CONFIG_RTC_DRV_X1205 is not set
# CONFIG_RTC_DRV_PCF8523 is not set
# CONFIG_RTC_DRV_PCF8563 is not set
# CONFIG_RTC_DRV_PCF8583 is not set
CONFIG_RTC_DRV_M41T80=m
CONFIG_RTC_DRV_M41T80_WDT=y
# CONFIG_RTC_DRV_BQ32K is not set
# CONFIG_RTC_DRV_S35390A is not set
# CONFIG_RTC_DRV_FM3130 is not set
# CONFIG_RTC_DRV_RX8581 is not set
# CONFIG_RTC_DRV_RX8025 is not set
# CONFIG_RTC_DRV_EM3027 is not set
# CONFIG_RTC_DRV_RV3029C2 is not set
# SPI RTC drivers
# Platform RTC drivers
CONFIG_RTC_DRV_CMOS=m
# CONFIG_RTC_DRV_DS1286 is not set
# CONFIG_RTC_DRV_DS1511 is not set
CONFIG_RTC_DRV_DS1553=m
CONFIG_RTC_DRV_DS1742=m
CONFIG_RTC_DRV_STK17TA8=m
CONFIG_RTC_DRV_M48T86=m
# CONFIG_RTC_DRV_M48T35 is not set
CONFIG_RTC_DRV_M48T59=m
# CONFIG_RTC_DRV_MSM6242 is not set
# CONFIG_RTC_DRV_BQ4802 is not set
# CONFIG_RTC_DRV_RP5C01 is not set
CONFIG_RTC_DRV_V3020=m
# CONFIG_RTC_DRV_DS2404 is not set
# on-CPU RTC drivers

This looks promising but I cannot reboot right now. Maybe someone else can confirm if the generated kernel actually works?
Comment 10 Ben Kohler gentoo-dev 2013-06-20 15:38:07 UTC
This config could still use some cleanup to silence the warnings, but yes this does boot and work fine, with RTC support.

The config has CONFIG_RTC_LIB=m but it ends up getting marked =y anyway because it's "Selected by: RTC_CLASS [=y] && !S390 && !UML" and we do have CONFIG_RTC_CLASS=y in our config.
Comment 11 sf 2013-09-04 12:52:02 UTC
As far as I am concerned this bug can be closed as fixed. Thanks.
Comment 12 Richard Yao (RETIRED) gentoo-dev 2014-02-27 23:08:17 UTC
Some things are better late than never. Anyway, this is fixed in genkernel 3.4.48, which I just tagged.