I am trying to get a DS1307 I2C real time clock (RTC) to work with a vocore using the kernel RTC module kmod-rtc-ds1307.

I have got the I2C interface working. I can detect a device at the correct I2C address (0x68) and I can communicate with the DS1307 using the i2c-tools applications. I can see the seconds and minutes registers counting up on the DS1307 so I am happy that that part of the system is working correctly.

I want to use the kmod-rtc-ds1307 module so I can use the "hwclock" application to simplify synchronising the hardware clock to the system clock.

I am not able to find the kmod-rtc-ds1307 module to enable it when I run "make menuconfig", it is not there under kernel modules or available using opkg or from anywhere else I have looked.

Can anyone tell me how I go about enabling the kmod-rtc-ds1307 module?

I have also looked at what is available under "make kernel_menuconfig" and found a generic sounding "Real Time Clock" option under "Device Drivers", but I am not sure if just enabling this setting is enough or how the settings under "make kernel_menuconfig" interact with those under "make menuconfig".

I have run "./scripts/feeds update", but I have not installed all feeds. Last time I did this I wasn't able to get the system to compile because of broken links to source code that it was trying to download (they were also things that I'd never use and it was also taking forever to compile)... so I am reluctant to run "./scripts/feeds install -a" again. But either way, I can't see the kernel module in the feeds list anyway.

I have also created a build environment and successfully downloaded and compiled CHAOS CALMER (15.05.1) and flashed it to my vocore. I have also downloaded and cross-compiled the i2c-tools applications, which also didn't seem to be available in the opkg list or feeds.

Any idea how to proceed or where to enable the kmod-rtc-ds1307kernel module?

Get ready to learn, if you are lucky the package got dropped because of lack of interest and an experienced openwrt geek could get it working in 1/2 hour or so, if not you will need to resolve whatever issues exist which could be a big hill to climb.

You don't get to see the I2C RTC devices without selecting I2C support, even though I2C support wasn't originally selected, and despite the i2c_core, i2c_dev and i2c_ralink kernel modules being present and loaded in the image I compiled.

I am busy backing up my build environment right now and will try compiling these settings when the backup is done.

FYI I am using the vocore to drive an old synchronous train station clock. It doesn't have a normal clock movement, it requires a pulse every 30 seconds to move the hands forward in 1/2 minute increments.

I plan to use ntp to keep the clock time accurate, but I want to use the battery backed up DS1307 RTC to keep track of the current time and use the RAM in the DS1307 to keep track of the current position of the hands for when the power inevitably goes off. Then the clock can adjust itself to the correct time when the power comes back on.

I was hoping to use the kernel module to make synchronising ntp and the DS1307 RTC easier - we'll have to see how easy that is in practice...

Looks like you may have an easy time of it. I'm not sure if selecting it in kernel config will produce an ipk that opkg wants but it will definitely produce a .ko you can load manually. If you select builtin (*) instead of module it will be builtin (duh) to the kernel when you load the image. You can check with

Here is the easy answer(obvious once I thought of it): change to designated driver or lede.

I'm not sure what your issues with feeds were caused by but they shouldn't be hard to fix and feeds/update feeds/install are very reliable for me (and many others). It may be worth your time to find the problem so they work. Yes, there is A LOT of stuff you don't need but there is also some very useful stuff. The packages repository I referenced earlier is where the feeds live.

It will take a long time to compile the first time but once done subsequent build go much faster as long as you don't do something to nuke the toolchain. If you don't select a package in the make menuconfig step they won't affect build time.

It turns out I am using Designated Driver but not everything I have tried has worked. Possibly I am doing things in the wrong order?

I have tried to compile in RTC kernel support as a module using make kernel_menuconfig and for some reason it didn't work. No rtc module under /lib/modules/4.4.14/ and modprobe rtc-ds1307 returned module not found.

So I recompiled with the RTC kernel support compiled built into the kernel, and this time it worked!

I ran the following and hey presto, I now have a /dev/rtc0 and the hwclock command works!