Merge branch 'develop' into 'master'

klalloc & pipeline changes

Added a klalloc and a klfree (not yet implemented) to lmemorymanager.
Added a page_mappable method to vmemorymanager to check if a page is mappable before trying to map, this supports klalloc.
Added a streamlined pipeline
Added documentation generation to the pipeline.

See merge request spexeah/asuro!19
This commit is contained in:
t3hn3rd committed 2021-07-05 15:27:55 +00:00
commit 76b399f3b5
184 files changed
+3507 -51699

No files matched your search

+85 -28
View File
@@ -1,39 +1,96 @@
# This file is a template, and might need editing before it works on your project.
# see https://docs.gitlab.com/ee/ci/yaml/README.html for all available options
stages:
- Generate Stub and Versions
- Generate Version Files
- Compile Sources
- Link
- Generate ISO
- Generate Sources List
- Generate Documentation
.before_script:
- echo "Before script section"
- echo "For example you might run an update here or install a build dependency"
- echo "Or perhaps you might print out some debugging details"
compile_stub:
stage: Generate Stub and Versions
script:
- chmod +x ./compile_stub.sh
- ./compile_stub.sh
artifacts:
paths:
- lib/stub.o
.after_script:
- echo "After script section"
- echo "For example you might do some cleanup here"
build:
stage: build
tags:
- asuro
script: ./compile.sh
vergen:
stage: Generate Stub and Versions
script:
- chmod +x ./compile_vergen.sh
- ./compile_vergen.sh
artifacts:
paths:
- release/Asuro.iso
- iso/boot/asuro.bin
- release/*.svg
- src/include/asuro.pas
.test1:
stage: test
compile_sources:
stage: Compile Sources
script:
- echo "Do a test here"
- echo "For example run a test suite"
- chmod +x ./compile_sources.sh
- ./compile_sources.sh
artifacts:
paths:
- lib/*.o
dependencies:
- compile_stub
- vergen
needs:
- vergen
- compile_stub
.test2:
stage: test
link:
stage: Link
script:
- echo "Do another parallel test here"
- echo "For example run a lint test"
- chmod +x ./compile_link.sh
- ./compile_link.sh
artifacts:
paths:
- bin/kernel.bin
dependencies:
- compile_sources
needs:
- compile_sources
.deploy1:
stage: deploy
isogen:
stage: Generate ISO
script:
- echo "Do your deploy here"
- chmod +x ./compile_isogen.sh
- ./compile_isogen.sh
artifacts:
paths:
- ./Asuro.iso
dependencies:
- link
needs:
- link
sourcelist:
stage: Generate Sources List
script:
- chmod +x ./compile_sourcelist.sh
- ./compile_sourcelist.sh
artifacts:
paths:
- ./sources.list
dependencies:
- vergen
needs:
- vergen
docgen:
stage: Generate Documentation
script:
- chmod +x ./compile_docs.sh
- ./compile_docs.sh
artifacts:
paths:
- ./doc/*
dependencies:
- vergen
- sourcelist
needs:
- vergen
- sourcelist
+2 -2
View File
@@ -2,8 +2,8 @@ FROM ubuntu:latest
VOLUME ["/code"]
RUN dpkg --add-architecture i386 && \
apt-get update
RUN dpkg --add-architecture i386
RUN apt-get update
RUN apt-get install nasm curl make:i386 binutils:i386 xorriso grub-pc-bin dos2unix -y
RUN apt-get clean
RUN curl https://sourceforge.net/projects/freepascal/files/Linux/2.6.4/fpc-2.6.4.i386-linux.tar/download --output fpc.tar -L && \
+16 -66
View File
@@ -2,18 +2,12 @@
ERRCOUNT=0
echo " "
echo "======================="
echo "== ASURO COMPILATION =="
echo "======================="
echo " "
echo "Checking out latest VM Source..."
echo "Asuro Compilation"
echo " "
./updatevm.sh
echo " "
echo "Compiling ASM Stub..."
echo " "
rm lib/*
nasm -f elf src/stub/stub.asm -o lib/stub.o
#Compile Stub.asm
./compile_stub.sh
if [ $? -ne 0 ]
then
echo "Failed to compile stub!"
@@ -22,47 +16,23 @@ else
echo "Success."
fi
echo " "
echo "======================="
echo " "
./versioning.sh
if [ "$1" = "-d" ]
then
echo "Compiling Debug FPC Sources..."
echo " "
fpc -Aelf -gw -n -va -O3 -Op3 -Si -Sc -Sg -Xd -CX -XXs -CfSSE -CfSSE2 -Rintel -Pi386 -Tlinux -FElib/ -Fusrc/* -Fusrc/driver/* src/kernel.pas
else
echo "Compiling FPC Sources..."
echo " "
fpc -Aelf -gw -n -va -O3 -Op3 -Si -Sc -Sg -Xd -CX -XXs -CfSSE -CfSSE2 -Rintel -Pi386 -Tlinux -FElib/ -Fusrc/* -Fusrc/driver/* -Fusrc/driver/net/* src/kernel.pas
fi
#Generate .pas with versioning headers.
./compile_vergen.sh
#Compile all .pas sources
./compile_sources.sh
if [ $? -ne 0 ]
then
echo " "
echo "Failed to compile FPC Sources!"
ERRCOUNT=$((ERRCOUNT+1))
else
echo " "
echo "Success."
fi
echo " "
echo "======================="
echo " "
echo "Linking..."
echo " "
objstring="";
for object in `find lib/ -name "*.o"`; do
if [ "$object" != "lib/stub.o" ]
then
objstring=$objstring$object" ";
fi
done;
objstring=lib/stub.o" "$objstring
echo "Object Files: "$objstring
echo " "
ld -m elf_i386 -s --gc-sections -Tlinker.script -o bin/kernel.bin $objstring
#Link into a binary.
./compile_link.sh
if [ $? -ne 0 ]
then
echo "Failed linking!"
@@ -71,13 +41,8 @@ else
echo "Success."
fi
echo " "
echo "======================="
echo " "
echo "Creating ISO..."
echo " "
cp bin/kernel.bin iso/boot/asuro.bin
grub-mkrescue -o Asuro.iso iso
#Generate an ISO with GRUB as the Bootloader.
./compile_isogen.sh
if [ $? -ne 0 ]
then
echo "Failed to create ISO!"
@@ -86,27 +51,12 @@ else
echo "Success."
fi
echo " "
echo "======================="
echo " "
#Call generate final artifacts based on failure or success of the above.
if [ "$ERRCOUNT" -ne "0" ]
then
echo "$ERRCOUNT Errors Occurred, please review."
wget -q https://img.shields.io/badge/build-failed-red.svg -O release/build.svg
./compile_finish.sh "failed"
else
echo "No errors."
wget -q https://img.shields.io/badge/build-succeeded-green.svg -O release/build.svg
./compile_finish.sh "success"
fi
echo " "
echo "======================="
echo " "
#cp Asuro.iso ~/host/Asuro.iso
cp Asuro.iso release/Asuro.iso
checksum=$(md5sum release/Asuro.iso | awk '{print $1}')
wget -q https://img.shields.io/badge/checksum-$checksum-important.svg -O release/checksum.svg
cd release
touch *
#svn commit -m "Versioning Auto-Commit"
cd ..
-7
View File
@@ -1,7 +0,0 @@
#!/bin/sh
ERRCOUNT=0
echo "======================="
echo "== ASURO =="
echo "======================="
./compile.sh
./run.sh
-7
View File
@@ -1,7 +0,0 @@
#!/bin/sh
ERRCOUNT=0
echo "======================="
echo "== ASURO =="
echo "======================="
./compile.sh -d
./run.sh -d
View File
File renamed without changes.
-2
View File
@@ -1,2 +0,0 @@
#!/bin/sh
./compile.sh -d
+18
View File
@@ -0,0 +1,18 @@
#!/bin/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."
exit 0
+18
View File
@@ -0,0 +1,18 @@
#/bin/sh
echo " "
echo "======================="
echo " "
if [ "$1" == "failed" ]
then
echo "Errors Occurred, please review."
wget -q https://img.shields.io/badge/build-failed-red.svg -O release/build.svg 2>/dev/null
echo " "
echo "======================="
exit 1
else
echo "No errors."
wget -q https://img.shields.io/badge/build-succeeded-green.svg -O release/build.svg 2>/dev/null
echo " "
echo "======================="
exit 0
fi
+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
echo " "
echo "======================="
echo " "
echo "Creating ISO..."
echo " "
cp bin/kernel.bin iso/boot/asuro.bin
grub-mkrescue -o Asuro.iso iso
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
echo " "
echo "======================="
echo " "
echo "Linking..."
echo " "
objstring="";
for object in `find lib/ -name "*.o"`; do
if [ "$object" != "lib/stub.o" ]
then
objstring=$objstring$object" ";
fi
done;
objstring=lib/stub.o" "$objstring
echo "Object Files: "$objstring
echo " "
ld -m elf_i386 -s --gc-sections -Tlinker.script -o bin/kernel.bin $objstring
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
echo " "
echo "======================="
echo " "
echo "Generating Source List..."
echo " "
find "$(cd ..; pwd)" -name "*.pas" > sources.list
echo "Finished Source List Generation."
exit 0
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
echo " "
echo "======================="
echo " "
echo "Compiling FPC Sources..."
echo " "
fpc -Aelf -gw -n -va -O3 -Op3 -Si -Sc -Sg -Xd -CX -XXs -CfSSE -CfSSE2 -Rintel -Pi386 -Tlinux -FElib/ -Fusrc/* -Fusrc/driver/* -Fusrc/driver/net/* src/kernel.pas
+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
echo " "
echo "======================="
echo " "
echo "Compiling Stub..."
echo " "
rm lib/*
nasm -f elf src/stub/stub.asm -o lib/stub.o
+8
View File
@@ -0,0 +1,8 @@
#/bin/sh
echo " "
echo "======================="
echo " "
echo "Generating Checksum Badge..."
echo " "
checksum=$(md5sum Asuro.iso | awk '{print $1}')
wget -q https://img.shields.io/badge/checksum-$checksum-important.svg -O release/checksum.svg 2>/dev/null
+17 -12
View File
@@ -1,6 +1,11 @@
#!/bin/bash
echo " "
echo "======================="
echo " "
echo "Generating Versioning Info..."
./checksum.sh
echo " "
chmod +x ./compile_checksum.sh
./compile_checksum.sh
outfile="src/include/asuro.pas"
file="version"
while IFS=: read -r line;do
@@ -44,15 +49,15 @@ echo "implementation" >> $outfile
echo " " >> $outfile
echo "end." >> $outfile
echo "Generating release info..."
wget -q https://img.shields.io/badge/version-$major.$minor.$sub--$revision$release-blue.svg -O release/version.svg
wget -q https://img.shields.io/badge/revision-$revision-blue.svg -O release/revision.svg
wget -q https://img.shields.io/badge/release-$release-blue.svg -O release/release.svg
wget -q https://img.shields.io/badge/lines-$linecount-blueviolet.svg -O release/lines.svg
wget -q https://img.shields.io/badge/files-$sourcecount-blueviolet.svg -O release/files.svg
wget -q https://img.shields.io/badge/drivers-$drivercount-blueviolet.svg -O release/drivers.svg
wget -q https://img.shields.io/badge/FPC_version-$fpcversion-lightgrey.svg -O release/fpcversion.svg
wget -q https://img.shields.io/badge/NASM_version-$nasmversion-lightgrey.svg -O release/nasmversion.svg
wget -q https://img.shields.io/badge/MAKE_version-$makeversion-lightgrey.svg -O release/makeversion.svg
wget -q https://img.shields.io/badge/release_date-$compiledate-lightgrey.svg -O release/date.svg
wget -q https://img.shields.io/badge/fingerprint-$checksum-important.svg -O release/fingerprint.svg
wget -q https://img.shields.io/badge/version-$major.$minor.$sub--$revision$release-blue.svg -O release/version.svg 2>/dev/null
wget -q https://img.shields.io/badge/revision-$revision-blue.svg -O release/revision.svg 2>/dev/null
wget -q https://img.shields.io/badge/release-$release-blue.svg -O release/release.svg 2>/dev/null
wget -q https://img.shields.io/badge/lines-$linecount-blueviolet.svg -O release/lines.svg 2>/dev/null
wget -q https://img.shields.io/badge/files-$sourcecount-blueviolet.svg -O release/files.svg 2>/dev/null
wget -q https://img.shields.io/badge/drivers-$drivercount-blueviolet.svg -O release/drivers.svg 2>/dev/null
wget -q https://img.shields.io/badge/FPC_version-$fpcversion-lightgrey.svg -O release/fpcversion.svg 2>/dev/null
wget -q https://img.shields.io/badge/NASM_version-$nasmversion-lightgrey.svg -O release/nasmversion.svg 2>/dev/null
wget -q https://img.shields.io/badge/MAKE_version-$makeversion-lightgrey.svg -O release/makeversion.svg 2>/dev/null
wget -q https://img.shields.io/badge/release_date-$compiledate-lightgrey.svg -O release/date.svg 2>/dev/null
wget -q https://img.shields.io/badge/fingerprint-$checksum-important.svg -O release/fingerprint.svg 2>/dev/null
echo "Done versioning."
-60
View File
@@ -1,60 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Asuro: ACE</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.15.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="tipuesearch/tipuesearch.css">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<table class="container"><tr><td class="navigation">
<h2>Asuro</h2><p><a href="AllUnits.html" class="navigation">Units</a></p><p><a href="ClassHierarchy.html" class="navigation">Class Hierarchy</a></p><p><a href="AllClasses.html" class="navigation">Classes, Interfaces, Objects and Records</a></p><p><a href="AllTypes.html" class="navigation">Types</a></p><p><a href="AllVariables.html" class="navigation">Variables</a></p><p><a href="AllConstants.html" class="navigation">Constants</a></p><p><a href="AllFunctions.html" class="navigation">Functions and Procedures</a></p><p><a href="AllIdentifiers.html" class="navigation">Identifiers</a></p><p><a href="GVUses.png" class="navigation">Unit dependency graph</a></p><form class="search-form" action="_tipue_results.html"><div class="search-input"><input type="text" name="q" id="tipue_search_input"></div><div class="search-button"><input type="button" id="tipue_search_button" onclick="this.form.submit();"></div></form>
<div style="clear: both"></div>
<script type="text/javascript">
$(document).ready(function() {
$('#tipue_search_input').tipuesearch({
/* 10 items to display seems standard */
'show': 10,
/* For PasDoc docs, showing urls is not very useful,
since the page title already shows the unit and identifier. */
'showURL': false
});
});
</script>
</td><td class="content">
<h1 class="unit">Unit ACE</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section"><a class="section" href="#PasDoc-Uses">Uses</a></div><div class="one_section">Classes, Interfaces, Objects and Records</div><div class="one_section"><a class="section" href="#PasDoc-FuncsProcs">Functions and Procedures</a></div><div class="one_section">Types</div><div class="one_section">Constants</div><div class="one_section">Variables</div></div>
<span id="PasDoc-Description"></span><h2 class="description">Description</h2>
<p>
Fault-&gt;<code>ACE</code> - Alignment Check Exception.
<p></p>
<span id="PasDoc-Uses"></span><h2 class="uses">Uses</h2>
<ul class="useslist"><li><a href="util.html">util</a></li><li><a href="console.html">console</a></li><li><a href="isr_types.html">isr_types</a></li><li><a href="isrmanager.html">isrmanager</a></li><li><a href="idt.html">IDT</a></li></ul><h2 class="overview">Overview</h2>
<span id="PasDoc-FuncsProcs"></span><h3 class="summary">Functions and Procedures</h3>
<table class="summary wide_list">
<tr class="list">
<td class="itemcode"><code>procedure <b><a href="ACE.html#register">register</a></b>();</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Functions and Procedures</h3>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="register"></span><code>procedure <b>register</b>();</code></td>
</tr>
<tr><td colspan="1">
&nbsp;</td></tr>
</table>
<h2 class="authors">Author</h2>
<ul class="authors">
<li>Kieron Morris &lt;<a href="mailto:[email protected]">[email protected]</a>&gt;</li>
</ul>
<hr><span class="appinfo"><em>Generated by <a href="https://github.com/pasdoc/pasdoc/wiki">PasDoc 0.15.0</a>. </em>
</span>
</td></tr></table></body></html>
-249
View File
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
Loaded 20 of 184 files, more files were not shown because too many files have changed in this diff. Show more