Add process scheduler, pipes, and separate terminal from shell

This commit is contained in:
2026-06-19 21:49:29 +03:00
parent 452125782e
commit 415f78fd40
17 changed files with 524 additions and 120 deletions
+49 -1
View File
@@ -38,6 +38,13 @@ kernel_entry_o = custom_target(
command: [nasm, '-f', 'elf64', '@INPUT@', '-o', '@OUTPUT@'],
)
timer_o = custom_target(
'timer',
input: 'src/kernel/timer.asm',
output: 'timer.o',
command: [nasm, '-f', 'elf64', '@INPUT@', '-o', '@OUTPUT@'],
)
process_o = custom_target(
'process',
input: 'src/kernel/process.asm',
@@ -71,15 +78,17 @@ kernel_sources = files([
'src/kernel/panic.c',
'src/kernel/path.c',
'src/kernel/pic.c',
'src/kernel/pipe.c',
'src/kernel/process.c',
'src/kernel/syscall.c',
'src/kernel/timer.c',
'src/kernel/tss.c',
'src/kernel/vga.c',
])
kernel_elf = executable(
'kernel.elf',
sources: [kernel_entry_o, process_o, syscall_o, lib_sources, kernel_sources],
sources: [kernel_entry_o, timer_o, process_o, syscall_o, lib_sources, kernel_sources],
c_args: [
'-ffreestanding',
'-nostdlib',
@@ -146,6 +155,45 @@ custom_target(
build_by_default: true,
)
shell_start = custom_target(
'shell_start',
input: 'src/user/start.asm',
output: 'shell_start.o',
command: [nasm, '-f', 'elf64', '-o', '@OUTPUT@', '@INPUT@'],
)
shell_syscall = custom_target(
'shell_syscall',
input: 'src/user/syscall.asm',
output: 'shell_syscall.o',
command: [nasm, '-f', 'elf64', '-o', '@OUTPUT@', '@INPUT@'],
)
shell_elf = executable(
'shell.elf',
sources: [shell_start, shell_syscall, lib_sources, 'src/user/app/shell/shell.c'],
c_args: [
'-ffreestanding',
'-nostdlib',
'-fno-stack-protector',
'-mcmodel=large',
'-DVERSION="' + meson.project_version() + '"',
],
link_args: [
'-T', meson.project_source_root() / 'src/user/linker.ld',
'-nostdlib',
],
link_depends: 'src/user/linker.ld',
)
custom_target(
'shell',
input: shell_elf,
output: 'shell',
command: ['objcopy', '-O', 'binary', '@INPUT@', '@OUTPUT@'],
build_by_default: true,
)
echo_start = custom_target(
'echo_start',
input: 'src/user/start.asm',