Compare commits

..
Author SHA1 Message Date
t3hn3rd dd3bb1e016 Automate boot unit inclusion with architecture-aware Moderne analysis
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
- Replace boot.mgr's static unit list with generated dangling_units.inc
- Generate Pascal LSTs and run the dangling-unit recipe before compilation
- Exclude Wasuro, inactive architectures, and NOT_DANGLING units
- Add ASURO_ARCH selection with an x86 default
- Mark unfinished legacy units as NOT_DANGLING
- Inherit pinned Moderne tooling in the builder image
- Ensure Drone pulls the latest builder image
- Document the updated build pipeline in MkDocs

Validation:
- Full x86 ISO build and VirtualBox boot succeeded
- 1,133 kernel tests passed with no failures
- x86_64 build failed clearly due to unavailable sources
2026-11-07 21:49:06 +00:00
admin 7ed8012c7e Merge pull request 'feature/boot.mgr' (#71) from feature/boot.mgr into develop
continuous-integration/drone/push Build is passing
Reviewed-on: #71
Reviewed-by: Aaron Hance <[email protected]>
2026-03-14 20:38:39 +00:00
t3hn3rd e7f7325c54 Fix unicode characters
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2026-03-14 20:02:25 +00:00
t3hn3rd 516be28057 Rebase on develop: fix duplicate include.
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2026-03-13 15:49:03 +00:00
t3hn3rd 2d190c221a feature: boot.mgr replace hardcoded init sequence with dependency-driven boot manager
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-13 15:37:43 +00:00
Aaron dd56ffbcb4 Merge pull request 'feature/file_browser' (#61) from feature/file_browser into develop
continuous-integration/drone/push Build is passing
Reviewed-on: #61
2026-03-12 19:26:21 +00:00
Aaron ee7dcd107b feat(filebrowser): add delete button to toolbar, fix FAT32 delete/rename with raw sector scanning
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
- Add SYM_TRASH toolbar button wired to fb_delete_cb (was missing entirely)
- Filter '.' and '..' entries in fb_collect_cb so they never appear
- Rewrite deleteFile/deleteDir/renameFile to use raw sector scanning
  instead of getDirEntries linked-list indices (fixes  gap mismatch)
- Handle root directory correctly (use bootRecord^.rootCluster instead
  of assuming entry 0 is '.')
2026-03-11 19:41:51 +00:00
Aaron 671c144ad5 fix: FAT32 >1024 byte read/write truncation, VFS write notifications & dir watch
- FAT32 writeFile: replace hardcoded spc=4 with bootRecord^.spc for
  cluster allocation and per-sector write loop
- FAT32 writeFile: update directory entry byteSize on disk after write
- FAT32 readFile: use dir^.byteSize instead of cluster-based estimate,
  fix off-by-one in read loop, remove spurious +sectorSize allocation
- VFS: fire VFS_OnMutation on sync/async writes (cache invalidate + watch)
- VFS: invalidate all cache entries for volume on mutation (relPath mismatch)
- VFS: add vfsParentDir helper, store VFSDir in file descriptors
- FDTable: add VFSDir field, free on close
- File browser: enable directory watch & poll timer, two-step new file
  creation (open + write), remove io.syslog import
- Linker: add --no-warn-execstack to suppress ld exit code 1 on warning
- Add core.strings.helpers unit (getFileExtension, fmtFileSize, sort)
2026-03-11 19:41:51 +00:00
Aaron 8755f108f2 refactor: rename core.stringhelpers to core.strings.helpers 2026-03-11 19:41:50 +00:00
Aaron 17ee64ba02 refactor: rename core.search to core.stringhelpers 2026-03-11 19:41:50 +00:00
Aaron 6383b35945 remove debug file 2026-03-11 19:41:50 +00:00
Aaron b9e6c53be2 removed unused icons 2026-03-11 19:41:49 +00:00
Aaron abac1ce4a3 fix: replace raw mouse hook with LVGL long-press for file browser context menu
Removed driver.hid.mouse dependency that caused page fault on close.
Context menu now triggers via LV_EVENT_LONG_PRESSED on content rows.
Cleaned up onClose teardown ordering and removed debug syslog markers.
2026-03-11 19:41:49 +00:00
Aaron 5628c1ddbf feat: file dispatch system, file-type icons, multi-instance notepad
- Add extension-based dispatch to driver.storage.filedispatch with typed
  union (variant record THandlerKind = hkMagic/hkExtension)
- Extract file-type icon constants and mapping to core.gfx.fileicons
- Add core.search utility (getFileExtension, fmtFileSize, sortStringArray)
- Generate PUA bitmap icon fonts (32/64/128px) from Font Awesome via
  gen_file_icons.py + compile_icons.sh toolchain
- Integrate file dispatch into file browser (double-click triggers dispatch)
- Register notepad as handler for text file extensions
- Fix init order in app.mgr (filedispatch.init before app inits)
- Refactor notepad from singleton to multi-instance (up to 8 windows)
  using instance array, findStateByWid, and LVGL user_data on msgboxes
2026-03-11 19:41:49 +00:00
54 changed files with 71018 additions and 557 deletions

No files matched your search

+1
View File
@@ -17,6 +17,7 @@ steps:
- name: compile - name: compile
image: t3hn3rd/asuro-build:latest image: t3hn3rd/asuro-build:latest
pull: always
depends_on: depends_on:
- build-image - build-image
commands: commands:
+5 -1
View File
@@ -19,4 +19,8 @@ lessons_learnt.md
wasuro wasuro
src/core/core.version.pas src/core/core.version.pas
site/* site/*
!site/.gitkeep !site/.gitkeep
/src/boot/dangling_units.inc
/lib/dangling/
.moderne
CLAUDE.md
+5 -5
View File
@@ -1,4 +1,5 @@
FROM ubuntu:latest ARG RECIPES_IMAGE=t3hn3rd/moderne-asuro-recipes:0.1.1@sha256:eaf54188053511dad9c620a8fb98b0f50c41770cd49a0b3d71a0538386522011
FROM ${RECIPES_IMAGE}
VOLUME ["/code"] VOLUME ["/code"]
@@ -6,8 +7,8 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN dpkg --add-architecture i386 RUN dpkg --add-architecture i386
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
curl dos2unix wget git make nasm binutils xorriso grub-pc-bin gcc gcc-multilib \ curl dos2unix wget git make nasm binutils xorriso grub-pc-bin gcc gcc-multilib \
python3 python3-pip && \ python3 python3-pip python3-pil && \
apt-get clean my room apt-get clean && rm -rf /var/lib/apt/lists/*
RUN pip3 install --no-cache-dir --break-system-packages "mkdocs>=1.6,<2" mkdocs-material RUN pip3 install --no-cache-dir --break-system-packages "mkdocs>=1.6,<2" mkdocs-material
@@ -20,6 +21,5 @@ 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 ADD https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver /usr/bin/semver
RUN chmod +x /usr/bin/semver RUN chmod +x /usr/bin/semver
WORKDIR /code WORKDIR /code
RUN find . -type f -print0 | xargs -0 dos2unix
ENTRYPOINT ["/bin/bash", "-c"] 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
@@ -0,0 +1,8 @@
**/.git
**/.gradle
**/build
**/.moderne
wasuro
site
lib
release
+45
View File
@@ -0,0 +1,45 @@
# 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.
+4 -1
View File
@@ -1,5 +1,8 @@
services: services:
builder: builder:
image: t3hn3rd/asuro-build:latest
build: . build: .
environment:
ASURO_ARCH: ${ASURO_ARCH:-x86}
volumes: volumes:
- .:/code - .:/code
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

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_LIMITS_INCLUDE <limits.h>
#define LV_STDARG_INCLUDE <stdarg.h> #define LV_STDARG_INCLUDE <stdarg.h>
/* Built-in memory pool: 256 KB should be plenty for our UI */ /* Built-in memory pool: 1 MB for complex UI (file browser etc.) */
#define LV_MEM_SIZE (256 * 1024U) #define LV_MEM_SIZE (1024 * 1024U)
#define LV_MEM_POOL_EXPAND_SIZE 0 #define LV_MEM_POOL_EXPAND_SIZE 0
#define LV_MEM_ADR 0 #define LV_MEM_ADR 0
+1
View File
@@ -283,6 +283,7 @@ nav:
- Version Generation: toolchain/compile_vergen.md - Version Generation: toolchain/compile_vergen.md
- LVGL Compilation: toolchain/compile_lvgl.md - LVGL Compilation: toolchain/compile_lvgl.md
- Wasuro Pull: toolchain/compile_wasuro.md - Wasuro Pull: toolchain/compile_wasuro.md
- Automatic Boot Units: toolchain/dangling_units.md
- Source List: toolchain/compile_sourcelist.md - Source List: toolchain/compile_sourcelist.md
- Source Compilation: toolchain/compile_sources.md - Source Compilation: toolchain/compile_sources.md
- Checksum: toolchain/compile_checksum.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