I am trying to cross compile lvgl from Linux x86_64 to arm64 for simple operation on /dev/fb0
I cloned the git repository from here: https://github.com/lvgl/lv_port_linux_frame_buffer.git, along with the recursive lv_drivers and lvgl submodules. I used the following cmake cross toolchain file:
type or pas# the name of the target operating system set(CMAKE_SYSTEM_NAME Linux) # which compilers to use for C and C++ set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc) set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++) # where is the target environment located set(CMAKE_FIND_ROOT_PATH /usr/aarch64-linux-gnu /media/user/system) # adjust the default behavior of the FIND_XXX() commands: # search programs in the host environment set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # search headers and libraries in the target environment set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
This cam very close to working. It compiles fine and gets all the way to the final link of lvgl_fb and then fails with the following error:
/usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: cannot find -lwayland-client /usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: cannot find -lwayland-cursor /usr/lib/gcc-cross/aarch64-linux-gnu/7/../../../../aarch64-linux-gnu/bin/ld: cannot find -lxkbcommon collect2: error: ld returned 1 exit status CMakeFiles/lvgl_fb.dir/build.make:117: recipe for target 'lvgl_fb' failed make: *** [lvgl_fb] Error 1 CMakeFiles/Makefile2:124: recipe for target 'CMakeFiles/lvgl_fb.dir/all' failed make: *** [CMakeFiles/lvgl_fb.dir/all] Error 2 Makefile:135: recipe for target 'all' failed make: *** [all] Error 2
This is not surprising, as I do not have wayland on the target system, nor do I want wayland on the target system. I would like lvlg to access /dev/fb0 directly without wayland.
Is this possible? If so, what do I need to do?
(As an aside, I did try and cross compile wayland for my arm64 linux system, but it uses the meson build system which doesn’t even get past the first command on an arm64 cross compile. Wayland has no support forum.)
Any assistance is appreciated.