PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.12k stars 13.34k forks source link

Cloud build (customization) support for PX4 #21548

Open junwoo091400 opened 1 year ago

junwoo091400 commented 1 year ago

Describe problem solved by the proposed feature

As described in https://github.com/mavlink/qgroundcontrol/issues/10676, betaflight currently provides a 'cloud build', which essentially allows users to have custom-built target (with custom set of drivers, features, etc).

image

In the betaflight configurator (equivalent to QGC), the custom build options are shown as indicated in red marking in the screenshot above, and users can easily build a target binary with custom options and have it directly flashed in the UI, which is amazing!

This is done via having the cloud service with a docker build environment, building a target with a specified build flags (e.g. -DUSE_SDCARD) in the make command. This is the script.

Note: Cloud build feature is also supported in Ardupilot.

Benefits

I think having this cloud build feature will enhance PX4 in following ways:

Describe your preferred solution

So far, I am uncertain if in PX4 build, such options like -DUSE_SDCARD for the make command exists. Since we are more using the KConfig architecture, defining the inclusion of drivers and features via .px4board files, I am uncertain how we would make this CLI compatible. @PetervdPerk-NXP I would love to know your thoughts on this!

However, if we can indeed specify the build options in the CLI, having the cloud build service set up wouldn't be a big hassle, as we can benchmark betaflight's implementation: https://github.com/betaflight/cloudbuild

p.s. Example of how betaflight transitioned USE_SDCARD flag to be cloud build compatible can be found here: https://github.com/betaflight/betaflight/pull/11947/files

Other

Note, the notion of 'selecting (custom) build variants' was also introduced in this PR https://github.com/PX4/PX4-Autopilot/pull/19848#issuecomment-1191590296, but was left unfinished for now.

PetervdPerk-NXP commented 1 year ago

I don't know the specifics of cloud-build, configuring flexibility and security.

But you could re-use the work of #17180 but then instead of using Qt for the frontend you create a web-based GUI with something like twisted.

DronecodeBot commented 3 months ago

This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/how-to-build-get-specific-firmware-release-as-v-1-14-3/38804/3