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

Debian package for cjdns with optimizations #4

Open
benhylau opened this issue Mar 6, 2017 · 6 comments
Open

Debian package for cjdns with optimizations #4

benhylau opened this issue Mar 6, 2017 · 6 comments

Comments

@benhylau
Copy link
Member

benhylau commented Mar 6, 2017

See: https://github.com/phillymesh/cjdns-optimizations#optimized-build

@Famicoman
Copy link
Member

Side note: Something went a little haywire when I upped the kernel to 4.10 and upped jessie to stretch. The neon flag is accepted for building but the cryptofuzz test fails. I'm not sure if it is not properly supported, or if I have a botched installation somewhere. I'm curious to hear from others who upgrade in any fashion and try a build with neon.

@benhylau
Copy link
Member Author

benhylau commented Dec 28, 2017

build

The current state is that cjdns gets included in a non-standard way. It gets included as a binary into the image. The main reason is that it pulls in Python, which adds ~100 MB to the tiny disk image, so @hamishcoleman has stripped out all that from the custom binary he built. This is a short-term solution however.

The long-term plan for this is to include this in the top right debian box. Host on a deb repo a minimal binary of cjdns, add that repo to the debian_repo so multistrap can pull it in. The deb repo should have binaries built for major architectures:

  • armhf
  • amd64

We should not publish device-specific binaries, just one binary for each major architecture. Board-specific _sub-_optimizations should be selected at runtime. For example, the armhf binary may contain :

sha256 (generic C code, no optimizations)
sha256_armhf_generic (contains some restricted set of assembly for generic optimizations on ARM)
sha256_armhf_neonfp (optimizations requiring neon floating point hardware)
sha256_armhf_vfp7 (optimizations requiring vfp7 floating point hardware)

All these should be packaged into a single armhf binary and which one to execute is a runtime decision.

@benhylau benhylau changed the title cjdns optimizations Debian package for cjdns with optimizations Dec 28, 2017
@Famicoman
Copy link
Member

Tell me more about how the board specific optimized binaries work. Are you running an apt server so we can import keys and add something to apt-sources.list? How are the specific board optimized binaries determined for use at runtime? These can all live in one binary?

@benhylau
Copy link
Member Author

benhylau commented Dec 28, 2017

Are you running an apt server so we can import keys and add something to apt-sources.list

Yes, that is the plan.

These can all live in one binary?

Only two binaries: armhf (for all the SBCs) and amd64

How are the specific board optimized binaries determined for use at runtime?

An ARM board will get the armhf binary, and has to choose one of the following object files (all of which are included in that binary) depending on whether it has neon, vfp7, or neither:

sha256_armhf_generic
sha256_armhf_neonfp
sha256_armhf_vfp7

@benhylau
Copy link
Member Author

RE: Debian pkg see:

This one can be a separate deb package that can bring cjdns tools without need for python and nodejs (mesh-orange already has perl):

@benhylau benhylau self-assigned this Jan 14, 2018
@benhylau
Copy link
Member Author

Working on a reproducible environment to produce .deb packages for both cjdns and yggdrasil. Not sure yet if I will host the packages on a repo yet: https://github.com/benhylau/mesh-router-builder

I would also like to use the Vagrant machine to build mesh-orange images.

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

No branches or pull requests

2 participants