diff --git a/.gitignore b/.gitignore index 09200ab..bb763c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ target sysroot +initrd_path +kernel_path diff --git a/build.rs b/build.rs index 3f670db..5459b33 100644 --- a/build.rs +++ b/build.rs @@ -1,4 +1,4 @@ -use std::{path::{Path, PathBuf}, process::Command}; +use std::{os::unix::ffi::OsStrExt, path::{Path, PathBuf}, process::Command}; extern crate bootloader; @@ -43,4 +43,7 @@ fn main() { println!("cargo:rustc-env=UEFI_PATH={}", uefi_path.to_string_lossy()); println!("cargo:rustc-env=BIOS_PATH={}", bios_path.to_string_lossy()); + + std::fs::write("kernel_path", kernel.as_os_str().as_bytes()).unwrap(); + std::fs::write("initrd_path", initrd_path.as_os_str().as_bytes()).unwrap(); }