Fossil SCM
Added build instructions for cross-compiling Fossil for Android from Linux, adapted from [https://fossil-scm.org/forum/forumpost/e0e9de4a7e | forumpost/e0e9de4a7e].
Commit
b70744576b31e654c285e52a472b4c0ad8e37e9aaaab645ea507f9f37cc66849
Parent
d5455f5b1b83d7d…
1 file changed
+53
+53
| --- www/build.wiki | ||
| +++ www/build.wiki | ||
| @@ -310,5 +310,58 @@ | ||
| 310 | 310 | </code></pre> |
| 311 | 311 | |
| 312 | 312 | Note the IDs of the images named <tt>fossil_static</tt> and <tt>alpine</tt>, then: |
| 313 | 313 | |
| 314 | 314 | <pre><code>docker image rm THE_FOSSIL_ID THE_ALPINE_ID</code></pre> |
| 315 | + | |
| 316 | + | |
| 317 | +<h2>6.0 Building on/for Android</h2> | |
| 318 | + | |
| 319 | +<h3>6.1 Cross-compiling from Linux</h3> | |
| 320 | + | |
| 321 | +The following instructions for building Fossil for Andoid, | |
| 322 | +without requiring a rooted OS, are adapted from | |
| 323 | +[https://fossil-scm.org/forum/forumpost/e0e9de4a7e | forumpost/e0e9de4a7e]. | |
| 324 | + | |
| 325 | +On the development machine, from the fossil source tree: | |
| 326 | + | |
| 327 | +<pre><code>export CC=$NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang | |
| 328 | +./configure --with-openssl=none | |
| 329 | +make | |
| 330 | +</code></pre> | |
| 331 | + | |
| 332 | + | |
| 333 | +On the Android device, enable the <em>USB debugging</em> option from | |
| 334 | +Developer menu in Device Options. Connect the device to the development | |
| 335 | +system with USB. If it's configured and connected properly, | |
| 336 | +the device should show up in the output of <code>adb devices</code>: | |
| 337 | + | |
| 338 | +<pre><code>sudo adb devices | |
| 339 | +</code></pre> | |
| 340 | + | |
| 341 | +Copy the resulting fossil binary onto the device... | |
| 342 | + | |
| 343 | +<pre><code>sudo adb push fossil /data/local/tmp | |
| 344 | +</code></pre> | |
| 345 | + | |
| 346 | +And run it from an <code>adb</code> shell: | |
| 347 | + | |
| 348 | +<pre><code>sudo adb shell | |
| 349 | +> cd /data/local/tmp | |
| 350 | +# Fossil requires a HOME directory to work with: | |
| 351 | +> export HOME=$PWD | |
| 352 | +> export PATH=$PWD:$PATH | |
| 353 | +> fossil version | |
| 354 | +This is fossil version 2.11 [e5653a4ceb] 2020-03-26 18:54:02 UTC | |
| 355 | +</code></pre> | |
| 356 | + | |
| 357 | +The output might, or might not, include warnings such as: | |
| 358 | + | |
| 359 | +<pre><code>WARNING: linker: ./fossil: unused DT entry: type 0x6ffffef5 arg 0x1464 | |
| 360 | +WARNING: linker: ./fossil: unused DT entry: type 0x6ffffffe arg 0x1ba8 | |
| 361 | +WARNING: linker: ./fossil: unused DT entry: type 0x6fffffff arg 0x2 | |
| 362 | +</code></pre> | |
| 363 | + | |
| 364 | +The source of such warnings is not 100% certain. | |
| 365 | +Some information about these (reportedly harmless) warnings can | |
| 366 | +be found | |
| 367 | +[https://stackoverflow.com/a/41900551 | on this StackOverflow post]. | |
| 315 | 368 |
| --- www/build.wiki | |
| +++ www/build.wiki | |
| @@ -310,5 +310,58 @@ | |
| 310 | </code></pre> |
| 311 | |
| 312 | Note the IDs of the images named <tt>fossil_static</tt> and <tt>alpine</tt>, then: |
| 313 | |
| 314 | <pre><code>docker image rm THE_FOSSIL_ID THE_ALPINE_ID</code></pre> |
| 315 |
| --- www/build.wiki | |
| +++ www/build.wiki | |
| @@ -310,5 +310,58 @@ | |
| 310 | </code></pre> |
| 311 | |
| 312 | Note the IDs of the images named <tt>fossil_static</tt> and <tt>alpine</tt>, then: |
| 313 | |
| 314 | <pre><code>docker image rm THE_FOSSIL_ID THE_ALPINE_ID</code></pre> |
| 315 | |
| 316 | |
| 317 | <h2>6.0 Building on/for Android</h2> |
| 318 | |
| 319 | <h3>6.1 Cross-compiling from Linux</h3> |
| 320 | |
| 321 | The following instructions for building Fossil for Andoid, |
| 322 | without requiring a rooted OS, are adapted from |
| 323 | [https://fossil-scm.org/forum/forumpost/e0e9de4a7e | forumpost/e0e9de4a7e]. |
| 324 | |
| 325 | On the development machine, from the fossil source tree: |
| 326 | |
| 327 | <pre><code>export CC=$NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang |
| 328 | ./configure --with-openssl=none |
| 329 | make |
| 330 | </code></pre> |
| 331 | |
| 332 | |
| 333 | On the Android device, enable the <em>USB debugging</em> option from |
| 334 | Developer menu in Device Options. Connect the device to the development |
| 335 | system with USB. If it's configured and connected properly, |
| 336 | the device should show up in the output of <code>adb devices</code>: |
| 337 | |
| 338 | <pre><code>sudo adb devices |
| 339 | </code></pre> |
| 340 | |
| 341 | Copy the resulting fossil binary onto the device... |
| 342 | |
| 343 | <pre><code>sudo adb push fossil /data/local/tmp |
| 344 | </code></pre> |
| 345 | |
| 346 | And run it from an <code>adb</code> shell: |
| 347 | |
| 348 | <pre><code>sudo adb shell |
| 349 | > cd /data/local/tmp |
| 350 | # Fossil requires a HOME directory to work with: |
| 351 | > export HOME=$PWD |
| 352 | > export PATH=$PWD:$PATH |
| 353 | > fossil version |
| 354 | This is fossil version 2.11 [e5653a4ceb] 2020-03-26 18:54:02 UTC |
| 355 | </code></pre> |
| 356 | |
| 357 | The output might, or might not, include warnings such as: |
| 358 | |
| 359 | <pre><code>WARNING: linker: ./fossil: unused DT entry: type 0x6ffffef5 arg 0x1464 |
| 360 | WARNING: linker: ./fossil: unused DT entry: type 0x6ffffffe arg 0x1ba8 |
| 361 | WARNING: linker: ./fossil: unused DT entry: type 0x6fffffff arg 0x2 |
| 362 | </code></pre> |
| 363 | |
| 364 | The source of such warnings is not 100% certain. |
| 365 | Some information about these (reportedly harmless) warnings can |
| 366 | be found |
| 367 | [https://stackoverflow.com/a/41900551 | on this StackOverflow post]. |
| 368 |