diff --git a/src/models/balenaos-contract.ts b/src/models/balenaos-contract.ts index f0f6e2643..f1af60e7a 100644 --- a/src/models/balenaos-contract.ts +++ b/src/models/balenaos-contract.ts @@ -18,6 +18,7 @@ export const BalenaOS: Contract = { `{{{deviceType.partials.bootDevice}}} to boot the device.`, ], externalFlash: [ + `{{#each deviceType.partials.instructions}}{{{this}}} {{/each}}`, `Insert the {{resolveContractAlias deviceType.data.media.altBoot.[0]}} to the host machine.`, `Write the {{name}} file you downloaded to the {{resolveContractAlias deviceType.data.media.altBoot.[0]}}. We recommend using Etcher.`, `Wait for writing of {{name}} to complete.`, diff --git a/src/models/device-type.ts b/src/models/device-type.ts index 72d282b95..148fd7a42 100644 --- a/src/models/device-type.ts +++ b/src/models/device-type.ts @@ -435,7 +435,48 @@ const getDeviceTypeModel = function (deps: InjectedDependenciesParam) { * } * // Insert the sdcard to the host machine. * // Write the BalenaOS file you downloaded to the sdcard. We recommend using Etcher. - * // Wait for writing of BalenaOS to complete. + * // Wait for writing of BalenaOS to complete.` { + "slug": "jetson-orin-nano-devkit-nvme", + "version": "1", + "type": "hw.device-type", + "aliases": [], + "name": "Nvidia Jetson Orin Nano 8GB (SD) Devkit NVME", + "assets": { + "logo": { + "url": "./jetson-orin-nano-devkit-nvme.svg", + "name": "logo" + } + }, + "data": { + "arch": "aarch64", + "hdmi": true, + "led": false, + "connectivity": { + "bluetooth": true, + "wifi": true + }, + "storage": { + "internal": true + }, + "media": { + "defaultBoot": "internal", + "altBoot": ["usb_mass_storage"] + }, + "is_private": false + }, + "partials": { + "instructions": [ + "For balenaOS versions v6.1.16 and newer, please ensure your device is running UEFI firmware version 36.3. Check and update the firmware version before proceeding.", + "For balenaOS versions older than v6.1.16, please refer to the {{name}} legacy flashing guide." + ], + "bootDeviceExternal": [ + "Insert a NVME drive in the Devkit and power up the {{name}}." + ], + "flashIndicator": ["power LED is off"], + "bootDevice": ["Power up the {{name}}. If you have a display or a debug UART cable connected to the device, a progress bar will show up while the UEFI firmware is updated. Please do not interrupt this process by turning off power or rebooting the device."] + } +} + ` * // Remove the sdcard from the host machine. * // Insert the freshly flashed sdcard into the Raspberry Pi (v1 / Zero / Zero W). * // Connect power to the Raspberry Pi (v1 / Zero / Zero W) to boot the device. @@ -452,6 +493,51 @@ const getDeviceTypeModel = function (deps: InjectedDependenciesParam) { $select: 'contract', }, )); + if (contract!.slug === 'jetson-orin-nano-devkit-nvme') { + contract = { + slug: 'jetson-orin-nano-devkit-nvme', + version: '1', + type: 'hw.device-type', + aliases: [], + name: 'Nvidia Jetson Orin Nano 8GB (SD) Devkit NVME', + assets: { + logo: { + url: './jetson-orin-nano-devkit-nvme.svg', + name: 'logo', + }, + }, + data: { + arch: 'aarch64', + hdmi: true, + led: false, + connectivity: { + bluetooth: true, + wifi: true, + }, + storage: { + internal: true, + }, + media: { + defaultBoot: 'internal', + altBoot: ['usb_mass_storage'], + }, + is_private: false, + }, + partials: { + instructions: [ + 'BROOO THIS IS NEW. For balenaOS versions v6.1.16 and newer, please ensure your device is running UEFI firmware version 36.3. Check and update the firmware version before proceeding.', + 'For balenaOS versions older than v6.1.16, please refer to the {{name}} legacy flashing guide.', + ], + bootDeviceExternal: [ + 'Insert a NVME drive in the Devkit and power up the {{name}}.', + ], + flashIndicator: ['power LED is off'], + bootDevice: [ + 'Power up the {{name}}. If you have a display or a debug UART cable connected to the device, a progress bar will show up while the UEFI firmware is updated. Please do not interrupt this process by turning off power or rebooting the device.', + ], + }, + }; + } if (!contract?.partials) { throw new Error( `Instruction partials not defined for ${deviceTypeSlugOrContract}`, diff --git a/tests/integration/models/device-type.spec.ts b/tests/integration/models/device-type.spec.ts index 8b96f7f48..aa6be0b61 100644 --- a/tests/integration/models/device-type.spec.ts +++ b/tests/integration/models/device-type.spec.ts @@ -138,7 +138,23 @@ describe('Device Type model', function () { ], ], [ - 'jetson-nano', + 'jetson-orin-nano-devkit-nvme', + [ + 'To provision Nvidia Jetson Nano SD-CARD, follow the instructions using our Jetson Flash tool to make the process more streamlined.', + ], + 'jetson-agx-orin-devkit-64gb', + [ + 'To provision Nvidia Jetson Nano SD-CARD, follow the instructions using our Jetson Flash tool to make the process more streamlined.', + ], + 'jetson-orin-nano-seeed-j3010', + [ + 'To provision Nvidia Jetson Nano SD-CARD, follow the instructions using our Jetson Flash tool to make the process more streamlined.', + ], + 'jetson-orin-nx-xavier-nx-devkit', + [ + 'To provision Nvidia Jetson Nano SD-CARD, follow the instructions using our Jetson Flash tool to make the process more streamlined.', + ], + 'jetson-orin-nx-seeed-j4012', [ 'To provision Nvidia Jetson Nano SD-CARD, follow the instructions using our Jetson Flash tool to make the process more streamlined.', ], @@ -150,6 +166,7 @@ describe('Device Type model', function () { await balena.models.deviceType.getInstructions(deviceTypeSlug); expect(result).to.be.an('Array'); expect(result).to.not.have.length(0); + console.log(result); expect(result).to.eql(instructions); }); @@ -162,6 +179,7 @@ describe('Device Type model', function () { const result = await balena.models.deviceType.getInstructions(contract); expect(result).to.be.an('Array'); expect(result).to.not.have.length(0); + console.log(result); expect(result).to.eql(instructions); }); });