mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
@@ -2,7 +2,6 @@
|
||||
title = "Writing an OS in pure Rust"
|
||||
date = 2018-03-09
|
||||
aliases = ["news/2018-03-09-pure-rust"]
|
||||
template = "news-page.html"
|
||||
+++
|
||||
|
||||
Over the past six months we've been working on a second edition of this blog. Our goals for this new version are [numerous] and we are still not done yet, but today we reached a major milestone: It is now possible to build the OS natively on Windows, macOS, and Linux **without any non-Rust dependendencies**.
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
+++
|
||||
title = "News"
|
||||
template = "news-section.html"
|
||||
page_template = "news-page.html"
|
||||
sort_by = "date"
|
||||
+++
|
||||
|
||||
34
blog/content/status-update/2019-05-01.md
Normal file
34
blog/content/status-update/2019-05-01.md
Normal file
@@ -0,0 +1,34 @@
|
||||
+++
|
||||
title = "Updates in April 2019"
|
||||
date = 2019-05-01
|
||||
+++
|
||||
|
||||
Lot's of things changed in the _Writing an OS in Rust_ series in the past month, both on the blog itself and in the tools behind the scenes. This post gives an overview of the most important updates.
|
||||
|
||||
This post is an experiment inspired by [_This Week in Rust_] and similar series. The goal is to provide a resource that allows following the project more closely and staying up-to-date with the changes in the tools/libraries behind the scenes. If enough people find this useful, I will try to turn this in a semi-regular series.
|
||||
|
||||
[_This Week in Rust_]: https://this-week-in-rust.org/
|
||||
|
||||
## Bootloader
|
||||
|
||||
- The build system of the bootloader was rewritten to do a proper linking instead of appending the kernel executable manually like before. The relevant pull requests are [_Rewrite build system_](https://github.com/rust-osdev/bootloader/pull/51) and [_Updates for new build system_](https://github.com/rust-osdev/bootloader/pull/53). These (breaking) changes were released as version `0.5.0` ([changelog](https://github.com/rust-osdev/bootloader/blob/master/Changelog.md#050)).
|
||||
- To make the bootloader work with future versions of `bootimage`, a [`package.metadata.bootloader.target` key was added](https://github.com/rust-osdev/bootloader/commit/33b8ce6059e90485c56883b23d4834d06ddfd517) to the `Cargo.toml` of the bootloader. This key specifies the name of the target JSON file, so that `bootimage` knows which `--target` argument to pass. This change was released as version `0.5.1` ([changelog](https://github.com/rust-osdev/bootloader/blob/master/Changelog.md#051))
|
||||
- In the [_Version 0.6.0_](https://github.com/rust-osdev/bootloader/pull/55) pull request, the `#[cfg(not(test))]` attribute was removed from the `entry_point` macro. This makes it possible to use the macro together with `cargo xtest` and a custom test framework. Since the change is breaking, it was released as version `0.6.0` ([changelog](https://github.com/rust-osdev/bootloader/blob/master/Changelog.md#060)).
|
||||
|
||||
## Bootimage
|
||||
|
||||
- The [_Rewrite bootimage for new bootloader build system_](https://github.com/rust-osdev/bootimage/pull/34) pull request completely revamped the implementation of the crate. This was released as version `0.7.0`. See the [changelog](https://github.com/rust-osdev/bootimage/blob/master/Changelog.md#070) for a list of changes.
|
||||
- The rewrite had the unintended side-effect that `bootimage run` no longer ignored executables named `test-*`, so that an additional `--bin` argument was required for specifying which executable to run. To avoid breaking users of `bootimage test`, we yanked version `0.7.0`. After [fixing the issue](https://github.com/rust-osdev/bootimage/commit/8746c15bf326cf8438a4e64ffdda332fbe59e30d), version `0.7.1` was released ([changelog](https://github.com/rust-osdev/bootimage/blob/master/Changelog.md#071)).
|
||||
- The [_New features for `bootimage runner`_](https://github.com/rust-osdev/bootimage/pull/36) pull request added support for additional arguments and various functionality for supporting `cargo xtest`. The changes were released as version `0.7.2` ([changelog](https://github.com/rust-osdev/bootimage/blob/master/Charelog.md#072)).
|
||||
- An argument parsing bug that broke the new `cargo bootimage` subcommand on Windows was [fixed](https://github.com/rust-osdev/bootimage/commit/101eb43de403fd9f3cb3f044e2c263356d2c179a). The fix was released as version `0.7.3`.
|
||||
|
||||
## Blog OS
|
||||
|
||||
- Performed an [_Update to new bootloader 0.5.1 and bootimage 0.7.2_](https://github.com/phil-opp/blog_os/pull/575). Apart from requiring the `llvm-tools-preview` rustup component, this only changes version numbers.
|
||||
- The [_Rewrite the linking section of "A Freestanding Rust Binary"_](https://github.com/phil-opp/blog_os/pull/577) pull request updated the first post to compile for the bare-metal `thumbv7em-none-eabihf` target instead of adding linker arguments for Linux/Windows/macOS.
|
||||
- Since the blog came close to the free bandwidth limit of Netlify, we needed to [_Migrate from Netlify to Github Pages_](https://github.com/phil-opp/blog_os/pull/579) to avoid additional fees.
|
||||
- With the [_Minimal Rust Kernel: Use a runner to make cargo xrun work_](https://github.com/phil-opp/blog_os/pull/582) pull request, we integrated the new `bootimage runner` into the blog.
|
||||
- The required updates to the `post-02` and `post-03` branches were performed in the [_Add `.cargo/config` file to post-02 branch_](https://github.com/phil-opp/blog_os/pull/585) and [_Merge the changes from #585 into the post-03 branch_](https://github.com/phil-opp/blog_os/pull/586) pull requests.
|
||||
- In the [_New testing post_](https://github.com/phil-opp/blog_os/pull/584) pull request, we replaced the previous [_Unit Testing_](https://os.phil-opp.com/unit-testing/) and [_Integration Tests_](https://os.phil-opp.com/integration-tests/) with the new [_Testing_](https://os.phil-opp.com/testing/) post, which uses `cargo xtest` and a custom test framework for running tests.
|
||||
- The required updates for the `post-04` branch were performed in the [_Implement code for new testing post in post-xx branches_](https://github.com/phil-opp/blog_os/pull/587) pull request. The updates for the other `post-*` branches were pushed manually to avoid spamming the repository with pull requests. You can find a list of the commits in the pull request description.
|
||||
- The [_Avoid generic impl trait parameters in BootInfoFrameAllocator_](https://github.com/phil-opp/blog_os/pull/595) pull request made the `BootInfoFrameAllocator` non-generic by reconstructing the frame iterator on every allocation. This way, we avoid using a `impl Trait` type parameter, which makes it [impossible to store the type in a `static`](https://github.com/phil-opp/blog_os/issues/593). See [rust-lang/rust#60367](https://github.com/rust-lang/rust/issues/60367) for the fundamental problem.
|
||||
6
blog/content/status-update/_index.md
Normal file
6
blog/content/status-update/_index.md
Normal file
@@ -0,0 +1,6 @@
|
||||
+++
|
||||
title = "Status Updates"
|
||||
template = "status-update-section.html"
|
||||
page_template = "status-update-page.html"
|
||||
sort_by = "date"
|
||||
+++
|
||||
@@ -14,10 +14,10 @@
|
||||
{% for page in section.pages %}
|
||||
<div>
|
||||
<h2 class="post-title"><a href="/{{ page.path | safe }}">{{ page.title }}</a></h2>
|
||||
<time datetime="{{ page.date | date(format="%Y-%m-%d") }}" class="post-date">
|
||||
<time datetime="{{ page.date | date(format="%Y-%m-%d") }}" class="post-date" style="margin-bottom: 0.5rem;">
|
||||
{{ page.date | date(format="%b %d, %Y") }}
|
||||
</time>
|
||||
<div class="post-summary">
|
||||
<div class="post-summary" style="margin-bottom: 2rem;">
|
||||
{{ page.summary | safe}}
|
||||
<a class="read-more" href="/{{ page.path | safe }}">read more…</a>
|
||||
</div>
|
||||
|
||||
39
blog/templates/status-update-page.html
Normal file
39
blog/templates/status-update-page.html
Normal file
@@ -0,0 +1,39 @@
|
||||
{% extends "second-edition/base.html" %}
|
||||
|
||||
{% import "macros.html" as macros %}
|
||||
|
||||
{% block title %}{{ page.title }} | {{ config.title }}{% endblock title %}
|
||||
|
||||
{% block main %}
|
||||
<h1>{{ page.title }}</h1>
|
||||
<time datetime="{{ page.date | date(format="%Y-%m-%d") }}" class="post-date">
|
||||
{{ page.date | date(format="%b %d, %Y") }}
|
||||
{% if page.extra.updated %} (updated on {{ page.extra.updated | date(format="%b %d, %Y") }}) {% endif %}
|
||||
</time>
|
||||
{{ page.content | safe }}
|
||||
|
||||
<div>
|
||||
<h2>Thank You!</h2>
|
||||
<p>I want to thank all the people who support me on <a href="https://donorbox.org/phil-opp">Donorbox</a>, <a href="https://www.patreon.com/phil_opp">Patreon</a>, and <a href="https://liberapay.com/phil-opp/">Liberapay</a>. It means a lot to me!</p>
|
||||
</div>
|
||||
{% endblock main %}
|
||||
|
||||
{% block after_main %}
|
||||
<hr>
|
||||
<div class="PageNavigation">
|
||||
{% if page.lighter %}
|
||||
<a class="prev" href="/{{ page.lighter.path | safe }}">« {{ page.lighter.title }}</a>
|
||||
{% endif %}
|
||||
{% if page.heavier %}
|
||||
<a class="next" href="/{{ page.heavier.path | safe }}">{{ page.heavier.title }} »</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<hr>
|
||||
<section>
|
||||
<h2 id="comments">Comments</h2>
|
||||
{{ macros::utterances() }}
|
||||
</section>
|
||||
|
||||
{% endblock after_main %}
|
||||
|
||||
|
||||
23
blog/templates/status-update-section.html
Normal file
23
blog/templates/status-update-section.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{% extends "second-edition/base.html" %}
|
||||
|
||||
{% import "macros.html" as macros %}
|
||||
|
||||
{% block title %}{{ section.title }} | {{ config.title }}{% endblock title %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
<h1>{{ section.title }}</h1>
|
||||
|
||||
{% block introduction %}
|
||||
<p>
|
||||
These posts give a semi-regular overview of the most important changes to the blog and the tools and libraries behind the scenes.
|
||||
</p>
|
||||
{% endblock introduction %}
|
||||
|
||||
<div><ul>
|
||||
{% for page in section.pages %}
|
||||
<li><b><a href="/{{ page.path | safe }}">{{ page.title }}</a></b></li>
|
||||
{% endfor %}
|
||||
</ul></div>
|
||||
|
||||
{% endblock main %}
|
||||
Reference in New Issue
Block a user