mirror of
https://github.com/CoderSherlock/CoderSherlock.github.io.git
synced 2026-06-13 08:08:10 -07:00
279 lines
8.8 KiB
HTML
279 lines
8.8 KiB
HTML
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
|
|
<head>
|
|
<title>
|
|
Cross Compile RSync ARM // Mil años de solitario
|
|
</title>
|
|
|
|
<link href="http://gmpg.org/xfn/11" rel="profile">
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
|
|
|
<meta name="description" content="">
|
|
<meta name="keywords" content="">
|
|
<meta name="author" content="">
|
|
<meta name="generator" content="Hugo 0.16" />
|
|
|
|
<meta property="og:title" content="Cross Compile RSync ARM" />
|
|
<meta property="og:description" content="" />
|
|
<meta property="og:type" content="website" />
|
|
<meta property="og:locale" content="en_US" />
|
|
<meta property="og:url" content="https://codersherlock.github.io/post/Cross-Compile-RSync-ARM/" />
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css">
|
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css">
|
|
|
|
|
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css">
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="https://codersherlock.github.io//css/redlounge.css">
|
|
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
|
|
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'>
|
|
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'>
|
|
|
|
|
|
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png">
|
|
<link rel="shortcut icon" href="/favicon.png">
|
|
|
|
|
|
<link href="" rel="alternate" type="application/rss+xml" title="Mil años de solitario" />
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/tomorrow-night-bright.min.css">
|
|
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js"></script>
|
|
<script>hljs.initHighlightingOnLoad();</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
<div id="layout" class="pure-g">
|
|
<div class="sidebar pure-u-1 pure-u-md-1-4">
|
|
<div class="header">
|
|
|
|
|
|
|
|
<img src="/images/photo.png" class="sidebarphoto">
|
|
|
|
|
|
<h1 class="brand-title">Mil años de solitario</h1>
|
|
<h2 class="brand-tagline">A boy who can't step into academia</h2>
|
|
|
|
<nav class="nav">
|
|
<ul class="nav-list">
|
|
<li class="nav-item"><span class="nav-item-separator">//</span><a href="https://codersherlock.github.io/">Home</a></li>
|
|
|
|
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/about">About</a></li>
|
|
|
|
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/bio">Biography</a></li>
|
|
|
|
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/post">Blog</a></li>
|
|
|
|
<li class="nav-item"><span class="nav-item-separator">//</span><a href="/about/">about me</a></li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
|
|
<div class="social-buttons">
|
|
|
|
|
|
<a href="http://github.com/CoderSherlcok" target="_blank"><i class='fa fa-github'></i></a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="content pure-u-1 pure-u-md-3-4">
|
|
<a name="top"></a>
|
|
|
|
|
|
|
|
|
|
<div id="toc" class="pure-u-1 pure-u-md-1-4">
|
|
<small class="toc-label">Contents</small>
|
|
<nav id="TableOfContents">
|
|
<ul>
|
|
<li><a href="#cross-compile-rsync-to-arm-platform">Cross Compile Rsync to ARM platform</a>
|
|
<ul>
|
|
<li><a href="#motivation">Motivation</a></li>
|
|
<li><a href="#pre-work">Pre-work</a></li>
|
|
<li><a href="#cross-compile-rsync">Cross-Compile Rsync</a></li>
|
|
<li><a href="#push-rsync-to-android">Push RSync to Android.</a></li>
|
|
<li><a href="#run-rsync-with-argument">Run Rsync with argument</a></li>
|
|
<li><a href="#references">References</a></li>
|
|
</ul></li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
|
|
|
|
<section class="post">
|
|
<h1 class="post-title">
|
|
<a href="/post/Cross-Compile-RSync-ARM/">Cross Compile RSync ARM</a>
|
|
</h1>
|
|
<h3 class="post-subtitle">
|
|
|
|
</h3>
|
|
|
|
<span class="post-date">
|
|
<span class="post-date-day"><sup>15</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Aug</span> <span class="post-date-year">2016</span>
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="post-categories">
|
|
|
|
<a class="post-category post-category-2016-08" href="https://codersherlock.github.io//categories/2016-08">2016-08</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h1 id="cross-compile-rsync-to-arm-platform">Cross Compile Rsync to ARM platform</h1>
|
|
|
|
<p>As always, feel free to ask. // Sherlock</p>
|
|
|
|
<h2 id="motivation">Motivation</h2>
|
|
|
|
<p>I got some issues about compile seafile to android, so instead of doing so, I start to figure out some other synchronize workflow. <a href="https://rsync.samba.org/">Rsync</a> is one of the most mature synchronization solution. So I made the decision on planting rsync to android.</p>
|
|
|
|
<h2 id="pre-work">Pre-work</h2>
|
|
|
|
<p>Rsync is a sync program with delta sync feature and based on SSH connection. So all we need to do is SSH support and cross compile tool-chain. Similar to what I mentioned in <a href="https://codersherlock.github.io/post/Cross-Compile-Seafile-2-ARM/">previews blog</a>, Android NDK and environment export need to be done before compilation.
|
|
To enable normally use of compiled program, we need to make android support SSH. My solution is just install <a href="https://play.google.com/store/apps/details?id=berserker.android.apps.sshdroid&hl=en">SSHDroid</a> from Google Play Store.</p>
|
|
|
|
<h2 id="cross-compile-rsync">Cross-Compile Rsync</h2>
|
|
|
|
<p>Running following script to build rsync. It will generate a executable file named rsync in the root directory.</p>
|
|
|
|
<pre><code>$ ./configure --build=${BUILD_SYS} --host=${TOOLCHAIN}
|
|
$ make
|
|
</code></pre>
|
|
|
|
<h2 id="push-rsync-to-android">Push RSync to Android.</h2>
|
|
|
|
<p>After installing SSHDroid, we can now push our arm-version-rsync to target machine.</p>
|
|
|
|
<pre><code>$ adb push rsync /data/local/tmp
|
|
$ adb shell
|
|
|
|
$ cd /data/data/berserker.android.apps.sshdroid/dropbear
|
|
$ mv ../../../local/tmp/rsync .
|
|
</code></pre>
|
|
|
|
<h2 id="run-rsync-with-argument">Run Rsync with argument</h2>
|
|
|
|
<p>Now we can easily use rsync in android shell. Similar to what we use on PC.</p>
|
|
|
|
<pre><code>$ ./rsync -e "./ssh" {target-data} {target-location}:{target-directory}
|
|
</code></pre>
|
|
|
|
<h2 id="references">References</h2>
|
|
|
|
<p><a href="http://stackoverflow.com/questions/8130889/build-rsync-for-android">Build Rsync for Android</a></p>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="tags-list">
|
|
<span class="dark-red">Tags</span><span class="decorative-marker">//</span>
|
|
|
|
<a class="post-tag post-tag-android" href="https://codersherlock.github.io//tags/android">android</a>,
|
|
|
|
<a class="post-tag post-tag-arm" href="https://codersherlock.github.io//tags/arm">arm</a>,
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="paging">
|
|
<span class="paging-label">More Reading</span>
|
|
|
|
<div class="paging-newer">
|
|
<span class="dark-red">Newer</span><span class="decorative-marker">//</span>
|
|
<a class="paging-link" href="/about/">about me</a>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="paging-older">
|
|
<span class="dark-red">Older</span><span class="decorative-marker">//</span>
|
|
<a class="paging-link" href="/post/Pokemon-Go-Hack/">Pokemon Go Hack</a>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<div id="disqus_thread"></div>
|
|
<script type="text/javascript">
|
|
var disqus_shortname = 'codersherlockblog';
|
|
var disqus_identifier = 'https:\/\/codersherlock.github.io\/post\/Cross-Compile-RSync-ARM\/';
|
|
var disqus_title = 'Cross Compile RSync ARM';
|
|
var disqus_url = 'https:\/\/codersherlock.github.io\/post\/Cross-Compile-RSync-ARM\/';
|
|
|
|
(function() {
|
|
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
|
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
|
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
|
})();
|
|
</script>
|
|
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
|
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
|
|
|
|
|
|
<div class="footer">
|
|
<hr class="thin" />
|
|
<div class="pure-menu pure-menu-horizontal pure-menu-open">
|
|
<ul class="footer-menu">
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
<p>© 2016. All rights reserved.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|