From 574d702dee3b1b37e92778c4f58f48d7d669d223 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Thu, 21 Sep 2023 17:18:20 +0200 Subject: [PATCH 01/41] multiboot2: changelog fix --- multiboot2/Changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multiboot2/Changelog.md b/multiboot2/Changelog.md index 20c1124b..afb2e012 100644 --- a/multiboot2/Changelog.md +++ b/multiboot2/Changelog.md @@ -1,6 +1,6 @@ # CHANGELOG for crate `multiboot2` -## 0.19.0 (2023-09-XX) +## 0.19.0 (2023-09-21) - **BREAKING** MSRV is 1.69.0 - **BREAKING** `Tag::get_dst_str_slice` renamed to `Tag::parse_slice_as_string` and now returns `Result<&str, StringError>` From 226348d57f06214dcf5f938ccfce04dfe05d6c4c Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Thu, 21 Sep 2023 17:00:33 +0200 Subject: [PATCH 02/41] multiboot2-header: update deps and raise MSRV from 1.68 to 1.69 --- Cargo.lock | 15 +-------------- integration-test/bins/Cargo.lock | 19 +++---------------- multiboot2-header/Cargo.toml | 2 +- multiboot2-header/Changelog.md | 6 +++++- multiboot2-header/README.md | 2 +- multiboot2-header/src/lib.rs | 2 +- 6 files changed, 12 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d9d54e11..760ec244 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -25,19 +25,6 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -[[package]] -name = "multiboot2" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b624a7b3f704734d98d21455b617607eb7043d4509d1c34bf9e7ff7dd47b31a" -dependencies = [ - "bitflags", - "derive_more", - "log", - "ptr_meta", - "uefi-raw", -] - [[package]] name = "multiboot2" version = "0.19.0" @@ -54,7 +41,7 @@ name = "multiboot2-header" version = "0.3.1" dependencies = [ "derive_more", - "multiboot2 0.16.0", + "multiboot2", ] [[package]] diff --git a/integration-test/bins/Cargo.lock b/integration-test/bins/Cargo.lock index ff272cbd..3b3bba8f 100644 --- a/integration-test/bins/Cargo.lock +++ b/integration-test/bins/Cargo.lock @@ -94,19 +94,6 @@ dependencies = [ "paste", ] -[[package]] -name = "multiboot2" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b624a7b3f704734d98d21455b617607eb7043d4509d1c34bf9e7ff7dd47b31a" -dependencies = [ - "bitflags 2.4.0", - "derive_more", - "log", - "ptr_meta", - "uefi-raw", -] - [[package]] name = "multiboot2" version = "0.19.0" @@ -123,7 +110,7 @@ name = "multiboot2-header" version = "0.3.1" dependencies = [ "derive_more", - "multiboot2 0.16.0", + "multiboot2", ] [[package]] @@ -135,7 +122,7 @@ dependencies = [ "good_memory_allocator", "log", "multiboot", - "multiboot2 0.19.0", + "multiboot2", "multiboot2-header", "util", ] @@ -147,7 +134,7 @@ dependencies = [ "anyhow", "good_memory_allocator", "log", - "multiboot2 0.19.0", + "multiboot2", "util", "x86", ] diff --git a/multiboot2-header/Cargo.toml b/multiboot2-header/Cargo.toml index ba84e644..4a572fb2 100644 --- a/multiboot2-header/Cargo.toml +++ b/multiboot2-header/Cargo.toml @@ -47,7 +47,7 @@ derive_more.workspace = true # log.workspace = true # used for MBI tags -multiboot2 = "0.16.0" +multiboot2 = "0.19.0" [package.metadata.docs.rs] all-features = true diff --git a/multiboot2-header/Changelog.md b/multiboot2-header/Changelog.md index 4d0f9bca..379f49f0 100644 --- a/multiboot2-header/Changelog.md +++ b/multiboot2-header/Changelog.md @@ -1,9 +1,13 @@ # CHANGELOG for crate `multiboot2-header` +## 0.4.0 (2023-09-xx) +- **BREAKING** MSRV is 1.68.0 +- **BREAKING** bumped `multiboot2` dependency to `v0.19.0` + ## 0.3.0 (2023-06-23) - **BREAKING** MSRV is 1.68.0 - **BREAKING** renamed the `std` feature to `alloc` -- **BREAKING** bumped dependency to `multiboot2@v0.16.0` +- **BREAKING** bumped `multiboot2` dependency to `v0.16.0` - **BREAKING** renamed `MULTIBOOT2_HEADER_MAGIC` to `MAGIC` - **BREAKING** renamed `Multiboot2HeaderBuilder` to `HeaderBuilder` - **BREAKING** renamed `from_addr` to `load`. The function now consumes a ptr. diff --git a/multiboot2-header/README.md b/multiboot2-header/README.md index 6110293e..42446acf 100644 --- a/multiboot2-header/README.md +++ b/multiboot2-header/README.md @@ -69,7 +69,7 @@ You may need a special linker script to place this in a LOAD segment with a file See specification. ## MSRV -The MSRV is 1.68.0 stable. +The MSRV is 1.69.0 stable. ## License & Contribution diff --git a/multiboot2-header/src/lib.rs b/multiboot2-header/src/lib.rs index 4995b028..929ca27c 100644 --- a/multiboot2-header/src/lib.rs +++ b/multiboot2-header/src/lib.rs @@ -31,7 +31,7 @@ //! ``` //! //! ## MSRV -//! The MSRV is 1.68.0 stable. +//! The MSRV is 1.69.0 stable. #![no_std] #![cfg_attr(feature = "unstable", feature(error_in_core))] From 5b13d153eb2cd7f4e48f3f5c1ef93206a7276af2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 10:53:20 +0000 Subject: [PATCH 03/41] build(deps): bump crate-ci/typos from 1.16.12 to 1.16.14 Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.16.12 to 1.16.14. - [Release notes](https://github.com/crate-ci/typos/releases) - [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md) - [Commits](https://github.com/crate-ci/typos/compare/v1.16.12...v1.16.14) --- updated-dependencies: - dependency-name: crate-ci/typos dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/qa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index a1a3a741..ba74172b 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -9,4 +9,4 @@ jobs: steps: - uses: actions/checkout@v4 # Executes "typos ." - - uses: crate-ci/typos@v1.16.12 + - uses: crate-ci/typos@v1.16.14 From bf86b1260ea9c13361a6b9332f2c4aa075b6db3c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 10:28:46 +0000 Subject: [PATCH 04/41] build(deps): bump crate-ci/typos from 1.16.14 to 1.16.15 Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.16.14 to 1.16.15. - [Release notes](https://github.com/crate-ci/typos/releases) - [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md) - [Commits](https://github.com/crate-ci/typos/compare/v1.16.14...v1.16.15) --- updated-dependencies: - dependency-name: crate-ci/typos dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/qa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index ba74172b..497f1323 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -9,4 +9,4 @@ jobs: steps: - uses: actions/checkout@v4 # Executes "typos ." - - uses: crate-ci/typos@v1.16.14 + - uses: crate-ci/typos@v1.16.15 From 89658ee3ec1e5557d793c10f04d86057952911a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 10:39:40 +0000 Subject: [PATCH 05/41] build(deps): bump crate-ci/typos from 1.16.15 to 1.16.17 Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.16.15 to 1.16.17. - [Release notes](https://github.com/crate-ci/typos/releases) - [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md) - [Commits](https://github.com/crate-ci/typos/compare/v1.16.15...v1.16.17) --- updated-dependencies: - dependency-name: crate-ci/typos dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/qa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index 497f1323..74e9cf91 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -9,4 +9,4 @@ jobs: steps: - uses: actions/checkout@v4 # Executes "typos ." - - uses: crate-ci/typos@v1.16.15 + - uses: crate-ci/typos@v1.16.17 From 59e9fc31fdd25b8e64cb8300a33056436e58e0ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Oct 2023 10:42:46 +0000 Subject: [PATCH 06/41] build(deps): bump crate-ci/typos from 1.16.17 to 1.16.18 Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.16.17 to 1.16.18. - [Release notes](https://github.com/crate-ci/typos/releases) - [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md) - [Commits](https://github.com/crate-ci/typos/compare/v1.16.17...v1.16.18) --- updated-dependencies: - dependency-name: crate-ci/typos dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/qa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index 74e9cf91..f5fefece 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -9,4 +9,4 @@ jobs: steps: - uses: actions/checkout@v4 # Executes "typos ." - - uses: crate-ci/typos@v1.16.17 + - uses: crate-ci/typos@v1.16.18 From 0253212dbe7c6bf9b1c9940273efc273d906ad6f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 11:04:21 +0000 Subject: [PATCH 07/41] build(deps): bump crate-ci/typos from 1.16.18 to 1.16.19 Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.16.18 to 1.16.19. - [Release notes](https://github.com/crate-ci/typos/releases) - [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md) - [Commits](https://github.com/crate-ci/typos/compare/v1.16.18...v1.16.19) --- updated-dependencies: - dependency-name: crate-ci/typos dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/qa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index f5fefece..5c183d8d 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -9,4 +9,4 @@ jobs: steps: - uses: actions/checkout@v4 # Executes "typos ." - - uses: crate-ci/typos@v1.16.18 + - uses: crate-ci/typos@v1.16.19 From fcf4d342ad80a9f3b072c1157b905d85ccead72c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 11:03:31 +0000 Subject: [PATCH 08/41] build(deps): bump crate-ci/typos from 1.16.19 to 1.16.20 Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.16.19 to 1.16.20. - [Release notes](https://github.com/crate-ci/typos/releases) - [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md) - [Commits](https://github.com/crate-ci/typos/compare/v1.16.19...v1.16.20) --- updated-dependencies: - dependency-name: crate-ci/typos dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/qa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index 5c183d8d..56301a79 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -9,4 +9,4 @@ jobs: steps: - uses: actions/checkout@v4 # Executes "typos ." - - uses: crate-ci/typos@v1.16.19 + - uses: crate-ci/typos@v1.16.20 From c76a32001b1c790930754d8b348e54baea5f166c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 10:50:29 +0000 Subject: [PATCH 09/41] build(deps): bump crate-ci/typos from 1.16.20 to 1.16.21 Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.16.20 to 1.16.21. - [Release notes](https://github.com/crate-ci/typos/releases) - [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md) - [Commits](https://github.com/crate-ci/typos/compare/v1.16.20...v1.16.21) --- updated-dependencies: - dependency-name: crate-ci/typos dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/qa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index 56301a79..e7e1c9be 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -9,4 +9,4 @@ jobs: steps: - uses: actions/checkout@v4 # Executes "typos ." - - uses: crate-ci/typos@v1.16.20 + - uses: crate-ci/typos@v1.16.21 From e0bae4d88dd8bcf2a2d1161b2f7537d2a46e2082 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Nov 2023 10:54:43 +0000 Subject: [PATCH 10/41] build(deps): bump crate-ci/typos from 1.16.21 to 1.16.22 Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.16.21 to 1.16.22. - [Release notes](https://github.com/crate-ci/typos/releases) - [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md) - [Commits](https://github.com/crate-ci/typos/compare/v1.16.21...v1.16.22) --- updated-dependencies: - dependency-name: crate-ci/typos dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/qa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index e7e1c9be..30a88c0e 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -9,4 +9,4 @@ jobs: steps: - uses: actions/checkout@v4 # Executes "typos ." - - uses: crate-ci/typos@v1.16.21 + - uses: crate-ci/typos@v1.16.22 From 3bf132c9066b2decf0652f6c00bb1be2245e70b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Nov 2023 10:30:41 +0000 Subject: [PATCH 11/41] build(deps): bump crate-ci/typos from 1.16.22 to 1.16.23 Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.16.22 to 1.16.23. - [Release notes](https://github.com/crate-ci/typos/releases) - [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md) - [Commits](https://github.com/crate-ci/typos/compare/v1.16.22...v1.16.23) --- updated-dependencies: - dependency-name: crate-ci/typos dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/qa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index 30a88c0e..d09c8f8b 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -9,4 +9,4 @@ jobs: steps: - uses: actions/checkout@v4 # Executes "typos ." - - uses: crate-ci/typos@v1.16.22 + - uses: crate-ci/typos@v1.16.23 From bad53e7ce5711332087eb0ae562b9bb41a673a67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Nov 2023 10:13:38 +0000 Subject: [PATCH 12/41] build(deps): bump cachix/install-nix-action from 23 to 24 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 23 to 24. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v23...v24) --- updated-dependencies: - dependency-name: cachix/install-nix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/integrationtest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integrationtest.yml b/.github/workflows/integrationtest.yml index 6343bea8..3dc48fcf 100644 --- a/.github/workflows/integrationtest.yml +++ b/.github/workflows/integrationtest.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Check out uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v23 + - uses: cachix/install-nix-action@v24 with: # This channel is only required to invoke "nix-shell". # Everything inside that nix-shell will use a pinned version of From 546e36026c792e065e99828d90ec345af79bcafc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 10:30:15 +0000 Subject: [PATCH 13/41] build(deps): bump crate-ci/typos from 1.16.23 to 1.16.24 Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.16.23 to 1.16.24. - [Release notes](https://github.com/crate-ci/typos/releases) - [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md) - [Commits](https://github.com/crate-ci/typos/compare/v1.16.23...v1.16.24) --- updated-dependencies: - dependency-name: crate-ci/typos dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/qa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index d09c8f8b..1403f684 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -9,4 +9,4 @@ jobs: steps: - uses: actions/checkout@v4 # Executes "typos ." - - uses: crate-ci/typos@v1.16.23 + - uses: crate-ci/typos@v1.16.24 From ed3c16f883bc5b8aa98148a5777bd2532302e047 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Dec 2023 10:52:04 +0000 Subject: [PATCH 14/41] build(deps): bump crate-ci/typos from 1.16.24 to 1.16.25 Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.16.24 to 1.16.25. - [Release notes](https://github.com/crate-ci/typos/releases) - [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md) - [Commits](https://github.com/crate-ci/typos/compare/v1.16.24...v1.16.25) --- updated-dependencies: - dependency-name: crate-ci/typos dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/qa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index 1403f684..a029582a 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -9,4 +9,4 @@ jobs: steps: - uses: actions/checkout@v4 # Executes "typos ." - - uses: crate-ci/typos@v1.16.24 + - uses: crate-ci/typos@v1.16.25 From 5595f791d1e494ba67c5e4cd3df273ee55ddd4b5 Mon Sep 17 00:00:00 2001 From: elbiazo Date: Tue, 12 Dec 2023 15:46:00 -0500 Subject: [PATCH 15/41] updating header to not include multiboot with alloc --- multiboot2-header/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multiboot2-header/Cargo.toml b/multiboot2-header/Cargo.toml index 4a572fb2..cc9c8f26 100644 --- a/multiboot2-header/Cargo.toml +++ b/multiboot2-header/Cargo.toml @@ -47,7 +47,7 @@ derive_more.workspace = true # log.workspace = true # used for MBI tags -multiboot2 = "0.19.0" +multiboot2 = { version = "0.19.0", default-features = false } [package.metadata.docs.rs] all-features = true From dddfed0c1bb6552c4f3f881e48dbe7f0408a4a30 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Sat, 16 Dec 2023 15:31:56 +0100 Subject: [PATCH 16/41] github: run dependabot less frequent --- .github/dependabot.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index cf002a05..b1f8bfa2 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,7 +3,7 @@ updates: - package-ecosystem: cargo directory: "/" schedule: - interval: daily + interval: weekly open-pull-requests-limit: 10 ignore: - dependency-name: "*" @@ -11,7 +11,7 @@ updates: - package-ecosystem: cargo directory: "/integration-test/bins" schedule: - interval: daily + interval: weekly open-pull-requests-limit: 10 ignore: - dependency-name: "*" @@ -19,5 +19,5 @@ updates: - package-ecosystem: github-actions directory: "/" schedule: - interval: daily + interval: monthly open-pull-requests-limit: 10 From 8a89358df488c6429ee044917afa7f10f59cc0d9 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Sat, 16 Dec 2023 15:39:53 +0100 Subject: [PATCH 17/41] multiboot2-header: update README.md --- multiboot2-header/README.md | 25 ++++++++++++++----------- multiboot2-header/src/lib.rs | 7 +++++-- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/multiboot2-header/README.md b/multiboot2-header/README.md index 42446acf..5927bf85 100644 --- a/multiboot2-header/README.md +++ b/multiboot2-header/README.md @@ -3,23 +3,23 @@ [![crates.io](https://img.shields.io/crates/v/multiboot2-header.svg)](https://crates.io/crates/multiboot2-header) [![docs](https://docs.rs/multiboot2-header/badge.svg)](https://docs.rs/multiboot2-header/) -Rust library with type definitions and parsing functions for Multiboot2 headers. -This library is `no_std` and can be used in bootloaders. +Rust library with type definitions and parsing functions for Multiboot2 headers, +as well as a builder to build them at runtime. This library is `no_std` and can +be used in bootloaders. What this library is good for: -- writing a small binary which writes you a valid Multiboot2 header - into a file (such as `header.bin`) +- construct a Multiboot2 header at runtime (constructing one at build-time with + macros is not done yet, contributions are welcome!) +- write a Multiboot2-bootloader that parses a Multiboot2-header - understanding Multiboot2 headers better - analyze Multiboot2 headers at runtime -What this library is not optimal for: -- compiling a Multiboot2 header statically into an object file using only Rust code - ## Features and `no_std` Compatibility + This library is always `no_std` without `alloc`. However, the default `builder`- feature requires the `alloc`-crate and an `#[global_allocator]` to be available. You need the `builder` only if you want to construct new headers at runtime. -For parsing, this is not relevant, and you can deactivate the default feature. +For parsing, the feature is not relevant, and you can deactivate it. ```toml # without `builder`-feature (and without `alloc`-crate) @@ -29,6 +29,7 @@ multiboot2-header = "" ``` ## Example 1: Builder + Parse + ```rust use multiboot2_header::builder::{InformationRequestHeaderTagBuilder, Multiboot2HeaderBuilder}; use multiboot2_header::{HeaderTagFlag, HeaderTagISA, MbiTagType, RelocatableHeaderTag, RelocatableHeaderTagPreference, Multiboot2Header}; @@ -58,17 +59,19 @@ fn main() { ``` ## Example 2: Multiboot2 header as static data in Rust file + You can use the builder, construct a Multiboot2 header, write it to a file and include it like this: ``` #[used] #[no_mangle] #[link_section = ".text.multiboot2_header"] -static MULTIBOOT2_HDR: &[u8; 64] = include_bytes!("mb2_hdr_dump.bin"); +static MULTIBOOT2_HDR: [u8; 64] = *include_bytes!("mb2_hdr_dump.bin"); ``` -You may need a special linker script to place this in a LOAD segment with a file offset with less than 32768 bytes. -See specification. +You may need a special linker script to place this symbol in the first 32768 +bytes of the ELF. See Multiboot2 specification. ## MSRV + The MSRV is 1.69.0 stable. ## License & Contribution diff --git a/multiboot2-header/src/lib.rs b/multiboot2-header/src/lib.rs index 929ca27c..11503f9c 100644 --- a/multiboot2-header/src/lib.rs +++ b/multiboot2-header/src/lib.rs @@ -1,7 +1,9 @@ -//! Library with type definitions and parsing functions for Multiboot2 headers. -//! This library is `no_std` and can be used in bootloaders. +//! Rust library with type definitions and parsing functions for Multiboot2 +//! headers, as well as a builder to build them at runtime. This library is +//! `no_std` and can be used in bootloaders. //! //! # Example +//! //! ```rust //! use multiboot2_header::builder::{InformationRequestHeaderTagBuilder, HeaderBuilder}; //! use multiboot2_header::{HeaderTagFlag, HeaderTagISA, MbiTagType, RelocatableHeaderTag, RelocatableHeaderTagPreference, Multiboot2Header}; @@ -31,6 +33,7 @@ //! ``` //! //! ## MSRV +//! //! The MSRV is 1.69.0 stable. #![no_std] From 4d4e213312172518d9039c2b4a2c1482a92dbcb1 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Sat, 16 Dec 2023 15:41:18 +0100 Subject: [PATCH 18/41] multiboot2-header: prepare release v0.3.2 --- Cargo.lock | 14 +++++++------- integration-test/bins/Cargo.lock | 2 +- multiboot2-header/Cargo.toml | 4 ++-- multiboot2-header/Changelog.md | 16 ++++++++++++++-- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 760ec244..962bcb24 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "derive_more" @@ -38,7 +38,7 @@ dependencies = [ [[package]] name = "multiboot2-header" -version = "0.3.1" +version = "0.3.2" dependencies = [ "derive_more", "multiboot2", @@ -46,9 +46,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.67" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] @@ -106,9 +106,9 @@ dependencies = [ [[package]] name = "uguid" -version = "2.0.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16dfbd255defbd727b3a30e8950695d2e6d045841ee250ff0f1f7ced17917f8d" +checksum = "ab14ea9660d240e7865ce9d54ecdbd1cd9fa5802ae6f4512f093c7907e921533" [[package]] name = "unicode-ident" diff --git a/integration-test/bins/Cargo.lock b/integration-test/bins/Cargo.lock index 3b3bba8f..3b328253 100644 --- a/integration-test/bins/Cargo.lock +++ b/integration-test/bins/Cargo.lock @@ -107,7 +107,7 @@ dependencies = [ [[package]] name = "multiboot2-header" -version = "0.3.1" +version = "0.3.2" dependencies = [ "derive_more", "multiboot2", diff --git a/multiboot2-header/Cargo.toml b/multiboot2-header/Cargo.toml index cc9c8f26..eefdcb68 100644 --- a/multiboot2-header/Cargo.toml +++ b/multiboot2-header/Cargo.toml @@ -4,7 +4,7 @@ description = """ Library with type definitions and parsing functions for Multiboot2 headers. This library is `no_std` and can be used in bootloaders. """ -version = "0.3.1" +version = "0.3.2" authors = [ "Philipp Schuster " ] @@ -46,7 +46,7 @@ derive_more.workspace = true # Not yet used. # log.workspace = true -# used for MBI tags +# Used for MBI tags. multiboot2 = { version = "0.19.0", default-features = false } [package.metadata.docs.rs] diff --git a/multiboot2-header/Changelog.md b/multiboot2-header/Changelog.md index 379f49f0..0198ae21 100644 --- a/multiboot2-header/Changelog.md +++ b/multiboot2-header/Changelog.md @@ -1,10 +1,18 @@ # CHANGELOG for crate `multiboot2-header` -## 0.4.0 (2023-09-xx) -- **BREAKING** MSRV is 1.68.0 +## 0.3.2 (2023-11-30) + - **BREAKING** bumped `multiboot2` dependency to `v0.19.0` +- the `multiboot2` dependency doesn't pull in the `multiboot2/builder` feature + anymore +- doc update + +## 0.3.1 (2023-06-28) + +- doc update ## 0.3.0 (2023-06-23) + - **BREAKING** MSRV is 1.68.0 - **BREAKING** renamed the `std` feature to `alloc` - **BREAKING** bumped `multiboot2` dependency to `v0.16.0` @@ -17,18 +25,22 @@ - implement `core::error::Error` for `LoadError` ## 0.2.0 (2022-05-03) + - **BREAKING** renamed `EntryHeaderTag` to `EntryAddressHeaderTag` - **BREAKING** some paths changed from `multiboot2_header::header` to `multiboot2_header::builder` -> thus, import paths are much more logically now - internal code improvements ## 0.1.1 (2022-05-02) + - fixed a bug that prevented the usage of the crate in `no_std` environments - added a new default `builder`-feature to Cargo which requires the `alloc`-crate (this feature can be disabled which will also remove the dependency to the `alloc` crate) ## 0.1.0 (2021-10-08) + - initial release ## 0.0.0 + Empty release to save the name on crates.io From 75b2f7db21de144dbe6b62217ef3aac0bc5ac448 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Sat, 16 Dec 2023 15:46:07 +0100 Subject: [PATCH 19/41] integration-test: update deps --- integration-test/bins/Cargo.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/integration-test/bins/Cargo.lock b/integration-test/bins/Cargo.lock index 3b328253..b0837598 100644 --- a/integration-test/bins/Cargo.lock +++ b/integration-test/bins/Cargo.lock @@ -28,9 +28,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "derive_more" @@ -51,11 +51,11 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elf_rs" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf723f70efb0373c0b2501d943cf20ac1adbbd8e7c8eef926b2be545e5a33e8" +checksum = "894d710b6b07dae25ce69f9227ec2ffa3a3f71dc7f071acea3e1928ab4aeafdf" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.1", "num-traits", ] @@ -71,9 +71,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -98,7 +98,7 @@ dependencies = [ name = "multiboot2" version = "0.19.0" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "derive_more", "log", "ptr_meta", @@ -141,9 +141,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] @@ -156,9 +156,9 @@ checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "proc-macro2" -version = "1.0.67" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] @@ -239,16 +239,16 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62642516099c6441a5f41b0da8486d5fc3515a0603b0fdaea67b31600e22082e" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "ptr_meta", "uguid", ] [[package]] name = "uguid" -version = "2.0.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16dfbd255defbd727b3a30e8950695d2e6d045841ee250ff0f1f7ced17917f8d" +checksum = "ab14ea9660d240e7865ce9d54ecdbd1cd9fa5802ae6f4512f093c7907e921533" [[package]] name = "unicode-ident" From 54bef6606b388e37fda6f9bbb3413595df879e7b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 10:49:52 +0000 Subject: [PATCH 20/41] build(deps): bump crate-ci/typos from 1.16.25 to 1.16.26 Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.16.25 to 1.16.26. - [Release notes](https://github.com/crate-ci/typos/releases) - [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md) - [Commits](https://github.com/crate-ci/typos/compare/v1.16.25...v1.16.26) --- updated-dependencies: - dependency-name: crate-ci/typos dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/qa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index a029582a..f1297492 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -9,4 +9,4 @@ jobs: steps: - uses: actions/checkout@v4 # Executes "typos ." - - uses: crate-ci/typos@v1.16.25 + - uses: crate-ci/typos@v1.16.26 From a81e5100952d74107a6725591f22d79f39722328 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 10:28:51 +0000 Subject: [PATCH 21/41] build(deps): bump actions/cache from 3 to 4 Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/_build-rust.yml | 2 +- .github/workflows/integrationtest.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/_build-rust.yml b/.github/workflows/_build-rust.yml index a00fc730..2c834c64 100644 --- a/.github/workflows/_build-rust.yml +++ b/.github/workflows/_build-rust.yml @@ -69,7 +69,7 @@ jobs: targets: ${{ inputs.rust-target }} components: clippy, rustfmt - name: Set up cargo cache - uses: actions/cache@v3 + uses: actions/cache@v4 continue-on-error: false with: path: | diff --git a/.github/workflows/integrationtest.yml b/.github/workflows/integrationtest.yml index 3dc48fcf..c46027e1 100644 --- a/.github/workflows/integrationtest.yml +++ b/.github/workflows/integrationtest.yml @@ -30,7 +30,7 @@ jobs: nix_path: nixpkgs=channel:nixos-23.05 - uses: DeterminateSystems/magic-nix-cache-action@main - name: Set up cargo cache - uses: actions/cache@v3 + uses: actions/cache@v4 continue-on-error: false with: path: | From adb21ab14f3154b46c4a0419438aff6cff28e2e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 10:06:00 +0000 Subject: [PATCH 22/41] build(deps): bump crate-ci/typos from 1.16.26 to 1.19.0 Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.16.26 to 1.19.0. - [Release notes](https://github.com/crate-ci/typos/releases) - [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md) - [Commits](https://github.com/crate-ci/typos/compare/v1.16.26...v1.19.0) --- updated-dependencies: - dependency-name: crate-ci/typos dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/qa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index f1297492..23637c97 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -9,4 +9,4 @@ jobs: steps: - uses: actions/checkout@v4 # Executes "typos ." - - uses: crate-ci/typos@v1.16.26 + - uses: crate-ci/typos@v1.19.0 From b7f6679a3620c7b7ad81e49aa8e8271ca42a78e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 10:06:04 +0000 Subject: [PATCH 23/41] build(deps): bump cachix/install-nix-action from 24 to 26 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 24 to 26. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v24...v26) --- updated-dependencies: - dependency-name: cachix/install-nix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/integrationtest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integrationtest.yml b/.github/workflows/integrationtest.yml index 3dc48fcf..84e93faa 100644 --- a/.github/workflows/integrationtest.yml +++ b/.github/workflows/integrationtest.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Check out uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v24 + - uses: cachix/install-nix-action@v26 with: # This channel is only required to invoke "nix-shell". # Everything inside that nix-shell will use a pinned version of From d08e5eb7bcf3cfca0dd94f95b7f58dd085b3a041 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Tue, 2 Apr 2024 13:10:10 +0200 Subject: [PATCH 24/41] clippy: apply new fixes --- multiboot2-header/Changelog.md | 17 ++-- multiboot2-header/src/end.rs | 6 ++ multiboot2/Changelog.md | 112 +++++++++++++++++--------- multiboot2/src/builder/information.rs | 6 ++ 4 files changed, 100 insertions(+), 41 deletions(-) diff --git a/multiboot2-header/Changelog.md b/multiboot2-header/Changelog.md index 0198ae21..a8d8a5d9 100644 --- a/multiboot2-header/Changelog.md +++ b/multiboot2-header/Changelog.md @@ -1,5 +1,9 @@ # CHANGELOG for crate `multiboot2-header` +## Unreleased + +- added `EndHeaderTag::default()` + ## 0.3.2 (2023-11-30) - **BREAKING** bumped `multiboot2` dependency to `v0.19.0` @@ -22,20 +26,23 @@ - **BREAKING** `HeaderBuilder::build` now returns a value of type `HeaderBytes` The old builder could produce misaligned structures. - added the optional `unstable` feature (requires nightly) - - implement `core::error::Error` for `LoadError` + - implement `core::error::Error` for `LoadError` ## 0.2.0 (2022-05-03) - **BREAKING** renamed `EntryHeaderTag` to `EntryAddressHeaderTag` -- **BREAKING** some paths changed from `multiboot2_header::header` to `multiboot2_header::builder` - -> thus, import paths are much more logically now +- **BREAKING** some paths changed from `multiboot2_header::header` + to `multiboot2_header::builder` + -> thus, import paths are much more logically now - internal code improvements ## 0.1.1 (2022-05-02) - fixed a bug that prevented the usage of the crate in `no_std` environments -- added a new default `builder`-feature to Cargo which requires the `alloc`-crate - (this feature can be disabled which will also remove the dependency to the `alloc` crate) +- added a new default `builder`-feature to Cargo which requires the `alloc` + -crate + (this feature can be disabled which will also remove the dependency to + the `alloc` crate) ## 0.1.0 (2021-10-08) diff --git a/multiboot2-header/src/end.rs b/multiboot2-header/src/end.rs index 271b1254..15f8c76f 100644 --- a/multiboot2-header/src/end.rs +++ b/multiboot2-header/src/end.rs @@ -12,6 +12,12 @@ pub struct EndHeaderTag { size: u32, } +impl Default for EndHeaderTag { + fn default() -> Self { + Self::new() + } +} + impl EndHeaderTag { pub const fn new() -> Self { EndHeaderTag { diff --git a/multiboot2/Changelog.md b/multiboot2/Changelog.md index afb2e012..aff09672 100644 --- a/multiboot2/Changelog.md +++ b/multiboot2/Changelog.md @@ -1,6 +1,11 @@ # CHANGELOG for crate `multiboot2` +## Unreleased + +- added `InformationBuilder::default()` + ## 0.19.0 (2023-09-21) + - **BREAKING** MSRV is 1.69.0 - **BREAKING** `Tag::get_dst_str_slice` renamed to `Tag::parse_slice_as_string` and now returns `Result<&str, StringError>` @@ -14,9 +19,11 @@ `add_tag` was introduced for that. ## 0.18.1 (2023-07-13) + - Documentation improvements ## 0.18.0 (2023-07-13) + - **BREAKING** The `TagTrait` was enhanced and now has an associated `ID` constant. This is only breaking to users that used `BootInformation::get_tag` or that implement custom tags. `BootInformation::get_tag` doesn't need the @@ -37,29 +44,39 @@ - Internal code cleanup. ## 0.17.0 (2023-07-12) -- **BREAKING** Make functions of `InformationBuilder` chainable. They now consume the builder. + +- **BREAKING** Make functions of `InformationBuilder` chainable. They now + consume the builder. - **BREAKING** Allow non-standard memory area types by using new pair of corresponding types: `MemoryAreaTypeId` and `MemoryAreaType`. ## 0.16.0 (2023-06-23) + - **BREAKING** renamed `MULTIBOOT2_BOOTLOADER_MAGIC` to `MAGIC` - **BREAKING** `EFIMemoryDesc` was removed and is now an alias of `uefi_raw::table::boot::MemoryDescriptor` - **BREAKING** `EFIMemoryAreaType` was removed and is now an alias of `uefi_raw::table::boot::MemoryType` - **BREAKING** MSRV is 1.68.0 -- **BREAKING** Removed `MemoryAreaIter` and `MemoryMapTag::available_memory_areas` -- **BREAKING** Renamed `BootInformation::load_base_addr` to `BootInformation::load_base_addr_tag` -- **BREAKING** Renamed `BootInformation::efi_32_ih` to `BootInformation::efi_32_ih_tag` -- **BREAKING** Renamed `BootInformation::efi_32_ih` to `BootInformation::efi_32_ih_tag` +- **BREAKING** Removed `MemoryAreaIter` + and `MemoryMapTag::available_memory_areas` +- **BREAKING** Renamed `BootInformation::load_base_addr` + to `BootInformation::load_base_addr_tag` +- **BREAKING** Renamed `BootInformation::efi_32_ih` + to `BootInformation::efi_32_ih_tag` +- **BREAKING** Renamed `BootInformation::efi_32_ih` + to `BootInformation::efi_32_ih_tag` - **BREAKING** Renamed `ImageLoadPhysAddr` to `ImageLoadPhysAddrTag` - **BREAKING** Renamed `EFIImageHandle32` to `EFIImageHandle32Tag` - **BREAKING** Renamed `EFIImageHandle64` to `EFIImageHandle64Tag` - **BREAKING** Renamed `EFISdt32` to `EFISdt32Tag` - **BREAKING** Renamed `EFISdt64` to `EFISdt64Tag` -- **BREAKING** Renamed `EFIBootServicesNotExited` to `EFIBootServicesNotExitedTag` -- **BREAKING** Renamed `CommandLineTag::command_line` renamed to `CommandLineTag::cmdline` -- **\[Might be\] BREAKING** Added `TagTrait` trait which enables to use DSTs as multiboot2 tags. This is +- **BREAKING** Renamed `EFIBootServicesNotExited` + to `EFIBootServicesNotExitedTag` +- **BREAKING** Renamed `CommandLineTag::command_line` renamed + to `CommandLineTag::cmdline` +- **\[Might be\] BREAKING** Added `TagTrait` trait which enables to use DSTs as + multiboot2 tags. This is mostly relevant for the command line tag, the modules tag, and the bootloader name tag. However, this might also be relevant for users of custom multiboot2 tags that use DSTs as types. See the example provided in the doc of the @@ -72,6 +89,7 @@ - added `MemoryMapTag::entry_size` and `MemoryMapTag::entry_version` ## 0.15.1 (2023-03-18) + - **BREAKING** `MemoryMapTag::all_memory_areas()` was renamed to `memory_areas` and now returns `MemoryAreaIter` instead of `impl Iterator`. Experience showed that its better to @@ -86,14 +104,16 @@ - fix: prevent a possible panic in `ElfSection::section_type()` ## 0.15.0 (2023-03-17) + - **BREAKING** MSRV is 1.56.1 - **BREAKING** fixed lifetime issues: `VBEInfoTag` is no longer `&static` - **BREAKING:** `TagType` is now split into `TagTypeId` and `TagType` - - `TagTypeId` is a binary-compatible form of a Multiboot2 tag id - - `TagType` is a higher-level abstraction for either specified or custom tags - but not ABI compatible. - - There exists a seamless integration between `u32`, `TagType`, and - `TagTypeId` via `From` and `PartialEq`-implementations. + - `TagTypeId` is a binary-compatible form of a Multiboot2 tag id + - `TagType` is a higher-level abstraction for either specified or custom + tags + but not ABI compatible. + - There exists a seamless integration between `u32`, `TagType`, and + `TagTypeId` via `From` and `PartialEq`-implementations. - fixed another internal lifetime issue - `BootInformation::framebuffer_tag()` now returns `Option>` instead of @@ -106,6 +126,7 @@ from. ## 0.14.2 (2023-03-17) + - documentation fixes - `MbiLoadError` now implements `Display` - Added the `unstable` feature, which enables nightly-only functionality. @@ -113,53 +134,67 @@ be used with `anyhow::Result` for example. ## 0.14.1 (2023-03-09) -- fixed the calculation of the last area of the memory map tag ([#119](https://github.com/rust-osdev/multiboot2/pull/119)) - (Previously, iterating the EFI Memory map resulted in a superfluous entry as it ran over the next tag) + +- fixed the calculation of the last area of the memory map + tag ([#119](https://github.com/rust-osdev/multiboot2/pull/119)) + (Previously, iterating the EFI Memory map resulted in a superfluous entry as + it ran over the next tag) ## 0.14.0 (2022-06-30) + - **BREAKING CHANGES** \ - This version includes a few small breaking changes that brings more safety when parsing strings from the + This version includes a few small breaking changes that brings more safety + when parsing strings from the multiboot information structure. - - `BootLoaderNameTag::name` now returns a Result instead of just the value - - `CommandLineTag::command_line` now returns a Result instead of just the value - - `ModuleTag::cmdline` now returns a Result instead of just the value - - `RsdpV1Tag::signature` now returns a Result instead of an Option - - `RsdpV1Tag::oem_id` now returns a Result instead of an Option - - `RsdpV2Tag::signature` now returns a Result instead of an Option - - `RsdpV2Tag::oem_id` now returns a Result instead of an Option + - `BootLoaderNameTag::name` now returns a Result instead of just the value + - `CommandLineTag::command_line` now returns a Result instead of just the + value + - `ModuleTag::cmdline` now returns a Result instead of just the value + - `RsdpV1Tag::signature` now returns a Result instead of an Option + - `RsdpV1Tag::oem_id` now returns a Result instead of an Option + - `RsdpV2Tag::signature` now returns a Result instead of an Option + - `RsdpV2Tag::oem_id` now returns a Result instead of an Option - internal code improvements ## 0.13.3 (2022-06-03) + - impl `Send` for `BootInformation` ## 0.13.2 (2022-05-02) + - `TagType` now implements `Ord` so that it can be used in `BTreeSet` -- small internal improvements and restructuring of the code (no breaking changes to public API) +- small internal improvements and restructuring of the code (no breaking changes + to public API) ## 0.13.1 (2022-01-09) + - minor fix ## 0.13.0 (**yanked**) + - added missing getters for tag `ImageLoadPhysAddr` - added missing getters for tags `EFIImageHandle32` and `EFIImageHandle64` ## 0.12.2 (2021-10-02) + - `TagType` now implements `Eq` and `Hash` - internal improvements - - `std` can be used in tests; the crate is still `no_std` - - this implies that `cargo test` doesn't work on "non-standard" targets - - CI (Ubuntu) still works. - - code formatting/style - - sensible style checks as optional CI job - - `.editorconfig` file - - prepared co-existence of crates `multiboot2` and `multiboot2-header` - in a Cargo workspace inside the same repository + - `std` can be used in tests; the crate is still `no_std` + - this implies that `cargo test` doesn't work on "non-standard" targets + - CI (Ubuntu) still works. + - code formatting/style + - sensible style checks as optional CI job + - `.editorconfig` file + - prepared co-existence of crates `multiboot2` and `multiboot2-header` + in a Cargo workspace inside the same repository ## 0.12.1 (2021-08-11) + - `TagType`-enum introduced in `v0.11` is now actually public - internal code improvements ## 0.12.0 (2021-08-06) + - **breaking:** `load()` and `load_with_offset` now returns a result - added public constant `MULTIBOOT2_BOOTLOADER_MAGIC` - Rust edition 2018 (instead of 2015) @@ -167,21 +202,26 @@ ## 0.11.0 (2021-07-07) -- **breaking:** iterator functions (e.g. `ElfSectionsTag::sections()`) return `impl Iterator` instead of a concrete type +- **breaking:** iterator functions (e.g. `ElfSectionsTag::sections()`) + return `impl Iterator` instead of a concrete type - lib now contains `TagType`-enum that contains all possible mbi tags that are specified (taken from spec) - much improved debug-formatting of `BootInformation` - internal code improvements / formatting ## 0.10.0 (2020-11-03) + - allow access to all memory regions (MemoryMap-Tag) - internal code improvements ## 0.9.0 (2020-07-06) -- Add a `checksum_is_valid` method to the RSDP tags ([#64](https://github.com/rust-osdev/multiboot2/pull/64)) +- Add a `checksum_is_valid` method to the RSDP + tags ([#64](https://github.com/rust-osdev/multiboot2/pull/64)) ## 0.8.2 (2022-03-02) -- Add some basic documentation ([#62](https://github.com/rust-osdev/multiboot2/pull/62)) -- Add MemoryAreaType, to allow users to access memory area types in a type-safe way ([#61](https://github.com/rust-osdev/multiboot2/pull/61)) +- Add some basic + documentation ([#62](https://github.com/rust-osdev/multiboot2/pull/62)) +- Add MemoryAreaType, to allow users to access memory area types in a type-safe + way ([#61](https://github.com/rust-osdev/multiboot2/pull/61)) diff --git a/multiboot2/src/builder/information.rs b/multiboot2/src/builder/information.rs index 7b6fe990..11616e31 100644 --- a/multiboot2/src/builder/information.rs +++ b/multiboot2/src/builder/information.rs @@ -64,6 +64,12 @@ impl core::error::Error for RedundantTagError {} #[derive(Debug, PartialEq, Eq)] pub struct InformationBuilder(Vec<(TagType, SerializedTag)>); +impl Default for InformationBuilder { + fn default() -> Self { + Self::new() + } +} + impl InformationBuilder { /// Creates a new builder. pub const fn new() -> Self { From d0fe1eff563c735c48fe89656fa3b55c893a4f76 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Tue, 2 Apr 2024 13:16:17 +0200 Subject: [PATCH 25/41] clippy: apply new fixes + MSRV fix --- multiboot2-header/Cargo.toml | 2 +- multiboot2-header/Changelog.md | 3 ++- multiboot2-header/src/header.rs | 1 - multiboot2/Cargo.toml | 2 +- multiboot2/Changelog.md | 1 + multiboot2/src/builder/information.rs | 1 + multiboot2/src/efi.rs | 1 - multiboot2/src/image_load_addr.rs | 2 +- multiboot2/src/memory_map.rs | 1 - multiboot2/src/rsdp.rs | 4 ++-- 10 files changed, 9 insertions(+), 9 deletions(-) diff --git a/multiboot2-header/Cargo.toml b/multiboot2-header/Cargo.toml index eefdcb68..30a4b77c 100644 --- a/multiboot2-header/Cargo.toml +++ b/multiboot2-header/Cargo.toml @@ -26,7 +26,7 @@ readme = "README.md" homepage = "https://github.com/rust-osdev/multiboot2-header" repository = "https://github.com/rust-osdev/multiboot2" documentation = "https://docs.rs/multiboot2-header" -rust-version = "1.68" +rust-version = "1.69" [[example]] name = "minimal" diff --git a/multiboot2-header/Changelog.md b/multiboot2-header/Changelog.md index a8d8a5d9..91d5bc18 100644 --- a/multiboot2-header/Changelog.md +++ b/multiboot2-header/Changelog.md @@ -3,6 +3,7 @@ ## Unreleased - added `EndHeaderTag::default()` +- MSRV is 1.69 ## 0.3.2 (2023-11-30) @@ -17,7 +18,7 @@ ## 0.3.0 (2023-06-23) -- **BREAKING** MSRV is 1.68.0 +- **BREAKING** MSRV is 1.68.0 (UPDATE: This is actually 1.69.) - **BREAKING** renamed the `std` feature to `alloc` - **BREAKING** bumped `multiboot2` dependency to `v0.16.0` - **BREAKING** renamed `MULTIBOOT2_HEADER_MAGIC` to `MAGIC` diff --git a/multiboot2-header/src/header.rs b/multiboot2-header/src/header.rs index bff62778..cb256f92 100644 --- a/multiboot2-header/src/header.rs +++ b/multiboot2-header/src/header.rs @@ -4,7 +4,6 @@ use crate::{ HeaderTag, HeaderTagISA, HeaderTagType, InformationRequestHeaderTag, ModuleAlignHeaderTag, RelocatableHeaderTag, }; -use core::convert::TryInto; use core::fmt::{Debug, Formatter}; use core::mem::size_of; diff --git a/multiboot2/Cargo.toml b/multiboot2/Cargo.toml index 3a31f84b..2ff96114 100644 --- a/multiboot2/Cargo.toml +++ b/multiboot2/Cargo.toml @@ -31,7 +31,7 @@ readme = "README.md" homepage = "https://github.com/rust-osdev/multiboot2" repository = "https://github.com/rust-osdev/multiboot2" documentation = "https://docs.rs/multiboot2" -rust-version = "1.68" +rust-version = "1.69" [features] default = ["builder"] diff --git a/multiboot2/Changelog.md b/multiboot2/Changelog.md index aff09672..4eb240ff 100644 --- a/multiboot2/Changelog.md +++ b/multiboot2/Changelog.md @@ -3,6 +3,7 @@ ## Unreleased - added `InformationBuilder::default()` +- MSRV is 1.69 ## 0.19.0 (2023-09-21) diff --git a/multiboot2/src/builder/information.rs b/multiboot2/src/builder/information.rs index 11616e31..700072cd 100644 --- a/multiboot2/src/builder/information.rs +++ b/multiboot2/src/builder/information.rs @@ -47,6 +47,7 @@ type SerializedTag = Vec; /// Error that indicates a tag was added multiple times that is not allowed to /// be there multiple times. #[derive(Debug)] +#[allow(unused)] pub struct RedundantTagError(TagType); impl Display for RedundantTagError { diff --git a/multiboot2/src/efi.rs b/multiboot2/src/efi.rs index a80325ca..230b1bd8 100644 --- a/multiboot2/src/efi.rs +++ b/multiboot2/src/efi.rs @@ -8,7 +8,6 @@ use crate::TagTypeId; use crate::{Tag, TagTrait, TagType}; -use core::convert::TryInto; use core::mem::size_of; /// EFI system table in 32 bit mode tag. diff --git a/multiboot2/src/image_load_addr.rs b/multiboot2/src/image_load_addr.rs index efb1b49e..fbc6645d 100644 --- a/multiboot2/src/image_load_addr.rs +++ b/multiboot2/src/image_load_addr.rs @@ -2,7 +2,7 @@ use crate::{Tag, TagTrait, TagType, TagTypeId}; #[cfg(feature = "builder")] -use {core::convert::TryInto, core::mem::size_of}; +use core::mem::size_of; /// The physical load address tag. Typically, this is only available if the /// binary was relocated, for example if the relocatable header tag was diff --git a/multiboot2/src/memory_map.rs b/multiboot2/src/memory_map.rs index c502551e..a5197ec5 100644 --- a/multiboot2/src/memory_map.rs +++ b/multiboot2/src/memory_map.rs @@ -5,7 +5,6 @@ pub use uefi_raw::table::boot::MemoryDescriptor as EFIMemoryDesc; pub use uefi_raw::table::boot::MemoryType as EFIMemoryAreaType; use crate::{Tag, TagTrait, TagType, TagTypeId}; -use core::convert::TryInto; use core::fmt::{Debug, Formatter}; use core::marker::PhantomData; use core::mem; diff --git a/multiboot2/src/rsdp.rs b/multiboot2/src/rsdp.rs index 12a5b723..d8526157 100644 --- a/multiboot2/src/rsdp.rs +++ b/multiboot2/src/rsdp.rs @@ -13,11 +13,11 @@ //! use crate::{Tag, TagTrait, TagType, TagTypeId}; +#[cfg(feature = "builder")] +use core::mem::size_of; use core::slice; use core::str; use core::str::Utf8Error; -#[cfg(feature = "builder")] -use {core::convert::TryInto, core::mem::size_of}; const RSDPV1_LENGTH: usize = 20; From cc685d44997d47fc02e26db1abb7d737df7afdb5 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Tue, 2 Apr 2024 13:19:40 +0200 Subject: [PATCH 26/41] cargo: update --- Cargo.lock | 16 ++++++++-------- multiboot2/Cargo.toml | 6 +++++- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 962bcb24..b02ea0fc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "bitflags" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "derive_more" @@ -21,9 +21,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "multiboot2" @@ -46,9 +46,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.70" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -75,9 +75,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] diff --git a/multiboot2/Cargo.toml b/multiboot2/Cargo.toml index 2ff96114..5305cd61 100644 --- a/multiboot2/Cargo.toml +++ b/multiboot2/Cargo.toml @@ -45,7 +45,11 @@ bitflags.workspace = true derive_more.workspace = true log.workspace = true -uefi-raw = { version = "0.3", default-features = false } +# We only use a very basic type definition from this crate. To prevent MSRV +# bumps from uefi-raw, I restrict this here. Upstream users are likely to have +# two versions of this library in it, which is no problem, as we only use the +# type definition. +uefi-raw = { version = "=0.3", default-features = false } ptr_meta = { version = "0.2", default-features = false } [package.metadata.docs.rs] From 7a0d6a2e197033b8bc1943b26cd8c7b22956af99 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Tue, 2 Apr 2024 13:19:53 +0200 Subject: [PATCH 27/41] niv: update nixpkgs --- integration-test/nix/sources.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/integration-test/nix/sources.json b/integration-test/nix/sources.json index f5049a96..51da70ed 100644 --- a/integration-test/nix/sources.json +++ b/integration-test/nix/sources.json @@ -1,14 +1,14 @@ { "nixpkgs": { - "branch": "nixos-23.05", + "branch": "nixos-23.11", "description": "Nix Packages collection", "homepage": null, "owner": "NixOS", "repo": "nixpkgs", - "rev": "ad157fe26e74211e7dde0456cb3fd9ab78b6e552", - "sha256": "0l5gimzlbzq1svw48p4h3wf24ry21icl9198jk5x4xqvs6k2gffx", + "rev": "219951b495fc2eac67b1456824cc1ec1fd2ee659", + "sha256": "065jy7qivlbdqmbvd7r9h97b23f21axmc4r7sqmq2h0j82rmymxv", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/ad157fe26e74211e7dde0456cb3fd9ab78b6e552.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/219951b495fc2eac67b1456824cc1ec1fd2ee659.tar.gz", "url_template": "https://github.com///archive/.tar.gz" } } From 40bb2ea5c39882f1396b69dd30cb8fd8144dc9c2 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Tue, 2 Apr 2024 13:35:10 +0200 Subject: [PATCH 28/41] integration-test: script with more verbosity --- integration-test/tests/multiboot2/build_img.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integration-test/tests/multiboot2/build_img.sh b/integration-test/tests/multiboot2/build_img.sh index ff528557..026e80cf 100755 --- a/integration-test/tests/multiboot2/build_img.sh +++ b/integration-test/tests/multiboot2/build_img.sh @@ -25,4 +25,5 @@ cp grub.cfg .vol/boot/grub cp "$MULTIBOOT2_PAYLOAD_PATH" .vol # Create a GRUB image with the files in ".vol" being embedded. -grub-mkrescue -o "grub_boot.img" ".vol" 2>/dev/null +echo "Creating bootable image..." +grub-mkrescue -o "grub_boot.img" ".vol" From 9f01fc216db7f5b9da5912fb415900edf0fba6ff Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Tue, 2 Apr 2024 13:35:26 +0200 Subject: [PATCH 29/41] integration-test: fix compiler warning --- .../bins/multiboot2_chainloader/src/multiboot.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/integration-test/bins/multiboot2_chainloader/src/multiboot.rs b/integration-test/bins/multiboot2_chainloader/src/multiboot.rs index 31aa0052..0a0bd5f6 100644 --- a/integration-test/bins/multiboot2_chainloader/src/multiboot.rs +++ b/integration-test/bins/multiboot2_chainloader/src/multiboot.rs @@ -1,9 +1,8 @@ //! Parsing the Multiboot information. Glue code for the [`multiboot`] code. use anyhow::anyhow; +use core::ptr::addr_of_mut; use core::slice; -pub use multiboot::information::ModuleIter; -pub use multiboot::information::Multiboot as Mbi; use multiboot::information::{MemoryManagement, Multiboot, PAddr, SIGNATURE_EAX}; static mut MEMORY_MANAGEMENT: Mem = Mem; @@ -14,7 +13,8 @@ pub fn get_mbi<'a>(magic: u32, ptr: u32) -> anyhow::Result Date: Tue, 2 Apr 2024 13:35:49 +0200 Subject: [PATCH 30/41] integration-test: make more resilient against different GRUB versions --- integration-test/bins/multiboot2_payload/src/verify/grub.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-test/bins/multiboot2_payload/src/verify/grub.rs b/integration-test/bins/multiboot2_payload/src/verify/grub.rs index df71c93d..9954e835 100644 --- a/integration-test/bins/multiboot2_payload/src/verify/grub.rs +++ b/integration-test/bins/multiboot2_payload/src/verify/grub.rs @@ -23,7 +23,7 @@ fn basic_sanity_checks(mbi: &BootInformation) -> anyhow::Result<()> { .map_err(anyhow::Error::msg)? .cmdline() .map_err(anyhow::Error::msg)?; - assert_eq!(bootloader_name, "GRUB 2.06"); + assert!(bootloader_name.starts_with("GRUB 2.")); assert_eq!(cmdline, "some commandline arguments"); Ok(()) From 7a7ac8dd3113194a099ab104f3fc1f86d5e5503b Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Tue, 2 Apr 2024 13:37:19 +0200 Subject: [PATCH 31/41] integration-test: update rust toolchain The data-layout string is necessary because of https://github.com/rust-lang/rust/commit/8b199222cc92667cd0e57595ad435cd0a7526af8 --- integration-test/bins/rust-toolchain.toml | 2 +- integration-test/bins/x86-unknown-none.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integration-test/bins/rust-toolchain.toml b/integration-test/bins/rust-toolchain.toml index 0aa1490d..6cd890fc 100644 --- a/integration-test/bins/rust-toolchain.toml +++ b/integration-test/bins/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "nightly-2023-06-22" +channel = "nightly-2024-03-31" # rustc 1.79-nightly profile = "default" components = [ "rust-src", diff --git a/integration-test/bins/x86-unknown-none.json b/integration-test/bins/x86-unknown-none.json index 3e5359f6..7b294d42 100644 --- a/integration-test/bins/x86-unknown-none.json +++ b/integration-test/bins/x86-unknown-none.json @@ -1,6 +1,6 @@ { "llvm-target": "i686-unknown-none", - "data-layout": "e-m:e-i32:32-f80:128-n8:16:32-S128-p:32:32", + "data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128", "arch": "x86", "target-endian": "little", "target-pointer-width": "32", From ac2b8c57d99399f0108ed1739ef1caa5ad36b160 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 10:06:49 +0000 Subject: [PATCH 32/41] build(deps): bump crate-ci/typos from 1.19.0 to 1.21.0 Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.19.0 to 1.21.0. - [Release notes](https://github.com/crate-ci/typos/releases) - [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md) - [Commits](https://github.com/crate-ci/typos/compare/v1.19.0...v1.21.0) --- updated-dependencies: - dependency-name: crate-ci/typos dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/qa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index 23637c97..02fb711c 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -9,4 +9,4 @@ jobs: steps: - uses: actions/checkout@v4 # Executes "typos ." - - uses: crate-ci/typos@v1.19.0 + - uses: crate-ci/typos@v1.21.0 From c17086c3d0b44580fcfabe05875b36fbf1e64e89 Mon Sep 17 00:00:00 2001 From: Niklas Sombert Date: Fri, 26 Apr 2024 10:39:13 +0200 Subject: [PATCH 33/41] multiboot2: builder: Allow to specify SMBIOS tag multiple times --- multiboot2/src/builder/information.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/multiboot2/src/builder/information.rs b/multiboot2/src/builder/information.rs index 700072cd..8d16a903 100644 --- a/multiboot2/src/builder/information.rs +++ b/multiboot2/src/builder/information.rs @@ -288,7 +288,10 @@ impl InformationBuilder { } fn tag_is_allowed_multiple_times(tag_type: TagType) -> bool { - matches!(tag_type, TagType::Module | TagType::Custom(_)) + matches!( + tag_type, + TagType::Module | TagType::Smbios | TagType::Custom(_) + ) } } From 55b836b9f6c7359a3a319eeaffd08c01770e09db Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Wed, 1 May 2024 12:41:06 +0200 Subject: [PATCH 34/41] cargo: updated all dependencies --- Cargo.lock | 12 +-- Cargo.toml | 6 +- integration-test/bins/Cargo.lock | 74 ++++++++++++------- integration-test/bins/Cargo.toml | 10 ++- .../bins/multiboot2_chainloader/Cargo.toml | 16 ++-- .../bins/multiboot2_payload/Cargo.toml | 12 +-- multiboot2-header/Cargo.toml | 6 -- multiboot2/Cargo.toml | 4 +- 8 files changed, 82 insertions(+), 58 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b02ea0fc..9ae63624 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -46,9 +46,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] @@ -75,9 +75,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -95,9 +95,9 @@ dependencies = [ [[package]] name = "uefi-raw" -version = "0.3.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62642516099c6441a5f41b0da8486d5fc3515a0603b0fdaea67b31600e22082e" +checksum = "efa8716f52e8cab8bcedfd5052388a0f263b69fe5cc2561548dc6a530678333c" dependencies = [ "bitflags", "ptr_meta", diff --git a/Cargo.toml b/Cargo.toml index 3b6f2682..f4e5b0ef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,9 +9,9 @@ exclude = [ ] [workspace.dependencies] -bitflags = "2" -derive_more = { version = "0.99", default-features = false, features = ["display"] } -log = { version = "0.4", default-features = false } +bitflags = "2.0.2" +derive_more = { version = "~0.99", default-features = false, features = ["display"] } +log = { version = "~0.4", default-features = false } # This way, the "multiboot2" dependency in the multiboot2-header crate can be # referenced by version, while still the repository version is used diff --git a/integration-test/bins/Cargo.lock b/integration-test/bins/Cargo.lock index b0837598..e55bdca7 100644 --- a/integration-test/bins/Cargo.lock +++ b/integration-test/bins/Cargo.lock @@ -4,15 +4,15 @@ version = 3 [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "bit_field" @@ -28,9 +28,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "derive_more" @@ -45,9 +45,9 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" [[package]] name = "elf_rs" @@ -55,7 +55,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "894d710b6b07dae25ce69f9227ec2ffa3a3f71dc7f071acea3e1928ab4aeafdf" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "num-traits", ] @@ -71,9 +71,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -81,9 +81,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "multiboot" @@ -98,11 +98,24 @@ dependencies = [ name = "multiboot2" version = "0.19.0" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "derive_more", "log", "ptr_meta", - "uefi-raw", + "uefi-raw 0.5.2", +] + +[[package]] +name = "multiboot2" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be7a13d71fc2f7747af3ce60e5eccb638acd687b3a580d0bd579c6d0f7b9d010" +dependencies = [ + "bitflags 2.5.0", + "derive_more", + "log", + "ptr_meta", + "uefi-raw 0.3.0", ] [[package]] @@ -110,7 +123,7 @@ name = "multiboot2-header" version = "0.3.2" dependencies = [ "derive_more", - "multiboot2", + "multiboot2 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -122,7 +135,7 @@ dependencies = [ "good_memory_allocator", "log", "multiboot", - "multiboot2", + "multiboot2 0.19.0", "multiboot2-header", "util", ] @@ -134,16 +147,16 @@ dependencies = [ "anyhow", "good_memory_allocator", "log", - "multiboot2", + "multiboot2 0.19.0", "util", "x86", ] [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", ] @@ -156,9 +169,9 @@ checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "proc-macro2" -version = "1.0.70" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] @@ -191,9 +204,9 @@ checksum = "8bb0fd6580eeed0103c054e3fba2c2618ff476943762f28a645b63b8692b21c9" [[package]] name = "quote" -version = "1.0.33" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -239,7 +252,18 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62642516099c6441a5f41b0da8486d5fc3515a0603b0fdaea67b31600e22082e" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", + "ptr_meta", + "uguid", +] + +[[package]] +name = "uefi-raw" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efa8716f52e8cab8bcedfd5052388a0f263b69fe5cc2561548dc6a530678333c" +dependencies = [ + "bitflags 2.5.0", "ptr_meta", "uguid", ] diff --git a/integration-test/bins/Cargo.toml b/integration-test/bins/Cargo.toml index 9c58b106..ddd6e60e 100644 --- a/integration-test/bins/Cargo.toml +++ b/integration-test/bins/Cargo.toml @@ -10,5 +10,11 @@ members = [ codegen-units = 1 lto = true -[patch.crates-io] -multiboot2 = { path = "../../multiboot2" } + +[workspace.dependencies] +anyhow = { version = "1.0", default-features = false } +log = { version = "0.4", default-features = false } +multiboot2 = { path = "../../multiboot2", features = ["builder", "unstable"] } +multiboot2-header = { path = "../../multiboot2-header", features = ["builder", "unstable"] } +good_memory_allocator = "0.1" +util = { path = "./util" } diff --git a/integration-test/bins/multiboot2_chainloader/Cargo.toml b/integration-test/bins/multiboot2_chainloader/Cargo.toml index dd5f2205..e3089f53 100644 --- a/integration-test/bins/multiboot2_chainloader/Cargo.toml +++ b/integration-test/bins/multiboot2_chainloader/Cargo.toml @@ -1,16 +1,16 @@ [package] name = "multiboot2_chainloader" -description = "Multiboot chainloader that loads a Multiboot2 payload" +description = "Integrationtest: Multiboot2 chainloader" version = "0.1.0" edition = "2021" publish = false [dependencies] -util = { path = "../util" } -multiboot2 = { path = "../../../multiboot2" } -multiboot2-header = { path = "../../../multiboot2-header" } -anyhow = { version = "1.0", default-features = false } -elf_rs = "0.3" -log = { version = "0.4", default-features = false } -good_memory_allocator = "0.1" +anyhow.workspace = true +log.workspace = true +good_memory_allocator.workspace = true multiboot = "0.8" +multiboot2.workspace = true +multiboot2-header.workspace = true +util.workspace = true +elf_rs = "0.3" diff --git a/integration-test/bins/multiboot2_payload/Cargo.toml b/integration-test/bins/multiboot2_payload/Cargo.toml index e350a6d0..46946abf 100644 --- a/integration-test/bins/multiboot2_payload/Cargo.toml +++ b/integration-test/bins/multiboot2_payload/Cargo.toml @@ -1,14 +1,14 @@ [package] name = "multiboot2_payload" -description = "Multiboot2 integration test" +description = "Integrationtest: Multiboot2 payload" version = "0.1.0" edition = "2021" publish = false [dependencies] -multiboot2 = { path = "../../../multiboot2", features = ["builder", "unstable"] } -util = { path = "../util" } -anyhow = { version = "1.0", default-features = false } -good_memory_allocator = "0.1" -log = { version = "0.4", default-features = false } +anyhow.workspace = true +log.workspace = true +good_memory_allocator.workspace = true +multiboot2.workspace = true +util.workspace = true x86 = "0.52" diff --git a/multiboot2-header/Cargo.toml b/multiboot2-header/Cargo.toml index 30a4b77c..a3ef4da5 100644 --- a/multiboot2-header/Cargo.toml +++ b/multiboot2-header/Cargo.toml @@ -40,13 +40,7 @@ builder = ["alloc"] unstable = [] [dependencies] -# Not yet used. -# bitflags.workspace = true derive_more.workspace = true -# Not yet used. -# log.workspace = true - -# Used for MBI tags. multiboot2 = { version = "0.19.0", default-features = false } [package.metadata.docs.rs] diff --git a/multiboot2/Cargo.toml b/multiboot2/Cargo.toml index 5305cd61..bf190e9c 100644 --- a/multiboot2/Cargo.toml +++ b/multiboot2/Cargo.toml @@ -49,8 +49,8 @@ log.workspace = true # bumps from uefi-raw, I restrict this here. Upstream users are likely to have # two versions of this library in it, which is no problem, as we only use the # type definition. -uefi-raw = { version = "=0.3", default-features = false } -ptr_meta = { version = "0.2", default-features = false } +uefi-raw = { version = "~0.5", default-features = false } +ptr_meta = { version = "~0.2", default-features = false } [package.metadata.docs.rs] all-features = true From 90ec7578cc3d5ebd7043c912682cd8beaaa0aef3 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Wed, 1 May 2024 15:03:18 +0200 Subject: [PATCH 35/41] multiboot2-header: update changelog + integration test --- .../bins/multiboot2_chainloader/src/loader.rs | 10 ++++++++-- multiboot2-header/Changelog.md | 1 + multiboot2/src/builder/boxed_dst.rs | 12 ++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/integration-test/bins/multiboot2_chainloader/src/loader.rs b/integration-test/bins/multiboot2_chainloader/src/loader.rs index fa613b85..896cf2af 100644 --- a/integration-test/bins/multiboot2_chainloader/src/loader.rs +++ b/integration-test/bins/multiboot2_chainloader/src/loader.rs @@ -1,7 +1,8 @@ +use core::ops::Deref; use elf_rs::{ElfFile, ProgramHeaderEntry, ProgramType}; use multiboot2::{ - BootLoaderNameTag, CommandLineTag, MemoryArea, MemoryAreaType, MemoryMapTag, - ModuleTag, + BootLoaderNameTag, CommandLineTag, MemoryArea, MemoryAreaType, MemoryMapTag, ModuleTag, + SmbiosTag, }; /// Loads the first module into memory. Assumes that the module is a ELF file. @@ -56,6 +57,11 @@ pub fn load_module(mut modules: multiboot::information::ModuleIter) -> ! { elf_mod.end as u32, elf_mod.string.unwrap(), )) + // Test that we can add SmbiosTag multiple times. + .add_tag(SmbiosTag::new(1, 1, &[1, 2, 3]).deref()) + .unwrap() + .add_tag(SmbiosTag::new(1, 2, &[1, 2, 3]).deref()) + .expect("should allow tag multiple times") .build(); log::info!( diff --git a/multiboot2-header/Changelog.md b/multiboot2-header/Changelog.md index 91d5bc18..dfda0207 100644 --- a/multiboot2-header/Changelog.md +++ b/multiboot2-header/Changelog.md @@ -4,6 +4,7 @@ - added `EndHeaderTag::default()` - MSRV is 1.69 +- Can add multiple `TagType::Smbios` tags in the builder. ## 0.3.2 (2023-11-30) diff --git a/multiboot2/src/builder/boxed_dst.rs b/multiboot2/src/builder/boxed_dst.rs index 9106457f..71d061c1 100644 --- a/multiboot2/src/builder/boxed_dst.rs +++ b/multiboot2/src/builder/boxed_dst.rs @@ -141,4 +141,16 @@ mod tests { assert_eq!(tag.size as usize, METADATA_SIZE + content.len()); assert_eq!(tag.string(), Ok(content_rust_str)); } + + #[test] + fn can_hold_tag_trait() { + fn consume(_: &T) {} + let content = b"hallo\0"; + + let tag = BoxedDst::::new(content); + consume(tag.deref()); + consume(&*tag); + // Compiler not smart enough? + // consume(&tag); + } } From 60411207cb21491b987e55ebe325760391e8c9f5 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Wed, 1 May 2024 15:18:34 +0200 Subject: [PATCH 36/41] typos --- multiboot2/src/builder/boxed_dst.rs | 2 +- multiboot2/src/builder/mod.rs | 2 +- multiboot2/src/tag_trait.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/multiboot2/src/builder/boxed_dst.rs b/multiboot2/src/builder/boxed_dst.rs index 71d061c1..bafb8df3 100644 --- a/multiboot2/src/builder/boxed_dst.rs +++ b/multiboot2/src/builder/boxed_dst.rs @@ -12,7 +12,7 @@ use core::ptr::NonNull; /// builder. This is tricky in Rust. This type behaves similar to the regular /// `Box` type except that it ensure the same layout is used for the (explicit) /// allocation and the (implicit) deallocation of memory. Otherwise, I didn't -/// found any way to figure out the right layout for a DST. Miri always reported +/// find any way to figure out the right layout for a DST. Miri always reported /// issues that the deallocation used a wrong layout. /// /// Technically, I'm certain this code is memory safe. But with this type, I diff --git a/multiboot2/src/builder/mod.rs b/multiboot2/src/builder/mod.rs index 1a1d7425..93b68528 100644 --- a/multiboot2/src/builder/mod.rs +++ b/multiboot2/src/builder/mod.rs @@ -3,7 +3,7 @@ mod boxed_dst; mod information; -// This must by public to support external people to create boxed DSTs. +// This must be public to support external people to create boxed DSTs. pub use boxed_dst::BoxedDst; pub use information::InformationBuilder; diff --git a/multiboot2/src/tag_trait.rs b/multiboot2/src/tag_trait.rs index 5c42e8a8..7e3ce9ab 100644 --- a/multiboot2/src/tag_trait.rs +++ b/multiboot2/src/tag_trait.rs @@ -5,7 +5,7 @@ use ptr_meta::Pointee; /// A trait to abstract over all sized and unsized tags (DSTs). For sized tags, /// this trait does not much. For DSTs, a [`TagTrait::dst_size`] implementation -/// must me provided, which returns the right size hint for the dynamically +/// must be provided, which returns the right size hint for the dynamically /// sized portion of the struct. /// /// # Trivia From 5438b8d4a3018ebb283b9f75efef5b8ed7ff9107 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Wed, 1 May 2024 15:25:14 +0200 Subject: [PATCH 37/41] rust: bump msrv --- .github/workflows/integrationtest.yml | 4 +-- .github/workflows/rust.yml | 8 +++--- multiboot2-header/Cargo.toml | 2 +- multiboot2-header/Changelog.md | 2 +- multiboot2-header/README.md | 12 ++++++--- multiboot2-header/src/lib.rs | 2 +- multiboot2/Cargo.toml | 2 +- multiboot2/Changelog.md | 2 +- multiboot2/README.md | 38 ++++++++++++++++----------- multiboot2/src/lib.rs | 2 +- 10 files changed, 44 insertions(+), 30 deletions(-) diff --git a/.github/workflows/integrationtest.yml b/.github/workflows/integrationtest.yml index c7ff5dbb..5f07017e 100644 --- a/.github/workflows/integrationtest.yml +++ b/.github/workflows/integrationtest.yml @@ -9,7 +9,7 @@ name: "Integration Test" # Run on every push (tag, branch) and pull_request -on: [pull_request, push, merge_group] +on: [ pull_request, push, merge_group ] env: CARGO_TERM_COLOR: always @@ -27,7 +27,7 @@ jobs: # This channel is only required to invoke "nix-shell". # Everything inside that nix-shell will use a pinned version of # nixpkgs. - nix_path: nixpkgs=channel:nixos-23.05 + nix_path: nixpkgs=channel:nixos-23.11 - uses: DeterminateSystems/magic-nix-cache-action@main - name: Set up cargo cache uses: actions/cache@v4 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 22afdc1f..6c9eb137 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -9,7 +9,7 @@ name: "Cargo workspace" # Run on every push (tag, branch) and pull_request -on: [pull_request, push, workflow_dispatch, merge_group] +on: [ pull_request, push, workflow_dispatch, merge_group ] env: CARGO_TERM_COLOR: always @@ -20,7 +20,7 @@ jobs: name: build (msrv) uses: ./.github/workflows/_build-rust.yml with: - rust-version: 1.69.0 # MSRV + rust-version: 1.70.0 # MSRV do-style-check: false features: builder @@ -46,7 +46,7 @@ jobs: needs: build_msrv uses: ./.github/workflows/_build-rust.yml with: - rust-version: 1.69.0 # MSRV + rust-version: 1.70.0 # MSRV do-style-check: false rust-target: thumbv7em-none-eabihf features: builder @@ -103,7 +103,7 @@ jobs: needs: build_msrv uses: ./.github/workflows/_build-rust.yml with: - rust-version: 1.69.0 # MSRV + rust-version: 1.70.0 # MSRV do-style-check: true do-test: false features: builder diff --git a/multiboot2-header/Cargo.toml b/multiboot2-header/Cargo.toml index a3ef4da5..6ed1c755 100644 --- a/multiboot2-header/Cargo.toml +++ b/multiboot2-header/Cargo.toml @@ -26,7 +26,7 @@ readme = "README.md" homepage = "https://github.com/rust-osdev/multiboot2-header" repository = "https://github.com/rust-osdev/multiboot2" documentation = "https://docs.rs/multiboot2-header" -rust-version = "1.69" +rust-version = "1.70" [[example]] name = "minimal" diff --git a/multiboot2-header/Changelog.md b/multiboot2-header/Changelog.md index dfda0207..aebf8dde 100644 --- a/multiboot2-header/Changelog.md +++ b/multiboot2-header/Changelog.md @@ -3,7 +3,7 @@ ## Unreleased - added `EndHeaderTag::default()` -- MSRV is 1.69 +- MSRV is 1.70 - Can add multiple `TagType::Smbios` tags in the builder. ## 0.3.2 (2023-11-30) diff --git a/multiboot2-header/README.md b/multiboot2-header/README.md index 5927bf85..eebac8d0 100644 --- a/multiboot2-header/README.md +++ b/multiboot2-header/README.md @@ -1,4 +1,5 @@ # multiboot2-header + ![Build](https://github.com/rust-osdev/multiboot2/actions/workflows/rust.yml/badge.svg) [![crates.io](https://img.shields.io/crates/v/multiboot2-header.svg)](https://crates.io/crates/multiboot2-header) [![docs](https://docs.rs/multiboot2-header/badge.svg)](https://docs.rs/multiboot2-header/) @@ -8,6 +9,7 @@ as well as a builder to build them at runtime. This library is `no_std` and can be used in bootloaders. What this library is good for: + - construct a Multiboot2 header at runtime (constructing one at build-time with macros is not done yet, contributions are welcome!) - write a Multiboot2-bootloader that parses a Multiboot2-header @@ -60,20 +62,24 @@ fn main() { ## Example 2: Multiboot2 header as static data in Rust file -You can use the builder, construct a Multiboot2 header, write it to a file and include it like this: +You can use the builder, construct a Multiboot2 header, write it to a file and +include it like this: + ``` #[used] #[no_mangle] #[link_section = ".text.multiboot2_header"] static MULTIBOOT2_HDR: [u8; 64] = *include_bytes!("mb2_hdr_dump.bin"); ``` + You may need a special linker script to place this symbol in the first 32768 bytes of the ELF. See Multiboot2 specification. ## MSRV -The MSRV is 1.69.0 stable. +The MSRV is 1.70.0 stable. ## License & Contribution -See main [README](https://github.com/rust-osdev/multiboot2/blob/main/README.md) file. +See main [README](https://github.com/rust-osdev/multiboot2/blob/main/README.md) +file. diff --git a/multiboot2-header/src/lib.rs b/multiboot2-header/src/lib.rs index 11503f9c..456f4682 100644 --- a/multiboot2-header/src/lib.rs +++ b/multiboot2-header/src/lib.rs @@ -34,7 +34,7 @@ //! //! ## MSRV //! -//! The MSRV is 1.69.0 stable. +//! The MSRV is 1.70.0 stable. #![no_std] #![cfg_attr(feature = "unstable", feature(error_in_core))] diff --git a/multiboot2/Cargo.toml b/multiboot2/Cargo.toml index bf190e9c..c3519cca 100644 --- a/multiboot2/Cargo.toml +++ b/multiboot2/Cargo.toml @@ -31,7 +31,7 @@ readme = "README.md" homepage = "https://github.com/rust-osdev/multiboot2" repository = "https://github.com/rust-osdev/multiboot2" documentation = "https://docs.rs/multiboot2" -rust-version = "1.69" +rust-version = "1.70" [features] default = ["builder"] diff --git a/multiboot2/Changelog.md b/multiboot2/Changelog.md index 4eb240ff..83f8cca2 100644 --- a/multiboot2/Changelog.md +++ b/multiboot2/Changelog.md @@ -3,7 +3,7 @@ ## Unreleased - added `InformationBuilder::default()` -- MSRV is 1.69 +- MSRV is 1.70 ## 0.19.0 (2023-09-21) diff --git a/multiboot2/README.md b/multiboot2/README.md index ea616127..4bdd1893 100644 --- a/multiboot2/README.md +++ b/multiboot2/README.md @@ -1,4 +1,5 @@ # multiboot2 + ![Build](https://github.com/rust-osdev/multiboot2/actions/workflows/rust.yml/badge.svg) [![crates.io](https://img.shields.io/crates/v/multiboot2.svg)](https://crates.io/crates/multiboot2) [![docs](https://docs.rs/multiboot2/badge.svg)](https://docs.rs/multiboot2/) @@ -8,9 +9,12 @@ Multiboot2-compliant bootloaders, such as GRUB. It supports all tags from the specification including full support for the sections of ELF files. This library is `no_std` and can be used in a Multiboot2-kernel. -It follows the Multiboot 2.0 specification at https://www.gnu.org/software/grub/manual/multiboot2/multiboot.html and the ELF 64 specification at http://www.uclibc.org/docs/elf-64-gen.pdf. +It follows the Multiboot 2.0 specification +at https://www.gnu.org/software/grub/manual/multiboot2/multiboot.html and the +ELF 64 specification at http://www.uclibc.org/docs/elf-64-gen.pdf. ## Features and `no_std` Compatibility + This library is always `no_std` without `alloc`. However, the default `builder`- feature requires the `alloc`-crate and an `#[global_allocator]` to be available. You need the `builder` only if you want to construct new boot information @@ -18,28 +22,32 @@ structures at runtime. For parsing, this is not relevant, and you can deactivate the default feature. ## Background: The Multiboot 2 Information Structure + The Multiboot information structure looks like this: -Field | Type ----------------- | ----------- -total size | u32 -reserved | u32 -tags | variable -end tag = (0, 8) | (u32, u32) + Field | Type +------------------|------------ + total size | u32 + reserved | u32 + tags | variable + end tag = (0, 8) | (u32, u32) There are many different types of tags, but they all have the same beginning: -Field | Type -------------- | ----------------- -type | u32 -size | u32 -other fields | variable + Field | Type +--------------|---------- + type | u32 + size | u32 + other fields | variable -All tags and the mbi itself are 8-byte aligned. The last tag must be the _end tag_, which is a tag of type `0` and size `8`. +All tags and the mbi itself are 8-byte aligned. The last tag must be the _end +tag_, which is a tag of type `0` and size `8`. ## MSRV -The MSRV is 1.69.0 stable. + +The MSRV is 1.70.0 stable. ## License & Contribution -See main [README](https://github.com/rust-osdev/multiboot2/blob/main/README.md) file. +See main [README](https://github.com/rust-osdev/multiboot2/blob/main/README.md) +file. diff --git a/multiboot2/src/lib.rs b/multiboot2/src/lib.rs index 4f8b05cf..ee6e4767 100644 --- a/multiboot2/src/lib.rs +++ b/multiboot2/src/lib.rs @@ -33,7 +33,7 @@ //! ``` //! //! ## MSRV -//! The MSRV is 1.69.0 stable. +//! The MSRV is 1.70.0 stable. #[cfg(feature = "builder")] extern crate alloc; From 1dd9bfff14a24491b8306b558e51334c27ad472e Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Wed, 1 May 2024 18:25:36 +0200 Subject: [PATCH 38/41] nix: move to repository root --- integration-test/.envrc => .envrc | 0 {integration-test/nix => nix}/sources.json | 6 +++--- {integration-test/nix => nix}/sources.nix | 0 integration-test/shell.nix => shell.nix | 9 +++++++-- 4 files changed, 10 insertions(+), 5 deletions(-) rename integration-test/.envrc => .envrc (100%) rename {integration-test/nix => nix}/sources.json (55%) rename {integration-test/nix => nix}/sources.nix (100%) rename integration-test/shell.nix => shell.nix (81%) diff --git a/integration-test/.envrc b/.envrc similarity index 100% rename from integration-test/.envrc rename to .envrc diff --git a/integration-test/nix/sources.json b/nix/sources.json similarity index 55% rename from integration-test/nix/sources.json rename to nix/sources.json index 51da70ed..5da91e3a 100644 --- a/integration-test/nix/sources.json +++ b/nix/sources.json @@ -5,10 +5,10 @@ "homepage": null, "owner": "NixOS", "repo": "nixpkgs", - "rev": "219951b495fc2eac67b1456824cc1ec1fd2ee659", - "sha256": "065jy7qivlbdqmbvd7r9h97b23f21axmc4r7sqmq2h0j82rmymxv", + "rev": "576ecd43d3b864966b4423a853412d6177775e8b", + "sha256": "05gr8w09w7fqfi6zflx7df1n0hhsf8f4p9siikk3wb7k7by2d9sr", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/219951b495fc2eac67b1456824cc1ec1fd2ee659.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/576ecd43d3b864966b4423a853412d6177775e8b.tar.gz", "url_template": "https://github.com///archive/.tar.gz" } } diff --git a/integration-test/nix/sources.nix b/nix/sources.nix similarity index 100% rename from integration-test/nix/sources.nix rename to nix/sources.nix diff --git a/integration-test/shell.nix b/shell.nix similarity index 81% rename from integration-test/shell.nix rename to shell.nix index 1871b0df..1e3e1a43 100644 --- a/integration-test/shell.nix +++ b/shell.nix @@ -3,10 +3,15 @@ let pkgs = import sources.nixpkgs {}; in pkgs.mkShell rec { - nativeBuildInputs = with pkgs; [ + packages = with pkgs; [ + # general + rustup + nixpkgs-fmt + niv + + # integration test grub2 qemu - rustup xorriso ]; From 8149f3f22e120c507628cd337d529c812bce2b1a Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Wed, 1 May 2024 18:29:24 +0200 Subject: [PATCH 39/41] integration test runs again --- .github/workflows/integrationtest.yml | 4 ++-- integration-test/bins/rust-toolchain.toml | 2 +- integration-test/run.sh | 3 ++- shell.nix | 4 ++++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integrationtest.yml b/.github/workflows/integrationtest.yml index 5f07017e..13de84fd 100644 --- a/.github/workflows/integrationtest.yml +++ b/.github/workflows/integrationtest.yml @@ -44,6 +44,6 @@ jobs: key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('integration-test/**/Cargo.toml', 'integration-test/**/Cargo.lock', 'integration-test/bins/rust-toolchain.toml') }} # Have all the "copying into Nix store" messages in a dedicated step for # better log visibility. - - run: cd integration-test && nix-shell --run "echo OK" && cd .. + - run: nix-shell --run "echo OK" # Now, run the actual test. - - run: cd integration-test && nix-shell --run ./run.sh && cd .. + - run: nix-shell --run run-integrationtest diff --git a/integration-test/bins/rust-toolchain.toml b/integration-test/bins/rust-toolchain.toml index 6cd890fc..4349337f 100644 --- a/integration-test/bins/rust-toolchain.toml +++ b/integration-test/bins/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "nightly-2024-03-31" # rustc 1.79-nightly +channel = "nightly-2024-04-30" # rustc 1.80-nightly profile = "default" components = [ "rust-src", diff --git a/integration-test/run.sh b/integration-test/run.sh index 318557b5..9f4fd36c 100755 --- a/integration-test/run.sh +++ b/integration-test/run.sh @@ -15,7 +15,8 @@ function fn_main() { function fn_build_rust_bins() { cd "bins" - cargo build --release + cargo --version + cargo build --release --verbose cd "$DIR" } diff --git a/shell.nix b/shell.nix index 1e3e1a43..178c58af 100644 --- a/shell.nix +++ b/shell.nix @@ -13,6 +13,10 @@ pkgs.mkShell rec { grub2 qemu xorriso + + (pkgs.writeShellScriptBin "run-integrationtest" '' + ./integration-test/run.sh + '') ]; # To invoke "nix-shell" in the CI-runner, we need a global Nix channel. From 78478c8608e0f55aba4c3434f871126876b5d9a8 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Wed, 1 May 2024 18:39:25 +0200 Subject: [PATCH 40/41] multiboot2: prepare release --- multiboot2/Changelog.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/multiboot2/Changelog.md b/multiboot2/Changelog.md index 83f8cca2..fc1ce89a 100644 --- a/multiboot2/Changelog.md +++ b/multiboot2/Changelog.md @@ -2,6 +2,8 @@ ## Unreleased +## 0.20.0 (2024-05-01) + - added `InformationBuilder::default()` - MSRV is 1.70 From c36066bd3aebf74d42f6a5cd751cac67a1b6e1d0 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Wed, 1 May 2024 18:40:24 +0200 Subject: [PATCH 41/41] chore: Release --- Cargo.lock | 28 ++++++++++++++++++++++++++-- multiboot2/Cargo.toml | 2 +- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9ae63624..6d96a4d3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,12 +28,25 @@ checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "multiboot2" version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be7a13d71fc2f7747af3ce60e5eccb638acd687b3a580d0bd579c6d0f7b9d010" +dependencies = [ + "bitflags", + "derive_more", + "log", + "ptr_meta", + "uefi-raw 0.3.0", +] + +[[package]] +name = "multiboot2" +version = "0.20.0" dependencies = [ "bitflags", "derive_more", "log", "ptr_meta", - "uefi-raw", + "uefi-raw 0.5.2", ] [[package]] @@ -41,7 +54,7 @@ name = "multiboot2-header" version = "0.3.2" dependencies = [ "derive_more", - "multiboot2", + "multiboot2 0.19.0", ] [[package]] @@ -93,6 +106,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "uefi-raw" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62642516099c6441a5f41b0da8486d5fc3515a0603b0fdaea67b31600e22082e" +dependencies = [ + "bitflags", + "ptr_meta", + "uguid", +] + [[package]] name = "uefi-raw" version = "0.5.2" diff --git a/multiboot2/Cargo.toml b/multiboot2/Cargo.toml index c3519cca..20d30a3d 100644 --- a/multiboot2/Cargo.toml +++ b/multiboot2/Cargo.toml @@ -6,7 +6,7 @@ Multiboot2-compliant bootloaders, such as GRUB. It supports all tags from the specification including full support for the sections of ELF files. This library is `no_std` and can be used in a Multiboot2-kernel. """ -version = "0.19.0" +version = "0.20.0" authors = [ "Philipp Oppermann ", "Calvin Lee ",