Skip to content

Commit bf54c87

Browse files
committed
integration-test: misc
1 parent 68e7f7c commit bf54c87

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,9 @@ at your option.
2121
Unless you explicitly state otherwise, any contribution intentionally submitted
2222
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
2323
dual licensed as above, without any additional terms or conditions.
24+
25+
## Developer Guide
26+
27+
This is a pretty normal Cargo workspace with two crates. For the integration
28+
test, please read the
29+
corresponding [instructions](./integration-test/README.md).

integration-test/bins/multiboot2_chainloader/Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
[package]
22
name = "multiboot2_chainloader"
3-
description = "Integrationtest: Multiboot2 chainloader"
3+
description = """
4+
Integrationtest: Multiboot2 chainloader. The loader itself loads via Multiboot1,
5+
but the payload is loaded via Multiboot2 by the loader.
6+
"""
47
version = "0.1.0"
58
edition = "2021"
69
publish = false

integration-test/bins/multiboot2_chainloader/src/main.rs

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ core::arch::global_asm!(include_str!("start.S"), options(att_syntax));
1919
#[no_mangle]
2020
fn rust_entry(multiboot_magic: u32, multiboot_hdr: *const u32) -> ! {
2121
init_environment();
22-
let x = 0.12 + 0.56;
23-
log::debug!("{x}");
2422
log::debug!("multiboot_hdr={multiboot_hdr:x?}, multiboot_magic=0x{multiboot_magic:x?}");
2523
let mbi = multiboot::get_mbi(multiboot_magic, multiboot_hdr as u32).unwrap();
2624
let module_iter = mbi.modules().expect("Should provide modules");

integration-test/bins/multiboot2_payload/src/main.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ fn main(multiboot2_magic: u32, multiboot2_hdr: u32) -> anyhow::Result<()> {
2929
if multiboot2_magic != multiboot2::MAGIC {
3030
Err(anyhow::Error::msg("Invalid bootloader magic"))?
3131
}
32-
log::debug!("multiboot2_hdr={multiboot2_hdr:x?}, multiboot2_magic=0x{multiboot2_magic:x?}");
32+
log::debug!(
33+
"multiboot2_hdr=0x{multiboot2_hdr:08x?}, multiboot2_magic=0x{multiboot2_magic:08x?}"
34+
);
3335

3436
let mbi_ptr = (multiboot2_hdr as *const u8).cast();
3537
let mbi = unsafe { BootInformation::load(mbi_ptr) }.map_err(anyhow::Error::msg)?;

0 commit comments

Comments
 (0)