To flash Yocto built images via bootburn

These steps update the Yocto built images back to the release so that bootburn picks them up:
  1. Copy the linux-DTBs to the release:
    mv <top>/drive-linux/kernel/preempt_rt <top>/drive-linux/kernel/preempt_rt_bkp 
    mkdir -p <top>/drive-linux/kernel/preempt_rt
    cp <top>/drive-linux_src/yocto/build/tmp/deploy/images/${MACHINE}/*.dtb <top>/drive-linux/kernel/preempt_rt/
  2. Copy the kernel images and modules to the release:
    mkdir -p <top>/drive-linux/kernel/preempt_rt/images
    cp <top>/drive-linux_src/yocto/build/tmp/deploy/images/${MACHINE}/Image <top>/drive-linux/kernel/preempt_rt/images/
    cp <top>/drive-linux_src/yocto/build/tmp/deploy/images/${MACHINE}/vmlinux <top>/drive-linux/kernel/preempt_rt/images/
    cp <top>/drive-linux_src/yocto/build/tmp/deploy/images/${MACHINE}/ <top>/drive-linux/kernel/preempt_rt/images/
    mkdir -p <top>/drive-linux/kernel/preempt_rt/modules
    # For standard kernel config :
    cd <top>/drive-linux/kernel/preempt_rt/modules 
    tar xf <top>/drive-linux_src/yocto/build/tmp/deploy/images/${MACHINE}/modules-${MACHINE}.tgz 
    find ./ -name '*rt-tegra*' -exec mv -t ./ {} +
    cd -
    # For  production kernel config :
    cd <top>/drive-linux/kernel/preempt_rt_prod/modules
    tar xf <top>/drive-linux_src/yocto/build/tmp/deploy/images/${MACHINE}/modules-${MACHINE}.tgz 
    find ./ -name '*rt-tegra*' -exec mv -t ./ {} +
    cd -
  3. Copy the initramfs image to the release:
    # For standard kernel config :
    cp <top>/drive-linux_src/yocto/build/tmp/deploy/images/${MACHINE}/tegra-initramfs-boot-*.cpio <top>/drive-linux/filesystem/initramfs.cpio
    # For production kernel config :
    cp <top>/drive-linux_src/yocto/build/tmp/deploy/images/${MACHINE}/tegra-prod-initramfs-boot-*.cpio <top>/drive-linux/filesystem/prod-initramfs.cpio
  4. Place the drive-os-av rootFS image at the location specified by the bootburn configurations:
    cp <top>/drive-linux_src/yocto/build/tmp/deploy/images/${MACHINE}/tegra-drive-os-av-image-${MACHINE}.img <top>/drive-linux/filesystem/targetfs-images
    ln -sf <top>/drive-linux/filesystem/targetfs-images/tegra-drive-os-av-image${MACHINE}.img <top>/drive-linux/filesystem/targetfs.img

After following the previous steps, all binaries are replaced by the Yocto built versions. Executing bootburn now automatically picks up these updated binaries. This applies to both native, as well as hypervisor flashing. For information on flashing steps, see the Flashing Customization topic in the NVIDIA DRIVE OS 6.0 Linux SDK Developer Guide.

For example:

  1. Put the Tegra board in recovery by running following commands on Aurix shell :
    1. NvShell>tegrarecovery x1 on
    2. NvShell>tegrareset x1
  2. Bind and flash the Tegra board :
    1. cd <top>/drive-foundation/make
    2. ./bind_partitions -b p3710-10-a04 linux
    3. cd <top>/drive-foundation/tools/flashtools/bootburn/
    4. ./ -b p3710-10-a04