seL4カーネルのリファレンスOS
https://github.com/seL4/refos
Terminal
impl/apps/terminal/src/terminal.cで実装されている-
static void
terminal_printhelp(void)
{
printf(“RefOS Terminal Help:\n”
” clear - Clear the screen.\n”
” help - Display this help screen.\n”
” exec - Run an executable.\n”
#if CONFIG_APP_TETRIS
” exec fileserv/tetris - Run tetris game.\n”
#endif
#if CONFIG_APP_SNAKE
” exec fileserv/snake - Run snake game.\n”
#endif
#if CONFIG_APP_NETHACK
” exec fileserv/nethack - Run Nethack 3.4.3 game.\n”
#endif
#if CONFIG_APP_TEST_USER
” exec fileserv/test_user - Run RefOS userland tests.\n”
#endif
” exec fileserv/terminal - Run another instance of RefOS terminal.\n”
” cd /fileserv/ - Change current working directory.\n”
” printenv - Print all environment variables.\n”
” setenv - Set an environment variable.\n”
” time - Display the current system time.\n”
” exit - Exit RefOS terminal.\n”);
}
```
terminal_exec()で新しくプロセスを実行している- 本質はおそらく
proc_new_proc()- proc_interface.xml で定義されている?
- 実装はProcess Serverがやっている
Process Server
impl/Makefileのrefosルール において${SEL4_COMMON}/elfloader/gen_boot_image.shの第2引数に${STAGE_BASE}/bin/process_serverを渡しており、これがルートタスクである可能性がある${SEL4_COMMON}と${STAGE_BASE}って何?gen_boot_image.shでGitHub検索しても出てこないんだけど?- orgで絞り込むのをやめたらSEL4PROJ/elfloader-tool が出てきた……が、2018年にarchiveされている
- Makefileに
gen_boot_image.shを実行する行が追加されたコミットは2014年のもので、当時は使えたんだろうな- つまり今はビルドできないってこと?
- Makefileに
- orgで絞り込むのをやめたらSEL4PROJ/elfloader-tool が出てきた……が、2018年にarchiveされている
proc_new_proc()の定義がある(impl/apps/process_server/src/dispatchers/proc_syscall.c@proc_new_proc_handler())