From 45138d629f666589a7eb74ec18f80c3de7304edb Mon Sep 17 00:00:00 2001 From: rcooke-warwick Date: Thu, 30 Nov 2023 16:35:45 +0000 Subject: [PATCH] checkout latest jetson-flash Change-type: patch Signed-off-by: Ryan Cooke --- lib/flashing/index.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/flashing/index.ts b/lib/flashing/index.ts index 387bfea..a5978a1 100644 --- a/lib/flashing/index.ts +++ b/lib/flashing/index.ts @@ -360,10 +360,16 @@ async function flashJetson(filename: string, autoKit: Autokit, deviceType: strin const powerOnDelay = Number(process.env.CAP_DELAY) || 1000*60*5; // Select the directory to build the container from, and the command to run inside the container once its built and running - const JETSON_FLASH_DIR = process.env.JETSON_FLASH_DIR || '/usr/app/jetson-flash/Orin_Nx_Nano_NVME' - const JETSON_FLASH_SCRIPT = process.env.JETSON_FLASH_SCRIPT || 'flash_orin.sh' + const JETSON_FLASH_DIR = process.env.JETSON_FLASH_DIR || '/usr/app/jetson-flash/Orin_Nx_Nano_NVME'; + const JETSON_FLASH_SCRIPT = process.env.JETSON_FLASH_SCRIPT || 'flash_orin.sh'; + const JETSON_FLASH_BRANCH = process.env.JETSON_FLASH_BRANCH || 'master'; // now start the jetson flash tool with docker. // build first + + // ensure we have latest jetson-flash + let checkout = await exec(`cd /usr/app/jetson-flash && git fetch && git reset --hard origin/${JETSON_FLASH_BRANCH}`); + console.log(checkout) + if(nvme){ await new Promise(async (resolve, reject) => { let build = spawn('docker',