1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

redox-osインストール

Last updated at Posted at 2020-09-15

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だけだと起動途中でとまる。

redox_login.png

redox_main.png

無事動作した。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?