wezm / ssd1675

Rust driver for SSD1675 e-Paper display controller
Apache License 2.0
63 stars 14 forks source link

Add armhf support for cross compilation #7

Closed jedahan closed 5 years ago

jedahan commented 5 years ago

So I tried cross compiling using the readme

cross build --target=arm-unknown-linux-gnueabi --release --example raspberry_pi_inky_phat --features examples

And a binary did result, but segfaulted on my raspberry pi zero w. The resulting file format is:

ELF 32-bit LSB pie executable ARM, EABI5 version 1 (SYSV), dynamically linked, 
interpreter /lib/ld-linux.so.3, for GNU/Linux 2.6.32, 
BuildID[sha1]=106da3de504ff660e85093b399132de00f484060, with debug_info, not stripped

When I tried using gnueabihf, and pointed the cross tool to rustcross/arm-unknown-linux-gnueabihf, the resulting file format is:

ELF 32-bit LSB pie executable ARM, EABI5 version 1 (SYSV), dynamically linked, 
interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.26, BuildID[sha1]=e7943ad7ed53c12c384d60981761686e6468658f, with debug_info, not stripped

I am new to cross compiling, so I am not sure if this is some other problem with my pi, but would you mind trying out both and seeing if this is helpful?

codecov-io commented 5 years ago

Codecov Report

Merging #7 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master       #7   +/-   ##
=======================================
  Coverage   91.66%   91.66%           
=======================================
  Files           5        5           
  Lines         192      192           
=======================================
  Hits          176      176           
  Misses         16       16

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7c40f07...6219046. Read the comment docs.

wezm commented 5 years ago

I discovered this myself preparing my linux.conf.au project but hadn’t updated the project yet. Thanks for the PR