muhkuh-sys / org.muhkuh.tools-flasher

The flasher is an application for systems based on the Hilscher "netX" CPU. It writes data to flash or EEPROM chips.
GNU General Public License v2.0
2 stars 6 forks source link

How to build this flasher in Yocto environment? #66

Open pblxptr opened 8 months ago

pblxptr commented 8 months ago

I'm trying to build this flasher in Yocto ecosystem as a part of my meta-layer, however, I have some difficulties. My target architecture is aarch64 - which seems to be supported, however provided CMakeLists.txt seems to require a compilation for a particular distro e.g. Ubuntu 22.04 etc, which is not a case in the context of Yocto. Is there a workaround I could use to include building this flasher in Yocto?

da151575 commented 3 months ago

I have a similar problem (I was just trying to see if I could build for custom arm64 linux build with yocto on x86_64 ubuntu by editing the build scripts and cmake files and it was proving "problematic"). Then I read that the code "doesn't require an operating system" so I tried downloading the pre-built ubuntu arm64 image from releases. And it runs on our NXP i.MX8 just fine. So perhaps investigate using that?

da151575 commented 3 months ago

Or if you did get it to build, I'd be very greatful if you could discuss that with me? I've got it to build right up until it wants to start installing some of the artifacts for further compilation which doesn't work because I'm cross-compiling.

pblxptr commented 3 months ago

I was also trying to modify build scripts but this is madness that gave me a headache. So far I've been working on something different but I will probably go a way you mentioned, will use build for ubuntu ARM64 and provide necessary libraries if needed. The other solution that I guess could work is to use flasher inside a Docker environment running on a target device.

da151575 commented 3 months ago

"...this is madness that gave me a headache..." 🤣 agreed... I believe (don't sue me if I'm wrong) the Ubuntu build is statically linked, so you shouldn't need any libraries...