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.
The files under conf/kas support building with the kas.
The setups here represent the last configuration tested.
pip3 install kas
Use the scripts at scripts, 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.
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
In your local.conf (or distro/machine configuration) add these lines:
IMAGE_INSTALL:append = " swupdate"
USE_REDUNDANT_FLASH_LAYOUT = "1"
IMAGE_FSTYPES:append = " tar.gz"
If you desire an image other than demo-image-base as your base image,
you may add a definition for SWUPDATE_CORE_IMAGE_NAME
with the
desired base image.
Finally, build the update image using:
bitbake swupdate-image-tegra
- Tegraflash the inital image (demo-image-base or, whatever
image you've set as
SWUPDATE_CORE_IMAGE_NAME
- Deploy the .swu file built with swupdate-image-tegra to the target
- Run the update with:
swupdate -i </path/to/swu/file>
- Reboot to apply the update.
- The root partition should change
- The
nvbootctrl dump-slots-info
output should show boot from the alternate boot slot withCapsule update status:1
.