Bananian

RTC DS3231 Module

28 7248
  1. # uname -a && cat /etc/bananian_version
  2. Linux bananapro 3.4.104-bananian #1 SMP PREEMPT Mon Apr 6 18:25:40 UTC 2015 armv7l GNU/Linux
  3. 150401
Copy the Code


The makes don't work at all:
  1. # make ARCH=arm sun7i_defconfig
  2. drivers/net/wireless/ap6210/Kconfig:42:warning: defaults for choice values not supported
  3. ***
  4. *** Can't find default configuration "arch/arm/configs/sun7i_defconfig"!
  5. ***
  6. make[1]: *** [sun7i_defconfig] Error 1
  7. make: *** [sun7i_defconfig] Error 2

  8. # make -j$(nproc) ARCH=arm modules
  9.   CHK     include/linux/version.h
  10. scripts/Makefile.modbuiltin:25: /usr/src/linux-headers-3.4.104-bananian/fs/exofs/Makefile: No such file or directory
  11. make[2]: *** No rule to make target `/usr/src/linux-headers-3.4.104-bananian/fs/exofs/Makefile'.  Stop.
  12. make[1]: *** [fs/exofs] Error 2
  13. make[1]: *** Waiting for unfinished jobs....
  14. make: *** [fs/modules.builtin] Error 2
  15. make: INTERNAL: Exiting with 3 jobserver tokens available; should be 2!
Copy the Code

tkaiser  
Ok, so you only have kernel headers but didn't clone the repo? And you want to stay with 15.04/Wheezy?

If so you've to checkout the correct kernel version that matches your running kernel. You should start with
  1. git clone https://github.com/Bananian/linux-bananapi.git
  2. cd linux-bananapi
Copy the Code
and then figure out what's the commit you need to do a "git checkout" (since Bananian now is also using 3.4.108). Have a look at this here and check with "git log".
Or you set on 3.4.108 which would be the better choice. Since Nico said he provides fixes for 15.04 as well you could wait a bit. Another approach would be to download https://dl.bananian.org/upgrade/150401/update.tar.gz extract the archive and when you understand every single line of code in update.sh then manually upgrade to 3.4.108 and the latest U-Boot version using "dpkg -i" without upgrading to Jessie (NOT recommended since it will break compatibility)

Apparently, I missed the updated version. Going to update to 3.4.108 first!
Are there any specific steps I need to follow to get the RTC working after finishing the update?

tkaiser  
Edited by tkaiser at Tue Aug 25, 2015 08:18

This should work:

  1. git clone https://github.com/Bananian/linux-bananapi.git
  2. cd linux-bananapi
  3. zgrep -v CONFIG_RTC_DRV_DS1307 /proc/config.gz >.config
  4. echo "CONFIG_RTC_DRV_DS1307=m" >>.config
  5. make -j$(nproc) ARCH=arm modules
Copy the Code


An optional step would be to run "make modules_install" but I would first try to move the module in question to the appropriate location and check whether it loads using modprobe. Since having a version mismatch between kernel and modules is not that good ;-)

I'll give it a shot and get back to you as soon as possible - hopefully with good news.
However, thank you so much for your help!!!

tkaiser  
BTW: If you've a spare TF card lying around would be interesting how much efforts the whole thing would be with Armbian (the 3.4.108 version ships with CONFIG_RTC_DRV_DS1307=y and all the variants should also already have i2c-tools installed by default)

Ok, finished the steps you mentioned but "zgrep CONFIG_RTC_DRV_DS13 /proc/config.gz" still says:
  1. # CONFIG_RTC_DRV_DS1307 is not set
  2. # CONFIG_RTC_DRV_DS1374 is not set
  3. # CONFIG_RTC_DRV_DS1305 is not set
  4. # CONFIG_RTC_DRV_DS1390 is not set
Copy the Code


Downloaded the Armbian image which works well so far. But since I'm using can bus I need the can4linux libs which apparently don't work with the newer kernel?!
So, now I got 2 system which both don't work.. frustrating..

tkaiser  
Sebastian replied at Wed Aug 26, 2015 03:31
Ok, finished the steps you mentioned but "zgrep CONFIG_RTC_DRV_DS13 /proc/config.gz" still says:

It's irrelevant what's in /proc/config.gz since when you only did a 'make modules' then the kernel itself (which contains the virtual file system entry /proc/config.gz) won't change.

The question was if you've been able to build the appropriate module, move it somewhere below /lib/modules and have do a modprobe afterwards.

Regarding Armbian: Igor's images for A20 boards are available in several fashions (three different distros for 2 different kernels). You should choose the one with 3.4.108. But bad news regarding CAN there: "# CONFIG_CAN is not set"

igorpec  
Edited by igorpec at Wed Aug 26, 2015 11:34
Sebastian replied at Wed Aug 26, 2015 10:31
Ok, finished the steps you mentioned but "zgrep CONFIG_RTC_DRV_DS13 /proc/config.gz" still says:
Downloaded the Armbian image which works well so far. But since I'm using can bus I need the can4linux libs which apparently don't work with the newer kernel?!
So, now I got 2 system which both don't work.. frustrating..

It's nothing unusual to rebuild external modules if kernel is changed. Binaries won't just work.

If you were able to compile CAN on older kernel 3.4.x it must go on latest 3.4.108.

ADD: Thomas answered at the same time ;)

Probably here CAN is compiled as an external module. I am not very familiar with details.

Edited by Sebastian at Wed Aug 26, 2015 06:31

Ah ok, my bad. I downloaded the newer kernel version first.

The question was if you've been able to build the appropriate module, move it somewhere below /lib/modules and have do a modprobe afterwards.

Stupidity on my side... I really don't get what you mean, sorry. I followed your steps, Everything worked like a charm but there's still no rtc module loaded.. I can't even "modprobe" any ds3231, ds1307, rtc-something.. !?I know that modprobe searches the module directory (which in my case would be e.g. /lib/modules/3.4.108-bananian). how do I get the newly compiled rtc module into that directory??´
And if I go with:
  1. ln -s /root/linux-bananapi/drivers/rtc/rtc-ds1307.ko /lib/modules/`uname -r`
  2. depmod -a
  3. modprobe rtc-ds1307.ko
Copy the Code
the module cannot be found.

You have to log in before you can reply Login | Sign Up

Points Rules