File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -277,6 +277,10 @@ where
277
277
278
278
// create boot info
279
279
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 ( ) ,
280
284
memory_regions,
281
285
framebuffer : mappings. framebuffer . map ( |addr| FrameBuffer {
282
286
buffer_start : addr. as_u64 ( ) ,
Original file line number Diff line number Diff line change @@ -15,6 +15,17 @@ use core::slice;
15
15
/// signature, use the [`entry_point`] macro.
16
16
#[ derive( Debug ) ]
17
17
pub 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 ,
18
29
/// A map of the physical memory regions of the underlying machine.
19
30
///
20
31
/// 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