Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a701db871e | ||
|
|
d0425a41e3 | ||
|
|
463b746b82 | ||
|
|
7d518418c2 | ||
|
|
8b4335768b | ||
|
|
91cd005361 | ||
|
|
99fd5507ca | ||
|
|
035d489c4f | ||
|
|
5e9d0004d7 |
No files matched your search
+2
-33
@@ -17,38 +17,13 @@ steps:
|
||||
|
||||
- name: compile
|
||||
image: t3hn3rd/asuro-build:latest
|
||||
pull: always
|
||||
depends_on:
|
||||
- build-image
|
||||
commands:
|
||||
- git fetch --tags
|
||||
- find . -type f -print0 | xargs -0 dos2unix
|
||||
- chmod +x /drone/src/toolchain/*.sh
|
||||
- /drone/src/toolchain/compile.sh
|
||||
|
||||
- name: deploy-docs
|
||||
image: alpine:latest
|
||||
depends_on:
|
||||
- compile
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
- develop
|
||||
- feature/mkdocs
|
||||
volumes:
|
||||
- name: docs-htdocs
|
||||
path: /htdocs
|
||||
commands:
|
||||
- apk add --no-cache rsync
|
||||
- |
|
||||
if [ "${DRONE_BRANCH}" = "master" ]; then
|
||||
DEST="/htdocs/master"
|
||||
else
|
||||
DEST="/htdocs/develop"
|
||||
fi
|
||||
- mkdir -p "$DEST"
|
||||
- rsync -a --delete site/ "$DEST/"
|
||||
- echo "Documentation deployed to ${DRONE_BRANCH}"
|
||||
- chmod +x /drone/src/*.sh
|
||||
- /drone/src/compile.sh
|
||||
|
||||
- name: upload-iso-artifact
|
||||
image: alpine/git
|
||||
@@ -89,9 +64,3 @@ steps:
|
||||
webhook_token:
|
||||
from_secret: discord_webhook_secret
|
||||
message: "**Asuro Build**\n\n{{#success build.status}}✅ Build successful!\n\n{{else}}❌ Build failed!\n\n{{/success}}Repository: `{{repo.namespace}}/{{repo.name}}`\nBranch: `{{commit.branch}}`\nCommit: `{{commit.sha}}`\nAuthor: `{{commit.author}} <{{commit.email}}>`\n\nGitea Diff: [Link](<{{commit.link}}>)\nDrone Build: [Link](<{{build.link}}>)\n\nMessage: {{commit.message}}"
|
||||
|
||||
volumes:
|
||||
- name: docs-htdocs
|
||||
host:
|
||||
path: /mnt/user/htdocs/asuro_docs
|
||||
|
||||
+1
-8
@@ -14,13 +14,6 @@ localenv.json
|
||||
/lvgl/
|
||||
dockerout.txt
|
||||
AGENTS.md
|
||||
lessons_learnt.md
|
||||
*.log
|
||||
/doc/*.md
|
||||
wasuro
|
||||
src/core/core.version.pas
|
||||
site/*
|
||||
!site/.gitkeep
|
||||
/src/boot/dangling_units.inc
|
||||
/lib/dangling/
|
||||
.moderne
|
||||
CLAUDE.md
|
||||
+6
-8
@@ -1,16 +1,12 @@
|
||||
ARG RECIPES_IMAGE=t3hn3rd/moderne-asuro-recipes:0.1.1@sha256:eaf54188053511dad9c620a8fb98b0f50c41770cd49a0b3d71a0538386522011
|
||||
FROM ${RECIPES_IMAGE}
|
||||
FROM ubuntu:latest
|
||||
|
||||
VOLUME ["/code"]
|
||||
|
||||
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/*
|
||||
|
||||
RUN pip3 install --no-cache-dir --break-system-packages "mkdocs>=1.6,<2" mkdocs-material
|
||||
curl dos2unix wget git make nasm binutils xorriso grub-pc-bin gcc gcc-multilib && \
|
||||
apt-get clean my room
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
ARG FPC_VERSION=3.2.2
|
||||
@@ -18,8 +14,10 @@ RUN curl -sL https://sourceforge.net/projects/freepascal/files/Linux/$FPC_VERSIO
|
||||
pushd fpc-$FPC_VERSION.i386-linux && ./install.sh && popd && \
|
||||
rm -rf fpc-$FPC_VERSION.i386-linux
|
||||
|
||||
COPY compile.sh /compile.sh
|
||||
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 ["/compile.sh"]
|
||||
@@ -1,8 +0,0 @@
|
||||
**/.git
|
||||
**/.gradle
|
||||
**/build
|
||||
**/.moderne
|
||||
wasuro
|
||||
site
|
||||
lib
|
||||
release
|
||||
@@ -1,75 +0,0 @@
|
||||
{ Compatibility shim: wasuro references the old unit name 'lmemorymanager'.
|
||||
Since wasuro/ cannot be modified, this unit re-exports the public API of
|
||||
memory.heap so that 'uses lmemorymanager' continues to compile. }
|
||||
unit lmemorymanager;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
memory.heap;
|
||||
|
||||
const
|
||||
ALLOC_UNIT = memory.heap.ALLOC_UNIT;
|
||||
DATA_OFFSET = memory.heap.DATA_OFFSET;
|
||||
PAGE_SIZE_LMM = memory.heap.PAGE_SIZE_LMM;
|
||||
TOTAL_UNITS = memory.heap.TOTAL_UNITS;
|
||||
BITMAP_DWORDS = memory.heap.BITMAP_DWORDS;
|
||||
SIZE_PREFIX = memory.heap.SIZE_PREFIX;
|
||||
LARGE_ALLOC_MAGIC = memory.heap.LARGE_ALLOC_MAGIC;
|
||||
|
||||
type
|
||||
PHeapPageHeader = memory.heap.PHeapPageHeader;
|
||||
THeapPageHeader = memory.heap.THeapPageHeader;
|
||||
|
||||
procedure init;
|
||||
function kalloc(size : uint32) : void;
|
||||
function klalloc(size : uint32) : void;
|
||||
procedure klfree(address : uint32);
|
||||
function kpalloc(address : uint32) : void;
|
||||
procedure kfree(area : void);
|
||||
function lmm_total_free : uint32;
|
||||
function lmm_page_count : uint32;
|
||||
|
||||
implementation
|
||||
|
||||
procedure init;
|
||||
begin
|
||||
memory.heap.init;
|
||||
end;
|
||||
|
||||
function kalloc(size : uint32) : void; inline;
|
||||
begin
|
||||
kalloc := memory.heap.kalloc(size);
|
||||
end;
|
||||
|
||||
function klalloc(size : uint32) : void; inline;
|
||||
begin
|
||||
klalloc := memory.heap.klalloc(size);
|
||||
end;
|
||||
|
||||
procedure klfree(address : uint32); inline;
|
||||
begin
|
||||
memory.heap.klfree(address);
|
||||
end;
|
||||
|
||||
function kpalloc(address : uint32) : void; inline;
|
||||
begin
|
||||
kpalloc := memory.heap.kpalloc(address);
|
||||
end;
|
||||
|
||||
procedure kfree(area : void); inline;
|
||||
begin
|
||||
memory.heap.kfree(area);
|
||||
end;
|
||||
|
||||
function lmm_total_free : uint32; inline;
|
||||
begin
|
||||
lmm_total_free := memory.heap.lmm_total_free;
|
||||
end;
|
||||
|
||||
function lmm_page_count : uint32; inline;
|
||||
begin
|
||||
lmm_page_count := memory.heap.lmm_page_count;
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -1,7 +0,0 @@
|
||||
unit types;
|
||||
|
||||
interface
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
Regular → Executable
+3
-9
@@ -1,6 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
TOOLCHAIN_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "$TOOLCHAIN_DIR/architecture.sh" || exit 1
|
||||
ERRCOUNT=0
|
||||
echo " "
|
||||
echo "======================="
|
||||
@@ -26,21 +24,17 @@ declare -a run_steps=(
|
||||
"compile_stub.sh" "Failed to compile stub!"
|
||||
"compile_vergen.sh" "Versions failed to compile"
|
||||
"compile_lvgl.sh" "Failed to compile LVGL!"
|
||||
"compile_icons.sh" "Failed to generate icons!"
|
||||
"compile_wasuro.sh" "Failed to pull Wasuro!"
|
||||
"compile_dangling.sh" "Failed to generate dangling unit list!"
|
||||
"compile_sources.sh" "Failed to compile FPC Sources!"
|
||||
"compile_initcalls.sh" "Failed to generate INITFINAL table!"
|
||||
"compile_link.sh" "Failed linking!"
|
||||
"compile_isogen.sh" "Failed to create ISO!"
|
||||
"compile_docs.sh" "Failed to generate documentation!"
|
||||
)
|
||||
|
||||
for ((i=0; i<${#run_steps[@]}; i+=2))
|
||||
do
|
||||
if [ "$ERRCOUNT" -eq "0" ]
|
||||
then
|
||||
script="${TOOLCHAIN_DIR}/${run_steps[$i]}"
|
||||
script=$(pwd)/"${run_steps[$i]}"
|
||||
message="${run_steps[$i+1]}"
|
||||
runOrFail "$script" "$message"
|
||||
fi
|
||||
@@ -49,9 +43,9 @@ done
|
||||
#Call generate final artifacts based on failure or success of the above.
|
||||
if [ "$ERRCOUNT" -ne "0" ]
|
||||
then
|
||||
. "${TOOLCHAIN_DIR}/compile_finish.sh" "failed"
|
||||
. ./compile_finish.sh "failed"
|
||||
else
|
||||
. "${TOOLCHAIN_DIR}/compile_finish.sh" "success"
|
||||
. ./compile_finish.sh "success"
|
||||
fi
|
||||
|
||||
cd ..
|
||||
File renamed without changes.
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
echo " "
|
||||
echo "======================="
|
||||
echo " "
|
||||
echo "Generating Documentation..."
|
||||
echo " "
|
||||
echo "Dowloading Pasdoc..."
|
||||
wget https://github.com/pasdoc/pasdoc/releases/download/v0.16.0/pasdoc-0.16.0-linux-x86_64.tar.gz -O pasdoc.tar.gz
|
||||
echo "Extracting Pasdoc..."
|
||||
tar -xf pasdoc.tar.gz
|
||||
echo "Creating doc output directory..."
|
||||
mkdir ./doc
|
||||
echo "Removing old docs"
|
||||
rm -rf ./doc/*
|
||||
echo "Generating Docs..."
|
||||
./pasdoc/bin/pasdoc -N "Asuro" -T "Asuro OS Documentation" -O "html" -E ./doc/ -S sources.list --use-tipue-search
|
||||
echo "Docgen finished."
|
||||
File renamed without changes.
File renamed without changes.
@@ -19,4 +19,4 @@ echo " "
|
||||
LIBGCC=$(gcc -m32 -print-libgcc-file-name)
|
||||
echo "libgcc: ${LIBGCC}"
|
||||
|
||||
ld -m elf_i386 -s --gc-sections --no-warn-execstack -Ttoolchain/linker.script -o bin/kernel.bin $objstring --start-group lib/liblvgl.a ${LIBGCC} --end-group
|
||||
ld -m elf_i386 -s --gc-sections -Tlinker.script -o bin/kernel.bin $objstring --start-group lib/liblvgl.a ${LIBGCC} --end-group
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# compile_lvgl.sh — Download LVGL v9.2 source and compile into lib/liblvgl.a
|
||||
# Clone & compile in /tmp (fast container-local fs).
|
||||
# Cache liblvgl.a on host mount (/code/lvgl/) to skip rebuild.
|
||||
# Copy source + objects to /lvgl (host mount) for debugging.
|
||||
set -e
|
||||
|
||||
LVGL_VERSION="v9.2.2"
|
||||
@@ -10,7 +10,6 @@ LVGL_DIR="/tmp/lvgl"
|
||||
OBJ_DIR="/tmp/lvgl_obj"
|
||||
CONF_DIR="$(pwd)/lvglh"
|
||||
OUT_DIR="$(pwd)/lib"
|
||||
CACHE_DIR="/code/lvgl"
|
||||
|
||||
CC="gcc"
|
||||
CFLAGS="-m32 -march=i686 -ffreestanding \
|
||||
@@ -27,17 +26,6 @@ echo " "
|
||||
echo "Compiling LVGL..."
|
||||
echo " "
|
||||
|
||||
# If cached liblvgl.a exists on host mount, just copy it and skip everything
|
||||
if [ -f "${CACHE_DIR}/liblvgl.a" ]; then
|
||||
echo "Found cached liblvgl.a in ${CACHE_DIR}, copying to ${OUT_DIR}..."
|
||||
cp "${CACHE_DIR}/liblvgl.a" "${OUT_DIR}/liblvgl.a"
|
||||
echo "(Delete lvgl/liblvgl.a to force a full rebuild.)"
|
||||
echo " "
|
||||
echo "LVGL compilation complete (cached)."
|
||||
echo " "
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Clone LVGL into /tmp (container-local)
|
||||
rm -rf "$LVGL_DIR"
|
||||
echo "Downloading LVGL ${LVGL_VERSION}..."
|
||||
@@ -117,14 +105,12 @@ else
|
||||
echo "No custom LVGL files in lvglh/."
|
||||
fi
|
||||
|
||||
# Cache liblvgl.a and source to host mount for next build
|
||||
echo "Caching LVGL to host mount..."
|
||||
mkdir -p "$CACHE_DIR"
|
||||
rm -rf ${CACHE_DIR}/* ${CACHE_DIR}/.[!.]* ${CACHE_DIR}/..?* 2>/dev/null || true
|
||||
cp "${OUT_DIR}/liblvgl.a" "${CACHE_DIR}/liblvgl.a"
|
||||
cp -a "$LVGL_DIR/src" "${CACHE_DIR}/src"
|
||||
cp -a "$LVGL_DIR"/*.h "${CACHE_DIR}/" 2>/dev/null || true
|
||||
cp -a "$OBJ_DIR" "${CACHE_DIR}/obj"
|
||||
# Copy source + objects to /lvgl host mount for debugging
|
||||
echo "Copying LVGL source and objects to host mount..."
|
||||
mkdir /code/lvgl 2>/dev/null || true
|
||||
rm -rf /code/lvgl/* /code/lvgl/.[!.]* /code/lvgl/..?* 2>/dev/null || true
|
||||
cp -a "$LVGL_DIR/src" /code/lvgl/src
|
||||
cp -a "$OBJ_DIR" /code/lvgl/obj
|
||||
echo "Done."
|
||||
|
||||
echo " "
|
||||
File renamed without changes.
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
echo " "
|
||||
echo "======================="
|
||||
echo " "
|
||||
echo "Compiling FPC Sources..."
|
||||
echo " "
|
||||
|
||||
# Build -Fu flags for all directories under src/ and wasuro/
|
||||
FU_PATHS="-Fusrc -Fuwasuro"
|
||||
for dir in $(find src wasuro -type d 2>/dev/null); do
|
||||
FU_PATHS="$FU_PATHS -Fu$dir"
|
||||
done
|
||||
|
||||
fpc -Aelf -gw -g -gl -n -v0ew -O3 -OpPENTIUM3 -Si -Sc -Sg -Xd -CX -XXs -CfSSE -CfSSE2 -Rintel -Pi386 -Tlinux -FElib/ $FU_PATHS src/kernel.pas
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
echo " "
|
||||
echo "======================="
|
||||
echo " "
|
||||
echo "Compiling Stub..."
|
||||
echo " "
|
||||
nasm -f elf src/stub/stub.asm -o lib/stub.o
|
||||
File renamed without changes.
@@ -1,15 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
TOOLCHAIN_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
echo " "
|
||||
echo "======================="
|
||||
echo " "
|
||||
echo "Generating Versioning Info..."
|
||||
echo " "
|
||||
chmod +x "${TOOLCHAIN_DIR}/compile_checksum.sh"
|
||||
"${TOOLCHAIN_DIR}/compile_checksum.sh"
|
||||
outfile="src/core/core.version.pas"
|
||||
file="toolchain/version"
|
||||
chmod +x ./compile_checksum.sh
|
||||
./compile_checksum.sh
|
||||
outfile="src/include/asuro.pas"
|
||||
file="version"
|
||||
{
|
||||
# this script requires semver tool
|
||||
wget -q https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver -O bin/semver && chmod +x bin/semver
|
||||
@@ -23,7 +22,7 @@ sub=$(semver get patch $tagref)
|
||||
version=$(semver get release $tagref)
|
||||
release=$(semver get prerel $tagref)
|
||||
build=$(semver get build $tagref)
|
||||
linecount=$("${TOOLCHAIN_DIR}/loc.sh" | awk '{print $1}')
|
||||
linecount=$(./loc.sh | awk '{print $1}')
|
||||
sourcecount=$(find src -type f | wc -l)
|
||||
drivercount=$(find src/driver -type f | wc -l)
|
||||
fpcversion=$(fpc -h | grep -m 1 version | awk '{print $5}')
|
||||
@@ -35,7 +34,7 @@ checksum=$(md5sum checksums.md5 | awk '{print $1}')
|
||||
|
||||
[[ -n "$release" ]] && version="$version-$release"
|
||||
cat > $outfile <<EOF
|
||||
unit core.version;
|
||||
unit asuro;
|
||||
|
||||
interface
|
||||
|
||||
File renamed without changes.
@@ -1,94 +0,0 @@
|
||||
# lmemorymanager
|
||||
|
||||
Compatibility shim that re-exports the `memory.heap` API under the legacy unit name.
|
||||
|
||||
## Overview
|
||||
|
||||
The Wasuro WASM VM project references the old unit name `lmemorymanager` for heap memory operations. Because the Wasuro source tree cannot be modified, this shim unit re-exports every public symbol from `memory.heap` so that `uses lmemorymanager` continues to compile without changes. All functions are thin inline wrappers that delegate directly to their `memory.heap` counterparts.
|
||||
|
||||
## Dependencies
|
||||
|
||||
- `memory.heap` -- the canonical heap allocator implementation in the Asuro kernel.
|
||||
|
||||
## Constants
|
||||
|
||||
### ALLOC_UNIT
|
||||
Re-exported from `memory.heap.ALLOC_UNIT`. The base allocation unit size used by the heap allocator.
|
||||
|
||||
### DATA_OFFSET
|
||||
Re-exported from `memory.heap.DATA_OFFSET`. Byte offset from a heap block header to the start of user data.
|
||||
|
||||
### PAGE_SIZE_LMM
|
||||
Re-exported from `memory.heap.PAGE_SIZE_LMM`. Page size used by the lightweight memory manager.
|
||||
|
||||
### TOTAL_UNITS
|
||||
Re-exported from `memory.heap.TOTAL_UNITS`. Total number of allocation units per heap page.
|
||||
|
||||
### BITMAP_DWORDS
|
||||
Re-exported from `memory.heap.BITMAP_DWORDS`. Number of 32-bit words in the per-page allocation bitmap.
|
||||
|
||||
### SIZE_PREFIX
|
||||
Re-exported from `memory.heap.SIZE_PREFIX`. Size of the prefix stored before each allocation to record its length.
|
||||
|
||||
### LARGE_ALLOC_MAGIC
|
||||
Re-exported from `memory.heap.LARGE_ALLOC_MAGIC`. Magic value used to identify large (multi-page) allocations.
|
||||
|
||||
## Types
|
||||
|
||||
### PHeapPageHeader / THeapPageHeader
|
||||
Re-exported from `memory.heap`. Pointer and record types describing the header structure at the beginning of each heap page.
|
||||
|
||||
## Functions and Procedures
|
||||
|
||||
### init
|
||||
```pascal
|
||||
procedure init;
|
||||
```
|
||||
Initializes the heap memory manager by delegating to `memory.heap.init`.
|
||||
|
||||
### kalloc
|
||||
```pascal
|
||||
function kalloc(size: uint32): void;
|
||||
```
|
||||
Allocates `size` bytes from the kernel heap and returns a pointer to the allocated memory.
|
||||
|
||||
### klalloc
|
||||
```pascal
|
||||
function klalloc(size: uint32): void;
|
||||
```
|
||||
Performs a large kernel allocation of `size` bytes and returns a pointer to the allocated memory.
|
||||
|
||||
### klfree
|
||||
```pascal
|
||||
procedure klfree(address: uint32);
|
||||
```
|
||||
Frees a large allocation previously obtained via `klalloc`.
|
||||
|
||||
### kpalloc
|
||||
```pascal
|
||||
function kpalloc(address: uint32): void;
|
||||
```
|
||||
Allocates a heap page at the specified address and returns a pointer to it.
|
||||
|
||||
### kfree
|
||||
```pascal
|
||||
procedure kfree(area: void);
|
||||
```
|
||||
Frees a standard allocation previously obtained via `kalloc`.
|
||||
|
||||
### lmm_total_free
|
||||
```pascal
|
||||
function lmm_total_free: uint32;
|
||||
```
|
||||
Returns the total number of free bytes available across all heap pages.
|
||||
|
||||
### lmm_page_count
|
||||
```pascal
|
||||
function lmm_page_count: uint32;
|
||||
```
|
||||
Returns the current number of heap pages managed by the allocator.
|
||||
|
||||
## Notes
|
||||
|
||||
- Every function and procedure in the implementation section is marked `inline`, so the compiler eliminates the wrapper overhead entirely.
|
||||
- This unit exists solely for backward compatibility with the Wasuro WASM VM build. New kernel code should use `memory.heap` directly.
|
||||
Loaded 20 of 478 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user