@@ -39,6 +39,7 @@ static FIRMWARENSH: &'static str = concat!("\\", env!("BASEDIR"), "\\res\\firmwa
3939static FIRMWAREROM : & ' static str = concat ! ( "\\ " , env!( "BASEDIR" ) , "\\ firmware\\ firmware.rom" ) ;
4040static IFLASHV : & ' static str = concat ! ( "\\ " , env!( "BASEDIR" ) , "\\ firmware\\ iflashv.efi" ) ;
4141static IFLASHVTAG : & ' static str = concat ! ( "\\ " , env!( "BASEDIR" ) , "\\ firmware\\ iflashv.tag" ) ;
42+ static IPXEEFI : & ' static str = concat ! ( "\\ " , env!( "BASEDIR" ) , "\\ firmware\\ ipxe.efi" ) ;
4243static MESETTAG : & ' static str = concat ! ( "\\ " , env!( "BASEDIR" ) , "\\ firmware\\ meset.tag" ) ;
4344static SHELLEFI : & ' static str = concat ! ( "\\ " , env!( "BASEDIR" ) , "\\ res\\ shell.efi" ) ;
4445static SPLASHBMP : & ' static str = concat ! ( "\\ " , env!( "BASEDIR" ) , "\\ res\\ splash.bmp" ) ;
@@ -206,6 +207,7 @@ fn remove_override(option: u16) -> Result<()> {
206207
207208fn inner ( ) -> Result < ( ) > {
208209 let mut shutdown = false ;
210+ let mut success = false ;
209211
210212 let option = set_override ( ) ?;
211213
@@ -249,9 +251,7 @@ fn inner() -> Result<()> {
249251
250252 if c == '\n' || c == '\r' {
251253 shutdown = true ;
252-
253- let mut success = true ;
254-
254+ success = true ;
255255 for ( component, validation) in components. iter ( ) . zip ( validations. iter ( ) ) {
256256 if * validation == ValidateKind :: Found {
257257 match component. flash ( ) {
@@ -297,6 +297,18 @@ fn inner() -> Result<()> {
297297
298298 remove_override ( option) ?;
299299
300+ if success && find ( IPXEEFI ) . is_ok ( ) {
301+ println ! ( "Launching iPXE..." ) ;
302+ match exec_path ( IPXEEFI , & [ ] ) {
303+ Ok ( status) => {
304+ println ! ( "iPXE exited with status {}" , status) ;
305+ } ,
306+ Err ( err) => {
307+ println ! ( "Failed to launch iPXE: {:?}" , err) ;
308+ }
309+ }
310+ }
311+
300312 if shutdown {
301313 println ! ( "Press any key to shutdown..." ) ;
302314 raw_key ( ) ?;
0 commit comments