Bananian
RTC DS3231 Module
28
10401
View: 10401|Reply: 28
|
[Bananian]
RTC DS3231 Module
[Copy link]
|
|
Edited by Sebastian at Tue Aug 25, 2015 02:25
Hi guys,
I've built my own hardware RTC with the DS3231 chip which is working as expected. I'm stuck on getting the module installed on my BananaPro (running with Bananian Linux).
Steps I've already done:
output of "i2cdetect -y 2":
- 0 1 2 3 4 5 6 7 8 9 a b c d e f
- 00: -- -- -- -- -- -- -- -- -- -- -- -- --
- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- 60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
- 70: -- -- -- -- -- -- -- --
Copy the Code- added the following lines to the /etc/rc.local:
- echo ds3231 0x68 > /sys/class/i2c-adapter/i2c-2/new_device
- hwclock -s
Copy the Code- "dmesg | grep ds3231" shows:
- [ 27.735733] i2c i2c-2: new_device: Instantiated device ds3231 at 0x68
- [ 37.774854] i2c i2c-2: Failed to register i2c client ds3231 at 0x68 (-16)
Copy the Code- "modprobe rtc-ds3231" fails with:
- FATAL: Module rtc-ds3231 not found.
Copy the Code- edited the /etc/init.d/hwclock.sh:
- "cat /proc/devices | grep rtc" shows:
- "ls -l /dev/rtc /dev/rtc0" shows:
- ls: cannot access /dev/rtc: No such file or directory
- crw------- 1 root root 254, 0 Jan 1 01:00 /dev/rtc0
Copy the Code- I already added the RTC module DS1307 in the menuconfig of the BPro (makes no difference).
Dunno what else I could do or what I'm doing wrong. Everytime the BPro reboots the "hwclock" command shows the correct time and date (which I manually added with "date MMDDHH........" beforehand). If the BPro powers down the clock always resets instead of getting the time from the RTC during restart.
The BPro is not connected to the internet - maybe a useful information as well.
Any help is appreciated.
Thanks in advance!
Sebastian
|
|
|
|
|
|
|
|
Have you tried to check whether the necessary driver is available in your running kernel?
- zgrep CONFIG_RTC_DRV_DS13 /proc/config.gz
Copy the Code |
|
|
|
|
|
|
|
Edited by Sebastian at Tue Aug 25, 2015 03:56
Not yet, but I guess it's not...
- # CONFIG_RTC_DRV_DS1307 is not set
- # CONFIG_RTC_DRV_DS1374 is not set
- # CONFIG_RTC_DRV_DS1305 is not set
- # CONFIG_RTC_DRV_DS1390 is not set
Copy the Code Well, how do I install it?
This is what's in the /usr/src/linux-.../.config file:
- #
- # I2C RTC drivers
- #
- CONFIG_RTC_DRV_DS1307=y
- # CONFIG_RTC_DRV_DS1374 is not set
- # CONFIG_RTC_DRV_DS1672 is not set
- # CONFIG_RTC_DRV_DS3232 is not set
Copy the Code
|
|
|
|
|
|
|
|
I would define it as M and then simply let the module build and install -- Bananian should include the necessary stuff (but I'm not sure) |
|
|
|
|
|
|
|
Thank you so much for your help.But there's still an issue I'm running into when I'm trying to execute "make" to start the build. It exits with an error:
- HOSTLD scripts/kconfig/conf
- scripts/kconfig/conf --silentoldconfig Kconfig
- drivers/net/wireless/ap6210/Kconfig:42:warning: defaults for choice values not supported
- CHK include/linux/version.h
- CHK include/generated/utsrelease.h
- make[1]: *** No rule to make target `arch/arm/tools/gen-mach-types', needed by `include/generated/mach-types.h'. Stop.
- make: *** [archprepare] Error 2
- make 4.10s user 2.52s system 71% cpu 9.226 total
Copy the Code Any hints on that one?
|
|
|
|
|
|
|
|
I do suggest you can try make menuconfig ARCH=arm to select the CONFIG_RTC_DRV_DS1307 to M.
Which linux kernel source do you get from? |
|
|
|
|
|
|
|
Thanks for your reply.
That sadly didn't work. I'm still facing the same issue as stated above.
The kernel version I'm using is 3.4.104-bananian.
|
|
|
|
|
|
|
|
Show out your compile process here.
And what is the result before you modify the kernel config. |
|
|
|
|
|
|
|
Edited by Sebastian at Tue Aug 25, 2015 06:46
Sorry, don't get exactly what you mean.
After "make menuconfig" and setting the DS1307 as M I'm facing:
- xx@bananapro ~src/linux-headers-3.4.104-bananian # make menuconfig
- scripts/kconfig/mconf Kconfig
- drivers/net/wireless/ap6210/Kconfig:42:warning: defaults for choice values not supported
- *** End of the configuration.
- *** Execute 'make' to start the build or try 'make help'.
- make menuconfig 7.56s user 2.74s system 50% cpu 20.445 total
- xx@bananapro ~src/linux-headers-3.4.104-bananian # make
- CHK include/linux/version.h
- CHK include/generated/utsrelease.h
- make[1]: *** No rule to make target 'arch/arm/tools/gen-mach-types', needed by 'include/generated/mach-types.h'. Stop.
- /usr/src/linux-headers-3.4.104-bananian/arch/arm/Makefile:282: recipe for target 'archprepare' failed
- make: *** [archprepare] Error 2
Copy the Code |
|
|
|
|
|
|
|
Can you please provide the output of "uname -a && cat /etc/bananian_version"? Did you cloned the Bananian kernel repository? What happens if you do a
- make ARCH=arm sun7i_defconfig
- make -j$(nproc) ARCH=arm modules
Copy the Code |
|
|
|
|
|
|