File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ impl UefiBoot {
68
68
bootloader_path,
69
69
self . kernel . as_path ( ) ,
70
70
self . ramdisk . as_deref ( ) ,
71
+ self . config . as_deref ( ) ,
71
72
out_path,
72
73
)
73
74
. context ( "failed to create UEFI PXE tftp folder" ) ?;
Original file line number Diff line number Diff line change 1
1
use std:: path:: Path ;
2
2
3
3
use anyhow:: Context ;
4
+ use bootloader_boot_config:: BootConfig ;
4
5
5
6
pub fn create_uefi_tftp_folder (
6
7
bootloader_path : & Path ,
7
8
kernel_binary : & Path ,
8
9
ramdisk_path : Option < & Path > ,
10
+ boot_config : Option < & str > ,
9
11
out_path : & Path ,
10
12
) -> anyhow:: Result < ( ) > {
11
13
std:: fs:: create_dir_all ( out_path)
@@ -39,5 +41,10 @@ pub fn create_uefi_tftp_folder(
39
41
} ) ?;
40
42
}
41
43
44
+ if let Some ( config) = boot_config {
45
+ let to = out_path. join ( "boot.json" ) ;
46
+ std:: fs:: write ( to, config) . context ( "failed to write boot.json" ) ?;
47
+ }
48
+
42
49
Ok ( ( ) )
43
50
}
You can’t perform that action at this time.
0 commit comments