用rust从零开始编写os
参考代码:
https://github.com/phil-opp/blog_os
参照文章:
- 切换rust版本
rustup override add nightly
- 安装Rust的源代码(可选)
如果需要自主build std ,基本库则需要安装rust-src,移除.cargo/config
rustup component add rust-src
- 安装xbuild(可选)
如果需要自主build std ,基本库则需要安装xbuild,移除.cargo/config
[unstable]
build-std = ["core", "compiler_builtins"]
cargo install cargo-xbuild
- 安装bootimage
注意bootimage要和bootloader
版本对应
cargo install bootimage
- 如果想要使用uefi引导,只需要使用最新的boot-loader即可无需安装安装bootimage