Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rsync for OpenELEC 8 #169

Open
machour opened this issue Dec 8, 2017 · 2 comments
Open

rsync for OpenELEC 8 #169

machour opened this issue Dec 8, 2017 · 2 comments

Comments

@machour
Copy link

machour commented Dec 8, 2017

I have the unofficial-addons enabled, but I can't seem to find rsync, or chromium on OpenElec.
I also noticed that there is no git tag in this repo for openelec-8.

Is there a new project superseding this one?

@me-kell
Copy link

me-kell commented Mar 6, 2018

Why has rsync been removed from unofficial-addons version 8?

@MichaelThessel
Copy link

OpenElec 8 has been out for a year. I would assume at this point that there won't be any support for it in the future.

I managed to get rsync working though. I will outline this here, it might come in handy for someone else. I cross compiled rsync for armv7 on my regular Linux machine and then copied the binary to my OpenElec box. This workflow is specific for ARMv7 but should be easily adapted for any other architecture.

Fetch and unpack the rsync sources:

# wget https://download.samba.org/pub/rsync/src/rsync-3.1.3.tar.gz
# tar -xzvf rsync-3.1.3.tar.gz 
# cd rsync-3.1.3

I installed the ARM GNU Compiler Collection. I'm on Arch and the package is in the AUR:

aur/arm-linux-gnueabihf-gcc

Initially I had installed:

community/aarch64-linux-gnu-gcc

This only works for ARMv8 though. If you wan't to compile for a RaspberryPIv3 this might be the way to go as this is available as pre-compiled binary while you have to compile the ARM GNU Compiler Collection which took several hours on my machine.

Next generate the Makefile:

./configure --disable-acl-support --disable-xattr-support --with-included-popt

Then edit the Makefile and replace:

CC=gcc   
CC=arm-linux-gnueabihf-gcc -march=armv7

If you want to compile for a different architecture or use another compiler adjust accordingly. To see the architecture you want to compile against, run this on your OpenElec box

# uname -a
Linux Projector 4.9.30 #1 SMP Mon May 29 09:51:09 CEST 2017 armv7l GNU/Linux

Next compile rsync:

# make

Once its done you can check if it compiled for the correct architecture with:

# file rsync
rsync: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=5129f7b08ff6d57de2e32b7e43de782a887aa06f, with debug_info, not stripped

Then create the directory structure and copy over the binary to the OpenElec box:

# mkdir -p /storage/.kodi/addons/network.backup.rsync/bin

...

#  scp ./rsync openelecbox:/storage/.kodi/addons/network.backup.rsync/bin/

I then use rsync like this to sync data to the OpenElec box:

rsync --bwlimit=1000 --progress -av --delete -e ssh --rsync-path=/storage/.kodi/addons/network.backup.rs
ync/bin/rsync /mnt/usb/backup/musi/ root@openelecbox:/var/media/sda2-ata-WDC_WD7500BPKT-0/music/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants