joelguittet / mender-mcu-client

Mender client for MCU, just because it's cool to have it
Apache License 2.0
37 stars 7 forks source link

Support platform linux with libcurl #2

Closed jkralik closed 1 year ago

jkralik commented 1 year ago

Feature

I want to ask if there is a plan for linux with libcurl (or other)

Why

For our use case mender client binary is too be big for our module with Yocto linux.

joelguittet commented 1 year ago

Hello @jkralik

Interesting use case, not sure the goal is to address it, but can you detail a bit your project before I provide a final response ? Flash device used, which bootloader, etc? For your information mender is currently rewriting the mender-client in C++. Not sure it will be smaller, but maybe yes.

Joel

jkralik commented 1 year ago

Hi @joelguittet

In our project we are using these components:

HW: CPU: A53 (GS+DT) RAM: 36 MB FLASH: 64 MB, jffs2 SW: OS: Linux (G-MCU) - yocto Boot: fsbl + u-boot

Do you know timeline of mender-client in C++ ?

joelguittet commented 1 year ago

Hello @jkralik

One of the principle of mender is to use a double rootfs and I doubt your linux distro+application can fit in only 32MB flash to permit rootfs A+B partitions ? (even it is possible with a great optimisation effort to have a small distro).

For the C++ client I recommend you to contact sales or marketing at mender. I'm not part of mender, I'm just someone who decided to developed and share an MCU client for my own projects. See also https://mender.io/client-rewrite-q-and-a.

By the way, my client is not designed for this kind of target so I will close the issue.

Regards, Joel

joelguittet commented 1 year ago

@jkralik thinking to your project, maybe there is an alternative.

Suppose you integrate the mender-mcu-client inside your application. The core part is generic and permit to schedule the requests / management of the mender API etc. On the platform side you can retrieve mbedtls part easily. The remaining modules missing are board/http/rtos parts.

You can imagine a scenario where your application is able to be self-updated if you integrate the mender-mcu-client inside. You have to save the artefact from mender locally (mender-ota.c) and then restart the application using the new binary.

You will not be able to update kernel, rootfs etc etc, but for a very small Linux platform like yours probably it's not bad.

Cheers, Joel

joelguittet commented 1 year ago

Hello @jkralik

I m currently working on a POSIX plateform support with libcurl. This is on a separated branch and should be available on master in few days.

The original purpose is to automate some testing in the github actions, and not to do a concurent of the official mender client from mender. But it can be used for your use case.

Let me a message if you are interested.

Joel

jkralik commented 1 year ago

Hi @joelguittet

Yes, it is interesting. We would like to integrate it into https://github.com/iotivity/iotivity-lite as a compilation option. This way, any developer can easily enable this feature for ESP32, Linux, and other platforms.

Jozef

joelguittet commented 1 year ago

Looks an interesting project :-) Just have to make a sub module so you can easily track the future enhancements. For the usage, you can check the tests in this repo, there is a cmakelists.txt file which will be useful for you. Let me know if you need support, feel free to open specific issues if required. I m interested by a demo of your solution when it will be ready of course!

Joel