Updates in May 2019
This post gives an overview of the recent updates to the Writing an OS in Rust blog and to the used tools. I was quite busy with my master thesis this month, so I didn’t have the time to create new content or major new features. However, there were quite a few minor updates.
x86_64
- Use cast crate instead of usize_conversions crate (released as version 0.5.5).
- Make FrameAllocator an unsafe trait (released as version 0.6.0).
- Change Port::read and PortReadOnly::read to take &mut self (released as version 0.7.0).
- @npmccallum started working on moving the type declarations to a separate crate to make them usable for more projects. We created the experimental x86_64_types crate for this.
Cargo-Xbuild
- Make backtraces optional to remove the transitive dependency on the
cc
crate, which has additional compile-time requirements (e.g. a workinggcc
installation). These requirements caused problems for some people, so we decided to disable backtraces by default. Released as version 0.5.9. - Error when the sysroot path contains spaces: This pull request adds a special error message that points to rust-lang/cargo#6139 when a sysroot path contains spaces. This should avoid the regular confusion, e.g. here, here, or here.
- Add a
XBUILD_SYSROOT_PATH
environment variable to override sysroot path: This feature is useful when the default sysroot path contains a space. Released as version 0.5.10. - Fix the new
XBUILD_SYSROOT_PATH
environment variable. Released as version 0.5.11. - Update Azure Pipelines CI script
- Build all branches instead of just
master
and the borsstaging
branch. - Rustup is now included in the official Windows image of Azure Pipelines, so we don’t need to install it again.
- Build all branches instead of just
Bootloader
- @rybot666 started working on porting the 16-bit assembly of the bootloader to Rust.
Bootimage
- @toothbrush7777777 landed a pull request to pad the boot image to a hard disk block size. This is required for booting the image in VirtualBox. Released as version 0.7.4.
- Set
XBUILD_SYSROOT_PATH
when building bootloader. Released as version 0.7.5.
Blog OS
- Update to version 0.6.0 of x86_64, which made the
FrameAllocator
trait unsafe to implement. - Use
-serial stdio
instead of-serial mon:stdio
as QEMU arguments when testing. - Update x86_64 to version 0.7.0, which changed the
Port::read
method to take&mut self
instead of&self
. - @josephlr replaced some leftover tabs with spaces.
- Rewrite
CompareMessage
struct to check the whole string.