Initial project import
This commit is contained in:
commit
9af96aa1e1
32 files changed
+187
No files matched your search
+17
@@ -0,0 +1,17 @@
|
||||
/build/
|
||||
/bin/
|
||||
/out/
|
||||
/target/
|
||||
*.o
|
||||
*.obj
|
||||
*.ali
|
||||
*.elf
|
||||
*.map
|
||||
*.lst
|
||||
*.img
|
||||
*.iso
|
||||
*.log
|
||||
.vscode/
|
||||
.idea/
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
@@ -0,0 +1,16 @@
|
||||
Agila Open License v1.0
|
||||
|
||||
Copyright (c) 2026 Matthew McClung
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software to use, copy, modify, merge, publish, distribute, and
|
||||
sublicense the software, subject to the following conditions:
|
||||
|
||||
1. This license and copyright notice must be preserved.
|
||||
2. Significant modifications must be clearly identified.
|
||||
3. The Agila, Flying V, and AGX names and logos may not be used to imply
|
||||
endorsement or official status without written permission.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
|
||||
@@ -0,0 +1,28 @@
|
||||
PROJECT := agila-open-kernel
|
||||
BUILD := build
|
||||
OBJ := $(BUILD)/obj
|
||||
BIN := $(BUILD)/bin
|
||||
GPRBUILD := gprbuild
|
||||
GPRCLEAN := gprclean
|
||||
|
||||
.PHONY: all clean rebuild run help
|
||||
|
||||
all:
|
||||
mkdir -p $(OBJ) $(BIN)
|
||||
$(GPRBUILD) -P kernel.gpr
|
||||
|
||||
clean:
|
||||
$(GPRCLEAN) -P kernel.gpr || true
|
||||
rm -rf $(BUILD)
|
||||
|
||||
rebuild: clean all
|
||||
|
||||
run: all
|
||||
$(BIN)/main
|
||||
|
||||
help:
|
||||
@echo "Agila Open Kernel"
|
||||
@echo "make Build the host prototype"
|
||||
@echo "make run Build and run the host prototype"
|
||||
@echo "make clean Remove build output"
|
||||
@echo "make rebuild Clean and rebuild"
|
||||
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
+23
@@ -0,0 +1,23 @@
|
||||
project Kernel is
|
||||
for Languages use ("Ada");
|
||||
|
||||
for Source_Dirs use
|
||||
("kernel",
|
||||
"kernel/console",
|
||||
"kernel/cpu",
|
||||
"kernel/memory",
|
||||
"kernel/scheduler",
|
||||
"kernel/interrupt",
|
||||
"kernel/timer");
|
||||
|
||||
for Object_Dir use "build/obj";
|
||||
for Exec_Dir use "build/bin";
|
||||
for Main use ("main.adb");
|
||||
|
||||
package Compiler is
|
||||
for Default_Switches ("Ada") use
|
||||
("-gnat2022",
|
||||
"-gnata",
|
||||
"-gnatwa");
|
||||
end Compiler;
|
||||
end Kernel;
|
||||
@@ -0,0 +1,18 @@
|
||||
with Ada.Text_IO;
|
||||
|
||||
package body Console is
|
||||
procedure Initialize is
|
||||
begin
|
||||
null;
|
||||
end Initialize;
|
||||
|
||||
procedure Write (Text : String) is
|
||||
begin
|
||||
Ada.Text_IO.Put (Text);
|
||||
end Write;
|
||||
|
||||
procedure Write_Line (Text : String) is
|
||||
begin
|
||||
Ada.Text_IO.Put_Line (Text);
|
||||
end Write_Line;
|
||||
end Console;
|
||||
@@ -0,0 +1,5 @@
|
||||
package Console is
|
||||
procedure Initialize;
|
||||
procedure Write (Text : String);
|
||||
procedure Write_Line (Text : String);
|
||||
end Console;
|
||||
@@ -0,0 +1,6 @@
|
||||
package body Cpu is
|
||||
procedure Initialize is
|
||||
begin
|
||||
null;
|
||||
end Initialize;
|
||||
end Cpu;
|
||||
@@ -0,0 +1,3 @@
|
||||
package Cpu is
|
||||
procedure Initialize;
|
||||
end Cpu;
|
||||
Whitespace-only changes.
Whitespace-only changes.
@@ -0,0 +1,6 @@
|
||||
package body Interrupt is
|
||||
procedure Initialize is
|
||||
begin
|
||||
null;
|
||||
end Initialize;
|
||||
end Interrupt;
|
||||
@@ -0,0 +1,3 @@
|
||||
package Interrupt is
|
||||
procedure Initialize;
|
||||
end Interrupt;
|
||||
@@ -0,0 +1,26 @@
|
||||
with CPU;
|
||||
with Memory;
|
||||
with Console;
|
||||
with Scheduler;
|
||||
with Interrupt;
|
||||
with Timer;
|
||||
|
||||
package body Kernel is
|
||||
procedure Start is
|
||||
begin
|
||||
CPU.Initialize;
|
||||
Memory.Initialize;
|
||||
Console.Initialize;
|
||||
Interrupt.Initialize;
|
||||
Timer.Initialize;
|
||||
Scheduler.Initialize;
|
||||
|
||||
Console.Write_Line ("Agila Open Kernel 0.1");
|
||||
Console.Write_Line ("CPU: initialized");
|
||||
Console.Write_Line ("Memory: initialized");
|
||||
Console.Write_Line ("Interrupts: initialized");
|
||||
Console.Write_Line ("Timer: initialized");
|
||||
Console.Write_Line ("Scheduler: initialized");
|
||||
Console.Write_Line ("System ready");
|
||||
end Start;
|
||||
end Kernel;
|
||||
@@ -0,0 +1,3 @@
|
||||
package Kernel is
|
||||
procedure Start;
|
||||
end Kernel;
|
||||
@@ -0,0 +1,6 @@
|
||||
with Kernel;
|
||||
|
||||
procedure Main is
|
||||
begin
|
||||
Kernel.Start;
|
||||
end Main;
|
||||
@@ -0,0 +1,6 @@
|
||||
package body Memory is
|
||||
procedure Initialize is
|
||||
begin
|
||||
null;
|
||||
end Initialize;
|
||||
end Memory;
|
||||
@@ -0,0 +1,3 @@
|
||||
package Memory is
|
||||
procedure Initialize;
|
||||
end Memory;
|
||||
@@ -0,0 +1,6 @@
|
||||
package body Scheduler is
|
||||
procedure Initialize is
|
||||
begin
|
||||
null;
|
||||
end Initialize;
|
||||
end Scheduler;
|
||||
@@ -0,0 +1,3 @@
|
||||
package Scheduler is
|
||||
procedure Initialize;
|
||||
end Scheduler;
|
||||
Whitespace-only changes.
@@ -0,0 +1,6 @@
|
||||
package body Timer is
|
||||
procedure Initialize is
|
||||
begin
|
||||
null;
|
||||
end Initialize;
|
||||
end Timer;
|
||||
@@ -0,0 +1,3 @@
|
||||
package Timer is
|
||||
procedure Initialize;
|
||||
end Timer;
|
||||
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Reference in new issue
Block a user