UEFI Adaptation

This section provides high level info for the users to adapt to using UEFI. CBoot was used in the prior rel-32 release, and is now replaced with UEFI starting with rel-34 release and onward.

Sources and Compilation

UEFI sources and compilation details for this release are available https://github.com/NVIDIA/edk2-nvidia/wiki.

Boot Order Selection

  • Boot device supported and the default boot order

    OS boot is supported from eMMC/SD/UFS/NvME/USB (T194 only). Removable devices (SD/USB) take precedence over non removable (eMMC/NvME/UFS) devices in the default boot order.

  • How to select boot device in UEFI?

    User can go to UEFI menu when prompted “Press ESCAPE for boot options”. From the landing page of UEFI menu, navigate to “Boot Manager” where all supported boot options are listed. User can choose an option from this list.

  • How to customize the default boot order?

    User can go to UEFI menu when prompted “Press ESCAPE for boot options”. From the landing page of UEFI menu, navigate to “Boot Maintenance manager” -> “Boot Options” -> “Change Boot Order”. The boot order can be changed on this spot.

DTB Support

  • Selection Order

    UEFI chooses the DTB for kernel in the following order:

    1. FDT tag in /boot/extlinux/extlinux.conf file in rootfs can specify the DTB to be passed to the
       kernel.
    2. If 1. is absent or cannot be used, DTB for kernel is loaded from the respective A/B kernel-dtb
       partition on boot device.
    3. If both 1. and 2. are absent or cannot be used, UEFI passes the DTB used by UEFI itself to kernel.
    
  • How to customize

    User can specify a custom DTB for kernel by modifying the FDT tag in /boot/extlinux/extlinux.conf file in rootfs. User can also uncomment backup boot option in the same file for adding an entirely new OS boot option.

  • DTB Overlays

    DTB in use by UEFI and/or kernel can be updated using overlays that are applied during boot based on platform parameters like board-id/odm-data/fuse-info/sw-module. Criteria for applying an overlay can be specified in board_config node and if every criteria in the node matches, the overlay is applied on base DTB.

An example structure of an overlay device tree file is as shown below:

/ {
    fragment@0 {
        target= "<&uartc>";
        delete_prop = "early-print-console-channel";
        board_config {
            ids = "2888-0001-400", "3360-1099-100" ;
            odm-data = "enable-high-speed-uart";
            sw-modules = “kernel”;
        };
        __overlay__ {
            compatible = "nvidia,tegra186-hsuart";
            reset-names = "serial";
        };
    };

    fragment@1 {
        target-path = "/nvenc@154c0000";
        board_config {
            fuse-info = "fuse-disable-nvenc";
    };
        __overlay__ {
            status = "disabled";
        };
    };
};

- ids property in board_config can specify a list of board-id, one of which has to match
  the board IDs read from platform EEPROMs.

- odm-data property in board_config can specify a list of odm data strings that are matched
  against /chosen/odm-data property strings in base DTB to find if there is a match.
  User can specify valid odm data strings for a platform during flash.

- fuse-info property in board_config can specify a list of fuse strings for floor sweeping configuration.

- The sw-modules property in board_config can specify if an overlay needs to be applied to only UEFI DTB,
  kernel DTB or both. If this property is not present, overlay is applied to both kernel as well as UEFI dtb.
  • Supporting DTBO (Device Tree Blob Overlay) for the camera module (instead of using the prior supported plug-in manager)

    Because UEFI boot is enabled in this release, the plugin manager is no longer supported. You must create a device tree overlay (DTB overlay, or .dtbo) file to register the camera module. If your camera module has on-board EEPROM and is programmed with a valid camera ID, you can use the device tree overlay file at to apply the overlay for a specific camera module and update the device tree entries with proper information at run time. Using a device tree overlay with an EEPROM ID allows a single system image to support multiple camera devices. To select a different camera, power down the device, replace the camera module, and then reboot. The new module works automatically.

  • To create and apply a device tree overlay file:

  1. Add the .dtsi file to the camera configuration .dtsi file.

  2. Set the status of your device tree nodes to “disabled”:

    imx185_cam0: imx185_a@1a {
        status = "disabled";
    };
    
  3. Add the overlay information as fragments below to a new .dts file like this:

    <top>/hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-modules/tegra194-camera-overlay-file.dts
    
    #You can also see the camera DTB overlay files provided with current release for example.
    
  4. Update the .dts file with proper overlay information and a compatible string:

    overlay-name = "Jetson Camera Dual-IMX274";
    jetson-header-name = "Jetson AGX Xavier CSI Connector";
    compatible = "nvidia,p2822-0000+p2888-0001";
    
    fragment@0 {
       target= “<&imx185_cam0>”;
       board_config {
         ids = "LPRD-dual-imx274-002" ;
         sw-modules = “kernel”;
       };
       __overlay__ {
         status = “okay”;
       };
    };
    fragment@1 {
       ... ... ...
    };
    
  5. Compile the .dts file to generate a .dtbo file. Move the .dtbo file to flash_folder/kernel/dtb/ before flashing.

  6. Add this line to the <board>.conf file, which is used for flashing the device:

    OVERLAY_DTB_FILE=”${OVERLAY_DTB_FILE},tegra194-camera-overlay-file.dtbo”;
    
    # The line causes the following steps to be performed:
    # - If a specific camera board is found when the kernel boots, the override data is applied to
        that camera board’s tree nodes.
    # - The tree nodes are made available for the system to use.