Developer Guide Release

Flashing Automotive Yocto Linux built from nv-git-07 sync
Bootburn, by default, does not pick up Yocto-built quickboot, kernel, etc. for flashing due to known limitations. The following steps update the Yocto-built images back to the release so that bootburn picks it up for flashing.
Install and extract the prerequisite PDK packages
On build host, navigate to the following location:
cd <top>/pdk/release-bins
Install the following .run files :
Installation of this .run file from the packaged PDK release must be done on the build host, even when the Yocto builds are done on the release tree synced from nv-git-07.
Copy Yocto-built images to the release-binary folders
Change to the Yocto deploy directory:
cd <top>/yocto/build/tmp/deploy/images/${MACHINE}
Copy quickboot and quickboot-DTBs to the release:
cp qb/* <top>/pdk/release-bins/drive-t186ref-foundation/firmwares/bin/<machine>
Copy linux-DTBs to the release:
cp *.dtb <top>/pdk/release-bins/drive-t186ref-linux/kernel
Copy kernel images to the release:
cp *Image <top>/pdk/release-bins/drive-t186ref-linux/kernel-rt_patches
Copy ebp kernel images only if flashing L+EBP config: 
cp Image.ebp <top>/drive-<TBD_platform_ver>-linux/kernel_early_boot-rt_patches/Image 
cp zImage.ebp <top>/drive-<TBD_platform_ver>-linux/kernel_early_boot-rt_patches/zImage
Copy initramfs to the release:
cp tegra-initramfs-boot-*.cpio <top>/pdk/release-bins/drive-t186ref-linux/kernel/yocto-tegra-initramfs-rootfs.img
Backup ubuntu targetfs and extract genivi or drive-os-av rootfs in its place:
tar -C <top>/pdk/release-bins/drive-t186ref-linux/targetfs -xf tegra-genivi-14-image-tegra-$MACHINE.tar.gz
sudo tar -C <top>/drive-<TBD_platform_ver>-linux/targetfs -xf tegra-drive-os-av-image-${MACHINE}.tar.gz
Copy the built EBRFS to the PDK:
cp tegra-early-boot-rootfs-*.cpio <top>/pdk/release-bins/drive-t186ref-linux/kernel
Update Aurix Firmware in the rootfs
Install the following .run file :
This run file installs the Aurix firmware binaries required for Drive AGX hardware functionality, and must be present.
Set up Foundation infrastructure
Set up the git environment:
cd <top>/pdk/release-bins
export NV_GIT_TOP=$PWD
Change <PDK_TOP> and <TARGET_BOARD> in .cfg files:
cd <top>/pdk/release-bins
find ./drive-t186ref-foundation -name "*.cfg" -exec sed -i -e "s,=<PDK_TOP>,=$PWD,g" {} \;
find ./drive-t186ref-foundation/tools/host/flashtools/ -name "*.cfg" -exec sed -i -e "s,<TARGET_BOARD>,t186ref,g" {} \;
Export CROSS_COMPILE variable:
cd <top>/pdk/release-bins/drive-t186ref-foundation
export CROSS_COMPILE=<top>/pdk/release-bins/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
touch .cross_compile
Bind and flash the drive-os-av rootfs
Execute the following commands to bind and flash drive-os-av rootfs:
make -f Makefile.bind PCT=linux BOARD=<board_id>
cd <top>/pdk/release-bins/drive-t186ref-foundation/tools/host/flashtools/bootburn
./bootburn.sh -b <board_id> -B qspi
Where <board_id> is:
e3550xxx-t194a for Xavier A
e3550xxx-t194b for Xavier B
e3550xxxt194ia for IVI SKU Xavier A
p2888-t194 for Xavier CVM
Replace xxx above with b01 or b03 based on the revision of e3550 board used.
Flashing Using the AURIX Console
Use this procedure to flash the platform using the AURIX serial console to interface with the Infineon AURIX 32-bit TriCore microcontroller.
Prior ADB configurations (such as ADB server running, ADB aliases with paths) may interfere with the Bootburn shell and cause it to fail with USB errors. Running bootburn.sh with bash -x reveals these issues.
Manually installed Foundation and Linux sdk releases.
After you have successfully installed the software, the following directories are created:
You have set up your platform.
You have placed the device in recovery mode.
You have configured the port and baud rate of a serial controller, such as Minicom.
To flash the platform with a new image
1. Connect the USB A cable to the platform:
If no other USB/Serial adapters are connected to the host, the ttyUSB port are as follows:
AURIX UART: /dev/ttyUSB3
Xavier A UART: /dev/ttyUSB2
Xavier B UART: /dev/ttyUSB6
If other USB serial adapters are already in use, the host takes relative numbering.
2. Use the AURIX serial console to put the board into Recovery mode for flashing.
3. On the host system, verify that the Xavier is in recovery mode using the following lsusb command to display the NVIDIA device.
lsusb | grep -i nvidia
Bus 001 Device 006: ID 0955:7721 Nvidia Corp
4. Flash your board using one of the following commands:
Xavier A (x1):
./bootburn.sh -b e3550xxx-t194a -B qspi
Xavier B (x2):
./bootburn.sh -b e3550xxx-t194b -B qspi
IVI SKU Xavier A (x1):
./bootburn.sh -b e3550xxx-t194ia -B qspi
Replace xxx in the board ID with b01 or b03 based on the e3550 board revision used.
This command flashes Linux with Hypervisor on QSPI-NOR flash and file system on eMMC. To mount the rootfs over NFS, it is also possible to flash the kernel and not the filesystem.
If you use additional options, the -b option must be the first argument.
5. Once flashing is complete, exit recovery mode and reboot the board from the AURIX console as follows.
tegrarecovery <device> off
Where <device> is x1 or x2.
6. Wait a few seconds then power on the board from the AURIX console.
7. Verify that the recovery switch is in the normal boot position.
8. Ensure that the Xavier device that is not being flashed is not running processes that cannot be interrupted before rebooting.
To boot after flashing
1. Upon first boot after flashing, run the drive-setup.sh script from a terminal window on the target to set up the necessary packages.
sudo /<root>/drive-setup.sh install-run-once-pkgs
2. Once the run-once installation is completed, reboot DRIVE™ Development Platform from the Xavier UART serial console.
sudo reboot
After the reboot, the desktop displays the welcome page.
If multiple monitors are connected, you can use the xfce display setting to configure the screen settings and layout.
If a login is required, the default password for the account is nvidia.
Run startx& in the SoC console if no xfce desktop is displayed.