Hi.
I have a custom carrier board with Jetson Orin NX on it. Because of that, I have additional files and config files which I need to flash.
The default sdkmanager does not consider these files. So, based on The Extra Configuration File — SDK Manager 2.1.0 documentation , I add an extra json file to overwrite original json file so that my desired files gets kicked in.
this is my json file
{
"information": {
"release": {
"releaseVersion": "JetPack 6.0",
"releaseEdition": "",
"releaseRevision": 0
}
},
"sw":{
"NV_L4T_DRIVERS_COMP": {
"name": "Drivers for Jetson",
"isVisible": true,
"isDetectableInstall": false,
"platforms": [
{
"downloadFiles": [
{
"url": "./Jetson_Linux_R36.3.0_aarch64.tbz2",
"fileName": "Jetson_Linux_R36.3.0_aarch64.tbz2",
"size": 679302251,
"checksum": "7550fd9a23e1c8c849eedfba063f55f1",
"checksumType": "md5",
"verifyChecksum": "yes",
"packageInstallParameters": {
"additionalParameters": {
"installDir": "{{TARGET_ROOT}}/{{BUNDLE_TITLE}}_{{BOARD_ID}}",
"preInstallCommands": [
{
"execBash": [
"sudo rm -rf {{TARGET_ROOT}}/{{BUNDLE_TITLE}}_{{BOARD_ID}}/Linux_for_Tegra/",
"safe_apt_install \"sudo apt-get install -y lbzip2\" 5"
]
}
],
"installCommands": [
{
"execBash": [
"echo patch file to flash AI-Blox device"
"tar -I lbzip2 -xf {{FILE_PATH}}",
"cd {{FILE_PATH}}/bootloader/generic/BCT/",
"LINE=$(grep 'cvb_eeprom_read_size' tegra234-mb2-bct-misc-p3767-0000.dts)",
"sed -i \"s|${LINE}|cvb_eeprom_read_size = <0x0>;|g\" tegra234-mb2-bct-misc-p3767-0000.dts",
"LINE=$(grep 'cvb_eeprom_read_size' tegra234-mb2-bct-misc-p3701-0002-p3711-0000.dts)",
"sed -i \"s|${LINE}|cvb_eeprom_read_size = <0x0>;|g\" tegra234-mb2-bct-misc-p3701-0002-p3711-0000.dts",
"LINE=$(grep 'cvb_eeprom_read_size' tegra234-mb2-bct-misc-p3701-0002-p3740-0002.dts)",
"sed -i \"s|${LINE}|cvb_eeprom_read_size = <0x0>;|g\" tegra234-mb2-bct-misc-p3701-0002-p3740-0002.dts",
"cd {{FILE_PATH}}"
]
}
]
},
"installEngineQueue": "default",
"installType": "cmd"
}
}
],
"architectures": [
"x86_64",
"x86_64-wsl"
],
"operatingSystems": [
"ubuntu20.04",
"ubuntu22.04"
],
"targetIds": [
"JETSON_AGX_ORIN_TARGETS",
"JETSON_ORIN_NX_TARGETS",
"JETSON_ORIN_NANO_TARGETS"
],
"installSizeMB": 748.17,
"prerequisites": []
}
],
"version": "36.3.0",
"locked": false,
"licenseIds": [
"NV_JETPACK_OS_EMBEDDED_EULA"
],
"id": "NV_L4T_DRIVERS_COMP",
"isPartiallyDetectableInstall": false,
"installPath": "{{TARGET_ROOT}}/{{BUNDLE_TITLE}}_{{BOARD_ID}}/"
},
"NV_L4T_FILE_SYSTEM_AND_OS_COMP": {
"name": "File System and OS",
"isVisible": true,
"isDetectableInstall": false,
"platforms": [
{
"prerequisites": [
"PREREQUISITE_APT_HOST"
],
"downloadFiles": [
{
"url": "./Tegra_Linux_Sample-Root-Filesystem_R36.3.0_aarch64.tbz2",
"fileName": "Tegra_Linux_Sample-Root-Filesystem_R36.3.0_aarch64.tbz2",
"size": 1499224890,
"checksum": "12bd3ed977eb86f6b13e90a2000022de",
"checksumType": "md5",
"verifyChecksum": "yes",
"packageInstallParameters": {
"additionalParameters": {
"installDir": "{{TARGET_ROOT}}/{{BUNDLE_TITLE}}_{{BOARD_ID}}/Linux_for_Tegra/rootfs/",
"installCommands": [
{
"execBash": [
"echo This place is to add or modify commands and scripts in extra-config file",
"sudo tar xpf {{FILE_PATH}}",
"cd ..",
"sudo ./tools/l4t_flash_prerequisites.sh",
"sudo ./apply_binaries.sh",
"sudo mkdir -p rootfs/opt/nvidia/deb_repos",
"sudo ./tools/l4t_create_default_usr.sh -u ai-blox -p ai-blox -n -a ai-blox --accept-license"
]
}
]
},
"installEngineQueue": "default",
"installType": "cmd"
}
}
],
"architectures": [
"x86_64",
"x86_64-wsl"
],
"operatingSystems": [
"ubuntu20.04",
"ubuntu22.04"
],
"targetIds": [
"JETSON_AGX_ORIN_TARGETS",
"JETSON_ORIN_NX_TARGETS",
"JETSON_ORIN_NANO_TARGETS"
],
"dependencies": [
{
"type": "required",
"id": "NV_L4T_DRIVERS_COMP"
}
],
"installSizeMB": 4958.77
},
{
"targetIds": [
"JETSON_AGX_ORIN_TARGETS",
"JETSON_ORIN_NX_TARGETS",
"JETSON_ORIN_NANO_TARGETS"
],
"prerequisites": [
"PREREQUISITE_APT_HOST"
],
"architectures": [
"x86_64"
],
"downloadFiles": [
{
"url": "./Tegra_Linux_Sample-Root-Filesystem_R36.3.0_aarch64.tbz2",
"fileName": "Tegra_Linux_Sample-Root-Filesystem_R36.3.0_aarch64.tbz2",
"size": 1899224890,
"checksum": "12bd3ed977eb86f6b13e90a2000022de",
"checksumType": "md5",
"verifyChecksum": "yes",
"packageInstallParameters": {
"additionalParameters": {
"installDir": "{{TARGET_ROOT}}/{{BUNDLE_TITLE}}_{{BOARD_ID}}/Linux_for_Tegra/rootfs/",
"installCommands": [
{
"execBash": [
"echo This place is to add or modify commands and scripts in extra-config file",
"sudo tar xpf {{FILE_PATH}}",
"cd ..",
"sudo ./tools/l4t_flash_prerequisites.sh",
"sudo ./apply_binaries.sh",
"sudo mkdir -p rootfs/opt/nvidia/deb_repos",
"sudo ./tools/l4t_create_default_usr.sh -u ai-blox -p ai-blox -n -a ai-blox --accept-license"
]
}
]
},
"installEngineQueue": "default",
"installType": "cmd"
}
}
],
"operatingSystems": [
"ubuntu20.04",
"ubuntu22.04"
],
"dependencies": [
{
"type": "optional",
"id": "NV_L4T_DRIVERS_COMP"
}
],
"installSizeMB": 4958.77
}
],
"version": "36.3.0.1",
"locked": false,
"licenseIds": [
"NV_JETPACK_OS_EMBEDDED_EULA"
],
"id": "NV_L4T_FILE_SYSTEM_AND_OS_COMP",
"isPartiallyDetectableInstall": false,
"installPath": "{{TARGET_ROOT}}/{{BUNDLE_TITLE}}_{{BOARD_ID}}/Linux_for_Tegra/rootfs/"
},
"NV_L4T_FLASH_JETSON_LINUX_COMP": {
"name": "Flash Jetson Linux",
"isVisible": true,
"estimateInstallDurationSeconds": 500,
"platforms": [
{
"installSizeMB": 9520,
"componentInstallParameters": {
"installDir": "{{TARGET_ROOT}}/{{BUNDLE_TITLE}}_{{BOARD_ID}}/Linux_for_Tegra",
"installEngineQueue": "parallel",
"installCommands": [
{
"execBash": [
"echo This place is to add or modify commands and scripts in extra-config file",
"set -e",
"unset LC_ALL",
"echo sudo ./nvsdkmanager_flash.sh {{FLASH_OPTIONS}}",
"sudo ./nvsdkmanager_flash.sh {{FLASH_OPTIONS}}",
"sleep 20",
"if [[ '{{FLASH_OPTIONS}}' == *'--nv-auto-config'* ]]; then",
"sleep 40",
"fi"
]
}
]
},
"architectures": [
"x86_64"
],
"downloadFiles": [],
"operatingSystems": [
"ubuntu18.04",
"ubuntu20.04"
],
"targetIds": [
"JETSON_AGX_XAVIER_TARGETS",
"JETSON_XAVIER_NX_TARGETS",
"JETSON_AGX_ORIN_TARGETS",
"JETSON_ORIN_NX_TARGETS",
"JETSON_ORIN_NANO_TARGETS"
],
"dependencies": [
{
"type": "optional",
"id": "NV_L4T_FILE_SYSTEM_AND_OS_COMP"
}
],
"prerequisites": []
}
],
"version": "36.3",
"licenseIds": [
"NV_JETPACK_OS_EMBEDDED_EULA"
],
"id": "NV_L4T_FLASH_JETSON_LINUX_COMP",
"isDetectableInstall": false,
"isPartiallyDetectableInstall": false
}
},
"hw": {
"JETSON_ORIN_NX_TARGETS": {
"id": "JETSON_ORIN_NX_TARGETS"
"name": "Jetson Orin Nano",
"moduleNames": [
"P3768-0000"
],
"hwDevices": [],
"products": [
"Jetson"
],
"targetIds": [
"P3768-0000"
],
"moduleIds": [
"P3768-0000"
],
"carrierIds": [
"3768-0000"
],
"moduleDescription": "AI-Blox Jetson Orin Nano board",
"carrierDescription": "bla bla",
"recoveryModeCodes": [
"0955:7223"
],
"hwImagePath": "https://developer.download.nvidia.com/sdkmanager/resources/hw_images/JETSON/JETSON_AGX_ORIN_32GB.png",
"storages": [
{
"id": "default",
"displayName": "EMMC (default)",
"flashOptions": ""
},
{
"id": "nvme",
"displayName": "NVMe",
"flashOptions": "--storage nvme0n1p1"
},
{
"id": "usb",
"displayName": "USB",
"flashOptions": "--storage sda1"
},
{
"id": "custom",
"displayName": "Custom",
"flashOptions": "--custom ./nvautoflash.sh --storage nvme0n1p1"
}
]
}
}
}
The keys NV_L4T_DRIVERS_COMP
, NV_L4T_FILE_SYSTEM_AND_OS_COMP
and NV_L4T_FLASH_JETSON_LINUX_COMP
are the ones which can be found the components
entry in the original json files.
this is the command I run
sdkmanager --cli --login-type offline --download-folder /home/ai-blox/Desktop/test/sdkm --target-image-folder /home/ai-blox/Desktop/test/sdkm --action install --target JETSON_ORIN_NX_TARGETS --product Jetson --target-os Linux --version 6.0 --extra-config extraconfig.json --flash all --license accept
The observation is that the device is flashed OK but not with the configs I expect to see. It seems that my generated json file does not affect the flashing process.
Can you please help me with this ?
additional notes:
In the original json file, the key components.NV_L4T_DRIVERS_COMP.platforms.downloadedFiles.packageInstallParameters.additionalParameters.installCommands
contains an execution command "tar -I lbzip2 -xf {{FILE_PATH}}"
which untars the downloaded BSP tarball.
I re-defined exactly the same key-value in sw
key in customized json file for my own carrier board:
sw.NV_L4T_DRIVERS_COMP.platforms.downloadFiles.packageInstallParameters.additionalParameters.installCommands
The key for the execBash
for the above key path is as below:
"execBash": [
"echo patch file to flash "
"tar -I lbzip2 -xf {{FILE_PATH}}",
"cd {{FILE_PATH}}/bootloader/generic/BCT/",
"LINE=$(grep 'cvb_eeprom_read_size' tegra234-mb2-bct-misc-p3767-0000.dts)",
"sed -i \"s|${LINE}|cvb_eeprom_read_size = <0x0>;|g\" tegra234-mb2-bct-misc-p3767-0000.dts",
"LINE=$(grep 'cvb_eeprom_read_size' tegra234-mb2-bct-misc-p3701-0002-p3711-0000.dts)",
"sed -i \"s|${LINE}|cvb_eeprom_read_size = <0x0>;|g\" tegra234-mb2-bct-misc-p3701-0002-p3711-0000.dts",
"LINE=$(grep 'cvb_eeprom_read_size' tegra234-mb2-bct-misc-p3701-0002-p3740-0002.dts)",
"sed -i \"s|${LINE}|cvb_eeprom_read_size = <0x0>;|g\" tegra234-mb2-bct-misc-p3701-0002-p3740-0002.dts",
"cd {{FILE_PATH}}"
]
It turns out that SDKManager generates .sh
file in /tmp/
directory that contains the execBash values. I realized that there is the content of the execBash of the original json file in it, and I expect to see the content of my json file in it.