Coder Social home page Coder Social logo

Comments (6)

jodersky avatar jodersky commented on June 3, 2024

Hi,
I don't think it is possible to run armv7 binaries on armv6 (you can always give it a try anyways). Regarding cross-compilation, at the moment flow uses a custom SBT build that invokes a native compiler. The idea behind this setup was to be as portable as possible by direclty compiling the binaries on different target platforms. This was OK for my needs, however I see that this solution is actually inconvenient for embedded systems and creating binary distributions (the latter was addressed by regrouping binaries in github, which by the way is also a pretty dirty solution).

I'll try to implement easy cross-compilation support the future, however I'll also gladly accept any contributions :)

In the meantime, you can always try compiling for your raspberry pi by changing the native compiler and linker used by SBT. To to so, change any relevant native settings in the build script.
For example, in project/FlowBuild.scala, change unixNativeSettings to something like this:

lazy val unixNativeSettings: Seq[Setting[_]] = commonNativeSettings ++ Seq(
    cCompiler in Native := "arm-linux-gnueabi-gcc",
    flags in Native := Seq("-fPIC", "-O2", "-mcpu=arm1176jzf-s"),
    linker in Native := "arm-linux-gnueabf-gcc",
    linkFlags in Native ++= Seq("-mcpu=arm1176jzf-s6")
)

I don't have a raspberry pi, so I can't guarantee anything for the above code.

from akka-serial.

mancvso avatar mancvso commented on June 3, 2024

You can't compile in SBT directly on the Pi due to it's limited amount of RAM available to apps.
However, we can run gcc on it.
Any directions on how to compile the C code on it and add it to the project? Thanks.

from akka-serial.

jodersky avatar jodersky commented on June 3, 2024

Check out documentation/embedded-builing.md on branch crosscompile-migration for details on that here.

By the way, I've started uncluttering and re-working the build configuration to enable easIER native cross-compilation (note that a portable build configuration that supports cross-compilation for any platform on any platform is kind of hard). You can find a preview on that branch.

from akka-serial.

jodersky avatar jodersky commented on June 3, 2024

By the way, does the existing version of flow work on the raspberry pi? There might be hope since no floating-point operations are done on the native side.

from akka-serial.

mancvso avatar mancvso commented on June 3, 2024

Still haven't tested on the device, but as far as i know, armv6 has hardware hard float operations.
Will post my results soon.

from akka-serial.

jodersky avatar jodersky commented on June 3, 2024

I updated the build to make cross-compilation easier and the inclusion of native libraries more transparent. Checkout the updated README for details.

Furthermore, if the native libraries in the new 'flow-pack' jar are incompatible with the raspberry pi, you can try adding the softfloat binaries to java.library.path. Pre-compiled versions of these can be found in the release v1.1.0-RC1.

I'm marking this as closed. If there are still any related issues, feel free to reopen.

from akka-serial.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.