Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d01b534a3d | ||
|
|
491b0ea5c3 | ||
|
|
de6fde05cc | ||
|
|
fb675a2299 | ||
|
|
aa374b6816 | ||
|
|
f427b7bcc7 | ||
|
|
4ba3c5b524 | ||
|
|
7180ad39d8 | ||
|
|
6c7bcc1911 | ||
|
|
e09c9b5595 | ||
|
|
9476bb0c8a | ||
|
|
8f7db8507b | ||
|
|
188b1aebb0 |
No files matched your search
+1
-2
@@ -15,5 +15,4 @@ localenv.json
|
||||
dockerout.txt
|
||||
AGENTS.md
|
||||
*.log
|
||||
/doc/*.md
|
||||
wasuro
|
||||
/doc/*.md
|
||||
@@ -24,7 +24,6 @@ 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_wasuro.sh" "Failed to pull Wasuro!"
|
||||
"compile_sources.sh" "Failed to compile FPC Sources!"
|
||||
"compile_link.sh" "Failed linking!"
|
||||
"compile_isogen.sh" "Failed to create ISO!"
|
||||
|
||||
+22
-8
@@ -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).
|
||||
# Copy source + objects to /lvgl (host mount) for debugging.
|
||||
# Cache liblvgl.a on host mount (/code/lvgl/) to skip rebuild.
|
||||
set -e
|
||||
|
||||
LVGL_VERSION="v9.2.2"
|
||||
@@ -10,6 +10,7 @@ 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 \
|
||||
@@ -26,6 +27,17 @@ 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}..."
|
||||
@@ -105,14 +117,16 @@ else
|
||||
echo "No custom LVGL files in lvglh/."
|
||||
fi
|
||||
|
||||
# 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
|
||||
# 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"
|
||||
echo "Done."
|
||||
|
||||
echo " "
|
||||
echo "LVGL compilation complete."
|
||||
echo " "
|
||||
echo " "
|
||||
+1
-8
@@ -4,11 +4,4 @@ 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
|
||||
fpc -Aelf -gw -g -gl -n -v0ew -O3 -OpPENTIUM3 -Si -Sc -Sg -Xd -CX -XXs -CfSSE -CfSSE2 -Rintel -Pi386 -Tlinux -FElib/ -Fusrc/* -Fusrc/include/* -Fusrc/driver/* -Fusrc/driver/net/* -Fusrc/driver/bus/* -Fusrc/driver/bus/usb/* -Fusrc/driver/hid/* src/kernel.pas
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# compile_wasuro.sh — Pull Wasuro WASM runtime source into wasuro/
|
||||
# Clones the repo (sparse, src/wasm only) and copies the Pascal sources
|
||||
# into $PWD/wasuro so the FPC build can reference them via -Fu.
|
||||
set -e
|
||||
|
||||
WASURO_REPO="https://gitea.spexeah.com/Spexeah/Wasuro.git"
|
||||
WASURO_BRANCH="develop"
|
||||
WASURO_TMP="/tmp/wasuro"
|
||||
WASURO_OUT="$(pwd)/wasuro"
|
||||
|
||||
echo " "
|
||||
echo "======================="
|
||||
echo " "
|
||||
echo "Pulling Wasuro WASM runtime..."
|
||||
echo " "
|
||||
|
||||
# Skip if wasuro/ already has .pas files (cached from previous build)
|
||||
if [ -n "$(find "${WASURO_OUT}" -name '*.pas' 2>/dev/null | head -1)" ]; then
|
||||
echo "Wasuro sources already present in ${WASURO_OUT}, skipping pull."
|
||||
echo " "
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Clone sparse checkout (only src/wasm)
|
||||
rm -rf "$WASURO_TMP"
|
||||
git clone --depth 1 --branch "${WASURO_BRANCH}" --filter=blob:none --sparse \
|
||||
"${WASURO_REPO}" "${WASURO_TMP}" 2>&1
|
||||
cd "$WASURO_TMP"
|
||||
git sparse-checkout set src/wasm 2>&1
|
||||
cd -
|
||||
|
||||
echo "Copying src/wasm to ${WASURO_OUT}..."
|
||||
rm -rf "$WASURO_OUT"
|
||||
mkdir -p "$WASURO_OUT"
|
||||
cp -a "${WASURO_TMP}/src/wasm/"* "$WASURO_OUT"/
|
||||
rm -rf "$WASURO_TMP"
|
||||
|
||||
TOTAL=$(find "$WASURO_OUT" -name '*.pas' | wc -l)
|
||||
echo "Copied ${TOTAL} Pascal source files."
|
||||
echo " "
|
||||
echo "Wasuro pull complete."
|
||||
echo " "
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
+18
-203
File diff suppressed because it is too large.
Load diff
+10
-35
@@ -70,33 +70,12 @@ uses
|
||||
video, vesa, doublebuffer, color, lvgl, desktop, uidebug,
|
||||
vterminal,
|
||||
graphicsrefresh, usbhotplug,
|
||||
|
||||
wasm, wasm.vm.io, wasm.test, wasm.test.framework;
|
||||
fifo, cfifo, cfifols, lifo, circ, minh, maxh, prio;
|
||||
|
||||
procedure terminal_command_meminfo(params : PParamList; stdin_buf, stdout_buf, stderr_buf : POutBuf);
|
||||
procedure terminal_command_bsod(params : PParamList; stdin_buf, stdout_buf, stderr_buf : POutBuf);
|
||||
|
||||
procedure kmain(mbinfo: Pmultiboot_info_t; mbmagic: uint32); stdcall;
|
||||
|
||||
implementation
|
||||
|
||||
procedure terminal_command_meminfo(params : PParamList; stdin_buf, stdout_buf, stderr_buf : POutBuf);
|
||||
begin
|
||||
push_trace('kernel.terminal_command_meminfo');
|
||||
|
||||
stdio.bufWriteStr(stdout_buf, 'Lower Memory = ');
|
||||
stdio.bufWriteInt(stdout_buf, multibootinfo^.mem_lower);
|
||||
stdio.bufWriteStrLn(stdout_buf, 'KB');
|
||||
stdio.bufWriteStr(stdout_buf, 'Higher Memory = ');
|
||||
stdio.bufWriteInt(stdout_buf, multibootinfo^.mem_upper);
|
||||
stdio.bufWriteStrLn(stdout_buf, 'KB');
|
||||
stdio.bufWriteStr(stdout_buf, 'Total Memory = ');
|
||||
stdio.bufWriteInt(stdout_buf, ((multibootinfo^.mem_upper + 1000) div 1024) + 1);
|
||||
stdio.bufWriteStrLn(stdout_buf, 'MB');
|
||||
|
||||
pop_trace;
|
||||
end;
|
||||
|
||||
procedure terminal_command_bsod(params : PParamList; stdin_buf, stdout_buf, stderr_buf : POutBuf);
|
||||
begin
|
||||
push_trace('kernel.terminal_command_bsod');
|
||||
@@ -189,6 +168,7 @@ begin
|
||||
|
||||
{ Stdio Init }
|
||||
stdio.init();
|
||||
stdio.registerCommand('BSOD', @terminal_command_bsod, 'Force a Panic Screen.');
|
||||
|
||||
tss.init();
|
||||
scheduler.init();
|
||||
@@ -211,9 +191,6 @@ begin
|
||||
{ VFS Init }
|
||||
vfs.init();
|
||||
|
||||
{ Let's init Wasuro! }
|
||||
wasm.wasm_init;
|
||||
|
||||
{ Management Interfaces }
|
||||
tracer.push_trace('kmain.DRVMGMT');
|
||||
drivermanagement.init();
|
||||
@@ -282,16 +259,14 @@ begin
|
||||
usbhub.UnitTest;
|
||||
usb_keyboard.UnitTest;
|
||||
usb_mouse.UnitTest;
|
||||
syslog.logln('WASM', 'Unit tests starting...');
|
||||
wasm.test.run_all_tests;
|
||||
syslog.writestring('[WASM] ');
|
||||
syslog.writeint(wasm.test.framework.PassedTests);
|
||||
syslog.writestring(' passed, ');
|
||||
syslog.writeint(wasm.test.framework.FailedTests);
|
||||
syslog.writestringln(' failed.');
|
||||
|
||||
{ Set syslog IO hooks for Wasm }
|
||||
wasm.vm.io.io_set_writechar(@syslog.logchar);
|
||||
fifo.UnitTest;
|
||||
cfifo.UnitTest;
|
||||
cfifols.UnitTest;
|
||||
lifo.UnitTest;
|
||||
circ.UnitTest;
|
||||
minh.UnitTest;
|
||||
maxh.UnitTest;
|
||||
prio.UnitTest;
|
||||
|
||||
{ Register timer-driven tasks }
|
||||
graphicsrefresh.init;
|
||||
|
||||
+27
-4
@@ -24,22 +24,45 @@ interface
|
||||
uses
|
||||
tracer,
|
||||
//progs
|
||||
base64_prog, md5sum, dhclient, vbeinfo, meminfo;
|
||||
base64_prog, md5sum, dhclient, vbeinfo, testcmd, ping, meminfo;
|
||||
|
||||
{ Initialize all baked-in programs }
|
||||
procedure init();
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
stdio,
|
||||
//command provider units
|
||||
kernel, cpu, drivermanagement, processmanager,
|
||||
arp, ipv4, tcp,
|
||||
storagemanagement, usbcore;
|
||||
|
||||
procedure init();
|
||||
begin
|
||||
tracer.push_trace('progmanager.md5sum.init');
|
||||
tracer.push_trace('progmanager.init');
|
||||
|
||||
{ Register commands from provider units }
|
||||
stdio.registerCommand('CPU', @cpu.Terminal_Command_CPU, 'CPU Info.');
|
||||
stdio.registerCommand('DEV', @drivermanagement.terminal_command_dev, 'Driver Management Interface.');
|
||||
stdio.registerCommand('PS', @processmanager.terminal_command_ps, 'List running processes.');
|
||||
stdio.registerCommand('KILL', @processmanager.terminal_command_kill, 'Force-kill a process by PID.');
|
||||
stdio.registerCommand('TERMINATE', @processmanager.terminal_command_terminate, 'Gracefully terminate a process by PID.');
|
||||
stdio.registerCommand('ARP', @arp.terminal_command_arp, 'Get ARP Table.');
|
||||
stdio.registerCommand('IFCONFIG', @ipv4.terminal_command_ifconfig, 'Configure Network Settings.');
|
||||
stdio.registerCommand('TCPCONNECT', @tcp.terminal_command_tcpconnect, 'Connect to a TCP host and send Hello World.');
|
||||
stdio.registerCommand('TCPLISTEN', @tcp.terminal_command_tcplisten, 'Listen on a TCP port and log received data.');
|
||||
stdio.registerCommand('TCPHTTP', @tcp.terminal_command_tcphttp, 'Send HTTP GET to a host IP (port 80 default).');
|
||||
stdio.registerCommand('DISK', @storagemanagement.disk_command, 'Disk utility');
|
||||
stdio.registerCommand('USB', @usbcore.terminal_command_usb, 'USB subsystem information.');
|
||||
|
||||
{ Initialize baked-in programs }
|
||||
md5sum.init();
|
||||
tracer.push_trace('progmanager.base64_prog.init');
|
||||
base64_prog.init();
|
||||
tracer.push_trace('progmanager.dhclient.init');
|
||||
dhclient.init();
|
||||
vbeinfo.init();
|
||||
testcmd.init();
|
||||
ping.init();
|
||||
meminfo.init();
|
||||
end;
|
||||
|
||||
|
||||
Reference in new issue
Block a user