kiwix-build icon indicating copy to clipboard operation
kiwix-build copied to clipboard

Mips32r2

Open cm8 opened this issue 6 years ago • 5 comments

Produces usable results, but for some hardcoded values (e.g. root path of toolchain) it may be desirable to supply the value on the command line, i.e. python3 -m kiwixbuild --target-platform mips32r2_uclibc_glibcxx_dyn --toolchain-root /path/to/mips/toolchain/.

If other mips toolchains deviate a lot in their path and binary name layout, however, then it may make more sense to create yet more (sub)classes in mips32r2.py to support these. This will be a future choice to make for people trying builds with openwrt toolchains.

It should be safe to assume that people experienced enough to build their own mips toolchains, can find rootpath variable in mips32r2.py and re-set that accordingly. When building with apt-get-able (debian default) mips toolchains this should not be necessary.

cm8 avatar Jun 24 '18 07:06 cm8

@cm8 Thank you very much. What is the output of this? kiwix-tools for mips32r2 statically compiled? In addition, please rebase your branch.

kelson42 avatar Jun 24 '18 07:06 kelson42

depends on the value used for --target-platform, as you can deduct from the PR comment, you can use it to build kiwix-tools dynamically and use that on a mips target router (even if you're not allowed to install kiwix binaries and libs in the standard locations on that device). Thus the compilation result in INSTALL may be used for two scenarios:

  • integrate them to the root directory structure of the target device, copying suffices (the usual way)
  • use them from a writable mount-point if root directory of the target is read-only/not-modifiable, copy and then call fixenv-nonstd-libdir on the target (kiwix-tools will be run through symlinks calling a shell script that sets up LD_LIBRARY_PATH in this case, for the linker to find the dynamic libraries in a non standard install location)

It may sound complicated, but use is straight-forward and its tried and tested to work.

cm8 avatar Jun 24 '18 07:06 cm8

@kelson42 Can you include the target mips32r2_glibc_glibcxx_dyn in travis ci builds once it is merged to master? It should be possible, because the toolchain used for that target is in debian and thus apt-get-able. I'm not to experienced with editing the .travis.yml

as a side-note: it's not necessary to rebase this branch before its merged to master (it does not have conflicts with the 3 commits in between, so it can be merged at the tip of master right away)

cm8 avatar Jun 24 '18 07:06 cm8

@cm8 I will let @mgautierfr make the reviewing work. We definitely wants to (1) integrate the mips architecture to the CI (2) generate statically compiled nightlies/releases for mips. If all of this works fine we should then have a look how to make it as easy as possible for openWRT users and probably optimise a few things on kiwix-serve.... But before all of this happen, please do not forget to rebase your PR branch on master.

kelson42 avatar Jun 24 '18 09:06 kelson42

This pull request has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

stale[bot] avatar Dec 14 '19 15:12 stale[bot]