diff options
author | aqua <aqua@iserlohn-fortress.net> | 2022-03-28 20:03:38 +0300 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2022-08-12 10:13:59 +0300 |
commit | edf9e71e2a7b6b89775c29cf28c19c6b89992c25 (patch) | |
tree | 3adbf944d9e47a743063487c4facb7eed1fbdee0 /meson.build | |
download | kernel-edf9e71e2a7b6b89775c29cf28c19c6b89992c25.tar.xz |
Initial commit
x86 kernel that prints a hello world message to com1
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..e5c8410 --- /dev/null +++ b/meson.build @@ -0,0 +1,26 @@ +project('glitch kernel', 'c', version: '0.1.0', default_options: ['c_std=gnu11', 'warning_level=2']) +python3 = import('python').find_installation('python3') + +subdir('arch/i686') +subdir('devices') + +kernel = executable('glitch.elf', + ['src/multiboot2.c', 'src/mmap.c', 'src/kernel.c', + 'src/mem/vmm.c', + 'lib/string/itoa.c', 'lib/stdio/printf.c'], + link_language: 'c', + link_args: ['-ffreestanding', '-nostdlib', '-static', '-T', meson.current_source_dir()/'arch/i686/linker.ld'], + install: true, native: false, + include_directories: [ + include_directories('grub/include', is_system: true), + include_directories('lib') + ], + dependencies: [arch, devices] +) + +glitch_iso = custom_target('glitch.iso', + input: 'scripts/mkiso.py', output: 'glitch.iso', depends: [kernel], + command: [python3, '@INPUT@', kernel, '@SOURCE_ROOT@/grub/grub.cfg']) + +qemu = find_program('qemu-system-i386') +run_target('run', depends: glitch_iso, command: [qemu, '-cdrom', 'glitch.iso', '-accel', 'kvm']) |