Nicole Portas пре 1 месец
родитељ
комит
1140b362b6
1 измењених фајлова са 23 додато и 138 уклоњено
  1. 23 138
      README.md

+ 23 - 138
README.md

@@ -1,149 +1,34 @@
-# ArduPilot Custom Firmware Builder
+# ArduPilot Custom Firmware Builder (EqualMass Edition)
 
-## Table of Contents
-1. [Overview](#overview)
-2. [Live Versions](#live-versions)
-3. [Running Locally Using Docker](#running-locally-using-docker)
-4. [Running Locally Without Docker on Ubuntu](#running-locally-without-docker-on-ubuntu)
-5. [Directory Structure](#directory-structure)
-6. [Acknowledgements](#acknowledgements)
+## 🛠EqualMass Customization Layer (Added Feb 2026)
 
-## Overview
-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.
+This repository has been customized to support a persistent, automated **Patch Management System**. These modifications allow for custom source code injection and regional data integration while maintaining a production-grade infrastructure on Debian 13.
 
-## Live Versions
-- **Stable Version:** The stable version of the ArduPilot Custom Firmware Builder can be accessed at [custom.ardupilot.org](https://custom.ardupilot.org).
-- **Beta Version:** We maintain a beta version available at [custom-beta.ardupilot.org](https://custom-beta.ardupilot.org) where newly developed features are tested before they are rolled out in the stable version.
+### 📁 Modified & New Files
+* **`docker-compose.yml`**: Updated to include the `overlay-manager` sidecar service and shared volumes for persistent code injection.
+* **`builder/builder.py`**: Modified to detect custom source files in the `/srv` directory. The engine now automatically merges these overlays into the ArduPilot source tree before the Waf compiler begins the build.
+* **`web/templates/index.html`**: The main dashboard now features a stylized "Patch Manager" bridge button in the navigation bar to allow seamless switching between the builder and the sidecar.
+* **`overlay_manager/` (New Service)**: 
+    * `main.py`: A FastAPI-based engine designed to manage (Upload/Edit/Delete) custom source files within the Docker environment.
+    * `templates/index.html`: A custom UI for managing patches, matching the ArduPilot ecosystem aesthetic.
+    * `static/logo.png`: Localized branding assets for the sidecar interface.
 
-## Running Locally Using Docker
-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:
+### 🌐 Network & Routing Architecture
+The system is unified behind an **Nginx Reverse Proxy** to provide a professional, single-domain experience:
+* **Main Builder UI**: `https://ardupilot.equalmass.com/` (Proxied to port `11080`).
+* **Patch Manager**: `https://ardupilot.equalmass.com/patch-manager/` (Proxied to port `11081`).
+* **SSL Termination**: Managed via Nginx for the `equalmass.com` domain.
 
-1. **Install Docker and Docker Compose:** Make sure Docker and Docker Compose are installed on your machine. For installation instructions, visit the [Docker website](https://docs.docker.com/engine/install).
-   
-2. **Clone the Repository:**
-   ```bash
-   git clone https://github.com/ardupilot/CustomBuild.git
-   cd CustomBuild
-   ```
 
-3. **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.
+---
 
-   ```bash
-   cp ./examples/.env.sample .env
-   ```
+## ArduPilot Custom Firmware Builder (Original Documentation)
 
-4. **Build and Start the Docker Containers:**
-   - To build and start the application, run:
-     ```bash
-     sudo docker compose up --build
-     ```
-   - If you want to run the application with the last built image, simply execute:
-     ```bash
-     sudo docker compose up
-     ```
+This is the web application for ArduPilot's custom firmware builder. It allows users to build custom ArduPilot firmware by selecting the features they want to include.
 
-   Use the `-d` flag to run the application in daemon mode:
-   ```bash
-   sudo docker compose up -d
-   ```
+### 🛠️ Development
 
-   **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.
+You can run the application using Docker and Docker Compose:
 
-5. **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.
-
-6. **Stopping the Application:**
-   To stop the application, you can use the following command:
-   ```bash
-   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.
-
-## Running Locally Without Docker on Ubuntu
-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](https://ardupilot.org/dev/docs/building-setup-linux.html) if necessary.
-
-1. **Clone the Custom-Build Repository:**
-   ```bash
-   git clone https://github.com/ardupilot/CustomBuild.git
-   cd CustomBuild
-   ```
-2. **Create and use a virtual environment:**
-   ```bash
-   python3 -m venv path/to/virtual/env
-   source path/to/virtual/env/bin/activate
-   ```
-
-   If the python venv module is not installed, run:
-   ```bash
-   sudo apt install python3-venv
-   ```
-
-   To deactive the virtual environment, run:
-   ```bash
-   deactivate
-   ```
-
-3. **Install Dependencies:**
-   ```bash
-   pip install -r web/requirements.txt -r builder/requirements.txt
-   ```
-
-   If pip is not installed, run:
-   ```bash
-   sudo apt install python3-pip
-   ```
-
-4. **Install and Run Redis:**
-   Use your package manager to install Redis:
-   ```bash
-   sudo apt install redis-server
-   ```
-   Ensure the Redis server is running:
-   ```bash
-   sudo systemctl status redis-server
-   ```
-
-5. **Execute the Application:**
-   - For a development environment with auto-reload, run:
-     ```bash
-     python3 web/main.py
-     ```
-     To change the port, use the `--port` argument:
-     ```bash
-     python3 web/main.py --port 9000
-     ```
-   - For a production environment, use:
-     ```bash
-     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.
-
-6. **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](https://www.uvicorn.org/) for additional configuration options.
-
-## Directory Structure
-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.
-
-## Acknowledgements
-This project includes many valuable contributions made during the Google Summer of Code 2021. For more information, please see the [GSOC 2021 Blog Post](https://discuss.ardupilot.org/t/gsoc-2021-custom-firmware-builder/74946).
+```bash
+docker-compose up --build