This is a customised Ardupilot firmware builder which allows to integrate custom patches, recall old builds etc. This is hosted on a private server but publicly accessible and the source code can be downloaded by anyone. Detailed instruction on how to build your custom firmware patcher based with this code are in the readme below. A live version of this app can be accessed here: https://ardupilot.equalmass.com
|
|
1 місяць тому | |
|---|---|---|
| .github | 2 місяців тому | |
| ap_git | 1 рік тому | |
| build_manager | 1 місяць тому | |
| builder | 1 місяць тому | |
| examples | 10 місяців тому | |
| metadata_manager | 2 місяців тому | |
| overlay_manager | 1 місяць тому | |
| scripts | 10 місяців тому | |
| utils | 11 місяців тому | |
| web | 1 місяць тому | |
| .flake8 | 2 місяців тому | |
| .gitignore | 11 місяців тому | |
| LICENSE | 5 роки тому | |
| README.md | 1 місяць тому | |
| Vagrantfile | 4 роки тому | |
| docker-compose.yml | 1 місяць тому |
The ArduPilot Custom Firmware Builder is a web-based application designed to generate downloadable customized ArduPilot firmware, tailored to user specifications. This tool facilitates the customization and building of firmware by allowing users to select the options that best fit their needs, thus providing a streamlined interface for creating ArduPilot firmware.
To minimize setup overhead and enhance ease of use, running this application in Docker containers is highly recommended. Follow the instructions below to run the application locally using Docker:
Install Docker and Docker Compose: Make sure Docker and Docker Compose are installed on your machine. For installation instructions, visit the Docker website.
Clone the Repository:
git clone https://github.com/ardupilot/CustomBuild.git
cd CustomBuild
Configure Environment Variables:
Copy the .env file to the root of the cloned repository from ./examples/.env.sample and configure the necessary parameters within it.
cp ./examples/.env.sample .env
Build and Start the Docker Containers:
To build and start the application, run:
sudo docker compose up --build
If you want to run the application with the last built image, simply execute:
sudo docker compose up
Use the -d flag to run the application in daemon mode:
sudo docker compose up -d
Note: When starting the application for the first time, it takes some time to initialize the ArduPilot Git repositories at the backend. This process also involves populating the list of available versions and releases using the GitHub API, so please be patient.
Access the Web Interface:
The application binds to port 11080 on your host machine by default. Open your web browser and go to http://localhost:11080 to interact with the web interface. To change the port, set the WEB_PORT environment variable in the .env file mentioned in the Configure Environment Variables section.
Stopping the Application: To stop the application, you can use the following command:
sudo docker compose down
This will stop and remove the containers, but it will not delete any built images or volumes, preserving your data for future use.
To run the ArduPilot Custom Firmware Builder locally without Docker, ensure you have an environment capable of building ArduPilot. Refer to the ArduPilot Environment Setup Guide if necessary.
Clone the Custom-Build Repository:
git clone https://github.com/ardupilot/CustomBuild.git
cd CustomBuild
Create and use a virtual environment:
python3 -m venv path/to/virtual/env
source path/to/virtual/env/bin/activate
If the python venv module is not installed, run:
sudo apt install python3-venv
To deactive the virtual environment, run:
deactivate
Install Dependencies:
pip install -r web/requirements.txt -r builder/requirements.txt
If pip is not installed, run:
sudo apt install python3-pip
Install and Run Redis: Use your package manager to install Redis:
sudo apt install redis-server
Ensure the Redis server is running:
sudo systemctl status redis-server
Execute the Application:
For a development environment with auto-reload, run:
python3 web/main.py
To change the port, use the --port argument:
python3 web/main.py --port 9000
For a production environment, use:
uvicorn web.main:app --host 0.0.0.0 --port 8080
During the coding and testing phases, use the development environment to easily debug and make changes with auto-reload enabled. When deploying the app for end users, use the production environment to ensure better performance, scalability, and security.
The application will automatically set up the required base directory at ./base upon first execution. You may customize this path by setting the CBS_BASEDIR environment variable.
Access the Web Interface:
Once the application is running, you can access the interface in your web browser at http://localhost:8080.
The default port is 8080, or the value of the WEB_PORT environment variable if set. You can override this by passing the --port argument when running the application directly (e.g., python3 web/main.py --port 9000) or when using uvicorn (e.g., uvicorn web.main:app --port 5000). Refer to the uvicorn documentation for additional configuration options.
The default directory structure is established as follows:
/home/<username>
└── CustomBuild
└── base
├── ardupilot (used by the web component)
├── artifacts
├── configs
| └── remotes.json (auto-generated, see examples/remotes.json.sample)
├── secrets
| └── reload_token (optional)
├── tmp
└── ardupilot (used by the builder component)
The build artifacts are organized under the base/artifacts subdirectory.
This project includes many valuable contributions made during the Google Summer of Code 2021. For more information, please see the GSOC 2021 Blog Post.