-
Notifications
You must be signed in to change notification settings - Fork 128
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
Test on arm devices #4
Comments
@Mai-Matsuura Could you try testing on Raspberry Pi4? |
Yes, I will try it. |
Observations from my devices:
Currently I can't verify on my desktop system using RX6800 (main desktop environment - Plasma Wayland). For whatever reason the Dart VM snapshot version doesn't match:
|
Thank you for your comment.
The first problem is that the Flutter SDK and Engine ( But I need to update README. |
Thank you for the information! This makes it a lot easier to verify if the correct versions are in use. The issue on my x64 machine could lie somewhere else as the versions are indeed matching 🤔 I will clean and update my setup later today to ensure there are no lingering caches remaining. I've already thoroughly cleaned the Flutter SDK && sample projects but I haven't done the same for the Versions matching
|
Update with RK3399 system - PinebookPro running ManjaroARM kernel
Detailed log with lldb
|
Small update towards my experiments on x64 with my Ryzen/RDNA2 machine:
The closest Flutter ticket to what I experience appears to be this one: flutter/flutter#64849 |
Hi, I follow your work regarding flutter and embedded for a while already and I am very happy about it, because I share the same view of Sony regarding flutter and embedded linux! And it's amazing to see it running now on embedded devices.. Now lets come to my test:
So far from my side. I am looking forward to the cross compile feature! If someone can give me a hint how to generate the app.so manually on an x64 (without the needs to wait the related PR to be merged) would also be cool. |
Thank you for your comments. Those are helpful.
I fixed that (#22) |
In terms of cross-building, I'm going to send a PR to add cross-building support into the Flutter SDK. I'll do it in March.
|
@HidenoriMatsubayashi |
After reading the provided link I was still unsure where to get the correct gen_snapshot from. But now I just realized that building the engine for arm64 on x64 will produce a gen_snapshot in clang_x64/exe.unstripped folder with simarm64 target. So this one can be used on x64 to "cross-compile" the app.dill to app.so for arm64. Thanks for your help! |
@LefixBlue check #21 for:
I agree that side-stepping the GTK app compile will be great once the embedder matures enough :) |
Had some fun doing something unconventional tonight by compiling the embedder on MSM8916 device (Wileyfox Swift) with postmarketOS. It resulted in the following errors: pmOS linker errors
The errors have less to do with the embedder itself and more with Flutter/ Alpine linux. There are several issues with the method I've use to conduct the attempt on this device tonight:
I will need to prepare a proper setup and try again but thought it would be interesting to share nonetheless. |
Some new input from my side as well: Building the "flutter-weston-dekstop-shell" not succeed in my environment. It already failed on my first attempt directly on the raspberry pi some days ago, but now I retried building it cross with yocto and getting the same result.
|
Thank you for your report! Actually, Weston is not backward compatible and we are looking for ways to support multiple versions. See also: #3 |
Havn't noticed #3 yet. |
No. Thank YOU! |
I've tried on i.MX 8M Mini EVK (OS: Zeus, imx-5.4.70-2.3.1.xml), but the embedder with DRM backend didn't work. Wayland backend is no problem.
|
Wohoo! After some extensive cleanup on my host machine, I've found the offending piece causing me problems with the So, I can finally confirm - the embedder does work with AMD RX6800 with the open source drivers using both the DRM and wayland clients. Mesa version installed on the x64 system - |
I also had a try on the actual iMX8M-MiniEVK BSP Release (OS: Gatesgarth 5.10.9) with the drm-backend. |
We want to support the i.MX8M platform, so we need to investigate this issue. I think i.MX8M supports DRM and actually, Weston which uses the DRM backend works on i.MX8M mini. I'll investigate this week. Please tell me more if you have any information. |
I am unfortunately not that deep into all these graphical backend stuff.. The only thing I observed today is that I ran into the same build-error like someone reported in #30 while building the drm-backend cross with yocto. You mentioned in #30 that the No idea if that helps. |
If it's a bug, I'd like to fix it. Now, we are preparing yocto recipe examples.
|
I tested on i.MX8M-Mini with the toolchain generated by Yocto. Unfortunately, this doesn’t works. The Yocto’s toolchain doesn’t put the cross tools (cross-compiler, linker, etc) in the /usr/bin/ folder, instead they are in /usr/bin// The toolchain sets the environment variables “CC”, “CXX”, “CLANGCC”, “CLANGCXX” and “LD” to the location of the corresponding cross-tools in /usr/bin// but flutter-elinux doesn’t seems to use these environment variables, like a traditional ‘Make’ would. Instead flutter-elinux looks for the cross-tools directly in /usr/bin/ but with the Yocto’s toolchain, it’s the native x86 tools at this location. Is there a way to tell flutter-elinux to look for the cross-tools in a specific folder ? |
A quick update:
Now I am able to cross-compile using flutter-elinux and the SDK generated by Yocto. |
Hi @topolittle , See my comment here: sony/meta-flutter#27 Another way to cross build flutter app with Yocto SDK is to patch flutter-elinux to use the correct compiler triple. I wasn't aware of editing the cmake toolchain file like you mentioned also does the trick. I would prefer to add a cmdline argument to elinux where the compiler-target/triple can be specified for cross building. Regarding sony/flutter-elinux#70: |
Hi, Cross compiling with a pure Yocto Poky dunfell SDK fails. The following can be made to Build a dunfell Poky SDK: git clone git://git.yoctoproject.org/poky.git -b dunfell cat >> conf/local.conf << EOF bitbake-layers add-layer ../meta-clang bitbake core-image-weston -c populate_sdk tmp/deploy/sdk/poky-glibc-x86_64-core-image-weston-aarch64-qemuarm64-toolchain-3.1.15.sh Source the SDK git clone https://github.com/sony/flutter-elinux.git =====> Linker error since it is the Yocto x86_64 ld that is used and not the cross-build ld. Modifying the SDK file OEToolchainConfig.cmake to include these two lines does not help. Editing the flutter-elinux files from aarch64-linux-gnu to aarch64-poky-linux does not help either. |
Could you try the following? $ export CC=${CLANGCC}
$ export CXX=${CLANGCXX}
$ flutter-elinux create exampleapp
$ cd exampleapp
$ flutter-elinux build elinux --target-arch=arm64 See also: https://github.com/sony/meta-flutter#cross-building-using-yocto-sdk |
Thanks for the response. Unfortunately it makes no difference. The linking still goes wrong. |
Could you inform me of the error messages? |
@HidenoriMatsubayashi . Yes, sure.
|
Here is what I done to patch the Yocto's SDK to make it works with flutter-elinux.
In a nutshell, it disables the compiler test for C and C++, it sets the target architecture and it swaps the x86_64 and the ARM64 linker since the SDK is using the wrong linker. I am running with this fix for months without any issues. |
Thank you very much. I'd like to add the doc how to build with Yocto SDK in flutter-elinux. Could you summarize how to build? I'll copy and paste your document into here. |
Hi @HidenoriMatsubayashi @topolittle @atornqvist , as far as i remember (I built everything for/with imx-yocto zeus release 2 months ago) I just had to patch flutter-elinux to match the compiler-triple used in Yocto: The file: The patched two lines: And ensure a rebuild of flutter-elinux afterwards! Then set the Yocto-SDK environment and build the application with flutter-elinux I havn't tried it with yocto-dunfell yet. So the time I built it, I thought it would be enough to let flutter-elinux allow to give the compiler-triple (in our case: 'aarch64-poky-linux') as a cmd-line argument. |
@LefixBlue Thank you for your comment.
I'll create a patch! Please watch sony/flutter-elinux#48 |
Now, I added |
That looks good to me! I will try the new option in my environment as soon as I'll have some free time. |
@HidenoriMatsubayashi @LefixBlue Looks good. I made a quick test. It does not make any difference in my build. What makes it build is the changing of the ld as @topolittle suggest with:
What I can see in the build is that it is "clang++" that is used and not "aarch64-poky-linux-clang++". Then it will be the clang++ in the SDK directory that will used and that uses the x86_64 "ld". |
@atornqvist @HidenoriMatsubayashi For the triplets, is not possible to move the clang compiler binaries like I do for the linker. The compiler in both folder are the same binaries and when invoked, they behave according to their filename, somewhat like busybox do. Setting CMAKE_C_COMPILER_TARGET and CMAKE_CXX_COMPILER_TARGET in the toolchain cmake configuration file make it use the right compiler path and filename. |
Hi, the compiler triplet does not seem to be used for CXX since flutter-elinux/lib/elinux_build_target.dart line"environment: <String, String>{'CC': 'clang', 'CXX': 'clang++'}" sets it to "clang++". Deleteing that line makes the cross build work fine with Poky dunfell. No changes in the toolchain cmake file is needed as long as the environment is set with this: As reference the situation can be reproduced with:
|
@atornqvist Perhaps, Case 2: Use Yocto SDK helps you. |
The moving of ld is not required if the flutter-elinux/lib/elinux_build_target.dart is modified as above. Then the CXX environment variable can be used to specify the appropriate clang++ that contains the toolchain triple for cross-building which will result in a working usage of ld. |
Thank you!!! I have the same problem as you.Executing the followings you mentioned solves my problem. |
Has anyone ever tried flutter with stm32mp15 on kirkstone branch? I've been trying for days but could not able to build an sdk for my flutter application. |
Hi @ALL root@imx8mm-var-dart:~/my_app# flutter-client -b /home/root/my_app/build/elinux/arm64/release/bundle/ Flutter version root@imx8mm-var-dart:~/my_app# flutter-elinux run -d elinux-wayland --release Flutter run key commands. Application finished. |
Please try:
|
Hi, after removing the flutter/bin/cache directory and then running root@imx8mm-var-dart:/opt/flutter-elinux/flutter/bin/cache# rm -rf * ! Doctor found issues in 4 categories. root@imx8mm-var-dart:~/my_app# flutter-client -b /home/root/my_app/build/elinux/arm64/release/bundle/ Steps to reproduce:
Please let me know if anything else is required from my side. |
Also while running
Let me know if these warnings are okay or not |
Hi, |
This issue is a memo for testing on different arm devices. I would like to test on a lot of arm devices.
Tested devices
Jetson Nano (OS: Ubuntu 18.04, JetPack)
Raspberry Pi4 (OS: Ubuntu 20) Doesn't work on Raspberry Pi4 when using DRM backend #9
i.MX 8M Mini EVK (OS: Zeus, imx-5.4.70-2.3.1.xml)
DRM backendNXP doesn't support EGL for GBM.RB5 (OS: Based Ubuntu 18.04)
Wayland backendWeston version is 3.0 and it doesn't support xdg-shellThe text was updated successfully, but these errors were encountered: