Jump to content

RTC Odroid c2


RoDuS

Recommended Posts

--------Preamble------------

Tried Armbian on Opi pc, and fell in love with it! It feels like the O.S. for me! Tried to turn the c2 into the ultimate night stand alarm clock, with 7" screen, micro keyboard and tiny mouse, with speakers built in a customized re-purposed case running ubuntu  for beside the bed . alarm-clock-applet is a favorite app on Rpi, works great, I live by it basically. but the c2 will not play audio with it, gstreamer-ugly download and then it works, but it whacks out the RTC. alarm works great on Opi with Armbian but no RTC. The RTC is a big part of the situation, experimentally powering with solar.  All that time and money wasted on a great concept, this was the second attempt to find a use for the c2 other than a paper weight.

I'm still a total newb....

---------------------------------

 

RTC on Odroid c2, Is it a similar process in Armbian?

 

Is it a different repository?

I have absolutely no idea what to do in armbian to make it work at least not with out some sort of example or at least a good path to start on, and searching produced no results, at least nothing understandable to me, But im really good at wrecking the linux O.S. when trying new things....

 

OS Requirements
- Linux : Add the PCF8563 RTC driver

 

c2 setup:

  1.  n/a
  2. Enable RTC Shield odroid@odroid:~$ sudo apt install device-tree-compiler
    odroid@odroid:~$ sudo fdtput -t s /media/boot/meson64_odroidc2.dtb /i2c@c1108500/pcf8563@51 status "okay"
    odroid@odroid:~$
  3. Now you have the RTC on ODROID-C2 running with the current date and time the next step is to make it load when the ODROID-C2 boots.
    Edit the modules file: odroid@odroid:~$ echo "aml_i2c"|sudo tee -a /etc/modules
    odroid@odroid:~$ cat /etc/modules
    aml_i2c
    odroid@odroid:~$

    Add aml_i2c at the end of the file.

  4. Next you want to add the RTC on ODROID-C2 at boot by editing /etc/rc.local.odroid@odroid:~$ sudo nano /etc/rc.local

    if [ -f /aafirstboot ]; then /aafirstboot start ; fi

    hwclock -s

    exit 0
  5. Reboot your ODROID-C2.

---------------

I know the Rpi will do the job, but i have enough of them and dont want to get yet another untill the Rpi4.....

If this wont work, is there an SBC with RTC option that works with Armbian?

 

Thanx

Link to comment
Share on other sites

Apparently it is similiar, I found the "meson64_odroidc2.dtb" /boot/dtb/meson64_odroidc2.dtb file within the folder.

I made the whole procedure but change the path where is "meson64_odroidc2.dtb"

Today in my ODROID disconnected night to see if tomorrow the date this date.

 

 

regards

 

[ This post was translated with Google. Please use English next time, Por favor, use Inglés próxima vez. Moderators ]

Link to comment
Share on other sites

Hi - I'm running kernel 4.18.8-odroidc2 and I've installed

 

  linux-headers-next-odroidc2

  linux-source-4.18.8-next-odroidc2

 

and the image was

 

  linux-image-next-odroidc2

 

The .config file includes the following entries

 

  CONFIG_RTC_DRV_PCF85363=m

  # CONFIG_RTC_DRV_PCF8563 is not set

 

The Odroid C2 RTC shield is the one not set, namely, the PCF8563

 

See

 

  https://www.hardkernel.com/shop/rtc-shield/

 

Now if I try to do a

 

  make ARCH=arm64 scripts

  make ARCH=arm64 distclean

 

the last command generates the following error

 

  scripts/Makefile.clean:15: drivers/gpu/drm/nouveau/Makefile: No such file or director

 

and if I just type

 

 make ARCH=arm64

 

make[1]: *** No rule to make target 'arch/arm64/kernel/vdso/gettimeofday.S', needed by 'arch/arm64/kernel/vdso/gettimeofday.o'.  Stop.

 

So I have to punt.

 

Any help would be greatly appreciated!

 

-- Cinaed

 

 

Link to comment
Share on other sites

Hello,

Sorry to bother you again with the pcf8563 RTC shield form Hardkernel but I just bought one and I'm unable to make it work...

I'm using ARMBIAN 5.71 stable Debian GNU/Linux 9 (stretch) 4.19.15-meson64 and tried a lot of things from Hardkernel's wiki to posts from this forum (https://forum.armbian.com/topic/2049-rtc-odroid-c2/) and from others.

 

It seems that I need modify the DTB using overlays but I'm completely lost... 

 

Where can I find help? Did someone had success to make it work with the latest armbian release for the Odroid C2?

Link to comment
Share on other sites

32 minutes ago, mbo said:

It seems that I need modify the DTB using overlays but I'm completely lost...

If you wish to use it in userspace with python script for example, you simply need to use I2C overlays already added into recent builds.

If you wish to use it directly by the kernel, you will have to do you own build since the PCF8563 is not present in current builds.

 

Link to comment
Share on other sites

Thank you.

 

Does that means that I need to build my own armbian image with CONFIG_RTC_DRV_PCF8563=y in build/config/kernel/linux-meson64-next.config? Is there something else to do?

 

There is no way to install a driver without re-building?

Link to comment
Share on other sites

Ok, I moved to Armbian_5.47_Odroidc2_Debian_stretch_default_3.16.57 then apt-get update & apt-get upgrade and did what the first post said. 

It's working as expected now. 

 

I don't understand why drivers have been removed in last kernel...

Link to comment
Share on other sites

57 minutes ago, mbo said:

I don't understand why drivers have been removed in last kernel...

It has not been intentionally removed ...

When a new kernel branch appears, there is a new defconfig for it. If we don't meticulously doing diff between old and new defconfig, it is easy to forget some drivers, and if no one report the missing, it can stay like that for months ...

Now that we know, I will add this one the NEXT and DEV defconfig for future builds !

 

EDIT : Done ! https://github.com/armbian/build/commit/d1f8564edb614c655d818b860320706ce6fca258

EDIT2 : The above commit is for sunxi ! For meson64, here it is : https://github.com/armbian/build/commit/93207705504400ae8fa4c28e4bfccd99803cbbfa

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines