File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -277,6 +277,10 @@ where
277277
278278 // create boot info
279279 let boot_info = boot_info. write ( BootInfo {
280+ version_major : env ! ( "CARGO_PKG_VERSION_MAJOR" ) . parse ( ) . unwrap ( ) ,
281+ version_minor : env ! ( "CARGO_PKG_VERSION_MINOR" ) . parse ( ) . unwrap ( ) ,
282+ version_patch : env ! ( "CARGO_PKG_VERSION_PATCH" ) . parse ( ) . unwrap ( ) ,
283+ pre_release : !env ! ( "CARGO_PKG_VERSION_PRE" ) . is_empty ( ) ,
280284 memory_regions,
281285 framebuffer : mappings. framebuffer . map ( |addr| FrameBuffer {
282286 buffer_start : addr. as_u64 ( ) ,
Original file line number Diff line number Diff line change @@ -15,6 +15,17 @@ use core::slice;
1515/// signature, use the [`entry_point`] macro.
1616#[ derive( Debug ) ]
1717pub struct BootInfo {
18+ /// Bootloader version (major).
19+ pub version_major : u16 ,
20+ /// Bootloader version (minor).
21+ pub version_minor : u16 ,
22+ /// Bootloader version (patch).
23+ pub version_patch : u16 ,
24+ /// Whether the bootloader version is a pre-release.
25+ ///
26+ /// We can't store the full prerelease string of the version number since it could be
27+ /// arbitrarily long.
28+ pub pre_release : bool ,
1829 /// A map of the physical memory regions of the underlying machine.
1930 ///
2031 /// The bootloader queries this information from the BIOS/UEFI firmware and translates this
You can’t perform that action at this time.
0 commit comments