Skip to content

Latest commit

 

History

History
106 lines (81 loc) · 3.26 KB

File metadata and controls

106 lines (81 loc) · 3.26 KB

Swupdate for NVIDIA Tegra (Jetson) platforms

This dynamic layer provides an example implementation for Nvidia Jetson and swupdate.

The simplest way to use on tegra is to add to a forked copy of tegra-demo-distro which also contains relevant images and submodules used to build tegra images. However, this is not strictly required. The only dependency required is the meta-tegra layer.

Build with KAS

The files under conf/kas support building with the kas.

The setups here represent the last configuration tested.

Install kas

pip3 install kas

Build with kas

Start by cloning this repo with

git clone <url> --shallow-submodules

Then use the scripts at scripts to kick of the build for instance

./scripts/build-jetson-orin-nano-devkit-nvme.sh

to build for the jetson-orin-nano-devkit-nvme MACHINE on the default branch configuration.

The default build will build for whatever branch of this repository you've cloned and latest branch of corresponding repositories.

To build the latest tested configuration instead, use kas build to specify the swupdate-oe4t-lasttested.yml file from the base directory, for instance:

kas build layers/meta-tegrademo/dynamic-layers/meta-swupdate/conf/kas/swupdate-oe4t-lasttested.yml

You may need to modify the machine setting or set KAS_MACHINE appropriately.

Build with tegra-demo-distro

Use these instructions to add to tegra-demo-distro on whatever branch you'd like to target (kirkstone and later are supported).

cd repos
git submodule add https://github.com/sbabic/meta-swupdate
cd ../layers
ln -s ../repos/meta-swupdate

Then use the setup-env script to start a bitbake shell, and add this layer to your build

bitbake-layers add-layer ../layers/meta-swupdate

Finally, build the update image using:

bitbake demo-image-<type>-swupdate

where <type> is one of base, sato, weston, or full. You can use the tegraflash package generated by the image recipe to do initial flashing, then use the .swu update file to test the update.

Deploy and Test

  1. Flash the initial image using the tegraflash package.
  2. Deploy the .swu file built with swupdate-image-tegra to the target.
  3. Check the current update state with nvbootctrl dump-slots-info.
  4. Install the update with:
swupdate-client </path/to/swu/file>
  1. Reboot to apply the update, if installation was successful. On reboot, the UEFI bootloader should find and apply the capsule update stored in the ESP by swupdate. It should then reboot a second time into the updated firmware in the other slot.
  2. When the system comes back up, use nvbootctrl dump-slots-info to check that the capsule update status is 1 and that the boot slot changed. You can also verify that the root filesystem is mounted on the partition corresponding to the current boot slot.

Build Options

The conf/distro/include/tegra-swupdate.inc file, under this directory, contains global configuration options for the swupdate demo. It will be included automatically by the tegrademo distro configuration if the meta-swupdate layer is in your BitBake layer configuration.