help compiling RTC module [rtc-pcf2127a]

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

help compiling RTC module [rtc-pcf2127a]

Postby homunculus » Sat Jul 06, 2013 4:32 am

Hello

http://afterthoughtsoftware.com/products/rasclock

RasClock looked like a quick way to add a real time clock to the raspberry pi so I picked one up. It doesn't look like it's natively supported by 3.6.11-12-ARCH+ and I haven't been able to find a package in the repositories for it. I've seen a couple of sites with instructions for compiling the module on raspbian but none on arch. Can someone take a look at this and make the necessary corrections? Even a general step-by-step on compiling a RTC module on arch would be helpful.

(this was for raspbian)
Code: Select all
sudo apt-get update
sudo apt-get –y dist-upgrade
sudo apt-get -y install build-essential gcc make cmake i2c-tools
mkdir devel
cd devel
wget https://github.com/raspberrypi/linux/archive/rpi-3.6.y.tar.gz
wget https://github.com/afterthoughtsoftware/linux/commit/fd5ff2d88f470ed70ff58393eee61110b181816a.patch
tar xzf rpi-3.6.y.tar.gz
cd linux-rpi-3.6.y/
SUW=`pwd`
patch -p1 < ../fd5ff2d88f470ed70ff58393eee61110b181816a.patch
zcat /proc/config.gz > .config
echo m | make oldconfig
wget https://github.com/raspberrypi/firmware/raw/master/extra/Module.symvers
make modules_prepare
cd drivers/rtc
make -C $SUW M=`pwd`
sudo cp rtc-pcf2127a.ko /lib/modules/3.6.11+/kernel/drivers/rtc/
sudo depmod
homunculus
 
Posts: 5
Joined: Sat Jul 06, 2013 3:37 am

Re: help compiling RTC module [rtc-pcf2127a]

Postby moonman » Sat Jul 06, 2013 8:51 am

Up to mkdir
Code: Select all
pacman -Suy
pacman -Sy base-devel linux-headers


Everything else is the same. Also i think you are missing make modules
Pogoplug V4 | GoFlex Home | Raspberry Pi B 512 | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | |[armv5] How to install my.pogoplug.com service | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 2973
Joined: Sat Jan 15, 2011 3:36 am
Location: Calgary, Canada

Re: help compiling RTC module [rtc-pcf2127a]

Postby nigelh » Mon Sep 09, 2013 9:48 am

Hi,
I'm wondering if "homunculus" had any luck in getting his RasClock working using the info from moonman ?
I've just recently received my RasClock and would like to get it running on my Arch installation for the raspberry pi!
Any further help/advice would be most appreciated,
Thanks
Nigel
nigelh
 
Posts: 8
Joined: Tue Aug 13, 2013 8:34 pm

Re: help compiling RTC module [rtc-pcf2127a]

Postby nigelh » Mon Sep 09, 2013 1:32 pm

Following on from my post above, I've now been through all the steps given by humunculus, but using pacman as moonman suggested, up to "mkdir devel" .
They all seemed to work well, with no errors that I could see.

BUT, sadly the hardware clock "/dev/rtc" isn't found :-

Code: Select all
[root@raspberrypi nigel]# hwclock --debug
hwclock from util-linux 2.23.2
hwclock: cannot open /dev/rtc: No such file or directory
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.


I haven't run "make modules" yet as
a) I'm not sure when it should be run
b) not sure what arguments to use

I would appreciate some help/guidance, please, as I feel I'm nearly there but confused as to where I'm going wrong :(
Many thanks
Nigel
nigelh
 
Posts: 8
Joined: Tue Aug 13, 2013 8:34 pm

Re: help compiling RTC module [rtc-pcf2127a]

Postby nigelh » Wed Sep 18, 2013 4:21 pm

Hi folks,
I'm still struggling with getting the RasClock running on my archlinux raspberry pi and would really appreciate some help in getting the proper driver etc. for it - ANY help/guidance would be most appreciated
Has any one succeeded yet ? :(
Thanks
Nigel
nigelh
 
Posts: 8
Joined: Tue Aug 13, 2013 8:34 pm

Re: help compiling RTC module [rtc-pcf2127a]

Postby moonman » Thu Sep 19, 2013 8:19 am

It seems the driver is in 3.11 kernel but is not selected for building. You can recompile the kernel with it, or wait until the 3.11.2 is out, I'll include it. The package is called linux-raspberrypi-latest. https://github.com/archlinuxarm/PKGBUIL ... ypi-latest
Pogoplug V4 | GoFlex Home | Raspberry Pi B 512 | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | |[armv5] How to install my.pogoplug.com service | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 2973
Joined: Sat Jan 15, 2011 3:36 am
Location: Calgary, Canada

Re: help compiling RTC module [rtc-pcf2127a]

Postby nigelh » Thu Sep 19, 2013 4:07 pm

many thanks, "moonman" - as I'm not too familiar with compliling kernel etc., I'll await the new version.
I appreciate your update and help.
regards
Nigel
nigelh
 
Posts: 8
Joined: Tue Aug 13, 2013 8:34 pm

Re: help compiling RTC module [rtc-pcf2127a]

Postby nigelh » Thu Sep 19, 2013 6:40 pm

Hi again moonman,
I've just checked my version of Archlinux on the pi and it seems I'm running 3.6.11-17

Code: Select all
[root@raspberrypi nigel]# uname -a
Linux raspberrypi 3.6.11-17-ARCH+ #1 PREEMPT Sun Aug 25 08:45:40 CDT 2013 armv6l GNU/Linux


- that seems to be way different from the 3.11.2 you are working on - I did an update with pacman -Syu an hour or so ago so thought I was up todate. Could that be part of my problem??
Nigel
nigelh
 
Posts: 8
Joined: Tue Aug 13, 2013 8:34 pm

Re: help compiling RTC module [rtc-pcf2127a]

Postby moonman » Thu Sep 19, 2013 6:50 pm

there are 2 packages: linux-raspberrypi -> this is what you have
and linux-raspberrypi-latest

Install with pacman -Sy linux-raspberry-latest

Keep in mind that -latest is experimental and some things may not work (so far camera module doesn't work and 1-wire adapters were reported not to work either)
Pogoplug V4 | GoFlex Home | Raspberry Pi B 512 | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | |[armv5] How to install my.pogoplug.com service | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 2973
Joined: Sat Jan 15, 2011 3:36 am
Location: Calgary, Canada

Re: help compiling RTC module [rtc-pcf2127a]

Postby moonman » Fri Sep 20, 2013 7:26 am

I commited the changes so when 3.11.1-2 is in the repo it will have the driver included (as a module, so you may need to modprobe it).
Pogoplug V4 | GoFlex Home | Raspberry Pi B 512 | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | |[armv5] How to install my.pogoplug.com service | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 2973
Joined: Sat Jan 15, 2011 3:36 am
Location: Calgary, Canada

Next

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 4 guests