From b256db89c4dc7b1d7ed4f95ea091e844ae3a8b9d Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sun, 27 Jan 2019 16:46:57 +0100 Subject: [PATCH 1/7] Add a Readme --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..1c16f755 --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# Blog OS (A Freestanding Rust Binary) + +[![Build Status](https://travis-ci.org/phil-opp/blog_os.svg?branch=post-01)](https://travis-ci.org/phil-opp/blog_os/branches) + +This repository contains the source code for the [A Freestanding Rust Binary][post] post of the [Writing an OS in Rust](https://os.phil-opp.com) series. + +[post]: https://os.phil-opp.com/freestanding-rust-binary/ + +**Check out the [master branch](https://github.com/phil-opp/blog_os) for more information.** + +## Building + +You need a nightly Rust compiler. To build the project on Linux, run: + +``` +cargo rustc -- -Z pre-link-arg=-nostartfiles +``` + +The entry point and the build command differ slightly on macOS and Windows. See the [post] for more information. + +Please file an issue if you have any problems. + +## License +The source code is dual-licensed under MIT or the Apache License (Version 2.0). From f013172dd743cd3d449aec2e1610ee0f150a9475 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sun, 27 Jan 2019 16:58:42 +0100 Subject: [PATCH 2/7] Update Readme for `A Minimal Rust Kernel` post --- README.md | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 1c16f755..bc23a357 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,50 @@ -# Blog OS (A Freestanding Rust Binary) +# Blog OS (A Minimal Rust Kernel) -[![Build Status](https://travis-ci.org/phil-opp/blog_os.svg?branch=post-01)](https://travis-ci.org/phil-opp/blog_os/branches) +[![Build Status](https://travis-ci.org/phil-opp/blog_os.svg?branch=post-02)](https://travis-ci.org/phil-opp/blog_os/branches) -This repository contains the source code for the [A Freestanding Rust Binary][post] post of the [Writing an OS in Rust](https://os.phil-opp.com) series. +This repository contains the source code for the [A Minimal Rust Kernel][post] post of the [Writing an OS in Rust](https://os.phil-opp.com) series. -[post]: https://os.phil-opp.com/freestanding-rust-binary/ +[post]: https://os.phil-opp.com/minimal-rust-kernel/ **Check out the [master branch](https://github.com/phil-opp/blog_os) for more information.** ## Building -You need a nightly Rust compiler. To build the project on Linux, run: +You need a nightly Rust compiler. First you need to install the `cargo-xbuild` and `bootimage` tools: ``` -cargo rustc -- -Z pre-link-arg=-nostartfiles +cargo install cargo-xbuild bootimage ``` -The entry point and the build command differ slightly on macOS and Windows. See the [post] for more information. +Then you can build the project by running: + +``` +bootimage build +``` + +This creates a bootable disk image in the `target/x86_64-blog_os/debug` directory. Please file an issue if you have any problems. +## Running + +You can run the disk image in [QEMU] through: + +[QEMU]: https://www.qemu.org/ + +``` +bootimage run +``` + +Of course [QEMU] needs to be installed for this. + +You can also write the image to an USB stick for booting it on a real machine. On Linux, the command for this is: + +``` +dd if=target/x86_64-blog_os/debug/bootimage-blog_os.bin of=/dev/sdX && sync +``` + +Where `sdX` is the device name of your USB stick. **Be careful** to choose the correct device name, because everything on that device is overwritten. + ## License The source code is dual-licensed under MIT or the Apache License (Version 2.0). From 8c1e98752a5e44f6c03e4bf684beef1d7042771a Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sun, 27 Jan 2019 16:59:44 +0100 Subject: [PATCH 3/7] Update Readme for `VGA Text Mode` post --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bc23a357..38717aa8 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# Blog OS (A Minimal Rust Kernel) +# Blog OS (VGA Text Mode) -[![Build Status](https://travis-ci.org/phil-opp/blog_os.svg?branch=post-02)](https://travis-ci.org/phil-opp/blog_os/branches) +[![Build Status](https://travis-ci.org/phil-opp/blog_os.svg?branch=post-03)](https://travis-ci.org/phil-opp/blog_os/branches) -This repository contains the source code for the [A Minimal Rust Kernel][post] post of the [Writing an OS in Rust](https://os.phil-opp.com) series. +This repository contains the source code for the [VGA Text Mode][post] post of the [Writing an OS in Rust](https://os.phil-opp.com) series. -[post]: https://os.phil-opp.com/minimal-rust-kernel/ +[post]: https://os.phil-opp.com/vga-text-mode/ **Check out the [master branch](https://github.com/phil-opp/blog_os) for more information.** From 61d10d686b1926b9defa81036a72a0019cfa9355 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sun, 27 Jan 2019 17:01:34 +0100 Subject: [PATCH 4/7] Update Readme for `Unit Testing` post --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 38717aa8..0d5ce9f1 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# Blog OS (VGA Text Mode) +# Blog OS (Unit Testing) -[![Build Status](https://travis-ci.org/phil-opp/blog_os.svg?branch=post-03)](https://travis-ci.org/phil-opp/blog_os/branches) +[![Build Status](https://travis-ci.org/phil-opp/blog_os.svg?branch=post-04)](https://travis-ci.org/phil-opp/blog_os/branches) -This repository contains the source code for the [VGA Text Mode][post] post of the [Writing an OS in Rust](https://os.phil-opp.com) series. +This repository contains the source code for the [Unit Testing][post] post of the [Writing an OS in Rust](https://os.phil-opp.com) series. -[post]: https://os.phil-opp.com/vga-text-mode/ +[post]: https://os.phil-opp.com/unit-testing/ **Check out the [master branch](https://github.com/phil-opp/blog_os) for more information.** @@ -46,5 +46,9 @@ dd if=target/x86_64-blog_os/debug/bootimage-blog_os.bin of=/dev/sdX && sync Where `sdX` is the device name of your USB stick. **Be careful** to choose the correct device name, because everything on that device is overwritten. +## Testing + +To run the unit tests on the host system, execute `cargo test`. + ## License The source code is dual-licensed under MIT or the Apache License (Version 2.0). From 92cc34712c86427aa68a9960e477c05d476155d4 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sun, 27 Jan 2019 17:03:46 +0100 Subject: [PATCH 5/7] Update Readme for `Integration Tests` post --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0d5ce9f1..b4456831 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# Blog OS (Unit Testing) +# Blog OS (Integration Tests) -[![Build Status](https://travis-ci.org/phil-opp/blog_os.svg?branch=post-04)](https://travis-ci.org/phil-opp/blog_os/branches) +[![Build Status](https://travis-ci.org/phil-opp/blog_os.svg?branch=post-05)](https://travis-ci.org/phil-opp/blog_os/branches) -This repository contains the source code for the [Unit Testing][post] post of the [Writing an OS in Rust](https://os.phil-opp.com) series. +This repository contains the source code for the [Integration Tests][post] post of the [Writing an OS in Rust](https://os.phil-opp.com) series. -[post]: https://os.phil-opp.com/unit-testing/ +[post]: https://os.phil-opp.com/integration-tests/ **Check out the [master branch](https://github.com/phil-opp/blog_os) for more information.** @@ -48,7 +48,7 @@ Where `sdX` is the device name of your USB stick. **Be careful** to choose the c ## Testing -To run the unit tests on the host system, execute `cargo test`. +To run the unit tests on the host system, execute `cargo test`. To run the integration tests in [QEMU], run `bootimage test`. ## License The source code is dual-licensed under MIT or the Apache License (Version 2.0). From 94014b5a3905c45778a4a16ed0dce57f5986d6de Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sun, 27 Jan 2019 17:04:55 +0100 Subject: [PATCH 6/7] Update Readme for `CPU Exceptions` post --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b4456831..4acd8d45 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# Blog OS (Integration Tests) +# Blog OS (CPU Exceptions) -[![Build Status](https://travis-ci.org/phil-opp/blog_os.svg?branch=post-05)](https://travis-ci.org/phil-opp/blog_os/branches) +[![Build Status](https://travis-ci.org/phil-opp/blog_os.svg?branch=post-06)](https://travis-ci.org/phil-opp/blog_os/branches) -This repository contains the source code for the [Integration Tests][post] post of the [Writing an OS in Rust](https://os.phil-opp.com) series. +This repository contains the source code for the [CPU Exceptions][post] post of the [Writing an OS in Rust](https://os.phil-opp.com) series. -[post]: https://os.phil-opp.com/integration-tests/ +[post]: https://os.phil-opp.com/cpu-exceptions/ **Check out the [master branch](https://github.com/phil-opp/blog_os) for more information.** From 233943310cd582f3224b5082112e25946b2d6981 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sun, 27 Jan 2019 17:12:21 +0100 Subject: [PATCH 7/7] Update Readme for `Double Faults` post --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4acd8d45..aceb4e1f 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# Blog OS (CPU Exceptions) +# Blog OS (Double Faults) -[![Build Status](https://travis-ci.org/phil-opp/blog_os.svg?branch=post-06)](https://travis-ci.org/phil-opp/blog_os/branches) +[![Build Status](https://travis-ci.org/phil-opp/blog_os.svg?branch=post-07)](https://travis-ci.org/phil-opp/blog_os/branches) -This repository contains the source code for the [CPU Exceptions][post] post of the [Writing an OS in Rust](https://os.phil-opp.com) series. +This repository contains the source code for the [Double Faults][post] post of the [Writing an OS in Rust](https://os.phil-opp.com) series. -[post]: https://os.phil-opp.com/cpu-exceptions/ +[post]: https://os.phil-opp.com/double-fault-exceptions/ **Check out the [master branch](https://github.com/phil-opp/blog_os) for more information.**