Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d518418c2 | ||
|
|
8b4335768b | ||
|
|
91cd005361 | ||
|
|
99fd5507ca | ||
|
|
035d489c4f | ||
|
|
5e9d0004d7 |
No files matched your search
+3
-34
@@ -17,39 +17,14 @@ 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:
|
||||||
- git fetch --tags
|
- git fetch --tags
|
||||||
- find . -type f -print0 | xargs -0 dos2unix
|
- find . -type f -print0 | xargs -0 dos2unix
|
||||||
- chmod +x /drone/src/toolchain/*.sh
|
- chmod +x /drone/src/*.sh
|
||||||
- /drone/src/toolchain/compile.sh
|
- /drone/src/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}"
|
|
||||||
|
|
||||||
- name: upload-iso-artifact
|
- name: upload-iso-artifact
|
||||||
image: alpine/git
|
image: alpine/git
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -88,10 +63,4 @@ steps:
|
|||||||
from_secret: discord_webhook_id
|
from_secret: discord_webhook_id
|
||||||
webhook_token:
|
webhook_token:
|
||||||
from_secret: discord_webhook_secret
|
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}}"
|
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/
|
/lvgl/
|
||||||
dockerout.txt
|
dockerout.txt
|
||||||
AGENTS.md
|
AGENTS.md
|
||||||
lessons_learnt.md
|
|
||||||
*.log
|
*.log
|
||||||
|
/doc/*.md
|
||||||
wasuro
|
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 ubuntu:latest
|
||||||
FROM ${RECIPES_IMAGE}
|
|
||||||
|
|
||||||
VOLUME ["/code"]
|
VOLUME ["/code"]
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
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-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
|
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-c"]
|
SHELL ["/bin/bash", "-c"]
|
||||||
ARG FPC_VERSION=3.2.2
|
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 && \
|
pushd fpc-$FPC_VERSION.i386-linux && ./install.sh && popd && \
|
||||||
rm -rf fpc-$FPC_VERSION.i386-linux
|
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
|
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 ["/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
+4
-10
@@ -1,6 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
TOOLCHAIN_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
||||||
source "$TOOLCHAIN_DIR/architecture.sh" || exit 1
|
|
||||||
ERRCOUNT=0
|
ERRCOUNT=0
|
||||||
echo " "
|
echo " "
|
||||||
echo "======================="
|
echo "======================="
|
||||||
@@ -26,21 +24,17 @@ declare -a run_steps=(
|
|||||||
"compile_stub.sh" "Failed to compile stub!"
|
"compile_stub.sh" "Failed to compile stub!"
|
||||||
"compile_vergen.sh" "Versions failed to compile"
|
"compile_vergen.sh" "Versions failed to compile"
|
||||||
"compile_lvgl.sh" "Failed to compile LVGL!"
|
"compile_lvgl.sh" "Failed to compile LVGL!"
|
||||||
"compile_icons.sh" "Failed to generate icons!"
|
|
||||||
"compile_wasuro.sh" "Failed to pull Wasuro!"
|
"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_sources.sh" "Failed to compile FPC Sources!"
|
||||||
"compile_initcalls.sh" "Failed to generate INITFINAL table!"
|
|
||||||
"compile_link.sh" "Failed linking!"
|
"compile_link.sh" "Failed linking!"
|
||||||
"compile_isogen.sh" "Failed to create ISO!"
|
"compile_isogen.sh" "Failed to create ISO!"
|
||||||
"compile_docs.sh" "Failed to generate documentation!"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
for ((i=0; i<${#run_steps[@]}; i+=2))
|
for ((i=0; i<${#run_steps[@]}; i+=2))
|
||||||
do
|
do
|
||||||
if [ "$ERRCOUNT" -eq "0" ]
|
if [ "$ERRCOUNT" -eq "0" ]
|
||||||
then
|
then
|
||||||
script="${TOOLCHAIN_DIR}/${run_steps[$i]}"
|
script=$(pwd)/"${run_steps[$i]}"
|
||||||
message="${run_steps[$i+1]}"
|
message="${run_steps[$i+1]}"
|
||||||
runOrFail "$script" "$message"
|
runOrFail "$script" "$message"
|
||||||
fi
|
fi
|
||||||
@@ -49,9 +43,9 @@ done
|
|||||||
#Call generate final artifacts based on failure or success of the above.
|
#Call generate final artifacts based on failure or success of the above.
|
||||||
if [ "$ERRCOUNT" -ne "0" ]
|
if [ "$ERRCOUNT" -ne "0" ]
|
||||||
then
|
then
|
||||||
. "${TOOLCHAIN_DIR}/compile_finish.sh" "failed"
|
. ./compile_finish.sh "failed"
|
||||||
else
|
else
|
||||||
. "${TOOLCHAIN_DIR}/compile_finish.sh" "success"
|
. ./compile_finish.sh "success"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd ..
|
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)
|
LIBGCC=$(gcc -m32 -print-libgcc-file-name)
|
||||||
echo "libgcc: ${LIBGCC}"
|
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
|
#!/usr/bin/env bash
|
||||||
# compile_lvgl.sh — Download LVGL v9.2 source and compile into lib/liblvgl.a
|
# compile_lvgl.sh — Download LVGL v9.2 source and compile into lib/liblvgl.a
|
||||||
# Clone & compile in /tmp (fast container-local fs).
|
# 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
|
set -e
|
||||||
|
|
||||||
LVGL_VERSION="v9.2.2"
|
LVGL_VERSION="v9.2.2"
|
||||||
@@ -10,7 +10,6 @@ LVGL_DIR="/tmp/lvgl"
|
|||||||
OBJ_DIR="/tmp/lvgl_obj"
|
OBJ_DIR="/tmp/lvgl_obj"
|
||||||
CONF_DIR="$(pwd)/lvglh"
|
CONF_DIR="$(pwd)/lvglh"
|
||||||
OUT_DIR="$(pwd)/lib"
|
OUT_DIR="$(pwd)/lib"
|
||||||
CACHE_DIR="/code/lvgl"
|
|
||||||
|
|
||||||
CC="gcc"
|
CC="gcc"
|
||||||
CFLAGS="-m32 -march=i686 -ffreestanding \
|
CFLAGS="-m32 -march=i686 -ffreestanding \
|
||||||
@@ -27,17 +26,6 @@ echo " "
|
|||||||
echo "Compiling LVGL..."
|
echo "Compiling LVGL..."
|
||||||
echo " "
|
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)
|
# Clone LVGL into /tmp (container-local)
|
||||||
rm -rf "$LVGL_DIR"
|
rm -rf "$LVGL_DIR"
|
||||||
echo "Downloading LVGL ${LVGL_VERSION}..."
|
echo "Downloading LVGL ${LVGL_VERSION}..."
|
||||||
@@ -117,16 +105,14 @@ else
|
|||||||
echo "No custom LVGL files in lvglh/."
|
echo "No custom LVGL files in lvglh/."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Cache liblvgl.a and source to host mount for next build
|
# Copy source + objects to /lvgl host mount for debugging
|
||||||
echo "Caching LVGL to host mount..."
|
echo "Copying LVGL source and objects to host mount..."
|
||||||
mkdir -p "$CACHE_DIR"
|
mkdir /code/lvgl 2>/dev/null || true
|
||||||
rm -rf ${CACHE_DIR}/* ${CACHE_DIR}/.[!.]* ${CACHE_DIR}/..?* 2>/dev/null || true
|
rm -rf /code/lvgl/* /code/lvgl/.[!.]* /code/lvgl/..?* 2>/dev/null || true
|
||||||
cp "${OUT_DIR}/liblvgl.a" "${CACHE_DIR}/liblvgl.a"
|
cp -a "$LVGL_DIR/src" /code/lvgl/src
|
||||||
cp -a "$LVGL_DIR/src" "${CACHE_DIR}/src"
|
cp -a "$OBJ_DIR" /code/lvgl/obj
|
||||||
cp -a "$LVGL_DIR"/*.h "${CACHE_DIR}/" 2>/dev/null || true
|
|
||||||
cp -a "$OBJ_DIR" "${CACHE_DIR}/obj"
|
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
echo "LVGL compilation complete."
|
echo "LVGL compilation complete."
|
||||||
echo " "
|
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
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
TOOLCHAIN_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
||||||
echo " "
|
echo " "
|
||||||
echo "======================="
|
echo "======================="
|
||||||
echo " "
|
echo " "
|
||||||
echo "Generating Versioning Info..."
|
echo "Generating Versioning Info..."
|
||||||
echo " "
|
echo " "
|
||||||
chmod +x "${TOOLCHAIN_DIR}/compile_checksum.sh"
|
chmod +x ./compile_checksum.sh
|
||||||
"${TOOLCHAIN_DIR}/compile_checksum.sh"
|
./compile_checksum.sh
|
||||||
outfile="src/core/core.version.pas"
|
outfile="src/include/asuro.pas"
|
||||||
file="toolchain/version"
|
file="version"
|
||||||
{
|
{
|
||||||
# this script requires semver tool
|
# this script requires semver tool
|
||||||
wget -q https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver -O bin/semver && chmod +x bin/semver
|
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)
|
version=$(semver get release $tagref)
|
||||||
release=$(semver get prerel $tagref)
|
release=$(semver get prerel $tagref)
|
||||||
build=$(semver get build $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)
|
sourcecount=$(find src -type f | wc -l)
|
||||||
drivercount=$(find src/driver -type f | wc -l)
|
drivercount=$(find src/driver -type f | wc -l)
|
||||||
fpcversion=$(fpc -h | grep -m 1 version | awk '{print $5}')
|
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"
|
[[ -n "$release" ]] && version="$version-$release"
|
||||||
cat > $outfile <<EOF
|
cat > $outfile <<EOF
|
||||||
unit core.version;
|
unit asuro;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# compile_wasuro.sh — Pull Wasuro WASM runtime source into wasuro/
|
# compile_wasuro.sh — Pull Wasuro WASM runtime source into /wasuro
|
||||||
# Clones the repo (sparse, src/wasm only) and copies the Pascal sources
|
# Clones the repo (sparse, src/wasm only) and copies the Pascal sources
|
||||||
# into $PWD/wasuro so the FPC build can reference them via -Fu.
|
# into /code/wasuro so the FPC build can reference them via -Fu.
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
WASURO_REPO="https://gitea.spexeah.com/Spexeah/Wasuro.git"
|
WASURO_REPO="https://gitea.spexeah.com/Spexeah/Wasuro.git"
|
||||||
WASURO_BRANCH="develop"
|
WASURO_BRANCH="develop"
|
||||||
WASURO_TMP="/tmp/wasuro"
|
WASURO_TMP="/tmp/wasuro"
|
||||||
WASURO_OUT="$(pwd)/wasuro"
|
WASURO_OUT="/code/wasuro"
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
echo "======================="
|
echo "======================="
|
||||||
@@ -28,7 +28,7 @@ git clone --depth 1 --branch "${WASURO_BRANCH}" --filter=blob:none --sparse \
|
|||||||
"${WASURO_REPO}" "${WASURO_TMP}" 2>&1
|
"${WASURO_REPO}" "${WASURO_TMP}" 2>&1
|
||||||
cd "$WASURO_TMP"
|
cd "$WASURO_TMP"
|
||||||
git sparse-checkout set src/wasm 2>&1
|
git sparse-checkout set src/wasm 2>&1
|
||||||
cd -
|
cd /code
|
||||||
|
|
||||||
echo "Copying src/wasm to ${WASURO_OUT}..."
|
echo "Copying src/wasm to ${WASURO_OUT}..."
|
||||||
rm -rf "$WASURO_OUT"
|
rm -rf "$WASURO_OUT"
|
||||||
@@ -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 477 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user