Re: Build Issue Toyota IVI-home screen on MacOS M1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Joel,
think i got it thank you
this stuff is all very new and rather exciting for the likes of me, so see how i go

regards


  



Bernard Craddock
Co-founder Pumped Fuel
L2, 11 York Street Sydney 2000


On Fri, Feb 11, 2022 at 4:14 AM Joel Winarske <joel.winarske@xxxxxxxxx> wrote:
Hi Bernard,

You need to build the qemuarm64 agl-image-flutter image via Linux.  Then you use the build artifacts directly on the M1 Mac terminal window via Qemu.  The same pattern as used with the qemux86-64 build, which is why I shared the CI job.  It's a reference to a known working build of the image.

The FLUTTER_SDK_TAG is associated with the Flutter Gallery commit.  Depending on what you change FLUTTER_SDK_TAG to, there is a potential the engine build fails due to a missing X11 dependency; just keep that in mind.  So unless you have a feature or reason you need that requires changing the SDK tag, I would avoid the potential busy work.

Joel

On Thu, Feb 10, 2022 at 1:06 AM Bernard <bernard@xxxxxxxxxxxxxx> wrote:
Hi Joel,

nope, haven't yet tried as we haven't had much luck doing anything on M1, but if you've got it working then sure we'll give it a go
Did you build on UTM for Mac using Ubuntu or something else?
Yes i see the 3 flutter recipe images and not sure i understand what the AGL health gate CI jobs but i'll have a play
I also noticed local.conf FLUTTER_SDK_TAG is "2.8.0-3.3.pre" which is now a little dated, can i change to "2.10.0-0.3.pre" or will that break something

please advise
regards
Bern

Bernard Craddock
Co-founder Pumped Fuel
L2, 11 York Street Sydney 2000


On Thu, Feb 10, 2022 at 9:32 AM Joel Winarske <joel.winarske@xxxxxxxxx> wrote:
Hi Bernard,

For arm64 have you tried building and running a qemuarm64 AGL build on the M1?  

I tried it.  The image boots and runs the stack, only there is some terrible input latency.  Not sure what that was, but it does run.  qemuarm64 would be the preferred route for AGL Flutter on Apple M1 hardware.  I don't have time right now to look at the latency issue, but it could just be a matter of dialing in the CLI options.

In agl-devel there are three images that provide the Flutter stack working with the agl-compositor:
* agl-image-flutter (Flutter Engine Runtime = Release)
* agl-image-flutter-debug  (Flutter Engine Runtime = Debug)
* agl-image-flutter-profile  (Flutter Engine Runtime = Profile)

For meta-flutter I have two AGL health gate CI jobs here:


Cheers,
Joel

On Wed, Feb 9, 2022 at 2:46 AM Bernard <bernard@xxxxxxxxxxxxxx> wrote:
Hi Joel
just circling back on this after some playing around the flutter embedder build works just fine on Mac x64, the M1 is ongoing
we also put some notes together here if anyone is interested.

regards 

Bernard Craddock
Co-founder Pumped Fuel
L2, 11 York Street Sydney 2000


On Mon, Jan 17, 2022 at 9:21 AM Joel Winarske <joel.winarske@xxxxxxxxx> wrote:
That said taking this approach you need to cross compile the engine for aarch64.

Another approach is to simply run AGL Flutter aarch64 build on an M1 using QEMU.

On Sun, Jan 16, 2022, 1:51 PM Joel Winarske via lists.automotivelinux.org <joel.winarske=gmail.com@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi Bernard,

I would suggest using UTM on the M1.  I am using Ubuntu 20.04 on my M1 max via UTM.  It's easy to set up and it worked the first try.

Using Ubuntu 20.04 there is no deviation from the documentation on how to build, etc.

Joel


On Sat, Jan 15, 2022 at 11:34 PM Bernard <bernard@xxxxxxxxxxxxxx> wrote:
Giday Joel,
We gave this a crack taking the road least traveled scenario 2,  parallels running Wayland cross compile flutter-engine for host (arm64).
My flutter dev running Mac/M1 gave up too many issues, If you get it working please share.
So I had a go on my Mac/x86 and got as far asm/types.h file not found., and when searching my local I have multiple copies, so which to use and how to include.

/home/parallels/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/linux/types.h:21:10: fatal error: 'asm/types.h' file not found

#include <asm/types.h>


We're not embedded or even 'c' programmers so it's all a bit of a mystery, only as your time permits if you can advise which and how to include asm/types.h i'll give it another whirl
Also attached for our internal benefit steps taken doc and log  flutter_embedded build steps Intel Mac Parallels Ubuntu 
lastly just for good measure i repeated same on windows/x86 WSL2 and also got asm/types.h not found

thanks and regards
Bern

Bernard Craddock
Co-founder Pumped Fuel
L2, 11 York Street Sydney 2000


On Fri, Nov 12, 2021 at 3:48 AM Joel Winarske <joel.winarske@xxxxxxxxx> wrote:
Hi Bernard,

Two scenarios:
1. Run emulated x86_64 on arm64 via QEMU (Lamprey AGL emulator image, use cross compiled bits; deal with performance loss - maybe not bad if virtualgl passthrough works)
2. In parallels environment that runs Wayland cross compile flutter-engine for host (arm64).  Build ivi-homescreen to use this flutter-engine by overriding/setting variables during cmake invocation.  This is supported today.  The "ci" branch of https://github.com/jwinarske/flutter_embedded will help with building the flutter-engine.

I might suggest focusing on scenario 1 as that has the least amount of variation.  Only unknown is if/how-well virtualgl passthrough works - or not.

That said, I'm expecting a new MBP M1X (64GB) in a few weeks, so I will be trying both myself at that time.

Cheers,
Joel


On Tue, Nov 9, 2021 at 8:01 AM Bernard <bernard@xxxxxxxxxxxxxx> wrote:
Hello Joel and AGL members,
for our flutter dev we use Mac's as it's a mandatory requirement within Apple's walled garden of iOS apps. So for the Linux desktop we adopted Mac Parallels Ubuntu 20.04.2.

I have Mac intel (x86_64) and was able to get Pumped Fuel working on Toyota IVI homescreen easily enough albeit looks kind of sketchy compared to standard linux desktop, needs beautifying

However my colleague, our flutter developer, who has a Mac M1 (arm) is blocked on the build. Can anyone help us out and advise what can be done to get this working on the M1.

Hi Bernard,
I was trying to build https://github.com/toyota-connected/ivi-homescreen on the Parallels ubuntu, where I've hit a roadblock.
I was following the Readme steps. One thing I noticed was that the notes are for x86_64 architecture, but my ubuntu is arm64. I am not sure if that is the reason for the failure. While following GCC/libstdc++ Build in the Readme.md it failed in make install -j step
The error thrown was 
/usr/bin/ld: ../libflutter_engine.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
make[2]: *** [shell/CMakeFiles/homescreen.dir/build.make:596: shell/homescreen] Error 1
make[1]: *** [CMakeFiles/Makefile2:94: shell/CMakeFiles/homescreen.dir/all] Error 2
make: *** [Makefile:152: all] Error 2


Seems like it is because of the architecture difference x86_64 vs ARM64. if possible can you confirm this from the writer (if you have contacts / access).

Regards


Bernard Craddock
Co-founder Pumped Fuel
L2, 11 York Street Sydney 2000

_._,_._,_

Links:

You receive all messages sent to this group.

View/Reply Online (#9669) | Reply To Group | Reply To Sender | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [list-automotive-discussions82@xxxxxxxxxxx]

_._,_._,_

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux