Compare commits

..
1 Commits
Author SHA1 Message Date
t3hn3rd 63c1aa544f feature: boot.mgr replace hardcoded init sequence with dependency-driven boot manager
continuous-integration/drone/push Build is passing
Introduce boot.mgr - a self-registering, dependency-ordered boot
initialization framework with barrier-based phasing and glob pattern
matching. Units now declare their own init procedures and dependencies
via registerBoot()/registerBarrier() in their initialization sections,
boot.mgr.run() topologically sorts and executes them.

- Add src/boot/boot.mgr.pas with topoSort, glob matching, barrier
  two-pass algorithm, and boot tree printer
- Gut src/asuro.pas (kmain): now just stores multiboot info, calls
  System.init(), boot.mgr.run, and yield()
- Add initialization sections with registerBoot() to 53 existing units
- Add new units: core.pas, test.pas, driver.storage.boot.pas,
  app.wasm.pas, app.bsod.pas (factored out of asuro.pas)
- Define 9 barrier phases: immediate -> early -> middle -> storage ->
  bus -> device -> bus.late -> late -> final
- Fix xHCI ISR: exclude PRC/WRC from PORTSC change bit clearing to
  prevent race with port reset busy-wait
- Fix driver.bus.usb.core fire_completion_hooks: guard against uint32
  underflow when CompletionHookCount = 0
- Move auto_mount_volumes from device barrier to late barrier so it
  runs after PCI scan discovers storage controllers
- Add toolchain/compile_initcalls.sh for boot entry extraction
- Add Boot Registration sections to all 51 doc files; create 4 new
  doc files; rewrite boot.mgr.md; update mkdocs.yml nav
2026-03-12 19:19:10 +00:00
54 changed files with 557 additions and 71018 deletions

No files matched your search

