From dc1ca3d3d0e7a4eb8445ac6899173b41ec01f3d3 Mon Sep 17 00:00:00 2001 From: mwojcik Date: Thu, 10 Mar 2022 16:19:38 +0800 Subject: [PATCH] szl: fallback to netboot if boot mode not supported --- szl/src/main.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/szl/src/main.rs b/szl/src/main.rs index b21e581..ca3e243 100644 --- a/szl/src/main.rs +++ b/szl/src/main.rs @@ -136,7 +136,14 @@ pub fn main_core0() { } } v => { - panic!("Boot mode {:?} not supported", v); + log::error!("Boot mode {:?} not supported", v); + log::info!("Fall back on netboot"); + netboot::netboot( + &mut bootgen_file, + config, + &mut __runtime_start as *mut usize as *mut u8, + max_len, + ) } }; }