Compare commits
5 Commits
189526cab8
...
1.1.3
Author | SHA1 | Date | |
---|---|---|---|
1db74f791a | |||
372fda3afc | |||
749ffe6d73 | |||
76b399f3b5 | |||
83f7ebb223 |
@ -4,4 +4,4 @@ echo "======================="
|
||||
echo " "
|
||||
echo "Compiling FPC Sources..."
|
||||
echo " "
|
||||
fpc -Aelf -gw -g -gl -n -vlewn -O3 -Op3 -Si -Sc -Sg -Xd -CX -XXs -CfSSE -CfSSE2 -Rintel -Pi386 -Tlinux -FElib/ -Fusrc/* -Fusrc/driver/* -Fusrc/driver/net/* src/kernel.pas
|
||||
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
|
@ -2,7 +2,7 @@ ENTRY(loader)
|
||||
SECTIONS
|
||||
{
|
||||
. = 0xC0100000;
|
||||
kernel_start = .;
|
||||
|
||||
.text : AT(ADDR(.text) - 0xC0000000)
|
||||
{
|
||||
text = .; _text = .; __text = .;
|
||||
@ -33,5 +33,4 @@ SECTIONS
|
||||
. = ALIGN(4096);
|
||||
}
|
||||
end = .; _end = .; __end = .;
|
||||
kernel_end = .;
|
||||
}
|
||||
|
@ -31,11 +31,11 @@ We welcome everyone to give building/breaking/fixing/shooting Asuro a go, feel f
|
||||
7. Clone this repository.
|
||||
8. Run the following command in the root of the repo to build the docker image:
|
||||
```powershell
|
||||
docker compose build builder
|
||||
docker-compose build builder
|
||||
```
|
||||
9. Run the following command to compile Asuro:
|
||||
```powershell
|
||||
docker compose run builder
|
||||
docker-compose run builder
|
||||
```
|
||||
10. Create a new virtual machine in Virtualbox and mount the `Asuro.iso` generated in step 9 as a boot image.
|
||||
11. Add the virtualbox installation directory to your `%PATH%` environment variable, usually:
|
||||
@ -78,4 +78,4 @@ We welcome everyone to give building/breaking/fixing/shooting Asuro a go, feel f
|
||||
14. Congratulations! You can now play with Asuro!
|
||||
|
||||
### Gotchas
|
||||
- It was noted that Windows builds above `20H2` seem to have issues installing WSL2. We may have to wait for a patch from Microsoft to fix this. Our devs are currently using build `20H2`.
|
||||
- It was noted that Windows builds above `20H2` seem to have issues installing WSL2. We may have to wait for a patch from Microsoft to fix this. Our devs are currently using build `20H2`.
|
@ -16,7 +16,6 @@
|
||||
Include->Strings - String Manipulation.
|
||||
|
||||
@author(Kieron Morris <kjm@kieronmorris.me>)
|
||||
@author(Aaron Hance <ah@aaronhance.me>)
|
||||
}
|
||||
unit strings;
|
||||
|
||||
@ -34,10 +33,6 @@ function stringCopy(str : pchar) : pchar;
|
||||
function stringNew(size : uint32) : pchar;
|
||||
function stringSize(str : pchar) : uint32;
|
||||
function stringConcat(str1, str2 : pchar) : pchar;
|
||||
function stringTrim(str : pchar; length : uint32) : pchar;
|
||||
function stringSub(str : pchar; start, size : uint32) : pchar;
|
||||
function stringReplace(str, find, replace : pchar) : pchar;
|
||||
function stringIndexOf(str, find : pchar) : sint32;
|
||||
function stringContains(str : pchar; sub : pchar) : boolean;
|
||||
function stringToInt(str : pchar) : uint32;
|
||||
function hexStringToInt(str : pchar) : uint32;
|
||||
@ -156,94 +151,6 @@ begin
|
||||
stringConcat:= result;
|
||||
end;
|
||||
|
||||
// Trim the string to the specified length.
|
||||
function stringTrim(str : pchar; length : uInt32) : pchar;
|
||||
var
|
||||
result : pchar;
|
||||
begin
|
||||
result:= stringNew(length);
|
||||
memcpy(uint32(str), uint32(result), length);
|
||||
stringTrim:= result;
|
||||
end;
|
||||
|
||||
// Return a substring of the string.
|
||||
function stringSub(str : pchar; start, size : uint32) : pchar;
|
||||
var
|
||||
result : pchar;
|
||||
begin
|
||||
result:= stringNew(size);
|
||||
memcpy(uint32(str)+start, uint32(result), size);
|
||||
stringSub:= result;
|
||||
end;
|
||||
|
||||
// Replace first instance of a string with another.
|
||||
function stringReplace(str, find, replace : pchar) : pchar;
|
||||
var
|
||||
result : pchar;
|
||||
i, j, k : uint32;
|
||||
found : boolean;
|
||||
begin
|
||||
|
||||
// Find the first instance of the find string.
|
||||
i:= 0;
|
||||
found:= false;
|
||||
while (i < stringSize(str)) and (not found) do begin
|
||||
if stringEquals(str+i, find) then begin
|
||||
found:= true;
|
||||
end else begin
|
||||
inc(i);
|
||||
end;
|
||||
end;
|
||||
|
||||
// If we found the find string, replace it.
|
||||
if found then begin
|
||||
result:= stringNew(stringSize(str) - stringSize(find) + stringSize(replace));
|
||||
j:= 0;
|
||||
k:= 0;
|
||||
while i < stringSize(str) do begin
|
||||
if stringEquals(str+i, find) then begin
|
||||
memcpy(uint32(replace), uint32(result+j), stringSize(replace));
|
||||
j:= j + stringSize(replace);
|
||||
inc(i, stringSize(find));
|
||||
end else begin
|
||||
result[j]:= str[i];
|
||||
inc(j);
|
||||
inc(i);
|
||||
end;
|
||||
end;
|
||||
stringReplace:= result;
|
||||
end else begin
|
||||
stringReplace:= stringCopy(str);
|
||||
end;
|
||||
|
||||
// Return the result.
|
||||
stringReplace:= result;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
// Find the index of the first instance of a string.
|
||||
function stringIndexOf(str, find : pchar) : sint32;
|
||||
var
|
||||
i : uint32;
|
||||
found : boolean;
|
||||
begin
|
||||
i:= 0;
|
||||
found:= false;
|
||||
while (i < stringSize(str)) and (not found) do begin
|
||||
if stringEquals(str+i, find) then begin
|
||||
found:= true;
|
||||
end else begin
|
||||
inc(i);
|
||||
end;
|
||||
end;
|
||||
if found then begin
|
||||
stringIndexOf:= i;
|
||||
end else begin
|
||||
stringIndexOf:= -1;
|
||||
end;
|
||||
end;
|
||||
|
||||
function stringContains(str : pchar; sub : pchar) : boolean;
|
||||
var
|
||||
strEnd, subEnd, i, j, count : uint32;
|
||||
|
@ -143,22 +143,6 @@ type
|
||||
|
||||
PText = ^Text;
|
||||
|
||||
var
|
||||
AK_START : uint32; external name 'kernel_start';
|
||||
AK_END : uint32; external name 'kernel_end';
|
||||
ASURO_KERNEL_START : uint32;
|
||||
ASURO_KERNEL_END : uint32;
|
||||
ASURO_KERNEL_SIZE : uint32;
|
||||
|
||||
procedure init();
|
||||
|
||||
implementation
|
||||
|
||||
procedure init();
|
||||
begin
|
||||
ASURO_KERNEL_START := uint32(@AK_START);
|
||||
ASURO_KERNEL_END := uint32(@AK_END);
|
||||
ASURO_KERNEL_SIZE:= ASURO_KERNEL_END - ASURO_KERNEL_START;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -125,9 +125,6 @@ var
|
||||
HM : PHashMap;
|
||||
|
||||
begin
|
||||
{ Init the base system unit }
|
||||
System.init();
|
||||
|
||||
{ Serial Init }
|
||||
serial.init();
|
||||
|
||||
|
Reference in New Issue
Block a user