mirror of
https://github.com/justinian/jsix.git
synced 2025-12-09 16:04:32 -08:00
This means the kernel now depends on libj6. I've added the macro definition __j6kernel when building for the kernel target, so I can remove parts with #ifdefs.
78 lines
2.0 KiB
Python
78 lines
2.0 KiB
Python
# vim: ft=python
|
|
|
|
kernel = module("kernel",
|
|
kind = "exe",
|
|
default = True,
|
|
output = "jsix.elf",
|
|
targets = [ "kernel" ],
|
|
description = "jsix kernel",
|
|
deps = [ "util", "cpu", "bootproto", "j6" ],
|
|
includes = [ "." ],
|
|
sources = [
|
|
"apic.cpp",
|
|
"ap_startup.s",
|
|
"assert.cpp",
|
|
"boot.s",
|
|
"clock.cpp",
|
|
"console.cpp",
|
|
"cpprt.cpp",
|
|
"cpu.cpp",
|
|
"debug.cpp",
|
|
"debug.s",
|
|
"device_manager.cpp",
|
|
"frame_allocator.cpp",
|
|
"gdt.cpp",
|
|
"gdtidt.s",
|
|
"heap_allocator.cpp",
|
|
"hpet.cpp",
|
|
"idt.cpp",
|
|
"interrupts.cpp",
|
|
"interrupts.s",
|
|
"io.cpp",
|
|
"log.cpp",
|
|
"logger.cpp",
|
|
"main.cpp",
|
|
"memory.cpp",
|
|
"memory.h.cog",
|
|
"memory_bootstrap.cpp",
|
|
"msr.cpp",
|
|
"objects/channel.cpp",
|
|
"objects/endpoint.cpp",
|
|
"objects/kobject.cpp",
|
|
"objects/thread.cpp",
|
|
"objects/process.cpp",
|
|
"objects/system.cpp",
|
|
"objects/vm_area.cpp",
|
|
"page_table.cpp",
|
|
"page_tree.cpp",
|
|
"pci.cpp",
|
|
"printf/printf.c",
|
|
"scheduler.cpp",
|
|
"serial.cpp",
|
|
"syscall.cpp.cog",
|
|
"syscall.h.cog",
|
|
"syscall.s",
|
|
"syscalls.inc.cog",
|
|
"syscalls/channel.cpp",
|
|
"syscalls/endpoint.cpp",
|
|
"syscalls/object.cpp",
|
|
"syscalls/process.cpp",
|
|
"syscalls/system.cpp",
|
|
"syscalls/thread.cpp",
|
|
"syscalls/vm_area.cpp",
|
|
"task.s",
|
|
"tss.cpp",
|
|
"vm_space.cpp",
|
|
])
|
|
|
|
from glob import glob
|
|
from os.path import join
|
|
|
|
layout = join(source_root, "definitions/memory_layout.csv")
|
|
definitions = glob('definitions/**/*.def', recursive=True)
|
|
|
|
kernel.add_depends(["memory.h.cog"], [layout])
|
|
kernel.add_depends(["syscall.cpp.cog", "syscall.h.cog", "syscalls.inc.cog"], definitions)
|
|
|
|
kernel.variables['ldflags'] = ["${ldflags}", "-T", "${source_root}/src/kernel/kernel.ld"]
|