Sdkmanager with extra config

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.

Hi, there are a few issues in the extra config file I have noticed.

  1. there are a few comma missing in the json
  2. for hw overwrite, we can not overwrite the whole series, only a single target devices can be overwrited. (for example JETSON_ORIN_NX_8GB)
  3. did not see whats the point to have 2 plateforms in NV_L4T_FILE_SYSTEM_AND_OS_COMP, it made the client confuse.
  4. NV_L4T_FLASH_JETSON_LINUX_COMP version not matching the client one.

I did some fix on the json you provided in the sw part for upper issue 1,3,4, it should be working now. You can use it as an example.
extraconfig.json (11.2 KB)

Please let me know if you have any other questions.

Hi @dongbox

Thanks for the feedback. I applied your modified json and I got below errors:

Error: Find invalid hw device object: undefined
Failed to validate HW json object. Error:
	Failed to validate json hw object for JETSON_ORIN_NX_TARGETS. Errors:
	property: instance. message: requires property "imagePath"
	property: instance. message: requires property "deviceIdentificationDetails"

This is the change I made:

"deviceIdentificationDetails": {
            "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"
            ],
          }
            "imagePath": "https://developer.download.nvidia.com/sdkmanager/resources/hw_images/JETSON/JETSON_AGX_ORIN_32GB.png",

But still no effect… It still does not use my extraconfig.json

Can you share the whole hw object? And please let me know what you are trying to achive here? I was not so sure so I did not help to modify the hw part.

"hw": {
        "JETSON_ORIN_NX_TARGETS": {
          "id": "JETSON_ORIN_NX_TARGETS",
          "name": "Jetson Orin Nano",
          "deviceIdentificationDetails": {
            "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"
            ],
          }
            "imagePath": "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"
                }
            ]
        }
    }

I need to flash Jetson-Orin NX module with my own carrier board. Note that, I don’t have EEPROM, so I need to modify some of the files inside bootloader/generic/BCT to disable EEPROM reading. I modify these dts files within sw object. Below is my sw object:

"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"
                    ],
                    "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
                }
            ],
            "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.0",
            "licenseIds": [
                "NV_JETPACK_OS_EMBEDDED_EULA"
            ],
            "id": "NV_L4T_FLASH_JETSON_LINUX_COMP",
            "isDetectableInstall": false,
            "isPartiallyDetectableInstall": false
        }
    },

The object sw.NV_L4T_DRIVERS_COMP should untar Jetson_Linux_R36.3.0_aarch64.tbz2 and should go inside Linux_for_Tegra/bootloader/generic/BCT to modify 3 device trees:

tegra234-mb2-bct-misc-p3767-0000.dts
tegra234-mb2-bct-misc-p3701-0002-p3711-0000.dts
tegra234-mb2-bct-misc-p3701-0002-p3740-0002.dts

In this way, the device gets flashed properly.

prob something like this
extraconfig.json (11.5 KB)

no improvement @dongbox

BTW, this is my command to run sdkmanager

sdkmanager --cli --login-type offline --download-folder /home/ai-blox/Desktop/test/sdkm --target-image-folder /home/ai-blox/Desktop/test/sdkm --action install --product Jetson --target-os Linux --version 6.0 --extra-config extraconfig.json --flash all --license accept

I expect to see the commands I put in extraconfig.json to get executed.


I did a trick to see if --extra-config really exert my commands. I run sdkmanager --cli with devzone login type to get the actual json file. I added my commands within objects "NV_L4T_DRIVERS_COMP" and "NV_L4T_FILE_SYSTEM_AND_OS_COMP", and re-run sdkmanager without --extra-config and in offline mode. My commands got applied and the device gets flashed correctly.

It seems that --extra-config is not kicked in.

you will need --extra-config everytime you run if you want it to be applied.

@dongbox Thank you very much for you prompt reply!

Indeed I add --extra-config everytime but the --extra-config does not kick in my custom json file.

Have you tried to test if --extra-config works or not ?
Do you want to reproduce the same problem I have ?

Hi I tried the extra config I sent, with your provided commands. It’s indeed applies the changes. A quick check you can see is: I helped to change the names of those components to a different one.
If you see the screenshot below, it indeed loaded the changes. (says AI-Blox in those components)

please double check if your customized commands is working correctly?
please share the install logs if you still meet any issues.

@dongbox
BSP and root file system preparation is OK.
NV_L4T_DRIVERS_COMP pass
NV_L4T_FILE_SYSTEM_AND_OS_COMP pass
NV_L4T_FLASH_JETSON_LINUX_COMP Fail (The failure reason is written in below picture)

It says make sure the device is in RCM mode. I’m sure it is in RCM mode because with manual flashing, it gets flashed. this is the content of the section NV_L4T_FLASH_JETSON_LINUX_COMP

      "NV_L4T_FLASH_JETSON_LINUX_COMP": {
            "name": "Flash AI-Blox Jetson OS",
            "isVisible": true,
            "estimateInstallDurationSeconds": 900,
            "platforms": [
                {
                    "componentInstallParameters": {
                        "installDir": "{{TARGET_ROOT}}/{{BUNDLE_TITLE}}_{{BOARD_ID}}/Linux_for_Tegra",
                        "installEngineQueue": "parallel",
                        "preInstallCommands": [
                            {
                                "execBash": [
                                    "sleep 10"
                                ]
                            }
                        ],
                        "installCommands": [
                            {
                                "execBash": [
                                    "echo Flashing process has been started",
                                    "echo sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_external.xml -p \"-c bootloader/generic/cfg/flash_t234_qspi.xml\" --network usb0 --showlogs  blox-orin-nvm  external",
                                    "sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_external.xml -p \"-c bootloader/generic/cfg/flash_t234_qspi.xml\" --network usb0 --showlogs  blox-orin-nvm  external"
                                ]
                            }
                        ]
                    },
                    "modals": [
                        "PREFLASH_VERIFY"
                    ],
                    "architectures": [
                        "x86_64",
                        "x86_64-wsl"
                    ],
                    "downloadFiles": [],
                    "operatingSystems": [
                        "ubuntu20.04",
                        "ubuntu22.04"
                    ],
                    "targetIds": [
                        "JETSON_AGX_XAVIER_TARGETS",
                        "JETSON_XAVIER_NX_TARGETS",
                        "JETSON_AGX_ORIN_TARGETS",
                        "JETSON_ORIN_NX_TARGETS",
                        "JETSON_ORIN_NANO_TARGETS"
                    ],
                    "dependencies": [
                        {
                            "type": "required",
                            "id": "NV_L4T_FILE_SYSTEM_AND_OS_COMP"
                        }
                    ],
                    "prerequisites": []
                }
            ],
            "version": "36.3.0",
            "licenseIds": [
                "NV_JETPACK_OS_EMBEDDED_EULA"
            ],
            "id": "NV_L4T_FLASH_JETSON_LINUX_COMP",
            "isDetectableInstall": false,
            "isPartiallyDetectableInstall": false
        }