set ocamlc [installed_command ocamlc] create_boot_directory proc depot_user {} { return [get_cmd_arg --depot-user genodelabs] } import_from_depot \ [depot_user]/src/[base_src] \ [depot_user]/src/init \ append build_components { app/ocamlrun } build $build_components install_config { } # # Compile some bytecode and TAR it # set fd [open [run_dir]/hello.ml w] puts $fd "print_string \"Hello world!\n\";;" close $fd exec ocamlc -o [run_dir]/a.out [run_dir]/hello.ml exec tar cf [run_dir]/genode/bytecode.tar -C [run_dir] a.out build_boot_image { ocamlrun libc.lib.so vfs.lib.so libm.lib.so posix.lib.so } append qemu_args " -nographic -serial mon:stdio " run_genode_until {child "ocamlrun" exited with exit value 0.*\n} 30