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

Added support for armhf and arm64 in librealsense2 #951

Merged
merged 24 commits into from
Oct 3, 2020

Conversation

ICH88
Copy link
Contributor

@ICH88 ICH88 commented Sep 23, 2020

Added all the necessary changes to successfully compile for the armhf platform.

Can be cross-compiled with:
mvn clean install -Djavacpp.platform=linux-armhf -Djavacpp.platform.compiler=arm-linux-gnueabihf-g++ -Dmaven.javadoc.skip=true -pl :librealsense2

(Sorry for the chaotic commits, I was in a hurry)

@saudet
Copy link
Member

saudet commented Sep 23, 2020

While we're at it, let's do the same for librealsense 1.x!

@saudet saudet marked this pull request as draft September 23, 2020 22:37
@saudet
Copy link
Member

saudet commented Sep 24, 2020

Let's also add builds for linux-arm64 here. BTW, you don't need to test that everything is working. We can let Travis CI do that.

@ICH88
Copy link
Contributor Author

ICH88 commented Sep 25, 2020

Both armhf and arm64 are building and working correctly now.
Had no time for librealsense 1 so far.

@ICH88 ICH88 changed the title Added support for armhf in librealsense2 Added support for armhf and arm64 in librealsense2 Sep 25, 2020
@saudet
Copy link
Member

saudet commented Sep 25, 2020

Thanks! It builds fine with GCC 5.4 from Ubuntu 16.04:
https://travis-ci.org/github/bytedeco/javacpp-presets/jobs/730305554
But not with GCC 4.9 from the Raspberry Tools:
https://travis-ci.org/github/bytedeco/javacpp-presets/jobs/730305543
Looks like we'll need to patch this a bit...

@saudet
Copy link
Member

saudet commented Oct 1, 2020

BTW, are 32-bit Raspberry Pi still ARMv6 only? Or can they do ARMv7 too? If they accept ARMv7 binaries as well these days, we could cross-compile using GCC from Ubuntu instead of trying to patch code from librealsense2.

/cc @vb216

@vb216
Copy link
Member

vb216 commented Oct 1, 2020

I think the early Pi1, and Pi Zero are physically ARMv6 chips, some of the newer models running 32bit OS are ARMv7 but may report as ARMv6 still.
Tricky one though, realistically I suspect anyone doing heavier compute work would be on a Pi3/Pi4 nowadays, but you'd lose some older platform compatibility fully switching to v7.
Wonder how much of the user base for ARM might be on Jetson boards nowadays too.

@ICH88
Copy link
Contributor Author

ICH88 commented Oct 1, 2020

The newer Pis are V7 compatible, I actually compiled on Ubuntu and it runs fine on the ARM V7 boards

@saudet
Copy link
Member

saudet commented Oct 2, 2020

Interesting, these days they actually recommend using Ubuntu for cross-compiling:
https://www.raspberrypi.org/documentation/linux/kernel/building.md
And it's supposed to work for "Pi 1, Pi Zero, Pi Zero W, or Compute Module".
Not sure how that works, but let's start by making builds with Ubuntu and we'll see if anyone has any issues.

@saudet saudet marked this pull request as ready for review October 2, 2020 02:48
@saudet saudet merged commit 3d86d0e into bytedeco:master Oct 3, 2020
@saudet saudet mentioned this pull request Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants