docs: fill out compat, lvglh, and toolchain documentation
continuous-integration/drone/push Build is failing

Replace placeholder content in doc/compat/, doc/lvglh/, and
doc/toolchain/ with comprehensive documentation derived from the
source files.

- compat: document Wasuro WASM VM compatibility shims
- lvglh: document LVGL v9.2.2 configuration, fonts, and patches
- toolchain: document all 13 build pipeline scripts
This commit is contained in:
t3hn3rd committed 2026-03-08 21:19:21 +00:00
1 parent d059ff1ffb
commit 466173613f
19 files changed
+888 -32

No files matched your search

+53 -1
View File
@@ -1 +1,53 @@
# Placeholder
# compile_vergen.sh
Generates compile-time version constants and release badges.
## Overview
`compile_vergen.sh` extracts version metadata from Git tags (using semantic versioning), gathers build statistics (line counts, file counts, tool versions), and writes them into a Pascal unit (`core.version.pas`). It also downloads shields.io SVG badges summarizing the release information.
## Prerequisites
- `git`, `wget`, `fpc`, `make`, `nasm`, `awk`, `find`, `md5sum`, and `date` must be available.
- The repository must have at least one semver-compatible Git tag reachable from HEAD.
- `compile_checksum.sh` must be present in the toolchain directory (called to generate `checksums.md5` first).
- `loc.sh` must be present in the toolchain directory.
- The `bin/`, `release/`, and `src/core/` directories must exist.
## Inputs
| Source | Description |
|--------|-------------|
| Git tags | Parsed via `git describe --tags` to extract semver components. |
| `checksums.md5` | Generated by `compile_checksum.sh`; its own MD5 is used as a build fingerprint. |
| Source tree (`src/`) | Scanned to count total files and driver files. |
| Tool versions | Queried from `fpc -h`, `make -v`, and `nasm -v`. |
## Outputs
| File | Description |
|------|-------------|
| `src/core/core.version.pas` | Pascal unit exposing version constants to the kernel at compile time. |
| `release/*.svg` | Shields.io badges for version, revision, release, line count, file count, driver count, tool versions, date, and fingerprint. |
## Behavior
1. Runs `compile_checksum.sh` to produce `checksums.md5`.
2. Downloads the `semver` shell tool from GitHub into `bin/` and adds it to `PATH`.
3. Extracts the following from `git describe --tags`:
- Major, minor, and patch version numbers.
- Pre-release label (if any).
- Build metadata.
- Short commit revision (8 characters).
4. Counts total lines of Pascal source (via `loc.sh`), total source files, and driver-specific files.
5. Queries the installed versions of FPC, Make, and NASM.
6. Records the current date and time.
7. Computes an MD5 fingerprint of `checksums.md5`.
8. Writes all values into `src/core/core.version.pas` as Pascal `const` declarations.
9. Downloads SVG badges from shields.io into `release/` for each metric. Badge download failures are non-fatal (`set +e`).
## Notes
- The `set -e` at the top causes the script to abort on any error during the critical version-extraction phase. It is relaxed (`set +e`) before badge downloads, since those are cosmetic and may fail in offline or branch builds.
- If a pre-release label is present in the tag, it is appended to the version string (e.g., `1.0.0-alpha`).
- The generated `core.version.pas` is compiled into the kernel by `compile_sources.sh`, making all version metadata available at runtime.