Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checkout latest jetson flash before flashing #67

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions lib/flashing/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void>(async (resolve, reject) => {
let build = spawn('docker',
Expand Down