|
| 1 | +# Armbian Target YAML Generator |
| 2 | + |
| 3 | +This script generates Armbian CI/CD pipeline configuration YAML files from `image-info.json`. |
| 4 | + |
| 5 | +## Quick Start |
| 6 | + |
| 7 | +All configuration files should be in this directory (`release-targets/`): |
| 8 | + |
| 9 | +```bash |
| 10 | +# From repository root |
| 11 | +python3 scripts/generate_targets.py image-info.json release-targets/ |
| 12 | +``` |
| 13 | + |
| 14 | +## Configuration Files |
| 15 | + |
| 16 | +The script reads the following files from the output directory (same location as generated files): |
| 17 | + |
| 18 | +- **`targets-extensions.map`** - Manual extensions for specific boards/branches (optional) |
| 19 | +- **`targets-release-<type>.blacklist`** - Boards to exclude from each target type (optional) |
| 20 | +- **`targets-release-<type>.manual`** - Additional YAML to append to each target (optional) |
| 21 | + |
| 22 | +## Generated Files |
| 23 | + |
| 24 | +The script generates 4 YAML files with the naming pattern `targets-release-<type>.yaml`: |
| 25 | + |
| 26 | +### 1. targets-release-apps.yaml |
| 27 | +Application-specific images for conf/wip boards |
| 28 | +- `apps-ha`: Home Assistant images (Ubuntu Noble + Gnome) |
| 29 | +- `apps-openhab`: openHAB images (Ubuntu Noble + Gnome) |
| 30 | +- `apps-kali`: Kali Linux images (Kali rolling + XFCE) |
| 31 | + |
| 32 | +### 2. targets-release-standard-support.yaml |
| 33 | +Standard support release images for conf/wip boards, split by performance: |
| 34 | + |
| 35 | +**Lists:** |
| 36 | +- `stable-current-fast-hdmi`: Fast 64-bit boards with video |
| 37 | +- `stable-current-slow-hdmi`: Slow 32-bit boards with video |
| 38 | +- `stable-current-headless`: Boards without video output |
| 39 | +- `stable-vendor-fast-hdmi`: Fast 64-bit vendor branch boards |
| 40 | +- `stable-vendor-slow-hdmi`: Slow 32-bit vendor branch boards |
| 41 | +- `stable-vendor-headless`: Headless vendor branch boards |
| 42 | + |
| 43 | +**Targets:** |
| 44 | +- `minimal-stable-debian`: Debian Trixie minimal |
| 45 | +- `minimal-stable-ubuntu`: Ubuntu Noble minimal |
| 46 | +- `desktop-stable-ubuntu`: Ubuntu Noble XFCE desktop (fast-hdmi only) |
| 47 | + |
| 48 | +### 3. targets-release-nightly.yaml |
| 49 | +Nightly builds for conf/wip boards, split by performance: |
| 50 | + |
| 51 | +**Lists:** |
| 52 | +- `nightly-fast-hdmi`: Fast 64-bit boards with video |
| 53 | +- `nightly-slow-hdmi`: Slow 32-bit boards with video |
| 54 | +- `nightly-headless`: Boards without video output |
| 55 | + |
| 56 | +**Targets:** |
| 57 | +- `nightly-forky-all`: Debian Forky minimal CLI for all boards |
| 58 | +- `nightly-noble-gnome`: Ubuntu Noble GNOME desktop (fast HDMI) |
| 59 | +- `nightly-noble-xfce`: Ubuntu Noble XFCE desktop (slow HDMI) |
| 60 | +- `nightly-noble-minimal`: Ubuntu Noble minimal CLI (headless/exotic) |
| 61 | + |
| 62 | +### 4. targets-release-community-maintained.yaml |
| 63 | +Community-maintained builds for csc/tvb boards: |
| 64 | + |
| 65 | +**Lists:** |
| 66 | +- `community-current`: Current branch community boards |
| 67 | +- `community-vendor`: Vendor branch community boards |
| 68 | + |
| 69 | +**Targets:** |
| 70 | +- `community-forky-all`: Debian Forky minimal CLI for all boards |
| 71 | +- `community-noble-gnome`: Ubuntu Noble GNOME desktop (fast HDMI) |
| 72 | +- `community-noble-xfce`: Ubuntu Noble XFCE desktop (slow HDMI) |
| 73 | +- `community-noble-minimal`: Ubuntu Noble minimal CLI (headless/exotic) |
| 74 | + |
| 75 | +## Board Classification |
| 76 | + |
| 77 | +### By Performance (KERNEL_SRC_ARCH) |
| 78 | +- **Slow HDMI**: `arm` (32-bit boards) |
| 79 | +- **Fast HDMI**: `arm64`, `x86` (modern 64-bit boards) |
| 80 | +- **RISC-V**: `riscv64` (separate category) |
| 81 | +- **LoongArch**: `loongarch64` (separate category) |
| 82 | +- **Headless**: Boards with `BOARD_HAS_VIDEO: false` |
| 83 | + |
| 84 | +### By Support Level |
| 85 | +- **conf/wip**: Higher quality support (stable and nightly builds) |
| 86 | +- **csc/tvb**: Community/experimental support (community builds) |
| 87 | + |
| 88 | +## Configuration File Formats |
| 89 | + |
| 90 | +### targets-extensions.map |
| 91 | + |
| 92 | +Add manual extensions for specific boards (merged with automatic fast‑HDMI extensions): |
| 93 | + |
| 94 | +```ini |
| 95 | +# Format: BOARD_NAME:branch1:branch2:...:ENABLE_EXTENSIONS="extension1,extension2" |
| 96 | + |
| 97 | +# Add to specific branches |
| 98 | +khadas-vim1s:legacy:current:edge::ENABLE_EXTENSIONS="image-output-oowow" |
| 99 | + |
| 100 | +# Add to single branch |
| 101 | +rock-5b:current::ENABLE_EXTENSIONS="custom-extension" |
| 102 | + |
| 103 | +# Add to all branches |
| 104 | +nanopi-r4s:::ENABLE_EXTENSIONS="test-extension" |
| 105 | + |
| 106 | +# Multiple extensions |
| 107 | +board-name:current::ENABLE_EXTENSIONS="ext1,ext2,ext3" |
| 108 | +``` |
| 109 | + |
| 110 | +### targets-release-<type>.blacklist |
| 111 | + |
| 112 | +Exclude specific boards from a target type (one board name per line): |
| 113 | + |
| 114 | +``` |
| 115 | +# Lines starting with # are comments |
| 116 | +ayn-odin2 |
| 117 | +mekotronics-r58hd |
| 118 | +mekotronics-r58-4x4 |
| 119 | +bananapim5 |
| 120 | +``` |
| 121 | + |
| 122 | +### targets-release-<type>.manual |
| 123 | + |
| 124 | +Additional YAML that gets appended to the auto-generated targets section: |
| 125 | + |
| 126 | +```yaml |
| 127 | +# Ubuntu stable minimal cloud |
| 128 | +minimal-cli-stable-ubuntu-cloud: |
| 129 | + enabled: yes |
| 130 | + configs: [ armbian-cloud ] |
| 131 | + pipeline: |
| 132 | + gha: *armbian-gha |
| 133 | + build-image: "yes" |
| 134 | + vars: |
| 135 | + RELEASE: noble |
| 136 | + BUILD_MINIMAL: "yes" |
| 137 | + BUILD_DESKTOP: "no" |
| 138 | + items: |
| 139 | + - { BOARD: uefi-arm64, BRANCH: cloud, ENABLE_EXTENSIONS: "image-output-qcow2" } |
| 140 | +``` |
| 141 | +
|
| 142 | +## Automatic Extensions |
| 143 | +
|
| 144 | +All fast HDMI boards (64-bit boards with video output) automatically get: |
| 145 | +- `v4l2loopback-dkms` |
| 146 | +- `mesa-vpu` |
| 147 | + |
| 148 | +**Note**: Manual extensions from `targets-extensions.map` are MERGED with automatic extensions. |
| 149 | + |
| 150 | +## Usage |
| 151 | + |
| 152 | +```bash |
| 153 | +python3 scripts/generate_targets.py <image-info.json> <output_directory> |
| 154 | +``` |
| 155 | + |
| 156 | +Both arguments are required. The output directory should contain `targets-extensions.map` and any `.blacklist`/`.manual` files. |
| 157 | + |
| 158 | +## Example |
| 159 | + |
| 160 | +```bash |
| 161 | +# Download latest image-info.json |
| 162 | +curl -L -o image-info.json https://github.armbian.com/image-info.json |
| 163 | +
|
| 164 | +# Generate target YAML files to https://github.armbian.com/release-targets/ directory |
| 165 | +python3 scripts/generate_targets.py image-info.json release-targets/ |
| 166 | +``` |
| 167 | + |
| 168 | +## Requirements |
| 169 | + |
| 170 | +- Python 3.6+ |
| 171 | +- image-info.json (from Armbian build framework or github.armbian.com) |
| 172 | +- targets-extensions.map (optional, but recommended in output directory) |
| 173 | +- .blacklist and .manual files (optional, per target type) |
0 commit comments