-1
View File
@@ -17,7 +17,6 @@ steps:
- name: compile
image: t3hn3rd/asuro-build:latest
pull: always
depends_on:
- build-image
commands:
+1 -5
View File
@@ -19,8 +19,4 @@ lessons_learnt.md
wasuro
src/core/core.version.pas
site/*
!site/.gitkeep
/src/boot/dangling_units.inc
/lib/dangling/
.moderne
CLAUDE.md
!site/.gitkeep
+5 -5
View File
@@ -1,5 +1,4 @@
ARG RECIPES_IMAGE=t3hn3rd/moderne-asuro-recipes:0.1.1@sha256:eaf54188053511dad9c620a8fb98b0f50c41770cd49a0b3d71a0538386522011
FROM ${RECIPES_IMAGE}
FROM ubuntu:latest
VOLUME ["/code"]
@@ -7,8 +6,8 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN dpkg --add-architecture i386
RUN apt-get update && apt-get install -y \
curl dos2unix wget git make nasm binutils xorriso grub-pc-bin gcc gcc-multilib \
python3 python3-pip python3-pil && \
apt-get clean && rm -rf /var/lib/apt/lists/*
python3 python3-pip && \
apt-get clean my room
RUN pip3 install --no-cache-dir --break-system-packages "mkdocs>=1.6,<2" mkdocs-material
@@ -21,5 +20,6 @@ RUN curl -sL https://sourceforge.net/projects/freepascal/files/Linux/$FPC_VERSIO
ADD https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver /usr/bin/semver
RUN chmod +x /usr/bin/semver
WORKDIR /code
RUN find . -type f -print0 | xargs -0 dos2unix
ENTRYPOINT ["/bin/bash", "-c"]
CMD ["find toolchain -name '*.sh' -exec dos2unix {} + 2>/dev/null; find toolchain -name '*.sh' -exec chmod +x {} +; bash toolchain/compile.sh"]
CMD ["find toolchain -name '*.sh' -exec dos2unix {} + 2>/dev/null; find toolchain -name '*.sh' -exec chmod +x {} +; bash toolchain/compile.sh"]
-8
View File
@@ -1,8 +0,0 @@
**/.git
**/.gradle
**/build
**/.moderne
wasuro
site
lib
release
-45
View File
@@ -1,45 +0,0 @@
# Automatic boot-unit inclusion
Run the usual `docker compose build builder` and `docker compose run builder`
from Asuro. Only this repository is required. Compose and Drone use the same
Dockerfile and repository build context, producing `t3hn3rd/asuro-build:latest`.
The Dockerfile inherits the published `t3hn3rd/moderne-asuro-recipes:0.1.1` image,
pinned by digest. It already includes Java, Moderne CLI, the Pascal LST generator,
and the registered recipe. The Asuro layer installs FPC and the kernel build tools.
To upgrade tooling, publish the upstream images first and update `RECIPES_IMAGE`
in the Dockerfile to the new tag and digest. Local tooling image testing can use
`docker compose build --build-arg RECIPES_IMAGE=<local-tag> builder`.
`ASURO_ARCH` selects the source architecture, defaulting to `x86`. For example:
```sh
export ASURO_ARCH=x86
docker compose run --rm builder
```
Compose forwards this variable to the builder; Drone inherits it from its compile
environment. Only `src/arch/$ASURO_ARCH` is added to FPC's unit search paths.
Other architecture folders are excluded from LST generation and from the recipe's
dependency graph and results. Common units outside `src/arch` remain eligible.
The selected architecture folder must exist. This source selection does not
change the existing i386 compiler target, assembly stub, or linker settings;
an x86_64 port still needs those platform-specific changes.
`compile_dangling.sh` runs after Wasuro synchronization and before FPC. It copies
only `src/` and `compat/` into an isolated temporary analysis repository, generates
LSTs with rewrite-pascal, runs the standalone Moderne recipe, exports its
datatable, and writes `src/boot/dangling_units.inc`. Wasuro is not parsed.
Datatable conversion is provided by the standalone project's Java exporter.
Parse errors, recipe failures, and malformed datatables stop the build. The
generated include is ignored by Git and removed before each generation attempt.
Use `{$DEFINE NOT_DANGLING}` near a unit declaration to exclude an experimental
or legacy unit from automatic inclusion. It can still be referenced normally.
This is a file-level marker; conditional definitions are not evaluated. The
analysis follows both interface and implementation uses, without expanding
includes or evaluating conditional compilation.
Moderne runs through its CLI normally; any license or tenant configuration
required by your CLI installation must be provided to the container separately.
No host credentials are copied into the image.
+1 -4
View File
@@ -1,8 +1,5 @@
services:
builder:
image: t3hn3rd/asuro-build:latest
build: .
environment:
ASURO_ARCH: ${ASURO_ARCH:-x86}
volumes:
- .:/code
- .:/code
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

-49056
View File
File diff suppressed because it is too large. Load diff
-3456
View File
File diff suppressed because it is too large. Load diff
-12576
View File
File diff suppressed because it is too large. Load diff
+2 -2
View File
@@ -30,8 +30,8 @@
#define LV_LIMITS_INCLUDE <limits.h>
#define LV_STDARG_INCLUDE <stdarg.h>
/* Built-in memory pool: 1 MB for complex UI (file browser etc.) */
#define LV_MEM_SIZE (1024 * 1024U)
/* Built-in memory pool: 256 KB should be plenty for our UI */
#define LV_MEM_SIZE (256 * 1024U)
#define LV_MEM_POOL_EXPAND_SIZE 0
#define LV_MEM_ADR 0
-1
View File
@@ -283,7 +283,6 @@ nav:
- Version Generation: toolchain/compile_vergen.md
- LVGL Compilation: toolchain/compile_lvgl.md
- Wasuro Pull: toolchain/compile_wasuro.md
- Automatic Boot Units: toolchain/dangling_units.md
- Source List: toolchain/compile_sourcelist.md
- Source Compilation: toolchain/compile_sources.md
- Checksum: toolchain/compile_checksum.md
Loaded 20 of 54 files, more files were not shown because too many files have changed in this diff. Show more