UbiquityRobotics / raspicam_node

ROS node for camera module of Raspberry Pi
BSD 3-Clause "New" or "Revised" License
293 stars 162 forks source link

fix compilation on aarch64 (e.g. Ubuntu 18.04.4 on Raspberry Pi 4) #94

Closed andreasBihlmaier closed 4 years ago

andreasBihlmaier commented 4 years ago

Tested on

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:        18.04
Codename:       bionic

with userland at 6e6a2c859a17a195fbb6a97c9da584dd2b9b0178 compiled using ./buildme --aarch64 on Raspberry Pi 4.

rohbotics commented 4 years ago

Does this just fix compilation? Or does the node actually work with 64 bit userland?

andreasBihlmaier commented 4 years ago

@rohbotics After the just pushed second commit I can successfully use raspicam_node :)

However, there seems to be an issue on (current) Ubuntu 18.04 aarch64 kernels (linux-image-5.3.0-1018-raspi2): The vc_sm_cma kernel module, although loaded, does not create /dev/vcsm-cma, thus not even raspivid works properly. I will submit a bug report to the Ubuntu folks soon. Thus, I'm using the kernel8.img from a recent Raspbian on Ubuntu for now. (If you are interested in trying this out yourself, you only need to copy RASPBIAN/boot/kernel8.img to UBUNTU/boot/firmware/vmlinuz, RASPBIAN/boot/bcm2711-rpi-4-b.dtb to UBUNTU/boot/firmware/ and RASPBIAN/lib/modules/4.19.97-v8+ to UBUNTU/lib/modules.)

Edit: See https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1867428 for Ubuntu bug report.

rohbotics commented 4 years ago

Oh thats awesome.

Also I had no idea raspbian had 64 bit support, when did that get added?

rohbotics commented 4 years ago

Also I will merge this after testing it on a non-64bit pi.

andreasBihlmaier commented 4 years ago

Since around September 2019 (cf. https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=250730) Raspbian ships with a 64-bit kernel, which must be activated manually. However, so far there is no 64-bit userland. Ubuntu (18.04) in contrast is 64-bit kernel and userland.