From 21fbb5720e4be2887b2faab5728e69c92fbb1a5b Mon Sep 17 00:00:00 2001 From: "Anna (navi) Figueiredo Gomes" Date: Thu, 6 Jun 2024 15:58:58 +0200 Subject: ustar disk Signed-off-by: Anna (navi) Figueiredo Gomes --- meson.build | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 94f7334..ebd79a4 100644 --- a/meson.build +++ b/meson.build @@ -13,6 +13,12 @@ endif fs = import('fs') linker_script = fs.copyfile('util/linker.ld') +drive = custom_target(output: 'drive', + command: ['util/build_disk.sh', + meson.current_source_dir() / 'disk', + '@OUTPUT@', + '@PRIVATE_DIR@']) + files = [ 'src/asm/boot.asm', 'src/asm/long.asm', @@ -27,7 +33,8 @@ files = [ 'src/ahci.c', 'src/vga.c', 'src/fs/gpt.c', - linker_script + linker_script, + drive ] ld_args = [ @@ -49,9 +56,14 @@ iso = custom_target('iso', output: 'nrvn.iso', command: ['util/build_iso.sh', '@PRIVATE_DIR@', '@INPUT@', '@OUTPUT@']) +qemu = find_program('qemu') qemu_args = [ - '-cdrom', iso, '-m', get_option('ram'), + '-boot', 'd', + '-cdrom', iso, + '-drive', 'id=disk,format=raw,file=@0@,if=none'.format(drive.full_path()), + '-device', 'ahci,id=ahci', + '-device', 'ide-hd,drive=disk,bus=ahci.0' ] qemu_kvm = [] @@ -59,5 +71,5 @@ if get_option('kvm') qemu_kvm += '-enable-kvm' endif -run_target('run', command: [find_program('qemu'), qemu_args, qemu_kvm]) -run_target('run-gdb', command: [find_program('qemu'), qemu_args, '-s', '-S']) +run_target('run', command: [qemu, qemu_args, qemu_kvm]) +run_target('run-gdb', command: [qemu, qemu_args, '-s', '-S']) -- cgit v1.2.3