32 lines
741 B
Meson
32 lines
741 B
Meson
cxx = meson.get_compiler('cpp')
|
|
gcc_dep = cxx.find_library('gcc', required: true)
|
|
|
|
elf = executable(
|
|
'kernel.elf',
|
|
arch_sources,
|
|
include_directories: includes,
|
|
dependencies: gcc_dep,
|
|
link_args: [
|
|
'-Wl,-T,' + meson.current_source_dir() + '/platform.ld',
|
|
'-static'
|
|
],
|
|
link_depends: files('platform.ld'),
|
|
install: true,
|
|
install_dir: meson.build_root()
|
|
)
|
|
|
|
run_target('qemu',
|
|
command: [
|
|
find_program('qemu-system-riscv64'),
|
|
'-machine', 'virt',
|
|
'-cpu', 'rv64',
|
|
'-bios', 'opensbi-riscv64-generic-fw_dynamic.bin',
|
|
'-m', '256m',
|
|
'-serial', 'stdio',
|
|
'-s',
|
|
'-display', 'none',
|
|
# '-d', 'int',
|
|
'-kernel', elf
|
|
]
|
|
)
|
|
|