From c1064ad3169d2e6d4c2e73a2d5318db1f88421f6 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sat, 20 Apr 2019 18:05:13 +0200 Subject: [PATCH 1/5] Add a .cargo/config file --- .cargo/config | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .cargo/config diff --git a/.cargo/config b/.cargo/config new file mode 100644 index 00000000..7f2ad55d --- /dev/null +++ b/.cargo/config @@ -0,0 +1,5 @@ +[build] +target = "x86_64-blog_os.json" + +[target.'cfg(target_os = "none")'] +runner = "bootimage runner" From 06d1c9ff81295b0dc13f60e06454740d70a8c881 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sat, 20 Apr 2019 18:06:02 +0200 Subject: [PATCH 2/5] Update CI scripts to use `cargo bootimage` --- .appveyor.yml | 2 +- .travis.yml | 5 ++--- azure-pipelines.yml | 6 ++---- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 7c4bd1c0..ad43a498 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -73,4 +73,4 @@ before_test: - cargo install-latest cargo-xbuild bootimage test_script: - - bootimage build + - cargo bootimage diff --git a/.travis.yml b/.travis.yml index a6f58578..ff2ad445 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,9 +30,8 @@ cache: before_script: - rustup component add rust-src llvm-tools-preview - - (test -x $HOME/.cargo/bin/cargo-install-latest || cargo install cargo-install-latest) - - cargo install-latest cargo-xbuild bootimage cargo-cache + - cargo install cargo-xbuild bootimage cargo-cache --debug -Z install-upgrade script: - - bootimage build + - cargo bootimage - cargo cache --autoclean diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5b43f03d..8a3dcda1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -52,12 +52,10 @@ steps: - script: rustup component add rust-src llvm-tools-preview displayName: 'Install Rustup Components' -- script: | - cargo install cargo-xbuild --debug - cargo install bootimage --debug +- script: cargo install cargo-xbuild bootimage --debug displayName: 'Install cargo-xbuild and bootimage' -- script: bootimage build +- script: cargo bootimage displayName: 'Build' - script: rustup component add rustfmt From 528bbd4e9fb90cf1e730cefd932112702c078c2f Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Thu, 25 Apr 2019 14:28:43 +0200 Subject: [PATCH 3/5] Add a `cargo xbuild` check on CI --- .appveyor.yml | 1 + .travis.yml | 1 + azure-pipelines.yml | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index ad43a498..423cc6db 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -73,4 +73,5 @@ before_test: - cargo install-latest cargo-xbuild bootimage test_script: + - cargo xbuild - cargo bootimage diff --git a/.travis.yml b/.travis.yml index ff2ad445..1e6697ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,5 +33,6 @@ before_script: - cargo install cargo-xbuild bootimage cargo-cache --debug -Z install-upgrade script: + - cargo xbuild - cargo bootimage - cargo cache --autoclean diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8a3dcda1..672a9add 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -55,9 +55,12 @@ steps: - script: cargo install cargo-xbuild bootimage --debug displayName: 'Install cargo-xbuild and bootimage' -- script: cargo bootimage +- script: cargo xbuild displayName: 'Build' +- script: cargo bootimage + displayName: 'Create Bootimage' + - script: rustup component add rustfmt displayName: 'Install Rustfmt' From 63b97fe1f85ec0ceec0a192c68a589089e6364ed Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Fri, 26 Apr 2019 11:23:32 +0200 Subject: [PATCH 4/5] Update bootloader to version 0.6.0 --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b30261fd..0bd7abdf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -22,12 +22,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "blog_os" version = "0.1.0" dependencies = [ - "bootloader 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bootloader 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bootloader" -version = "0.5.2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fixedvec 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -215,7 +215,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum array-init 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "23589ecb866b460d3a0f1278834750268c607e8e28a1b982c907219f3178cd72" "checksum bit_field 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ed8765909f9009617974ab6b7d332625b320b33c326b1e9321382ef1999b5d56" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" -"checksum bootloader 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2735a1e3ddf16e6832fff86db617778dd3cecd5804fc8c2f20f448750d4c989c" +"checksum bootloader 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8654b1ebbd38d2a8687a451ad53466d01b5edc9d75ec63d676525a6103d77151" "checksum fixedvec 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7c6c16d316ccdac21a4dd648e314e76facbbaf316e83ca137d0857a9c07419d0" "checksum font8x8 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b81d84c3c978af7d05d31a2198af4b9ba956d819d15d8f6d58fc150e33f8dc1f" "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" diff --git a/Cargo.toml b/Cargo.toml index affeefaf..26a84cf7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Philipp Oppermann "] edition = "2018" [dependencies] -bootloader = "0.5.1" +bootloader = "0.6.0" [profile.dev] panic = "abort" From b59720f6e112f5c1079ba649d50cdcf61139ef66 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Fri, 26 Apr 2019 11:27:36 +0200 Subject: [PATCH 5/5] Update Readme for new runner --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2c264b11..66739f4b 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,13 @@ cargo install cargo-xbuild bootimage Then you can build the project by running: ``` -bootimage build +cargo xbuild +``` + +To create a bootable disk image, run: + +``` +cargo bootimage ``` This creates a bootable disk image in the `target/x86_64-blog_os/debug` directory. @@ -33,7 +39,7 @@ You can run the disk image in [QEMU] through: [QEMU]: https://www.qemu.org/ ``` -bootimage run +cargo xrun ``` Of course [QEMU] needs to be installed for this.