Bonnibel will now build dynamic libraries when they're dependencies for non-statically linked modules. It will also copy those shared libraries into the initrd image for programs being copied into the image.
90 lines
2.2 KiB
Python
90 lines
2.2 KiB
Python
# vim: ft=python
|
|
|
|
kernel = module("kernel",
|
|
default = True,
|
|
basename = "jsix",
|
|
targets = [ "kernel" ],
|
|
description = "jsix kernel",
|
|
deps = [ "util", "cpu", "bootproto", "j6" ],
|
|
static = True,
|
|
ld_script = "kernel.ld",
|
|
sources = [
|
|
"apic.cpp",
|
|
"kassert.cpp",
|
|
"boot.s",
|
|
"capabilities.cpp",
|
|
"clock.cpp",
|
|
"cpprt.cpp",
|
|
"cpu.cpp",
|
|
"cpu.s",
|
|
"device_manager.cpp",
|
|
"frame_allocator.cpp",
|
|
"gdt.cpp",
|
|
"gdtidt.s",
|
|
"heap_allocator.cpp",
|
|
"hpet.cpp",
|
|
"idt.cpp",
|
|
"interrupts.cpp",
|
|
"interrupts.s",
|
|
"io.cpp",
|
|
"ipc_message.cpp",
|
|
"kernel_main.cpp",
|
|
"logger.cpp",
|
|
"memory.cpp",
|
|
"memory.h.cog",
|
|
"memory_bootstrap.cpp",
|
|
"msr.cpp",
|
|
"objects/event.cpp",
|
|
"objects/kobject.cpp",
|
|
"objects/mailbox.cpp",
|
|
"objects/thread.cpp",
|
|
"objects/process.cpp",
|
|
"objects/system.cpp",
|
|
"objects/vm_area.cpp",
|
|
"page_table.cpp",
|
|
"page_tree.cpp",
|
|
"scheduler.cpp",
|
|
"smp.cpp",
|
|
"smp.s",
|
|
"syscall.cpp.cog",
|
|
"syscall.h.cog",
|
|
"syscall.s",
|
|
"syscall_verify.cpp.cog",
|
|
"syscalls.inc.cog",
|
|
"syscalls/event.cpp",
|
|
"syscalls/handle.cpp",
|
|
"syscalls/mailbox.cpp",
|
|
"syscalls/object.cpp",
|
|
"syscalls/process.cpp",
|
|
"syscalls/futex.cpp",
|
|
"syscalls/system.cpp",
|
|
"syscalls/thread.cpp",
|
|
"syscalls/vm_area.cpp",
|
|
"sysconf.cpp",
|
|
"sysconf.h.cog",
|
|
"task.s",
|
|
"tss.cpp",
|
|
"vm_space.cpp",
|
|
"wait_queue.cpp",
|
|
"xsave.cpp",
|
|
])
|
|
|
|
if config == "debug":
|
|
kernel.add_input("debugcon.cpp")
|
|
|
|
from glob import glob
|
|
from os.path import join
|
|
|
|
layout = join(source_root, "definitions/memory_layout.yaml")
|
|
sysconf = join(source_root, "definitions/sysconf.yaml")
|
|
definitions = glob(join(source_root, 'definitions/**/*.def'), recursive=True)
|
|
|
|
kernel.add_depends(["memory.h.cog"], [layout])
|
|
kernel.add_depends(["sysconf.h.cog"], [sysconf])
|
|
kernel.add_depends([
|
|
"syscall.cpp.cog",
|
|
"syscall.h.cog",
|
|
"syscalls.inc.cog",
|
|
"syscall_verify.cpp.cog",
|
|
], definitions)
|