Write the paths to the initrd and kernel to files in the build script
This commit is contained in:
parent
6e7424bbf0
commit
c63a523b6c
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,4 @@
|
||||
target
|
||||
sysroot
|
||||
initrd_path
|
||||
kernel_path
|
||||
|
5
build.rs
5
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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user