Copy boot config file to boot partition
This commit is contained in:
parent
922a5655fd
commit
c7f5971f9f
10
boot.json
Normal file
10
boot.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"frame_buffer": {
|
||||
"minimum_framebuffer_height": null,
|
||||
"minimum_framebuffer_width": null
|
||||
},
|
||||
"log_level": "Trace",
|
||||
"frame_buffer_logging": true,
|
||||
"serial_logging": true,
|
||||
"_test_sentinel": 0
|
||||
}
|
16
build.rs
16
build.rs
@ -1,10 +1,4 @@
|
||||
use std::{
|
||||
env,
|
||||
fs,
|
||||
os::unix::ffi::OsStrExt,
|
||||
path::PathBuf,
|
||||
process::Command,
|
||||
};
|
||||
use std::{env, fs, os::unix::ffi::OsStrExt, path::PathBuf, process::Command};
|
||||
|
||||
use gpt::{mbr::ProtectiveMBR, GptConfig};
|
||||
|
||||
@ -15,6 +9,7 @@ fn main() {
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
println!("cargo:rerun-if-changed=initrd_file_list");
|
||||
println!("cargo:rerun-if-changed=bootloader-x86_64-uefi.efi");
|
||||
println!("cargo:rerun-if-changed=boot.json");
|
||||
|
||||
// set by cargo, build scripts should use this directory for output files
|
||||
let out_dir = std::env::var_os("OUT_DIR").unwrap();
|
||||
@ -151,6 +146,13 @@ fn main() {
|
||||
.arg("::ramdisk")
|
||||
.output()
|
||||
.unwrap();
|
||||
Command::new("mcopy")
|
||||
.arg("-i")
|
||||
.arg("tmp_esp.img")
|
||||
.arg("boot.json")
|
||||
.arg("::")
|
||||
.output()
|
||||
.unwrap();
|
||||
|
||||
Command::new("dd")
|
||||
.arg("if=tmp_esp.img")
|
||||
|
Loading…
Reference in New Issue
Block a user