Bananian

RTC DS3231 Module

28 6210
tkaiser  
Edited by tkaiser at Wed Aug 26, 2015 07:01

This is wrong. Try "modprobe rtc-ds1307" instead. If that works you should copy the module into the right location and add "rtc-ds1307" to /etc/modules.

Edited by Sebastian at Wed Aug 26, 2015 07:12

doesn't work either with "modprobe rtc-ds1307"..I dunno what I'm doing wrong. What exactly do I need to copy to the /lib/modules/... folder?

tkaiser  
  1. [ -d /lib/modules/$(uname -r)/kernel/drivers/rtc ] || mkdir -p /lib/modules/$(uname -r)/kernel/drivers/rtc
  2. cp -p /root/linux-bananapi/drivers/rtc/rtc-ds1307.ko /lib/modules/$(uname -r)/kernel/drivers/rtc/
  3. depmod
  4. modprobe rtc-ds1307
Copy the Code

Edited by Sebastian at Thu Aug 27, 2015 01:10

Sorry for my late reply.Appart from your suggestions I downloaded the new linux-headers (3.4.108) as well. Nevertheless "modprobe rtc-ds1307" sadly results in the following error:
  1. modprobe: ERROR: could not insert 'rtc_ds1307': Exec format error
Copy the Code


tkaiser  
No idea (maybe "modprobe --force"). And I feel I have no clues regarding the environment you currently run.

I switched to Armbian ages ago since it's so convenient to have a cross compile environment (hosted inside a virtual machine here) where I can do stuff like kernel compilation so easily. It's just a matter of minutes to get a new working kernel that can be installed easily using dpkg -i afterwards: https://github.com/igorpecovnik/lib#how-to-build-armbian

compiling with compile.sh makes sense but how to add modules to the output - no clue at all! Sorry for bothering you but I've never done such things before.

tkaiser  
Sebastian replied at Thu Aug 27, 2015 05:07
compiling with compile.sh makes sense but how to add modules to the output - no clue at all! Sorry f ...

Sorry, I believe i don't understand since everything's outlined in the aforementioned link in detail.
If you don't have a Ubuntu 14.04 machine simply create one (eg. in Virtualbox running in OS X or Windows). After that all you need to do is to edit compile.sh so that it reads KERNEL_CONFIGURE="yes" afterwards (you need this for CAN not for the DS3231 since the latter is already enabled in Igor's config).

If you start compile.sh you will be asked which board you have, which kernel version you want (choose sunxi/3.4.x and not mainline) and which distro you like (Wheezy, Jessie or Ubuntu Trusty -- I would stay with Wheezy at the moment), then compilation starts and an hour later (or maybe earlier if the host is beefy enough) you end up with a complete OS image in output/output and also a tar archive in output/output/kernel/ that contain 5 different deb packages. Looks somewhat like this afterwards
  1. linux-firmware-image-3.4.108-bananapi_3.2_armhf.deb
  2. linux-headers-3.4.108-bananapi_3.2_armhf.deb
  3. linux-image-3.4.108-bananapi_3.2_armhf.deb
  4. linux-libc-dev_3.2_armhf.deb
  5. linux-u-boot-3.4.108-bananapi_3.2_armhf.deb
Copy the Code
You could even install linux-headers*.deb and linux-image*.deb in Bananian but would've to adjust /boot/boot.cmd afterwards to point to the correct names/locations and run mkimage (not recommended since any mistake here leads to your installation failing to boot!).

If you switch to Armbian and do not throw away your build environment future builds will be many times faster since Armbian caches most stuff. And by editing compile.sh so that it reads KERNEL_ONLY="yes" only a new kernel will be compiled that you can exchange easily in your running Armbian installation by transferring the tar archive from output/output/kernel/ to your Banana Pi, unpack it there and install all packages except u-boot with "dpkg -i"


In case further questions arise it would be better to open a new thread on http://armbian.com :-)


neoe  
I wrote a guide on how to add a RTC to Banana Pi
https://n101n.xyz/n/apps.blog?id=32372
IMG_20160111_225334.jpg

neoe replied at Jan 11, 2016 10:23
I wrote a guide on how to add a RTC to Banana Pi
https://n101n.xyz/n/apps.blog?id=32372

Hi neoe,

where can I find this guide ?


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

Points Rules