File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ impl UefiBoot {
6868 bootloader_path,
6969 self . kernel . as_path ( ) ,
7070 self . ramdisk . as_deref ( ) ,
71+ self . config . as_deref ( ) ,
7172 out_path,
7273 )
7374 . context ( "failed to create UEFI PXE tftp folder" ) ?;
Original file line number Diff line number Diff line change 11use std:: path:: Path ;
22
33use anyhow:: Context ;
4+ use bootloader_boot_config:: BootConfig ;
45
56pub fn create_uefi_tftp_folder (
67 bootloader_path : & Path ,
78 kernel_binary : & Path ,
89 ramdisk_path : Option < & Path > ,
10+ boot_config : Option < & str > ,
911 out_path : & Path ,
1012) -> anyhow:: Result < ( ) > {
1113 std:: fs:: create_dir_all ( out_path)
@@ -39,5 +41,10 @@ pub fn create_uefi_tftp_folder(
3941 } ) ?;
4042 }
4143
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+
4249 Ok ( ( ) )
4350}
You can’t perform that action at this time.
0 commit comments