-
Notifications
You must be signed in to change notification settings - Fork 155
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
Cross Compiling macchina.io for Raspberry Pi Zero W #97
Comments
You should do the cross compiling on host using the same Debian release that you are also running on the Raspberry Pi. Everything else is a recipe for disaster. For the current Raspbian Buster, that would be Debian Buster. The |
I installed Debian Buster 10.3 (x86-64) on my VMware virtual macchine. Also I downloaded Raspberry Pi Zero GCC cross-compiler: Following commands are executed: $ cd ~ $ sudo apt-get install g++ make libssl-dev python $ git clone https://github.com/macchina-io/macchina.io.git $ cd macchina.io $ git checkout master $ make -s -j2 hosttools Exporting path to bin folder of cross-compiler $ POCO_CONFIG=X-Debian-Stretch-RPi LINKMODE=SHARED make -s -j2 DEFAULT_TARGET=shared_release During compiling, get this error messages for openssl: ** Compiling src/Cipher.cpp (release, shared) I used original X-Debian-Stretch-RPi configuration file with no change, but time optimization flags on cross-compiler site and X-Debian-Stretch-RPi configuration file are different. Cross-compiler site: X-Debian-Stretch-RPi configuration file: Also Raspberry Pi Zero have armv6l instead of armv7l architecture. I tried to compile helloWorld on host and a.out file work on Zero. |
You need to have the OpenSSL libraries available for your target (cross-compiled with the same toolchain) as well. |
I tried to compile macchina direct on Raspberry Pi Zero W. For example, Tinkerforge RED Brick and Zero W have similar hardware capabilities, 1GHz CPU and 512 MB RAM. But Tinkerforge RED Brick and all models of Raspberry Pi have ARM v7 architecture, except Raspberry Pi Zero/Zero W which have ARM v6 architecture. Compiling on my Raspberry Pi Zero W with latest Rasbian Buser terminated during V8 build with unsupported architecture error: ... ** Building shared library (release) /home/pi/macchina.io/platform/lib/Linux/armv6l/libPocoWebTunnel.so.1 Is it possible to run the macchina on Raspberry Pi Zero/Zero W? |
It may be that the old ARMv6 architecture is no longer supported by the V8 version we're using. Haven't actually checked. You could try adding the following check to
(right after or before the corresponding check for armv7) |
Raspberry Pi Zero W has a modest 512 MB of RAM, I guess cross compiling is a better solution than direct compiling on the platform, because of that I want to cross compile macchina.io on my Ubuntu 16.04 host and run it on Raspberry Pi Zero W. I follow steps for cross compiling in this article:
https://github.com/macchina-io/macchina.io/wiki/Cross-Compiling-for-Raspberry-Pi-(Raspbian)-and-BeagleBone-Black-(Debian-Stretch)
#1 Can not install libssl-dev:armhf
Command:
$ sudo apt-get install libssl-dev:armhf
Can not locate the package:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libssl-dev:armhf
#2 Editing configuration file
Which build configuration file is the best choise: ARM-Linux, X-Debian-Stretch-RPi or some other? What we need to redefine in this configuration file for armv6l Raspberry Pi Zero W architecture?
The text was updated successfully, but these errors were encountered: