Rust製OS、Redoxを試す。
インストール
公式通り。
今回はVirtualBox用にインストールする。
$ mkdir redox
$ cd redox
~/redox$ curl -sf https://gitlab.redox-os.org/redox-os/redox/raw/master/bootstrap.sh -o bootstrap.sh && bash -e bootstrap.sh
nightlyがインストールされる。
nightly-x86_64-unknown-linux-gnu installed - rustc 1.48.0-nightly (9b4154193 2020-09-14)
info: checking for self-updates
info: using existing install for 'nightly-x86_64-unknown-linux-gnu'
info: default toolchain set to 'nightly-x86_64-unknown-linux-gnu'
nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.48.0-nightly (9b4154193 2020-09-14)
Your rust install looks good!
~/redox$ cd redox
~/redox/redox$ make all
info: syncing channel updates for 'nightly-2020-07-27-x86_64-unknown-linux-gnu'
info: latest update on 2020-07-27, rust version 1.47.0-nightly (6c8927b0c 2020-07-26)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: Defaulting to 500.0 MiB unpack ram
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
mk/depends.mk:18: *** xargo 0.3.20 not found, run "cargo install --force --version 0.3.20 xargo". 中止.
mk/depends.mk:18: *** xargo 0.3.20 not found, run "cargo install --force --version 0.3.20 xargo". 中止.
~/redox/redox$ cargo install --force --version 0.3.20 xargo
xargoの0.3.20がない、と怒られるので、指示に従ってインストールした。
再度、make all
する。
~/redox/redox$ make all
途中、いくつかのcrateに対して、「すでにバージョンが上がっているのでわざわざ指定しなくて良い」やFFIに関するwarningが出る。
warning: `extern` fn uses type `fn(i32)`, which is not FFI-safe
--> src/header/signal/mod.rs:235:58
|
235 | pub extern "C" fn sigset(sig: c_int, func: fn(c_int)) -> fn(c_int) {
| ^^^^^^^^^ not FFI-safe
|
= help: consider using an `extern fn(...) -> ...` function pointer instead
= note: this function pointer has Rust-specific calling convention
warning: `extern` fn uses type `[u64; 34]`, which is not FFI-safe
--> src/header/arch_aarch64_user/mod.rs:26:8
|
26 | c: elf_gregset_t,
| ^^^^^^^^^^^^^ not FFI-safe
|
= help: consider passing a pointer to the array
= note: passing raw arrays by value is not FFI-safe
warning: `extern` fn uses type `[u64; 27]`, which is not FFI-safe
--> src/header/arch_x64_user/mod.rs:79:8
|
79 | d: elf_gregset_t,
| ^^^^^^^^^^^^^ not FFI-safe
|
= help: consider passing a pointer to the array
= note: passing raw arrays by value is not FFI-safe
+ test x != x--no-po4a
+ cd po4a
+ sh update-po
po4a/update-po: The program 'po4a' was not found.
po4a/update-po: Translated man pages were not generated.
cook - xz - error: failed to fetch: failed to run "bash" "-ex": exited with status exit code: 1
./repo.sh failed.make: *** [mk/filesystem.mk:18: build/filesystem.bin] エラー 1
bashの実行でエラーがでてストップ。
9/16追記
エラーをよく見たら「po4aがないよ」ということがわかった。
sudo apt install -y po4a
とした上で、再度make all
。これで先に進む。
warning: trait objects without an explicit `dyn` are deprecated
--> src/smolnetd/scheme/netcfg/mod.rs:287:29
|
287 | node_writer: Option<Box<NodeWriter>>,
| ^^^^^^^^^^ help: use `dyn`: `dyn NodeWriter`
このくらいの修正は後で試してみると面白いかも。
動作確認
make qemu kvm=no
を実行した。make qemu
だけだと起動途中でとまる。
無事動作した。