From 91cf10dd77f900d18465e4bd557ebf9b484e0aba Mon Sep 17 00:00:00 2001 From: Josef Holzmayr Date: Tue, 18 Jul 2023 10:50:04 +0200 Subject: [PATCH 01/11] fix: kas: remove oe-core branch revision in tegra This was an unintentional duplication from the mender-base.yml kas include, and did set the revision floating on a release branch. Changelog: Title Ticket: None Signed-off-by: Josef Holzmayr --- kas/include/tegra.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/kas/include/tegra.yml b/kas/include/tegra.yml index c5e33e753..aa45a2f4d 100644 --- a/kas/include/tegra.yml +++ b/kas/include/tegra.yml @@ -10,8 +10,6 @@ repos: refspec: kirkstone-l4t-r32.7.x meta-openembedded: - url: https://git.openembedded.org/meta-openembedded - refspec: kirkstone layers: meta-python: From c85755104c204bda2a4aa48f255a411521220876 Mon Sep 17 00:00:00 2001 From: Josef Holzmayr Date: Sun, 23 Jul 2023 21:47:41 +0200 Subject: [PATCH 02/11] feat: Tegra: update Readme The Readme file and repo scripts for meta-mender-tegra still referred to the dunfell and zeus releases. As we now provide kas configurations for all supported boards in this layer, note those in the Readme and remove the outdated information. Changelog: Title Ticket: None Signed-off-by: Josef Holzmayr --- meta-mender-tegra/README.md | 22 +++++++++++++++---- meta-mender-tegra/scripts/manifest-tegra.xml | 13 ----------- .../templates/bblayers.conf.sample | 16 -------------- meta-mender-tegra/templates/local.conf.append | 14 ------------ 4 files changed, 18 insertions(+), 47 deletions(-) delete mode 100644 meta-mender-tegra/scripts/manifest-tegra.xml delete mode 100644 meta-mender-tegra/templates/bblayers.conf.sample delete mode 100644 meta-mender-tegra/templates/local.conf.append diff --git a/meta-mender-tegra/README.md b/meta-mender-tegra/README.md index 2a0edc533..0f9b1c16b 100644 --- a/meta-mender-tegra/README.md +++ b/meta-mender-tegra/README.md @@ -19,26 +19,40 @@ together with Mender for the mentioned boards. This layer depends on: ``` -URI: https://github.com/madisongh/meta-tegra.git +URI: https://github.com/OE4T/meta-tegra.git layers: meta-tegra -branch: dunfell-l4t-r32.4.3 +branch: kirkstone-l4t-r32.7.x revision: HEAD ``` ``` URI: https://github.com/mendersoftware/meta-mender.git layers: meta-mender-core -branch: dunfell +branch: kirkstone revision: HEAD ``` - ## Quick start See the mender hub pages and the documentation for the `tegrademo-mender` distro on the [tegra-demo-distro](https://github.com/OE4T/tegra-demo-distro) repository for the most up to date instructions on starting out with mender and tegra. +## [`kas`](https://github.com/siemens/kas) configurations + +The following configuration files for building using the `kas` tool are provided: + +- [jetson-agx-xavier-devkit.yml](../kas/jetson-agx-xavier-devkit.yml) +- [jetson-nano-2gb-devkit.yml](../kas/jetson-nano-2gb-devkit.yml) +- [jetson-nano-devkit-emmc.yml](../kas/jetson-nano-devkit-emmc.yml) +- [jetson-nano-devkit.yml](../kas/jetson-nano-devkit.yml) +- [jetson-tx2-devkit-4gb.yml](../kas/jetson-tx2-devkit-4gb.yml) +- [jetson-tx2-devkit-tx2i.yml](../kas/jetson-tx2-devkit-tx2i.yml) +- [jetson-tx2-devkit.yml](../kas/jetson-tx2-devkit.yml) +- [jetson-xavier-nx-devkit-emmc.yml](../kas/jetson-xavier-nx-devkit-emmc.yml) +- [jetson-xavier-nx-devkit-tx2-nx.yml](../kas/jetson-xavier-nx-devkit-tx2-nx.yml) +- [jetson-xavier-nx-devkit.yml](../kas/jetson-xavier-nx-devkit.yml) + ## Acknowlegements Special thanks to [Matt Madison](https://github.com/madisongh) for his contributions to diff --git a/meta-mender-tegra/scripts/manifest-tegra.xml b/meta-mender-tegra/scripts/manifest-tegra.xml deleted file mode 100644 index ab004ff8c..000000000 --- a/meta-mender-tegra/scripts/manifest-tegra.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/meta-mender-tegra/templates/bblayers.conf.sample b/meta-mender-tegra/templates/bblayers.conf.sample deleted file mode 100644 index d213006ce..000000000 --- a/meta-mender-tegra/templates/bblayers.conf.sample +++ /dev/null @@ -1,16 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "1" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../sources/poky/meta \ - ${TOPDIR}/../sources/poky/meta-poky \ - ${TOPDIR}/../sources/poky/meta-yocto-bsp \ - ${TOPDIR}/../sources/meta-tegra \ - ${TOPDIR}/../sources/meta-mender/meta-mender-core \ - ${TOPDIR}/../sources/meta-mender/meta-mender-demo \ - ${TOPDIR}/../sources/meta-mender-community/meta-mender-tegra \ -" diff --git a/meta-mender-tegra/templates/local.conf.append b/meta-mender-tegra/templates/local.conf.append deleted file mode 100644 index 7d41a6cd1..000000000 --- a/meta-mender-tegra/templates/local.conf.append +++ /dev/null @@ -1,14 +0,0 @@ -# See README for other supported options -MACHINE ?= "jetson-tx2" - -# Tegra specific mender setup variables -INHERIT += "tegra-mender-setup" - -# Grow the data partition by default -MENDER_FEATURES_ENABLE:append = " mender-growfs-data" - -# Not required for mender support, but gives you access via SSH by default -# Note that the ssh key will change on each upgrade. To fix this you need to -# symlink /etc/dropbear/dropbear_rsa_host_key to the data partition or use an -# overlay setup that maps the key to the data partition -EXTRA_IMAGE_FEATURES += " ssh-server-dropbear" From cb7e26ef6fed8691ccad0a2b0f43478102aee726 Mon Sep 17 00:00:00 2001 From: Josef Holzmayr Date: Tue, 18 Jul 2023 11:00:07 +0200 Subject: [PATCH 03/11] feat: Tegra: refactor into subdirectory The current layer is compatible with Jetpack 4, which correlates with the L4T 32.x release family. A number of boards are supported on this, for example - Jetson TX2 - Jetson Nano - ... The newer release family Jetpack 5 correlating with L4T 35.x introduces a number of breaking changes which cannot be folded into the existing structure. To prepare for the support of both families, this moves the existing layer into a dedicated subdirectory, allowing additional Tegra-specific layers to be added to the meta-mender-tegra top level directory. Changelog: Title Ticket: None Signed-off-by: Josef Holzmayr --- kas/include/tegra.yml | 2 +- meta-mender-tegra/conf/layer.conf | 12 ----------- .../README.md | 20 +++++++++---------- .../classes/image_types_mender_tegra.bbclass | 0 .../classes/tegra-mender-setup.bbclass | 0 .../conf/layer.conf | 12 +++++++++++ .../recipes-bsp/cboot/cboot-t18x_%.bbappend | 0 .../recipes-bsp/cboot/cboot-t19x_%.bbappend | 0 .../jetson-nano-2gb-devkit/flash_mender.xml | 0 .../jetson-nano-devkit-emmc/flash_mender.xml | 0 .../jetson-nano-devkit/flash_mender.xml | 0 .../jetson-nano-emmc/flash_mender.xml | 0 .../jetson-nano-qspi-sd/flash_mender.xml | 0 .../flash_mender.xml | 0 .../flash_mender.xml | 0 .../jetson-xavier-nx-devkit/flash_mender.xml | 0 .../tegra186/flash_mender.xml | 0 .../tegra194/flash_mender.xml | 0 .../tegra210/flash_mender.xml | 0 .../mender-custom-flash-layout_1.0.bb | 0 .../update-nvbootctrl.service.in | 0 .../update-nvbootctrl.sh.in | 0 .../redundant-boot-overrides_%.bbappend | 0 .../redundant-boot-overrides_1.0.bb | 0 .../tegra-binaries/tegra-bootfiles_%.bbappend | 0 .../tegra-nv-boot-control-config_%.bbappend | 0 .../tegra-redundant-boot_%.bbappend | 0 .../tegra-bup-payload_%.bbappend | 0 .../setup-nv-boot-control/target-mkdir.conf | 0 .../tools/setup-nv-boot-control_%.bbappend | 0 .../u-boot/libubootenv-fake/fw_printenv | 0 .../u-boot/libubootenv-fake/fw_setenv | 0 .../u-boot/libubootenv-fake_1.0.bb | 0 .../recipes-bsp/u-boot/libubootenv_%.bbappend | 0 ...tion-of-Mender-boot-code-into-U-Boot.patch | 0 ...egra-mender-auto-configured-modified.patch | 0 ...0011-Jetson-TX2-mender-boot-commands.patch | 0 ...12-p3541-0000_defconfig-Mender-patch.patch | 0 ...duce-env-size-on-p3450-0000-to-64KiB.patch | 0 ...emmc-defconfigs-for-new-UBENV-locati.patch | 0 ...PIflash-Nanos-for-R32.5.0-with-Mende.patch | 0 .../0017-Jetson-Xavier-NX-TX2-NX-mender.patch | 0 .../u-boot/u-boot-bup-payload.bbappend | 0 .../u-boot/u-boot-mender-tegra-vars.inc | 0 .../u-boot/u-boot-mender-tegra.inc | 0 .../u-boot/u-boot-tegra_%.bbappend | 0 .../u-boot/u-boot-tegra_2022.01.bbappend | 0 .../images/tegra-minimal-initramfs.bbappend | 0 .../platform-preboot-cboot.sh | 0 .../tegra-minimal-init_%.bbappend | 0 .../linux/linux-tegra_%.bbappend | 0 .../mender-client/mender-client_%.bbappend | 0 .../redundant-boot-commit-check-script-uboot | 0 .../files/redundant-boot-install-script | 0 .../files/redundant-boot-install-script-uboot | 0 .../tegra-state-scripts_1.0.bb | 0 .../scripts/test/README.md | 0 .../scripts/test/device_test.py | 0 .../scripts/test/do_mender_test.sh | 0 .../scripts/test/mender_tegra_test.py | 0 .../scripts/test/requirements.txt | 0 .../scripts/test/setup_image_server.sh | 0 62 files changed, 23 insertions(+), 23 deletions(-) delete mode 100644 meta-mender-tegra/conf/layer.conf rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/README.md (70%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/classes/image_types_mender_tegra.bbclass (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/classes/tegra-mender-setup.bbclass (100%) create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack4/conf/layer.conf rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/cboot/cboot-t18x_%.bbappend (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/cboot/cboot-t19x_%.bbappend (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-2gb-devkit/flash_mender.xml (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit-emmc/flash_mender.xml (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit/flash_mender.xml (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-emmc/flash_mender.xml (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-qspi-sd/flash_mender.xml (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit-emmc/flash_mender.xml (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit-tx2-nx/flash_mender.xml (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit/flash_mender.xml (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra186/flash_mender.xml (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra194/flash_mender.xml (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra210/flash_mender.xml (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tegra-binaries/mender-custom-flash-layout_1.0.bb (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tegra-binaries/redundant-boot-overrides/update-nvbootctrl.service.in (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tegra-binaries/redundant-boot-overrides/update-nvbootctrl.sh.in (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tegra-binaries/redundant-boot-overrides_%.bbappend (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tegra-binaries/redundant-boot-overrides_1.0.bb (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tegra-binaries/tegra-bootfiles_%.bbappend (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tegra-binaries/tegra-nv-boot-control-config_%.bbappend (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tegra-binaries/tegra-redundant-boot_%.bbappend (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tegra-bup-payload/tegra-bup-payload_%.bbappend (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tools/setup-nv-boot-control/target-mkdir.conf (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/tools/setup-nv-boot-control_%.bbappend (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/u-boot/libubootenv-fake/fw_printenv (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/u-boot/libubootenv-fake/fw_setenv (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/u-boot/libubootenv-fake_1.0.bb (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/u-boot/libubootenv_%.bbappend (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/u-boot/patches/0003-Integration-of-Mender-boot-code-into-U-Boot.patch (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/u-boot/patches/0010-tegra-mender-auto-configured-modified.patch (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/u-boot/patches/0011-Jetson-TX2-mender-boot-commands.patch (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/u-boot/patches/0012-p3541-0000_defconfig-Mender-patch.patch (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/u-boot/patches/0013-Reduce-env-size-on-p3450-0000-to-64KiB.patch (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/u-boot/patches/0015-Update-TX1-nano-emmc-defconfigs-for-new-UBENV-locati.patch (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/u-boot/patches/0016-Update-env-for-SPIflash-Nanos-for-R32.5.0-with-Mende.patch (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/u-boot/patches/0017-Jetson-Xavier-NX-TX2-NX-mender.patch (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/u-boot/u-boot-bup-payload.bbappend (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/u-boot/u-boot-mender-tegra-vars.inc (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/u-boot/u-boot-mender-tegra.inc (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/u-boot/u-boot-tegra_%.bbappend (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-bsp/u-boot/u-boot-tegra_2022.01.bbappend (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-core/images/tegra-minimal-initramfs.bbappend (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-core/initrdscripts/tegra-minimal-init/platform-preboot-cboot.sh (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-core/initrdscripts/tegra-minimal-init_%.bbappend (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-kernel/linux/linux-tegra_%.bbappend (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-mender/mender-client/mender-client_%.bbappend (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-mender/tegra-state-scripts/files/redundant-boot-commit-check-script-uboot (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script-uboot (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/recipes-mender/tegra-state-scripts/tegra-state-scripts_1.0.bb (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/scripts/test/README.md (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/scripts/test/device_test.py (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/scripts/test/do_mender_test.sh (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/scripts/test/mender_tegra_test.py (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/scripts/test/requirements.txt (100%) rename meta-mender-tegra/{ => meta-mender-tegra-jetpack4}/scripts/test/setup_image_server.sh (100%) diff --git a/kas/include/tegra.yml b/kas/include/tegra.yml index aa45a2f4d..5d7582e6e 100644 --- a/kas/include/tegra.yml +++ b/kas/include/tegra.yml @@ -15,7 +15,7 @@ repos: meta-mender-community: layers: - meta-mender-tegra: + meta-mender-tegra/meta-mender-tegra-jetpack4: local_conf_header: tegra: | diff --git a/meta-mender-tegra/conf/layer.conf b/meta-mender-tegra/conf/layer.conf deleted file mode 100644 index a76764375..000000000 --- a/meta-mender-tegra/conf/layer.conf +++ /dev/null @@ -1,12 +0,0 @@ -# We have a conf and classes directory, add to BBPATH -BBPATH .= ":${LAYERDIR}" -# We have recipes-* directories, add to BBFILES -BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ - ${LAYERDIR}/recipes-*/*/*.bbappend" - -BBFILE_COLLECTIONS += "meta-mender-tegra" -BBFILE_PATTERN_meta-mender-tegra = "^${LAYERDIR}/" -BBFILE_PRIORITY_meta-mender-tegra = "10" -LAYERVERSION_meta-mender-tegra = "1" -LAYERSERIES_COMPAT_meta-mender-tegra = "kirkstone" -LAYERDEPENDS_meta-mender-tegra = "tegra" diff --git a/meta-mender-tegra/README.md b/meta-mender-tegra/meta-mender-tegra-jetpack4/README.md similarity index 70% rename from meta-mender-tegra/README.md rename to meta-mender-tegra/meta-mender-tegra-jetpack4/README.md index 0f9b1c16b..5439213cb 100644 --- a/meta-mender-tegra/README.md +++ b/meta-mender-tegra/meta-mender-tegra-jetpack4/README.md @@ -42,16 +42,16 @@ for the most up to date instructions on starting out with mender and tegra. The following configuration files for building using the `kas` tool are provided: -- [jetson-agx-xavier-devkit.yml](../kas/jetson-agx-xavier-devkit.yml) -- [jetson-nano-2gb-devkit.yml](../kas/jetson-nano-2gb-devkit.yml) -- [jetson-nano-devkit-emmc.yml](../kas/jetson-nano-devkit-emmc.yml) -- [jetson-nano-devkit.yml](../kas/jetson-nano-devkit.yml) -- [jetson-tx2-devkit-4gb.yml](../kas/jetson-tx2-devkit-4gb.yml) -- [jetson-tx2-devkit-tx2i.yml](../kas/jetson-tx2-devkit-tx2i.yml) -- [jetson-tx2-devkit.yml](../kas/jetson-tx2-devkit.yml) -- [jetson-xavier-nx-devkit-emmc.yml](../kas/jetson-xavier-nx-devkit-emmc.yml) -- [jetson-xavier-nx-devkit-tx2-nx.yml](../kas/jetson-xavier-nx-devkit-tx2-nx.yml) -- [jetson-xavier-nx-devkit.yml](../kas/jetson-xavier-nx-devkit.yml) +- [jetson-agx-xavier-devkit.yml](../../kas/jetson-agx-xavier-devkit.yml) +- [jetson-nano-2gb-devkit.yml](../../kas/jetson-nano-2gb-devkit.yml) +- [jetson-nano-devkit-emmc.yml](../../kas/jetson-nano-devkit-emmc.yml) +- [jetson-nano-devkit.yml](../../kas/jetson-nano-devkit.yml) +- [jetson-tx2-devkit-4gb.yml](../../kas/jetson-tx2-devkit-4gb.yml) +- [jetson-tx2-devkit-tx2i.yml](../../kas/jetson-tx2-devkit-tx2i.yml) +- [jetson-tx2-devkit.yml](../../kas/jetson-tx2-devkit.yml) +- [jetson-xavier-nx-devkit-emmc.yml](../../kas/jetson-xavier-nx-devkit-emmc.yml) +- [jetson-xavier-nx-devkit-tx2-nx.yml](../../kas/jetson-xavier-nx-devkit-tx2-nx.yml) +- [jetson-xavier-nx-devkit.yml](../../kas/jetson-xavier-nx-devkit.yml) ## Acknowlegements diff --git a/meta-mender-tegra/classes/image_types_mender_tegra.bbclass b/meta-mender-tegra/meta-mender-tegra-jetpack4/classes/image_types_mender_tegra.bbclass similarity index 100% rename from meta-mender-tegra/classes/image_types_mender_tegra.bbclass rename to meta-mender-tegra/meta-mender-tegra-jetpack4/classes/image_types_mender_tegra.bbclass diff --git a/meta-mender-tegra/classes/tegra-mender-setup.bbclass b/meta-mender-tegra/meta-mender-tegra-jetpack4/classes/tegra-mender-setup.bbclass similarity index 100% rename from meta-mender-tegra/classes/tegra-mender-setup.bbclass rename to meta-mender-tegra/meta-mender-tegra-jetpack4/classes/tegra-mender-setup.bbclass diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack4/conf/layer.conf b/meta-mender-tegra/meta-mender-tegra-jetpack4/conf/layer.conf new file mode 100644 index 000000000..5c5c0329d --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack4/conf/layer.conf @@ -0,0 +1,12 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "meta-mender-tegra-jetpack4" +BBFILE_PATTERN_meta-mender-tegra-jetpack4 = "^${LAYERDIR}/" +BBFILE_PRIORITY_meta-mender-tegra-jetpack4 = "10" +LAYERVERSION_meta-mender-tegra = "1" +LAYERSERIES_COMPAT_meta-mender-tegra-jetpack4 = "kirkstone" +LAYERDEPENDS_meta-mender-tegra-jetpack4 = "tegra" diff --git a/meta-mender-tegra/recipes-bsp/cboot/cboot-t18x_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/cboot/cboot-t18x_%.bbappend similarity index 100% rename from meta-mender-tegra/recipes-bsp/cboot/cboot-t18x_%.bbappend rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/cboot/cboot-t18x_%.bbappend diff --git a/meta-mender-tegra/recipes-bsp/cboot/cboot-t19x_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/cboot/cboot-t19x_%.bbappend similarity index 100% rename from meta-mender-tegra/recipes-bsp/cboot/cboot-t19x_%.bbappend rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/cboot/cboot-t19x_%.bbappend diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-2gb-devkit/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-2gb-devkit/flash_mender.xml similarity index 100% rename from meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-2gb-devkit/flash_mender.xml rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-2gb-devkit/flash_mender.xml diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit-emmc/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit-emmc/flash_mender.xml similarity index 100% rename from meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit-emmc/flash_mender.xml rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit-emmc/flash_mender.xml diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit/flash_mender.xml similarity index 100% rename from meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit/flash_mender.xml rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit/flash_mender.xml diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-emmc/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-emmc/flash_mender.xml similarity index 100% rename from meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-emmc/flash_mender.xml rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-emmc/flash_mender.xml diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-qspi-sd/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-qspi-sd/flash_mender.xml similarity index 100% rename from meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-qspi-sd/flash_mender.xml rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-qspi-sd/flash_mender.xml diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit-emmc/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit-emmc/flash_mender.xml similarity index 100% rename from meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit-emmc/flash_mender.xml rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit-emmc/flash_mender.xml diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit-tx2-nx/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit-tx2-nx/flash_mender.xml similarity index 100% rename from meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit-tx2-nx/flash_mender.xml rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit-tx2-nx/flash_mender.xml diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit/flash_mender.xml similarity index 100% rename from meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit/flash_mender.xml rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit/flash_mender.xml diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra186/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra186/flash_mender.xml similarity index 100% rename from meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra186/flash_mender.xml rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra186/flash_mender.xml diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra194/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra194/flash_mender.xml similarity index 100% rename from meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra194/flash_mender.xml rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra194/flash_mender.xml diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra210/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra210/flash_mender.xml similarity index 100% rename from meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra210/flash_mender.xml rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra210/flash_mender.xml diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout_1.0.bb b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout_1.0.bb similarity index 100% rename from meta-mender-tegra/recipes-bsp/tegra-binaries/mender-custom-flash-layout_1.0.bb rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/mender-custom-flash-layout_1.0.bb diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/redundant-boot-overrides/update-nvbootctrl.service.in b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/redundant-boot-overrides/update-nvbootctrl.service.in similarity index 100% rename from meta-mender-tegra/recipes-bsp/tegra-binaries/redundant-boot-overrides/update-nvbootctrl.service.in rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/redundant-boot-overrides/update-nvbootctrl.service.in diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/redundant-boot-overrides/update-nvbootctrl.sh.in b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/redundant-boot-overrides/update-nvbootctrl.sh.in similarity index 100% rename from meta-mender-tegra/recipes-bsp/tegra-binaries/redundant-boot-overrides/update-nvbootctrl.sh.in rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/redundant-boot-overrides/update-nvbootctrl.sh.in diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/redundant-boot-overrides_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/redundant-boot-overrides_%.bbappend similarity index 100% rename from meta-mender-tegra/recipes-bsp/tegra-binaries/redundant-boot-overrides_%.bbappend rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/redundant-boot-overrides_%.bbappend diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/redundant-boot-overrides_1.0.bb b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/redundant-boot-overrides_1.0.bb similarity index 100% rename from meta-mender-tegra/recipes-bsp/tegra-binaries/redundant-boot-overrides_1.0.bb rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/redundant-boot-overrides_1.0.bb diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/tegra-bootfiles_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/tegra-bootfiles_%.bbappend similarity index 100% rename from meta-mender-tegra/recipes-bsp/tegra-binaries/tegra-bootfiles_%.bbappend rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/tegra-bootfiles_%.bbappend diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/tegra-nv-boot-control-config_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/tegra-nv-boot-control-config_%.bbappend similarity index 100% rename from meta-mender-tegra/recipes-bsp/tegra-binaries/tegra-nv-boot-control-config_%.bbappend rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/tegra-nv-boot-control-config_%.bbappend diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/tegra-redundant-boot_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/tegra-redundant-boot_%.bbappend similarity index 100% rename from meta-mender-tegra/recipes-bsp/tegra-binaries/tegra-redundant-boot_%.bbappend rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-binaries/tegra-redundant-boot_%.bbappend diff --git a/meta-mender-tegra/recipes-bsp/tegra-bup-payload/tegra-bup-payload_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-bup-payload/tegra-bup-payload_%.bbappend similarity index 100% rename from meta-mender-tegra/recipes-bsp/tegra-bup-payload/tegra-bup-payload_%.bbappend rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tegra-bup-payload/tegra-bup-payload_%.bbappend diff --git a/meta-mender-tegra/recipes-bsp/tools/setup-nv-boot-control/target-mkdir.conf b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tools/setup-nv-boot-control/target-mkdir.conf similarity index 100% rename from meta-mender-tegra/recipes-bsp/tools/setup-nv-boot-control/target-mkdir.conf rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tools/setup-nv-boot-control/target-mkdir.conf diff --git a/meta-mender-tegra/recipes-bsp/tools/setup-nv-boot-control_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tools/setup-nv-boot-control_%.bbappend similarity index 100% rename from meta-mender-tegra/recipes-bsp/tools/setup-nv-boot-control_%.bbappend rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/tools/setup-nv-boot-control_%.bbappend diff --git a/meta-mender-tegra/recipes-bsp/u-boot/libubootenv-fake/fw_printenv b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/libubootenv-fake/fw_printenv similarity index 100% rename from meta-mender-tegra/recipes-bsp/u-boot/libubootenv-fake/fw_printenv rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/libubootenv-fake/fw_printenv diff --git a/meta-mender-tegra/recipes-bsp/u-boot/libubootenv-fake/fw_setenv b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/libubootenv-fake/fw_setenv similarity index 100% rename from meta-mender-tegra/recipes-bsp/u-boot/libubootenv-fake/fw_setenv rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/libubootenv-fake/fw_setenv diff --git a/meta-mender-tegra/recipes-bsp/u-boot/libubootenv-fake_1.0.bb b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/libubootenv-fake_1.0.bb similarity index 100% rename from meta-mender-tegra/recipes-bsp/u-boot/libubootenv-fake_1.0.bb rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/libubootenv-fake_1.0.bb diff --git a/meta-mender-tegra/recipes-bsp/u-boot/libubootenv_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/libubootenv_%.bbappend similarity index 100% rename from meta-mender-tegra/recipes-bsp/u-boot/libubootenv_%.bbappend rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/libubootenv_%.bbappend diff --git a/meta-mender-tegra/recipes-bsp/u-boot/patches/0003-Integration-of-Mender-boot-code-into-U-Boot.patch b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/patches/0003-Integration-of-Mender-boot-code-into-U-Boot.patch similarity index 100% rename from meta-mender-tegra/recipes-bsp/u-boot/patches/0003-Integration-of-Mender-boot-code-into-U-Boot.patch rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/patches/0003-Integration-of-Mender-boot-code-into-U-Boot.patch diff --git a/meta-mender-tegra/recipes-bsp/u-boot/patches/0010-tegra-mender-auto-configured-modified.patch b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/patches/0010-tegra-mender-auto-configured-modified.patch similarity index 100% rename from meta-mender-tegra/recipes-bsp/u-boot/patches/0010-tegra-mender-auto-configured-modified.patch rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/patches/0010-tegra-mender-auto-configured-modified.patch diff --git a/meta-mender-tegra/recipes-bsp/u-boot/patches/0011-Jetson-TX2-mender-boot-commands.patch b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/patches/0011-Jetson-TX2-mender-boot-commands.patch similarity index 100% rename from meta-mender-tegra/recipes-bsp/u-boot/patches/0011-Jetson-TX2-mender-boot-commands.patch rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/patches/0011-Jetson-TX2-mender-boot-commands.patch diff --git a/meta-mender-tegra/recipes-bsp/u-boot/patches/0012-p3541-0000_defconfig-Mender-patch.patch b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/patches/0012-p3541-0000_defconfig-Mender-patch.patch similarity index 100% rename from meta-mender-tegra/recipes-bsp/u-boot/patches/0012-p3541-0000_defconfig-Mender-patch.patch rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/patches/0012-p3541-0000_defconfig-Mender-patch.patch diff --git a/meta-mender-tegra/recipes-bsp/u-boot/patches/0013-Reduce-env-size-on-p3450-0000-to-64KiB.patch b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/patches/0013-Reduce-env-size-on-p3450-0000-to-64KiB.patch similarity index 100% rename from meta-mender-tegra/recipes-bsp/u-boot/patches/0013-Reduce-env-size-on-p3450-0000-to-64KiB.patch rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/patches/0013-Reduce-env-size-on-p3450-0000-to-64KiB.patch diff --git a/meta-mender-tegra/recipes-bsp/u-boot/patches/0015-Update-TX1-nano-emmc-defconfigs-for-new-UBENV-locati.patch b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/patches/0015-Update-TX1-nano-emmc-defconfigs-for-new-UBENV-locati.patch similarity index 100% rename from meta-mender-tegra/recipes-bsp/u-boot/patches/0015-Update-TX1-nano-emmc-defconfigs-for-new-UBENV-locati.patch rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/patches/0015-Update-TX1-nano-emmc-defconfigs-for-new-UBENV-locati.patch diff --git a/meta-mender-tegra/recipes-bsp/u-boot/patches/0016-Update-env-for-SPIflash-Nanos-for-R32.5.0-with-Mende.patch b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/patches/0016-Update-env-for-SPIflash-Nanos-for-R32.5.0-with-Mende.patch similarity index 100% rename from meta-mender-tegra/recipes-bsp/u-boot/patches/0016-Update-env-for-SPIflash-Nanos-for-R32.5.0-with-Mende.patch rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/patches/0016-Update-env-for-SPIflash-Nanos-for-R32.5.0-with-Mende.patch diff --git a/meta-mender-tegra/recipes-bsp/u-boot/patches/0017-Jetson-Xavier-NX-TX2-NX-mender.patch b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/patches/0017-Jetson-Xavier-NX-TX2-NX-mender.patch similarity index 100% rename from meta-mender-tegra/recipes-bsp/u-boot/patches/0017-Jetson-Xavier-NX-TX2-NX-mender.patch rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/patches/0017-Jetson-Xavier-NX-TX2-NX-mender.patch diff --git a/meta-mender-tegra/recipes-bsp/u-boot/u-boot-bup-payload.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/u-boot-bup-payload.bbappend similarity index 100% rename from meta-mender-tegra/recipes-bsp/u-boot/u-boot-bup-payload.bbappend rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/u-boot-bup-payload.bbappend diff --git a/meta-mender-tegra/recipes-bsp/u-boot/u-boot-mender-tegra-vars.inc b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/u-boot-mender-tegra-vars.inc similarity index 100% rename from meta-mender-tegra/recipes-bsp/u-boot/u-boot-mender-tegra-vars.inc rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/u-boot-mender-tegra-vars.inc diff --git a/meta-mender-tegra/recipes-bsp/u-boot/u-boot-mender-tegra.inc b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/u-boot-mender-tegra.inc similarity index 100% rename from meta-mender-tegra/recipes-bsp/u-boot/u-boot-mender-tegra.inc rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/u-boot-mender-tegra.inc diff --git a/meta-mender-tegra/recipes-bsp/u-boot/u-boot-tegra_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/u-boot-tegra_%.bbappend similarity index 100% rename from meta-mender-tegra/recipes-bsp/u-boot/u-boot-tegra_%.bbappend rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/u-boot-tegra_%.bbappend diff --git a/meta-mender-tegra/recipes-bsp/u-boot/u-boot-tegra_2022.01.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/u-boot-tegra_2022.01.bbappend similarity index 100% rename from meta-mender-tegra/recipes-bsp/u-boot/u-boot-tegra_2022.01.bbappend rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-bsp/u-boot/u-boot-tegra_2022.01.bbappend diff --git a/meta-mender-tegra/recipes-core/images/tegra-minimal-initramfs.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-core/images/tegra-minimal-initramfs.bbappend similarity index 100% rename from meta-mender-tegra/recipes-core/images/tegra-minimal-initramfs.bbappend rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-core/images/tegra-minimal-initramfs.bbappend diff --git a/meta-mender-tegra/recipes-core/initrdscripts/tegra-minimal-init/platform-preboot-cboot.sh b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-core/initrdscripts/tegra-minimal-init/platform-preboot-cboot.sh similarity index 100% rename from meta-mender-tegra/recipes-core/initrdscripts/tegra-minimal-init/platform-preboot-cboot.sh rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-core/initrdscripts/tegra-minimal-init/platform-preboot-cboot.sh diff --git a/meta-mender-tegra/recipes-core/initrdscripts/tegra-minimal-init_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-core/initrdscripts/tegra-minimal-init_%.bbappend similarity index 100% rename from meta-mender-tegra/recipes-core/initrdscripts/tegra-minimal-init_%.bbappend rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-core/initrdscripts/tegra-minimal-init_%.bbappend diff --git a/meta-mender-tegra/recipes-kernel/linux/linux-tegra_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-kernel/linux/linux-tegra_%.bbappend similarity index 100% rename from meta-mender-tegra/recipes-kernel/linux/linux-tegra_%.bbappend rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-kernel/linux/linux-tegra_%.bbappend diff --git a/meta-mender-tegra/recipes-mender/mender-client/mender-client_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-mender/mender-client/mender-client_%.bbappend similarity index 100% rename from meta-mender-tegra/recipes-mender/mender-client/mender-client_%.bbappend rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-mender/mender-client/mender-client_%.bbappend diff --git a/meta-mender-tegra/recipes-mender/tegra-state-scripts/files/redundant-boot-commit-check-script-uboot b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-mender/tegra-state-scripts/files/redundant-boot-commit-check-script-uboot similarity index 100% rename from meta-mender-tegra/recipes-mender/tegra-state-scripts/files/redundant-boot-commit-check-script-uboot rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-mender/tegra-state-scripts/files/redundant-boot-commit-check-script-uboot diff --git a/meta-mender-tegra/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script similarity index 100% rename from meta-mender-tegra/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script diff --git a/meta-mender-tegra/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script-uboot b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script-uboot similarity index 100% rename from meta-mender-tegra/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script-uboot rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script-uboot diff --git a/meta-mender-tegra/recipes-mender/tegra-state-scripts/tegra-state-scripts_1.0.bb b/meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-mender/tegra-state-scripts/tegra-state-scripts_1.0.bb similarity index 100% rename from meta-mender-tegra/recipes-mender/tegra-state-scripts/tegra-state-scripts_1.0.bb rename to meta-mender-tegra/meta-mender-tegra-jetpack4/recipes-mender/tegra-state-scripts/tegra-state-scripts_1.0.bb diff --git a/meta-mender-tegra/scripts/test/README.md b/meta-mender-tegra/meta-mender-tegra-jetpack4/scripts/test/README.md similarity index 100% rename from meta-mender-tegra/scripts/test/README.md rename to meta-mender-tegra/meta-mender-tegra-jetpack4/scripts/test/README.md diff --git a/meta-mender-tegra/scripts/test/device_test.py b/meta-mender-tegra/meta-mender-tegra-jetpack4/scripts/test/device_test.py similarity index 100% rename from meta-mender-tegra/scripts/test/device_test.py rename to meta-mender-tegra/meta-mender-tegra-jetpack4/scripts/test/device_test.py diff --git a/meta-mender-tegra/scripts/test/do_mender_test.sh b/meta-mender-tegra/meta-mender-tegra-jetpack4/scripts/test/do_mender_test.sh similarity index 100% rename from meta-mender-tegra/scripts/test/do_mender_test.sh rename to meta-mender-tegra/meta-mender-tegra-jetpack4/scripts/test/do_mender_test.sh diff --git a/meta-mender-tegra/scripts/test/mender_tegra_test.py b/meta-mender-tegra/meta-mender-tegra-jetpack4/scripts/test/mender_tegra_test.py similarity index 100% rename from meta-mender-tegra/scripts/test/mender_tegra_test.py rename to meta-mender-tegra/meta-mender-tegra-jetpack4/scripts/test/mender_tegra_test.py diff --git a/meta-mender-tegra/scripts/test/requirements.txt b/meta-mender-tegra/meta-mender-tegra-jetpack4/scripts/test/requirements.txt similarity index 100% rename from meta-mender-tegra/scripts/test/requirements.txt rename to meta-mender-tegra/meta-mender-tegra-jetpack4/scripts/test/requirements.txt diff --git a/meta-mender-tegra/scripts/test/setup_image_server.sh b/meta-mender-tegra/meta-mender-tegra-jetpack4/scripts/test/setup_image_server.sh similarity index 100% rename from meta-mender-tegra/scripts/test/setup_image_server.sh rename to meta-mender-tegra/meta-mender-tegra-jetpack4/scripts/test/setup_image_server.sh From c065f009915576f773080a33517aae73d9ed6c4c Mon Sep 17 00:00:00 2001 From: Josef Holzmayr Date: Wed, 19 Jul 2023 22:42:26 +0200 Subject: [PATCH 04/11] feat: tegra: refactor and first Jetpack 5 PoC This commit continues the refactoring of meta-mender-tegra to support both Jetpack 4 and Jetpack 5 enabled boards. The Jetpack 4 based board have been moved to the tegrademo-mender distro as provided by the OE4T project. The AGX Orin board is being added as a PoC-quality board integration on Jetpack 5 Changelog: Title Ticket: None Signed-off-by: Josef Holzmayr --- .github/workflows/build.yml | 2 + kas/include/tegra-base.yml | 32 + kas/include/tegra-jetpack4.yml | 29 + kas/include/tegra-jetpack5.yml | 28 + kas/include/tegra.yml | 23 - kas/jetson-agx-orin-devkit.yml | 7 + kas/jetson-agx-xavier-devkit.yml | 2 +- kas/jetson-nano-2gb-devkit.yml | 2 +- kas/jetson-nano-devkit-emmc.yml | 2 +- kas/jetson-nano-devkit.yml | 2 +- kas/jetson-tx2-devkit-4gb.yml | 2 +- kas/jetson-tx2-devkit-tx2i.yml | 2 +- kas/jetson-tx2-devkit.yml | 2 +- kas/jetson-xavier-nx-devkit-emmc.yml | 2 +- kas/jetson-xavier-nx-devkit-tx2-nx.yml | 2 +- kas/jetson-xavier-nx-devkit.yml | 2 +- .../meta-mender-tegra-jetpack5/README.md | 49 ++ .../classes/image_types_mender_tegra.bbclass | 4 + .../classes/tegra-mender-setup.bbclass | 158 ++++ .../conf/layer.conf | 19 + .../recipes-bsp/cboot/cboot-t18x_%.bbappend | 1 + .../recipes-bsp/cboot/cboot-t19x_%.bbappend | 1 + .../jetson-agx-orin-devkit/flash_mender.xml | 760 ++++++++++++++++++ .../jetson-nano-2gb-devkit/flash_mender.xml | 272 +++++++ .../jetson-nano-devkit-emmc/flash_mender.xml | 408 ++++++++++ .../jetson-nano-devkit/flash_mender.xml | 262 ++++++ .../jetson-nano-emmc/flash_mender.xml | 406 ++++++++++ .../jetson-nano-qspi-sd/flash_mender.xml | 296 +++++++ .../flash_mender.xml | 665 +++++++++++++++ .../flash_mender.xml | 583 ++++++++++++++ .../jetson-xavier-nx-devkit/flash_mender.xml | 665 +++++++++++++++ .../tegra186/flash_mender.xml | 583 ++++++++++++++ .../tegra194/flash_mender.xml | 665 +++++++++++++++ .../tegra210/flash_mender.xml | 441 ++++++++++ .../mender-custom-flash-layout_1.0.bb | 23 + .../update-nvbootctrl.service.in | 14 + .../update-nvbootctrl.sh.in | 10 + .../redundant-boot-overrides_%.bbappend | 2 + .../redundant-boot-overrides_1.0.bb | 39 + .../tegra-binaries/tegra-bootfiles_%.bbappend | 5 + .../tegra-nv-boot-control-config_%.bbappend | 3 + .../tegra-redundant-boot_%.bbappend | 5 + .../tegra-bup-payload_%.bbappend | 2 + .../setup-nv-boot-control/target-mkdir.conf | 2 + .../tools/setup-nv-boot-control_%.bbappend | 10 + .../u-boot/libubootenv-fake/fw_printenv | 60 ++ .../u-boot/libubootenv-fake/fw_setenv | 13 + .../u-boot/libubootenv-fake_1.0.bb | 28 + .../recipes-bsp/u-boot/libubootenv_%.bbappend | 13 + ...tion-of-Mender-boot-code-into-U-Boot.patch | 51 ++ ...egra-mender-auto-configured-modified.patch | 379 +++++++++ ...0011-Jetson-TX2-mender-boot-commands.patch | 48 ++ ...12-p3541-0000_defconfig-Mender-patch.patch | 39 + ...duce-env-size-on-p3450-0000-to-64KiB.patch | 29 + ...emmc-defconfigs-for-new-UBENV-locati.patch | 46 ++ ...PIflash-Nanos-for-R32.5.0-with-Mende.patch | 52 ++ .../0017-Jetson-Xavier-NX-TX2-NX-mender.patch | 61 ++ .../u-boot/u-boot-bup-payload.bbappend | 1 + .../u-boot/u-boot-mender-tegra-vars.inc | 29 + .../u-boot/u-boot-mender-tegra.inc | 30 + .../u-boot/u-boot-tegra_%.bbappend | 3 + .../u-boot/u-boot-tegra_2022.01.bbappend | 1 + .../uefi/edk2-firmware-tegra_%.bbappend | 9 + ...-access-for-KernelCommandLine-efivar.patch | 39 + .../files/0008-enable-rootfs-redundancy.patch | 13 + .../uefi/files/0009-BootChainDxe-fix.patch | 15 + .../images/tegra-minimal-initramfs.bbappend | 3 + .../platform-preboot-cboot.sh | 23 + .../tegra-minimal-init_%.bbappend | 7 + .../linux/linux-tegra_%.bbappend | 9 + .../files/tegra234/efi_systemd_machine_id.sh | 128 +++ ...34-mender-client-set-systemd-machine-id.sh | 20 + .../mender-client/mender-client_%.bbappend | 21 + .../files/mender-update-verifier.service | 11 + .../files/mender-update-verifier.sh | 33 + .../mender-update-verifier.bb | 21 + .../redundant-boot-commit-check-script-uboot | 38 + .../files/redundant-boot-install-script | 69 ++ .../files/redundant-boot-install-script-uboot | 101 +++ .../tegra-state-scripts/files/switch-rootfs | 40 + .../tegra-state-scripts_1.0.bb | 56 ++ .../scripts/manifest-tegra.xml | 13 + .../scripts/test/README.md | 54 ++ .../scripts/test/device_test.py | 134 +++ .../scripts/test/do_mender_test.sh | 78 ++ .../scripts/test/mender_tegra_test.py | 198 +++++ .../scripts/test/requirements.txt | 1 + .../scripts/test/setup_image_server.sh | 7 + .../templates/bblayers.conf.sample | 16 + .../templates/local.conf.append | 14 + 90 files changed, 8515 insertions(+), 33 deletions(-) create mode 100644 kas/include/tegra-base.yml create mode 100644 kas/include/tegra-jetpack4.yml create mode 100644 kas/include/tegra-jetpack5.yml delete mode 100644 kas/include/tegra.yml create mode 100644 kas/jetson-agx-orin-devkit.yml create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/README.md create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/classes/image_types_mender_tegra.bbclass create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/classes/tegra-mender-setup.bbclass create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/conf/layer.conf create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/cboot/cboot-t18x_%.bbappend create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/cboot/cboot-t19x_%.bbappend create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-agx-orin-devkit/flash_mender.xml create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-2gb-devkit/flash_mender.xml create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit-emmc/flash_mender.xml create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit/flash_mender.xml create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-emmc/flash_mender.xml create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-qspi-sd/flash_mender.xml create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit-emmc/flash_mender.xml create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit-tx2-nx/flash_mender.xml create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit/flash_mender.xml create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra186/flash_mender.xml create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra194/flash_mender.xml create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra210/flash_mender.xml create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout_1.0.bb create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/redundant-boot-overrides/update-nvbootctrl.service.in create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/redundant-boot-overrides/update-nvbootctrl.sh.in create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/redundant-boot-overrides_%.bbappend create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/redundant-boot-overrides_1.0.bb create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/tegra-bootfiles_%.bbappend create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/tegra-nv-boot-control-config_%.bbappend create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/tegra-redundant-boot_%.bbappend create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-bup-payload/tegra-bup-payload_%.bbappend create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tools/setup-nv-boot-control/target-mkdir.conf create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tools/setup-nv-boot-control_%.bbappend create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/libubootenv-fake/fw_printenv create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/libubootenv-fake/fw_setenv create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/libubootenv-fake_1.0.bb create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/libubootenv_%.bbappend create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0003-Integration-of-Mender-boot-code-into-U-Boot.patch create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0010-tegra-mender-auto-configured-modified.patch create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0011-Jetson-TX2-mender-boot-commands.patch create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0012-p3541-0000_defconfig-Mender-patch.patch create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0013-Reduce-env-size-on-p3450-0000-to-64KiB.patch create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0015-Update-TX1-nano-emmc-defconfigs-for-new-UBENV-locati.patch create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0016-Update-env-for-SPIflash-Nanos-for-R32.5.0-with-Mende.patch create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0017-Jetson-Xavier-NX-TX2-NX-mender.patch create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-bup-payload.bbappend create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-mender-tegra-vars.inc create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-mender-tegra.inc create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-tegra_%.bbappend create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-tegra_2022.01.bbappend create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/uefi/edk2-firmware-tegra_%.bbappend create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/uefi/files/0007-runtime-access-for-KernelCommandLine-efivar.patch create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/uefi/files/0008-enable-rootfs-redundancy.patch create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/uefi/files/0009-BootChainDxe-fix.patch create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/images/tegra-minimal-initramfs.bbappend create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/initrdscripts/tegra-minimal-init/platform-preboot-cboot.sh create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/initrdscripts/tegra-minimal-init_%.bbappend create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-kernel/linux/linux-tegra_%.bbappend create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-client/files/tegra234/efi_systemd_machine_id.sh create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-client/files/tegra234/tegra234-mender-client-set-systemd-machine-id.sh create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-client/mender-client_%.bbappend create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-update-verifier/files/mender-update-verifier.service create mode 100755 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-update-verifier/files/mender-update-verifier.sh create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-update-verifier/mender-update-verifier.bb create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-commit-check-script-uboot create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script-uboot create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/switch-rootfs create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/tegra-state-scripts_1.0.bb create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/manifest-tegra.xml create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/README.md create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/device_test.py create mode 100755 meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/do_mender_test.sh create mode 100755 meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/mender_tegra_test.py create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/requirements.txt create mode 100755 meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/setup_image_server.sh create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/templates/bblayers.conf.sample create mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/templates/local.conf.append diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 94ca46112..007595ad2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -90,6 +90,8 @@ jobs: experimental: true - board: rock-pi-e experimental: true + - board: jetson-agx-orin-devkit + experimental: true runs-on: [self-hosted, linux, x64] container: diff --git a/kas/include/tegra-base.yml b/kas/include/tegra-base.yml new file mode 100644 index 000000000..ccea9d732 --- /dev/null +++ b/kas/include/tegra-base.yml @@ -0,0 +1,32 @@ +header: + version: 11 + +repos: + meta-tegra: + url: https://github.com/OE4T/meta-tegra.git + meta-tegra-community: + url: https://github.com/OE4T/meta-tegra-community.git + meta-tegrademo: + url: https://github.com/OE4T/tegra-demo-distro.git + layers: + layers/meta-tegra-support: + layers/meta-demo-ci: + layers/meta-tegrademo: + + meta-openembedded: + layers: + meta-filesystems: + meta-networking: + meta-python: + + meta-virtualization: + url: https://git.yoctoproject.org/meta-virtualization.git + +distro: tegrademo + +local_conf_header: + tegra: | + # these two classes only work as intended when being inherited in the + # OE4t setup-env.sh style environment, as they modify bblayers.conf + # and expect additional information on the host. + INHERIT:remove = "tegra-support-sanity distro_layer_buildinfo" \ No newline at end of file diff --git a/kas/include/tegra-jetpack4.yml b/kas/include/tegra-jetpack4.yml new file mode 100644 index 000000000..8ce5e9ed1 --- /dev/null +++ b/kas/include/tegra-jetpack4.yml @@ -0,0 +1,29 @@ +header: + version: 11 + includes: + - kas/include/tegra-base.yml + +repos: + meta-tegra: + refspec: kirkstone-l4t-r32.7.x + layers: + .: + contrib: + meta-tegra-community: + refspec: kirkstone-l4t-r32.7.x + meta-tegrademo: + refspec: kirkstone-l4t-r32.7.x + meta-virtualization: + refspec: kirkstone + + meta-mender-community: + layers: + meta-mender-tegra/meta-mender-tegra-jetpack4: + +distro: tegrademo-mender + +#local_conf_header: +# tegra-jetpack4: | +# INHERIT:remove = "tegra-support-sanity distro_layer_buildinfo" +# MENDER_FEATURES_ENABLE:append = " mender-growfs-data" +# MENDER_FEATURES_DISABLE:append = " mender-uboot" \ No newline at end of file diff --git a/kas/include/tegra-jetpack5.yml b/kas/include/tegra-jetpack5.yml new file mode 100644 index 000000000..be4a4d177 --- /dev/null +++ b/kas/include/tegra-jetpack5.yml @@ -0,0 +1,28 @@ +header: + version: 11 + includes: + - kas/include/tegra-base.yml + +repos: + meta-tegra: + refspec: 2a808b6afb221974196d2eeab3537140ebb63cc7 + meta-tegra-community: + refspec: f5a9cf859a1414bc7654fc57c09fb7ee1b116194 + meta-tegrademo: + refspec: kirkstone + + meta-virtualization: + refspec: b3b3dbc67504e8cd498d6db202ddcf5a9dd26a9d + + meta-mender-community: + layers: + meta-mender-tegra/meta-mender-tegra-jetpack5: + +local_conf_header: + tegra-jetpack5: | + INHERIT += "tegra-mender-setup" + MENDER_FEATURES_ENABLE:append = " mender-growfs-data" + MENDER_FEATURES_DISABLE:append = " mender-uboot" + IMAGE_FSTYPES:tegra = "tegraflash mender dataimg" + IMAGE_FSTYPES:pn-tegra-minimal-initramfs:tegra = "${INITRAMFS_FSTYPES}" + IMAGE_FSTYPES:pn-tegra-initrd-flash-initramfs:tegra = "${TEGRA_INITRD_FLASH_INITRAMFS_FSTYPES}" \ No newline at end of file diff --git a/kas/include/tegra.yml b/kas/include/tegra.yml deleted file mode 100644 index 5d7582e6e..000000000 --- a/kas/include/tegra.yml +++ /dev/null @@ -1,23 +0,0 @@ -header: - version: 11 - -repos: - meta-tegra: - url: https://github.com/OE4T/meta-tegra.git - refspec: kirkstone-l4t-r32.7.x - meta-tegra-community: - url: https://github.com/OE4T/meta-tegra-community.git - refspec: kirkstone-l4t-r32.7.x - - meta-openembedded: - layers: - meta-python: - - meta-mender-community: - layers: - meta-mender-tegra/meta-mender-tegra-jetpack4: - -local_conf_header: - tegra: | - INHERIT += "tegra-mender-setup" - MENDER_FEATURES_ENABLE:append = " mender-growfs-data" \ No newline at end of file diff --git a/kas/jetson-agx-orin-devkit.yml b/kas/jetson-agx-orin-devkit.yml new file mode 100644 index 000000000..5c13307ca --- /dev/null +++ b/kas/jetson-agx-orin-devkit.yml @@ -0,0 +1,7 @@ +header: + version: 11 + includes: + - kas/include/mender-full.yml + - kas/include/tegra-jetpack5.yml + +machine: jetson-agx-orin-devkit diff --git a/kas/jetson-agx-xavier-devkit.yml b/kas/jetson-agx-xavier-devkit.yml index 728531ef1..ea17aefd1 100644 --- a/kas/jetson-agx-xavier-devkit.yml +++ b/kas/jetson-agx-xavier-devkit.yml @@ -3,6 +3,6 @@ header: includes: - kas/include/mender-full.yml - kas/include/poky.yml - - kas/include/tegra.yml + - kas/include/tegra-jetpack4.yml machine: jetson-agx-xavier-devkit diff --git a/kas/jetson-nano-2gb-devkit.yml b/kas/jetson-nano-2gb-devkit.yml index 5151754d8..31fe4c097 100644 --- a/kas/jetson-nano-2gb-devkit.yml +++ b/kas/jetson-nano-2gb-devkit.yml @@ -3,6 +3,6 @@ header: includes: - kas/include/mender-full.yml - kas/include/poky.yml - - kas/include/tegra.yml + - kas/include/tegra-jetpack4.yml machine: jetson-nano-2gb-devkit diff --git a/kas/jetson-nano-devkit-emmc.yml b/kas/jetson-nano-devkit-emmc.yml index f8ce00cf4..b6b5dbd65 100644 --- a/kas/jetson-nano-devkit-emmc.yml +++ b/kas/jetson-nano-devkit-emmc.yml @@ -3,6 +3,6 @@ header: includes: - kas/include/mender-full.yml - kas/include/poky.yml - - kas/include/tegra.yml + - kas/include/tegra-jetpack4.yml machine: jetson-nano-devkit-emmc diff --git a/kas/jetson-nano-devkit.yml b/kas/jetson-nano-devkit.yml index 1df83837a..d105a372c 100644 --- a/kas/jetson-nano-devkit.yml +++ b/kas/jetson-nano-devkit.yml @@ -3,6 +3,6 @@ header: includes: - kas/include/mender-full.yml - kas/include/poky.yml - - kas/include/tegra.yml + - kas/include/tegra-jetpack4.yml machine: jetson-nano-devkit diff --git a/kas/jetson-tx2-devkit-4gb.yml b/kas/jetson-tx2-devkit-4gb.yml index f0f384d76..b5f0c95e8 100644 --- a/kas/jetson-tx2-devkit-4gb.yml +++ b/kas/jetson-tx2-devkit-4gb.yml @@ -3,6 +3,6 @@ header: includes: - kas/include/mender-full.yml - kas/include/poky.yml - - kas/include/tegra.yml + - kas/include/tegra-jetpack4.yml machine: jetson-tx2-devkit-4gb diff --git a/kas/jetson-tx2-devkit-tx2i.yml b/kas/jetson-tx2-devkit-tx2i.yml index cfb0ff167..0caa613c8 100644 --- a/kas/jetson-tx2-devkit-tx2i.yml +++ b/kas/jetson-tx2-devkit-tx2i.yml @@ -3,6 +3,6 @@ header: includes: - kas/include/mender-full.yml - kas/include/poky.yml - - kas/include/tegra.yml + - kas/include/tegra-jetpack4.yml machine: jetson-tx2-devkit-tx2i diff --git a/kas/jetson-tx2-devkit.yml b/kas/jetson-tx2-devkit.yml index 3f58a6494..782b9352b 100644 --- a/kas/jetson-tx2-devkit.yml +++ b/kas/jetson-tx2-devkit.yml @@ -3,6 +3,6 @@ header: includes: - kas/include/mender-full.yml - kas/include/poky.yml - - kas/include/tegra.yml + - kas/include/tegra-jetpack4.yml machine: jetson-tx2-devkit diff --git a/kas/jetson-xavier-nx-devkit-emmc.yml b/kas/jetson-xavier-nx-devkit-emmc.yml index e9fe749a1..6c68a5af9 100644 --- a/kas/jetson-xavier-nx-devkit-emmc.yml +++ b/kas/jetson-xavier-nx-devkit-emmc.yml @@ -3,6 +3,6 @@ header: includes: - kas/include/mender-full.yml - kas/include/poky.yml - - kas/include/tegra.yml + - kas/include/tegra-jetpack4.yml machine: jetson-xavier-nx-devkit-emmc diff --git a/kas/jetson-xavier-nx-devkit-tx2-nx.yml b/kas/jetson-xavier-nx-devkit-tx2-nx.yml index 40a53c884..440c8929b 100644 --- a/kas/jetson-xavier-nx-devkit-tx2-nx.yml +++ b/kas/jetson-xavier-nx-devkit-tx2-nx.yml @@ -3,6 +3,6 @@ header: includes: - kas/include/mender-full.yml - kas/include/poky.yml - - kas/include/tegra.yml + - kas/include/tegra-jetpack4.yml machine: jetson-xavier-nx-devkit-tx2-nx diff --git a/kas/jetson-xavier-nx-devkit.yml b/kas/jetson-xavier-nx-devkit.yml index 2cae99e7c..74ea3b205 100644 --- a/kas/jetson-xavier-nx-devkit.yml +++ b/kas/jetson-xavier-nx-devkit.yml @@ -3,6 +3,6 @@ header: includes: - kas/include/mender-full.yml - kas/include/poky.yml - - kas/include/tegra.yml + - kas/include/tegra-jetpack4.yml machine: jetson-xavier-nx-devkit diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/README.md b/meta-mender-tegra/meta-mender-tegra-jetpack5/README.md new file mode 100644 index 000000000..2a0edc533 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/README.md @@ -0,0 +1,49 @@ +# meta-mender-tegra + +Mender integration layer for NVIDIA Tegra hardware. + +The supported and tested boards are: + +- [Jetson TX2](https://hub.mender.io/t/nvidia-tegra-jetson-tx2/123) +- [Jetson Nano](https://hub.mender.io/t/nvidia-tegra-jetson-nano/1360) +- [Jetson Xavier NX](https://hub.mender.io/t/nvidia-tegra-jetson-xavier-nx/2615) +- [Jetson AGX Xavier](https://hub.mender.io/t/nvidia-tegra-agx-xavier/2616) + +Visit the individual board links above for more information on status of the +integration and more detailed instructions on how to build and use images +together with Mender for the mentioned boards. + + +## Dependencies + +This layer depends on: + +``` +URI: https://github.com/madisongh/meta-tegra.git +layers: meta-tegra +branch: dunfell-l4t-r32.4.3 +revision: HEAD +``` + +``` +URI: https://github.com/mendersoftware/meta-mender.git +layers: meta-mender-core +branch: dunfell +revision: HEAD +``` + + +## Quick start + +See the mender hub pages and the documentation for the `tegrademo-mender` +distro on the [tegra-demo-distro](https://github.com/OE4T/tegra-demo-distro) repository +for the most up to date instructions on starting out with mender and tegra. + +## Acknowlegements + +Special thanks to [Matt Madison](https://github.com/madisongh) for his contributions to +support zeus and later branches and his work on meta-tegra which makes this mender +integration possible. + +Thanks also to [Kurt Keifer](https://github.com/kekiefer/) for his contributions and +cleanup to support additional platforms and the tegra-demo-distro on the dunfell release. diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/classes/image_types_mender_tegra.bbclass b/meta-mender-tegra/meta-mender-tegra-jetpack5/classes/image_types_mender_tegra.bbclass new file mode 100644 index 000000000..b914e3704 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/classes/image_types_mender_tegra.bbclass @@ -0,0 +1,4 @@ +inherit image_types_tegra + +DATAFILE ?= "${IMAGE_BASENAME}-${MACHINE}.dataimg" +IMAGE_TEGRAFLASH_DATA ?= "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.dataimg" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/classes/tegra-mender-setup.bbclass b/meta-mender-tegra/meta-mender-tegra-jetpack5/classes/tegra-mender-setup.bbclass new file mode 100644 index 000000000..50ebb5f15 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/classes/tegra-mender-setup.bbclass @@ -0,0 +1,158 @@ +inherit l4t_bsp + +python () { + # insert l4t-mender- as a machine-specific override for tegra platforms + machine_overrides = d.getVar('MACHINEOVERRIDES', False).split(':') + try: + i = machine_overrides.index('tegra') + l4t_ver = 'l4t-mender-%s' % d.getVar('L4T_VERSION').replace('.','-') + d.setVar('MACHINEOVERRIDES', ':'.join(machine_overrides[:i] + [l4t_ver] + machine_overrides[i:])) + except ValueError: + pass +} + +def tegra_mender_set_rootfs_partsize(calc_rootfs_size_kb): + return calc_rootfs_size_kb * 1024 + +def tegra_mender_image_rootfs_size(d): + rootfspart_size = d.getVar('ROOTFSPART_SIZE') + if rootfspart_size: + calc_rootfs_size = int(rootfspart_size) // 1024 + else: + calc_rootfs_size = int(d.getVar('MENDER_CALC_ROOTFS_SIZE')) + calc_rootfs_size = (calc_rootfs_size * 95) // 100 + return calc_rootfs_size - eval(d.getVar('IMAGE_ROOTFS_EXTRA_SPACE')) + +# meta-tegra and tegraflash requirements +IMAGE_CLASSES += "image_types_mender_tegra" +IMAGE_FSTYPES += "tegraflash" + +ARTIFACTIMG_FSTYPE = "ext4" +# Generate dataimg for use with tegraflash +IMAGE_TYPEDEP:tegraflash += " dataimg" +IMAGE_FSTYPES += "dataimg" +PREFERRED_PROVIDER_u-boot-fw-utils = "u-boot-fw-utils-tegra" +PREFERRED_PROVIDER_libubootenv:tegra = "${@'libubootenv-fake' if d.getVar('PREFERRED_PROVIDER_virtual/bootloader').startswith('cboot') else 'libubootenv'}" +PREFERRED_RPROVIDER_u-boot-fw-utils = "u-boot-fw-utils-tegra" +PREFERRED_RPROVIDER_libubootenv-bin:tegra = "${@'libubootenv-fake' if d.getVar('PREFERRED_PROVIDER_virtual/bootloader').startswith('cboot') else 'libubootenv-bin'}" +PREFERRED_PROVIDER_libubootenv:tegra234 = "libubootenv-fake" + +# Note: this isn't really a boot file, just put it here to keep the mender build from +# complaining about empty IMAGE_BOOT_FILES. We won't use the full image anyway, just the mender file +IMAGE_BOOT_FILES = "u-boot-dtb.bin" +# Mender customizations to support jetson platforms. This needs to +# match up with your defined flash or sdcard layout. +# You will need to update these partition values when you update the flash layout. One way to find the correct number is to +# boot into an emergency shell and examine the /dev/mmcblk* devices, +# or use the uboot console to look at mtdparts +MENDER_DATA_PART_NUMBER_DEFAULT:tegra186 = "34" +MENDER_DATA_PART_NUMBER_DEFAULT:tegra194 = "43" +MENDER_DATA_PART_NUMBER_DEFAULT:tegra210 = "${@'16' if (d.getVar('TEGRA_SPIFLASH_BOOT') or '') == '1' else '23'}" +MENDER_DATA_PART_NUMBER_DEFAULT:jetson-nano-emmc = "19" +MENDER_DATA_PART_NUMBER_DEFAULT:xavier-nx = "12" +MENDER_DATA_PART_NUMBER_DEFAULT:tegra234 = "16" +MENDER_ROOTFS_PART_A_NUMBER_DEFAULT = "1" +MENDER_ROOTFS_PART_B_NUMBER_DEFAULT:tegra186 = "33" +MENDER_ROOTFS_PART_B_NUMBER_DEFAULT:tegra194 = "42" +MENDER_ROOTFS_PART_B_NUMBER_DEFAULT:tegra210 = "${@'15' if (d.getVar('TEGRA_SPIFLASH_BOOT') or '') == '1' else '22'}" +MENDER_ROOTFS_PART_B_NUMBER_DEFAULT:jetson-nano-emmc = "18" +MENDER_ROOTFS_PART_B_NUMBER_DEFAULT:xavier-nx = "11" +MENDER_ROOTFS_PART_B_NUMBER_DEFAULT:tegra234 = "2" + +# Machine name and flash layout changed for SDcard Nanos in L4T R32.5.x +MENDER_DATA_PART_NUMBER_DEFAULT:jetson-nano-devkit = "3" +MENDER_ROOTFS_PART_B_NUMBER_DEFAULT:jetson-nano-devkit = "2" +# Machine name changed for Nano-eMMC in L4T R32.5.x +MENDER_DATA_PART_NUMBER_DEFAULT:jetson-nano-devkit-emmc = "19" +MENDER_ROOTFS_PART_B_NUMBER_DEFAULT:jetson-nano-devkit-emmc = "18" +# Added in L4T R32.5.x +MENDER_DATA_PART_NUMBER_DEFAULT:jetson-nano-2gb-devkit = "4" +MENDER_ROOTFS_PART_B_NUMBER_DEFAULT:jetson-nano-2gb-devkit = "2" + +# Use a 4096 byte alignment for support of tegraflash scheme and default partition locations +MENDER_PARTITION_ALIGNMENT = "4096" + +MENDER_RESERVED_SPACE_BOOTLOADER_DATA = "0" + +# See note in https://docs.mender.io/1.7/troubleshooting/running-yocto-project-image#i-moved-from-an-older-meta-mender-branch-to-the-thud-branch-and +# Prevents build failure during mkfs.ext4 step on warrior +MENDER_PARTITIONING_OVERHEAD_KB = "0" +# We don't use a boot partition in the mender image, we use tegraflash to setup our boot partition +MENDER_BOOT_PART = "" +MENDER_BOOT_PART_SIZE_MB = "0" + +# Calculate the ROOTFSPART_SIZE value based on the *calculated* +# IMAGE_ROOTFS_SIZE set by mender. Do *not* use ${IMAGE_ROOTFS_SIZE} +# here; when we're called on in the context of an initramfs image +# build (for BUP payload generation), its size is set smaller than +# the actual rootfs image, so the resulting flash layout XML files +# will be different between the two contexts, leading to boot +# failures after bootloader updates. +ROOTFSPART_SIZE = "${@tegra_mender_set_rootfs_partsize(${MENDER_CALC_ROOTFS_SIZE})}" + +# See https://hub.mender.io/t/yocto-thud-release-and-mender/144 +# Default for thud and later is grub integration but we need to use u-boot integration already included. +# Leave out sdimg since we don't use this with tegra (instead use +# tegraflash) +MENDER_FEATURES_ENABLE:append:tegra = "${@tegra_mender_uboot_feature(d)}" +MENDER_FEATURES_DISABLE:append:tegra = " mender-grub mender-image-uefi" + +# Use these variables to adjust your total rootfs size across both +# images. Rootfs size will be approximately 1/2 of +# MENDER_STORAGE_TOTAL_SIZE_MB (ignoring alignment). +# Calculate the total size based on the eMMC or SDcard size configured +# for the machine, subtracting off space for the boot-related files +# and other NVIDIA-specific partitions (by default, 1GiB). +def tegra_mender_calc_total_size(d): + # For pre-production Nanos, use SDCard size, which in the machine + # config ends with a size factor (K, M, or G). Note that the + # factors are kilo/mega/giga, rather than kibi/mibi/gibi. + if (d.getVar('TEGRA_SPIFLASH_BOOT') or '') == '1': + sdcard_size = d.getVar('TEGRAFLASH_SDCARD_SIZE') + fchar = sdcard_size[-1:].upper() + sdcard_size = int(sdcard_size[:-1]) + if fchar == 'G': + total_size_bytes = sdcard_size * 1000 * 1000 * 1000 + elif fchar == 'K': + total_size_bytes = sdcard_size * 1000 + elif fchar == 'M': + total_size_bytes = sdcard_size * 1000 * 1000 + else: + bb.error('TEGRAFLASH_SDCARD_SIZE does not end with G, K, or M') + else: + total_size_bytes = int(d.getVar('EMMC_SIZE')) + # Mender uses mibibytes, not megabytes + return total_size_bytes // (1024*1024) - int(d.getVar('TEGRA_MENDER_RESERVED_SPACE_MB')) + +MENDER_IMAGE_ROOTFS_SIZE_DEFAULT = "${@tegra_mender_image_rootfs_size(d)}" +TEGRA_MENDER_RESERVED_SPACE_MB_DEFAULT = "1024" +TEGRA_MENDER_RESERVED_SPACE_MB_DEFAULT:jetson-nano-2gb-devkit = "5120" +TEGRA_MENDER_RESERVED_SPACE_MB ?= "${TEGRA_MENDER_RESERVED_SPACE_MB_DEFAULT}" +MENDER_STORAGE_TOTAL_SIZE_MB_DEFAULT:tegra = "${@tegra_mender_calc_total_size(d)}" + +def tegra_mender_uboot_feature(d): + if (d.getVar('PREFERRED_PROVIDER_virtual/bootloader') or '').startswith('cboot'): + return " mender-persist-systemd-machine-id" + return " mender-uboot mender-persist-systemd-machine-id" + +_MENDER_IMAGE_DEPS_EXTRA = "" +_MENDER_IMAGE_DEPS_EXTRA:tegra = "tegra-state-scripts:do_deploy" +do_image_mender[depends] += "${_MENDER_IMAGE_DEPS_EXTRA}" + +# mender-setup-image adds kernel-image and kernel-devicetree +# to MACHINE_ESSENTIAL_EXTRA_RDEPENDS, but they should *not* +# be included by default on cboot platforms. +MACHINE_ESSENTIAL_EXTRA_RDEPENDS:remove:tegra194 = "kernel-image kernel-devicetree" +MACHINE_ESSENTIAL_EXTRA_RDEPENDS:remove:tegra186 = "${@'kernel-image kernel-devicetree' if (d.getVar('PREFERRED_PROVIDER_virtual/bootloader') or '').startswith('cboot') else ''}" + +# Compatibility settings for handling the machine name changes +# made in L4T R32.5.x, to allow for upgrades. This does not +# include jetson-nano-qspi-sd (now jetson-nano-devkit) due to +# major changes in the flash layout. +MENDER_DEVICE_TYPES_COMPATIBLE:append:jetson-tx1-devkit = " jetson-tx1" +MENDER_DEVICE_TYPES_COMPATIBLE:append:jetson-tx2-devkit = " jetson-tx2" +MENDER_DEVICE_TYPES_COMPATIBLE:append:jetson-tx2-devkit-tx2i = " jetson-tx2i" +MENDER_DEVICE_TYPES_COMPATIBLE:append:jetson-tx2-devkit-4gb = " jetson-tx2-4gb" +MENDER_DEVICE_TYPES_COMPATIBLE:append:jetson-agx-xavier-devkit = " jetson-xavier" +MENDER_DEVICE_TYPES_COMPATIBLE:append:jetson-agx-xavier-devkit-8gb = " jetson-xavier-8gb" +MENDER_DEVICE_TYPES_COMPATIBLE:append:jetson-nano-devkit-emmc = " jetson-nano-emmc" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/conf/layer.conf b/meta-mender-tegra/meta-mender-tegra-jetpack5/conf/layer.conf new file mode 100644 index 000000000..56848cd41 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/conf/layer.conf @@ -0,0 +1,19 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "meta-mender-tegra-jetpack5" +BBFILE_PATTERN_meta-mender-tegra-jetpack5 = "^${LAYERDIR}/" +BBFILE_PRIORITY_meta-mender-tegra-jetpack5 = "10" +LAYERVERSION_meta-mender-tegra-jetpack5 = "1" +LAYERSERIES_COMPAT_meta-mender-tegra-jetpack5 = "kirkstone" +LAYERDEPENDS_meta-mender-tegra-jetpack5 = "tegra" + +BBMASK:tegra234:append = " \ + recipes-bsp/cboot/ \ + recipes-bsp/u-boot/patches \ + recipes-bsp/u-boot/libubootenv_.* \ + recipes-bsp/u-boot/u-boot.* \ + " diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/cboot/cboot-t18x_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/cboot/cboot-t18x_%.bbappend new file mode 100644 index 000000000..1a0b38479 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/cboot/cboot-t18x_%.bbappend @@ -0,0 +1 @@ +PACKAGECONFIG:append = " machine-id" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/cboot/cboot-t19x_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/cboot/cboot-t19x_%.bbappend new file mode 100644 index 000000000..1a0b38479 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/cboot/cboot-t19x_%.bbappend @@ -0,0 +1 @@ +PACKAGECONFIG:append = " machine-id" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-agx-orin-devkit/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-agx-orin-devkit/flash_mender.xml new file mode 100644 index 000000000..791c6fa22 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-agx-orin-devkit/flash_mender.xml @@ -0,0 +1,760 @@ + + + + + + + + + + sequential + basic + 1048576 + 0 + 8 + 0 + + + sequential + basic + 524288 + 0 + 8 + 0 + MB1FILE + 262144 + + + sequential + basic + 262144 + 0 + 8 + 0 + PSCBL1FILE + 65536 + + + sequential + basic + 131072 + 0 + 8 + 0 + 65536 + + + sequential + basic + 262144 + 0 + 8 + 0 + 65536 + + + sequential + basic + 1048576 + 0 + 8 + 0 + TSECFW + 65536 + + + sequential + basic + 1048576 + 0 + 8 + 0 + NVHOSTNVDEC + 65536 + + + sequential + basic + 524288 + 0 + 8 + 0 + MB2BLFILE + 65536 + + + sequential + basic + 262144 + 0 + 8 + 0 + XUSB_FW + 65536 + + + sequential + basic + 1572864 + 0 + 8 + 0 + BPFFILE + 65536 + + + sequential + basic + 4194304 + 0 + 8 + 0 + BPFDTB_FILE + 65536 + + + sequential + basic + 786432 + 0 + 8 + 0 + PSCFW + 65536 + + + sequential + basic + 524288 + 0 + 8 + 0 + MCE_IMAGE + 65536 + + + sequential + basic + 196608 + 0 + 8 + 0 + WB0FILE + 65536 + + + sequential + basic + 196608 + 0 + 8 + 0 + PSCRF_IMAGE + 65536 + + + sequential + basic + 131072 + 0 + 8 + 0 + MB2RF_IMAGE + 65536 + + + sequential + basic + 3670016 + 0 + 8 + 0 + TBCDTB-FILE + 65536 + + + sequential + basic + 4194304 + 0 + 8 + 0 + TOSFILE + 65536 + + + sequential + basic + 2097152 + 0 + 8 + 0 + 65536 + + + sequential + basic + 262144 + 0 + 8 + 0 + EKSFILE + 65536 + + + sequential + basic + 5242880 + 0 + 8 + 0 + DCE + 65536 + + + sequential + basic + 589824 + 0 + 8 + 0 + SPEFILE + 65536 + + + sequential + basic + 1048576 + 0 + 8 + 0 + CAMERAFW + 65536 + + + sequential + basic + 2097152 + 0 + 8 + 0 + adsp-fw.bin + 65536 + + + sequential + basic + 1376256 + 0 + 8 + 0 + 65536 + + + sequential + basic + 524288 + 0 + 8 + 0 + MB1FILE + 262144 + + + sequential + basic + 262144 + 0 + 8 + 0 + PSCBL1FILE + 65536 + + + sequential + basic + 131072 + 0 + 8 + 0 + 65536 + + + sequential + basic + 262144 + 0 + 8 + 0 + 65536 + + + sequential + basic + 1048576 + 0 + 8 + 0 + TSECFW + 65536 + + + sequential + basic + 1048576 + 0 + 8 + 0 + NVHOSTNVDEC + 65536 + + + sequential + basic + 524288 + 0 + 8 + 0 + MB2BLFILE + 65536 + + + sequential + basic + 262144 + 0 + 8 + 0 + XUSB_FW + 65536 + + + sequential + basic + 1572864 + 0 + 8 + 0 + BPFFILE + 65536 + + + sequential + basic + 4194304 + 0 + 8 + 0 + BPFDTB_FILE + 65536 + + + sequential + basic + 786432 + 0 + 8 + 0 + PSCFW + 65536 + + + sequential + basic + 524288 + 0 + 8 + 0 + MCE_IMAGE + 65536 + + + sequential + basic + 196608 + 0 + 8 + 0 + WB0FILE + 65536 + + + sequential + basic + 196608 + 0 + 8 + 0 + PSCRF_IMAGE + 65536 + + + sequential + basic + 131072 + 0 + 8 + 0 + MB2RF_IMAGE + 65536 + + + sequential + basic + 3670016 + 0 + 8 + 0 + TBCDTB-FILE + 65536 + + + sequential + basic + 4194304 + 0 + 8 + 0 + TOSFILE + 65536 + + + sequential + basic + 2097152 + 0 + 8 + 0 + 65536 + + + sequential + basic + 262144 + 0 + 8 + 0 + EKSFILE + 65536 + + + sequential + basic + 5242880 + 0 + 8 + 0 + DCE + 65536 + + + sequential + basic + 589824 + 0 + 8 + 0 + SPEFILE + 65536 + + + sequential + basic + 1048576 + 0 + 8 + 0 + CAMERAFW + 65536 + + + sequential + basic + 2097152 + 0 + 8 + 0 + adsp-fw.bin + 65536 + + + sequential + basic + 1376256 + 0 + 8 + 0 + 65536 + + + sequential + basic + 262144 + 0 + 0x8 + 0 + 65536 + + + sequential + basic + 524288 + 0 + 0x8 + 0 + 65536 + + + sequential + basic + 0x3F70000 + 196608 + 0 + 0x8 + 0 + 65536 + + + sequential + basic + 0x3FA0000 + 65536 + 65536 + 0 + 8 + 0 + + + sequential + basic + 65536 + 65536 + 0 + 8 + 0 + + + sequential + basic + 65536 + 65536 + 0 + 8 + 0 + + + sequential + basic + 0x3FD0000 + 65536 + 65536 + 0 + 0 + 8 + 0 + VERFILE + + + sequential + basic + 65536 + 65536 + 0 + 0 + 8 + 0 + VERFILE + + + sequential + basic + 0xFFFFFFFFFFFFFFFF + 0 + 8 + 0 + + + + + sequential + basic + 512 + 0 + 8 + 0 + + + sequential + basic + 19968 + 0 + 8 + 0 + + + sequential + basic + 134217728 + 0 + 8 + 0 + LNXFILE + + + sequential + basic + 786432 + 0 + 8 + 0 + DTB_FILE + + + sequential + basic + 33161216 + 0 + 8 + 0 + + + sequential + basic + 134217728 + 0 + 8 + 0 + LNXFILE_b + + + sequential + basic + 786432 + 0 + 8 + 0 + DTB_FILE + + + sequential + basic + 33161216 + 0 + 8 + 0 + + + sequential + basic + RECSIZE + 0 + 8 + 0 + RECFILE + + + sequential + basic + 524288 + 0 + 8 + 0 + RECDTB-FILE + + + sequential + basic + 67108864 + 0 + 0x8 + 0 + ESP_FILE + C12A7328-F81F-11D2-BA4B-00A0C93EC93B + **Required.** EFI system partition with L4T Launcher. + + + sequential + basic + RECSIZE + 0 + 8 + 0 + + + sequential + basic + 524288 + 0 + 8 + 0 + + + sequential + basic + 67108864 + 0 + 0x8 + 0 + **Required.** EFI system partition for fail-safe ESP update. + + + sequential + basic + 922222592 + 0 + 8 + 0 + **Required.** Reserve space in case there is any partition change + required in the future, for example, adding new partitions or increasing size + of some partitions. + + + sequential + basic + APPSIZE + 0 + 0x8 + 16384 + 0 + APPUUID + APPFILE + **Required.** Contains the rootfs. This partition must be assigned + the "1" for id as it is physically put to the end of the device, so that it + can be accessed as the fixed known special device `/dev/mmcblk0p1`. + + + sequential + basic + APPSIZE + 0 + 0x8 + 16384 + 0 + APPUUID_b + APPFILE_b + **Required.** Contains the rootfs. This partition must be defined + after `primary_GPT` so that it can be accessed as the fixed known special device + `/dev/mmcblk0p2`. + + + sequential + basic + 18432 + 0 + 0x808 + DATAFILE + 0 + **Required.** Automatically takes all remaining space on the device except that + occupied by the `secondary_gpt` partition. Allocation attribute must be set to 0x808. + May be mounted and used to store user data. + + + sequential + basic + 0xFFFFFFFFFFFFFFFF + 0 + 8 + 0 + + + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-2gb-devkit/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-2gb-devkit/flash_mender.xml new file mode 100644 index 000000000..769deec4f --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-2gb-devkit/flash_mender.xml @@ -0,0 +1,272 @@ + + + + + + + + sequential + basic + 262144 + 0 + 8 + 0 + **Required.** Contains Boot Configuration Table (BCT). + + + + sequential + basic + 196608 + 0 + 8 + 0 + NVCFILE + **Required.** Contains TegraBoot binary. + + + + sequential + basic + 65536 + 0 + 8 + 0 + flash.xml.bin + **Required.** Contains Partition Table. + + + + sequential + basic + 196608 + 0 + 8 + 0 + NVCFILE + **Required.** Contains a redundant copy of the TegraBoot + binary. + + + + sequential + basic + 131072 + 0 + 8 + 0 + TBCFILE + **Required.** Contains TegraBoot CPU-side binary. + + + + sequential + basic + 327680 + 0 + 0x8 + 0 + DTBFILE + **Required.** Contains Bootloader DTB binary. + + + + sequential + basic + 589824 + 0 + 8 + 0 + EBTFILE + **Required.** Contains CBoot, the final boot stage CPU bootloader + binary that loads the binary in the kernel partition.. + + + + sequential + basic + 65536 + 0 + 8 + 0 + WB0FILE + **Required.** Contains warm boot binary. + + + + sequential + basic + 196608 + 0 + 0 + 8 + 0 + BPFFILE + **Required.** Contains SC7 entry firmware. + + + + sequential + basic + 65536 + 0 + 8 + 0 + BPFDTB-FILE + **Optional.** Reserved for future use by BPMP DTB binary; + can't remove. + + + + sequential + basic + 458752 + 0 + 0 + 8 + 0 + TOSFILE + **Required.** Contains TOS binary. + + + + sequential + basic + 327680 + 0 + 0x8 + 0 + DTBFILE + **Required.** Contains kernel DTB binary. + + + + sequential + basic + 753664 + 0 + 0x8 + 0 + LNXFILE + **Required.** Contains U-Boot, which loads and launches the kernel from + the rootfs at `/boot`. + + + + sequential + basic + 131072 + 0 + 0x8 + 0 + rp4.blob + **Required.** Contains XUSB firmware file, making XUSB + a true USB 3.0 compliant host controller. + + + + sequential + basic + 0x3B0000 + 131072 + 0 + 8 + 0 + U-Boot environment area + + + + sequential + basic + 0x3E0000 + 32768 + 0 + 0 + 8 + 0 + VERFILE + **Required.** Contains a redundant copy of BSP version + information. + + + + sequential + basic + 0x3F0000 + 32768 + 0 + 0 + 8 + 0 + VERFILE + **Required.** Contains BSP version information. + + + + + + sequential + basic + 2097152 + 0 + 8 + 0 + **Required.** Contains primary GPT of the `sdcard` device. All + partitions defined after this entry are configured in the kernel, and are accessible + by standard partition tools such as gdisk and parted. + + + + sequential + basic + APPSIZE + 0 + 0x8 + 0 + 4096 + APPFILE + **Required.** Contains the rootfs. This partition must be defined after + `primary_GPT` so that it can be accessed as the fixed known special device + `/dev/mmcblk0p1`. + + + + sequential + basic + APPSIZE + 0 + 0x8 + 0 + 4096 + APPFILE + + + + sequential + basic + 4294967296 + 0 + 0x8 + 0 + 4096 + + + + sequential + basic + 2097152 + 0x808 + DATAFILE + + + + sequential + basic + 2097152 + 0 + 8 + 0 + **Required.** Contains secondary GPT of the `sdcard` device. + + + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit-emmc/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit-emmc/flash_mender.xml new file mode 100644 index 000000000..cd91e0037 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit-emmc/flash_mender.xml @@ -0,0 +1,408 @@ + + + + + + + + sequential + basic + 1048576 + 8 + **Required.** Contains Boot Configuration Table (BCT). + + + + sequential + basic + 262144 + 8 + NVCFILE + **Required.** Contains TegraBoot binary. + + + + sequential + basic + 131072 + 8 + flash.xml.bin + **Required.** Contains Partition Table. + + + + sequential + basic + 196608 + 8 + TBCFILE + **Required.** Contains TegraBoot CPU-side binary. + + + + sequential + basic + 1048576 + 8 + DTBFILE + **Required.** Contains Bootloader DTB binary. + + + + sequential + basic + 655360 + 8 + EBTFILE + **Required.** Contains CBoot, the final boot stage CPU bootloader binary + that loads the binary in kernel partition. + + + + sequential + basic + 131072 + 8 + WB0FILE + **Required.** Contains warm boot binary. + + + + sequential + basic + 262144 + 8 + BPFFILE + **Required.** Contains SC7 entry firmware. + + + + sequential + basic + 458752 + 0 + 8 + 0 + BPFDTB-FILE + **Optional.** Reserved for future use by BPMP DTB binary; can't remove + + + + sequential + basic + 262144 + 8 + NVCFILE + **Required.** Contains a redundant copy of the TegraBoot + binary. + + + + sequential + basic + 131072 + 8 + flash.xml.bin + **Required.** Contains a redundant copy of the Partition + Table. + + + + sequential + basic + 196608 + 8 + TBCFILE + **Required.** Contains a redundant copy of TegraBoot CPU-side binary. + + + + sequential + basic + 1048576 + 8 + DTBFILE + **Required.** Contains a redundant copy of the Bootloader + DTB binary. + + + + sequential + basic + 655360 + 8 + EBTFILE + **Required.** Contains a redundant copy of CBoot. + + + + sequential + basic + 131072 + 8 + WB0FILE + **Required.** Contains a redundant copy of the + warm boot binary. + + + + sequential + basic + 262144 + 8 + BPFFILE + **Required.** Contains a redundant copy of the + SC7 Entry Firmware. + + + + sequential + basic + 458752 + 0 + 8 + 0 + BPFDTB-FILE + **Optional.** Reserved for future use by BPMP DTB binary; can't remove + + + + sequential + basic + 0x7A0000 + 262144 + 0 + 8 + 0 + **Required.** Reserved for U-Boot environment. + + + + sequential + basic + 0x7E0000 + 32768 + 0 + 0 + 8 + 0 + VERFILE + **Required.** Contains a redundant copy of the + BSP version info. + + + + sequential + basic + 0x7F0000 + 32768 + 0 + 0 + 8 + 0 + VERFILE + **Required.** Contains BSP version information. + + + + + + sequential + basic + 2097152 + 8 + **Required.** Contains primary GPT of the `sdmmc_user` device. All + partitions defined after this entry are configured in the kernel, and are accessible + by standard partition tools such as gdisk and parted. + + + + sequential + basic + APPSIZE + 8 + APPFILE + **Required.** Contains the rootfs. This partition must be defined after + `primary_GPT` so it can be accessed as the fixed known special device + `/dev/mmcblk0p1`. + + + + sequential + basic + 1048576 + 8 + DTBFILE + **Required.** Contains kernel DTB binary. + + + + sequential + basic + 6291456 + 8 + TOSFILE + **Required.** Contains TOS binary. + + + + sequential + basic + 81920 + 8 + EKSFILE + **Optional.** Contains the encrypted keys. + + + + sequential + basic + 67092480 + 8 + LNXFILE + **Required.** Contains U-Boot, which loads and launches the kernel from + the rootfs at `/boot`. + + + + sequential + basic + 1048576 + 8 + DTBFILE + **Required.** Contains a redundant copy of the + kernel DTB binary. + + + + sequential + basic + 6291456 + 8 + TOSFILE + **Required.** Contains a redundant copy of the + TOS binary. + + + + sequential + basic + 81920 + 8 + EKSFILE + **Optional.** Contains a redundant copy of the encrypted + keys. + + + + sequential + basic + 67092480 + 8 + LNXFILE + **Required.** Contains a redundant copy of U-Boot, which loads and + launches the kernel from the rootfs at `/boot`. + + + + sequential + basic + 196608 + 8 + bmp.blob + **Optional.** Contains BMP images for splash screen display during + boot. + + + + sequential + basic + 262144 + 8 + rp4.blob + **Required.** Contains the XUSB module’s firmware file, making XUSB a + true USB 3.0 compliant host controller. + + + + sequential + basic + 66060288 + 8 + 0 + **Optional.** Reserved for future use by the recovery image; removable. + + + + sequential + basic + 524288 + 8 + 0 + **Optional.** Reserved for future use by the recovery DTB image; + removable. + + + + sequential + basic + 262144 + 8 + 0 + **Optional.** Reserved for future use by boot control data; removable. + + + + sequential + basic + 262144 + 8 + 0 + **Optional.** Reserved for future use by a redundant copy of the boot control data; + removable. + + + + sequential + basic + 314572800 + 0 + 0x8 + 0 + **Optional.** Reserved for future use by the recovery filesystem; + removable. + + + + sequential + basic + 262144 + 8 + + + + sequential + basic + APPSIZE + 8 + APPFILE + + + + sequential + basic + 2097152 + 0x808 + DATAFILE + + + + sequential + basic + -1 + 8 + **Required.** Contains secondary GPT of the `sdmmc_user` + device. + + + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit/flash_mender.xml new file mode 100644 index 000000000..f185b7904 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit/flash_mender.xml @@ -0,0 +1,262 @@ + + + + + + + + sequential + basic + 262144 + 0 + 8 + 0 + **Required.** Contains Boot Configuration Table (BCT). + + + + sequential + basic + 196608 + 0 + 8 + 0 + NVCFILE + **Required.** Contains TegraBoot binary. + + + + sequential + basic + 65536 + 0 + 8 + 0 + flash.xml.bin + **Required.** Contains Partition Table. + + + + sequential + basic + 196608 + 0 + 8 + 0 + NVCFILE + **Required.** Contains a redundant copy of the TegraBoot + binary. + + + + sequential + basic + 131072 + 0 + 8 + 0 + TBCFILE + **Required.** Contains TegraBoot CPU-side binary. + + + + sequential + basic + 327680 + 0 + 0x8 + 0 + DTBFILE + **Required.** Contains Bootloader DTB binary. + + + + sequential + basic + 589824 + 0 + 8 + 0 + EBTFILE + **Required.** Contains CBoot, the final boot stage CPU bootloader + binary that loads the binary in the kernel partition.. + + + + sequential + basic + 65536 + 0 + 8 + 0 + WB0FILE + **Required.** Contains warm boot binary. + + + + sequential + basic + 196608 + 0 + 0 + 8 + 0 + BPFFILE + **Required.** Contains SC7 entry firmware. + + + + sequential + basic + 65536 + 0 + 8 + 0 + BPFDTB-FILE + **Optional.** Reserved for future use by BPMP DTB binary; + can't remove. + + + + sequential + basic + 458752 + 0 + 0 + 8 + 0 + TOSFILE + **Required.** Contains TOS binary. + + + + sequential + basic + 327680 + 0 + 0x8 + 0 + DTBFILE + **Required.** Contains kernel DTB binary. + + + + sequential + basic + 753664 + 0 + 0x8 + 0 + LNXFILE + **Required.** Contains U-Boot, which loads and launches the kernel from + the rootfs at `/boot`. + + + + sequential + basic + 131072 + 0 + 0x8 + 0 + rp4.blob + **Required.** Contains XUSB firmware file, making XUSB + a true USB 3.0 compliant host controller. + + + + sequential + basic + 0x3B0000 + 131072 + 0 + 8 + 0 + U-Boot environment area + + + + sequential + basic + 0x3E0000 + 32768 + 0 + 0 + 8 + 0 + VERFILE + **Required.** Contains a redundant copy of BSP version + information. + + + + sequential + basic + 0x3F0000 + 32768 + 0 + 0 + 8 + 0 + VERFILE + **Required.** Contains BSP version information. + + + + + + sequential + basic + 2097152 + 0 + 8 + 0 + **Required.** Contains primary GPT of the `sdcard` device. All + partitions defined after this entry are configured in the kernel, and are accessible + by standard partition tools such as gdisk and parted. + + + + sequential + basic + APPSIZE + 0 + 0x8 + 0 + 4096 + APPFILE + **Required.** Contains the rootfs. This partition must be defined after + `primary_GPT` so that it can be accessed as the fixed known special device + `/dev/mmcblk0p1`. + + + + sequential + basic + APPSIZE + 0 + 0x8 + 0 + 4096 + APPFILE + + + + sequential + basic + 2097152 + 0x808 + DATAFILE + + + + sequential + basic + 2097152 + 0 + 8 + 0 + **Required.** Contains secondary GPT of the `sdcard` device. + + + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-emmc/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-emmc/flash_mender.xml new file mode 100644 index 000000000..f0eb1bea1 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-emmc/flash_mender.xml @@ -0,0 +1,406 @@ + + + + + + + + sequential + basic + 1048576 + 8 + **Required.** Contains Boot Configuration Table (BCT). + + + + sequential + basic + 262144 + 8 + NVCFILE + **Required.** Contains TegraBoot binary. + + + + sequential + basic + 131072 + 8 + flash.xml.bin + **Required.** Contains Partition Table. + + + + sequential + basic + 196608 + 8 + TBCFILE + **Required.** Contains TegraBoot CPU-side binary. + + + + sequential + basic + 1048576 + 8 + DTBFILE + **Required.** Contains Bootloader DTB binary. + + + + sequential + basic + 655360 + 8 + EBTFILE + **Required.** Contains CBoot, the final boot stage CPU bootloader binary + that loads the binary in kernel partition. + + + + sequential + basic + 131072 + 8 + WB0FILE + **Required.** Contains warm boot binary. + + + + sequential + basic + 262144 + 8 + BPFFILE + **Required.** Contains SC7 entry firmware. + + + + sequential + basic + 458752 + 0 + 8 + 0 + BPFDTB-FILE + **Optional.** Reserved for future use by BPMP DTB binary; can't remove + + + + sequential + basic + 262144 + 8 + NVCFILE + **Required.** Contains a redundant copy of the TegraBoot + binary. + + + + sequential + basic + 131072 + 8 + flash.xml.bin + **Required.** Contains a redundant copy of the Partition + Table. + + + + sequential + basic + 196608 + 8 + TBCFILE + **Required.** Contains a redundant copy of TegraBoot CPU-side binary. + + + + sequential + basic + 1048576 + 8 + DTBFILE + **Required.** Contains a redundant copy of the Bootloader + DTB binary. + + + + sequential + basic + 655360 + 8 + EBTFILE + **Required.** Contains a redundant copy of CBoot. + + + + sequential + basic + 131072 + 8 + WB0FILE + **Required.** Contains a redundant copy of the + warm boot binary. + + + + sequential + basic + 262144 + 8 + BPFFILE + **Required.** Contains a redundant copy of the + SC7 Entry Firmware. + + + + sequential + basic + 458752 + 0 + 8 + 0 + BPFDTB-FILE + **Optional.** Reserved for future use by BPMP DTB binary; can't remove + + + + + sequential + basic + 917504 + 0 + 8 + 0 + **Required.** Empty padding. + + + + sequential + basic + 65536 + 0 + 0 + 8 + 0 + VERFILE + **Required.** Contains a redundant copy of the + BSP version info. + + + + sequential + basic + 65536 + 0 + 0 + 8 + 0 + VERFILE + **Required.** Contains BSP version information. + + + + + + sequential + basic + 2097152 + 8 + **Required.** Contains primary GPT of the `sdmmc_user` device. All + partitions defined after this entry are configured in the kernel, and are accessible + by standard partition tools such as gdisk and parted. + + + + sequential + basic + APPSIZE + 8 + APPFILE + **Required.** Contains the rootfs. This partition must be defined after + `primary_GPT` so it can be accessed as the fixed known special device + `/dev/mmcblk0p1`. + + + + sequential + basic + 1048576 + 8 + DTBFILE + **Required.** Contains kernel DTB binary. + + + + sequential + basic + 6291456 + 8 + TOSFILE + **Required.** Contains TOS binary. + + + + sequential + basic + 81920 + 8 + EKSFILE + **Optional.** Contains the encrypted keys. + + + + sequential + basic + 67092480 + 8 + LNXFILE + **Required.** Contains U-Boot, which loads and launches the kernel from + the rootfs at `/boot`. + + + + sequential + basic + 1048576 + 8 + DTBFILE + **Required.** Contains a redundant copy of the + kernel DTB binary. + + + + sequential + basic + 6291456 + 8 + TOSFILE + **Required.** Contains a redundant copy of the + TOS binary. + + + + sequential + basic + 81920 + 8 + EKSFILE + **Optional.** Contains a redundant copy of the encrypted + keys. + + + + sequential + basic + 67092480 + 8 + LNXFILE + **Required.** Contains a redundant copy of U-Boot, which loads and + launches the kernel from the rootfs at `/boot`. + + + + sequential + basic + 196608 + 8 + bmp.blob + **Optional.** Contains BMP images for splash screen display during + boot. + + + + sequential + basic + 262144 + 8 + rp4.blob + **Required.** Contains the XUSB module’s firmware file, making XUSB a + true USB 3.0 compliant host controller. + + + + sequential + basic + 66060288 + 8 + 0 + **Optional.** Reserved for future use by the recovery image; removable. + + + + sequential + basic + 524288 + 8 + 0 + **Optional.** Reserved for future use by the recovery DTB image; + removable. + + + + sequential + basic + 262144 + 8 + 0 + **Optional.** Reserved for future use by boot control data; removable. + + + + sequential + basic + 262144 + 8 + 0 + **Optional.** Reserved for future use by a redundant copy of the boot control data; + removable. + + + + sequential + basic + 314572800 + 0 + 0x8 + 0 + **Optional.** Reserved for future use by the recovery filesystem; + removable. + + + + sequential + basic + 262144 + 8 + + + + sequential + basic + APPSIZE + 8 + APPFILE + + + + sequential + basic + 2097152 + 0x808 + DATAFILE + + + + sequential + basic + -1 + 8 + **Required.** Contains secondary GPT of the `sdmmc_user` + device. + + + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-qspi-sd/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-qspi-sd/flash_mender.xml new file mode 100644 index 000000000..5a974231c --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-qspi-sd/flash_mender.xml @@ -0,0 +1,296 @@ + + + + + + + + sequential + basic + 262144 + 0 + 8 + 0 + **Required.** Contains Boot Configuration Table (BCT). + + + + sequential + basic + 196608 + 0 + 8 + 0 + NVCFILE + **Required.** Contains TegraBoot binary. + + + + sequential + basic + 65536 + 0 + 8 + 0 + flash.xml.bin + **Required.** Contains Partition Table. + + + + sequential + basic + 196608 + 0 + 8 + 0 + NVCFILE + **Required.** Contains a redundant copy of the TegraBoot + binary. + + + + sequential + basic + 0x3B0000 + 131072 + 0 + 8 + 0 + U-Boot environment area + + + + sequential + basic + 0x3E0000 + 32768 + 0 + 0 + 8 + 0 + VERFILE + **Required.** Contains a redundant copy of BSP version + information. + + + + sequential + basic + 0x3F0000 + 32768 + 0 + 0 + 8 + 0 + VERFILE + **Required.** Contains BSP version information. + + + + + + sequential + basic + 2097152 + 0 + 8 + 0 + **Required.** Contains primary GPT of the `sdcard` device. All + partitions defined after this entry are configured in the kernel, and are accessible + by standard partition tools such as gdisk and parted. + + + + sequential + basic + APPSIZE + 0 + 0x8 + 0 + 4096 + APPFILE + **Required.** Contains the rootfs. This partition must be defined after + `primary_GPT` so that it can be accessed as the fixed known special device + `/dev/mmcblk0p1`. + + + + sequential + basic + 131072 + 0 + 8 + 0 + TBCFILE + **Required.** Contains TegraBoot CPU-side binary. + + + + sequential + basic + 458752 + 0 + 0x8 + 0 + DTBFILE + **Required.** Contains Bootloader DTB binary. + + + + sequential + basic + 589824 + 0 + 8 + 0 + EBTFILE + **Required.** Contains CBoot, the final boot stage CPU bootloader + binary that loads the binary in the kernel partition.. + + + + sequential + basic + 65536 + 0 + 8 + 0 + WB0FILE + **Required.** Contains warm boot binary. + + + + sequential + basic + 196608 + 0 + 0 + 8 + 0 + BPFFILE + **Required.** Contains SC7 entry firmware. + + + + sequential + basic + 393216 + 0 + 8 + 0 + BPFDTB-FILE + **Optional.** Reserved for future use by BPMP DTB binary; can't remove. + + + + sequential + basic + 65536 + 0 + 0x8 + 0 + FBFILE + **Optional.** Reserved for fuse bypass; removeable. + + + + sequential + basic + 458752 + 0 + 0 + 8 + 0 + TOSFILE + **Required.** Contains TOS binary. + + + + sequential + basic + 458752 + 0 + 0x8 + 0 + DTBFILE + **Required.** Contains kernel DTB binary. + + + + sequential + basic + 786432 + 0 + 0x8 + 0 + LNXFILE + **Required.** Contains U-Boot, which loads and launches the kernel from + the rootfs at `/boot`. + + + + sequential + basic + 65536 + 0 + 0 + 8 + 0 + EKSFILE + **Optional.** Contains the encrypted keys. + + + + sequential + basic + 81920 + 0 + 0x8 + 0 + bmp.blob + **Optional.** Contains BMP images for splash screen display during + boot. + + + + sequential + basic + 131072 + 0 + 0x8 + 0 + rp4.blob + **Required.** Contains XUSB module’s firmware file, making XUSB + a true USB 3.0 compliant host controller. + + + + sequential + basic + APPSIZE + 0 + 0x8 + 0 + 4096 + APPFILE + + + + sequential + basic + 2097152 + 0x808 + DATAFILE + + + + sequential + basic + 2097152 + 0 + 8 + 0 + **Required.** Contains secondary GPT of the `sdcard` device. + + + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit-emmc/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit-emmc/flash_mender.xml new file mode 100644 index 000000000..a6131cb77 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit-emmc/flash_mender.xml @@ -0,0 +1,665 @@ + + + + sequential + basic + 131072 + 0 + 8 + 0 + **Required.** Contains Boot Configuration Table (BCT). + + + sequential + basic + 262144 + 0 + 8 + 0 + MB1FILE + **Required.** Slot A; contains NVIDIA signed MB1 binary. + + + sequential + basic + 262144 + 0 + 8 + 0 + MB1FILE + **Required.** Slot B; contains NVIDIA signed MB1 binary. + + + sequential + basic + 65536 + 0 + 8 + 0 + **Required.** Slot A; contains MB1 boot configuration table. + + + sequential + basic + 65536 + 0 + 8 + 0 + **Required.** Slot B; contains MB1 boot configuration table. + + + sequential + basic + 262144 + 0 + 8 + 0 + **Required.** Slot A; contains memory configuration table. + + + sequential + basic + 262144 + 0 + 8 + 0 + **Required.** Slot B; contains memory configuration table. + + + sequential + basic + 262144 + 0 + 8 + 0 + SPEFILE + **Required.** Slot A; contains BPMP SPE-FW binary. + + + sequential + basic + 262144 + 0 + 8 + 0 + SPEFILE + **Required.** Slot B; contains BPMP SPE-FW binary. + + + sequential + basic + 262144 + 0 + 8 + 0 + TEGRABOOT + **Required.** Slot A; contains TegraBoot binary. + + + sequential + basic + 262144 + 0 + 8 + 0 + TEGRABOOT + **Required.** Slot B; contains TegraBoot binary. + + + sequential + basic + 65536 + 0 + 8 + 0 + MTSPREBOOT + **Required.** Slot A; contains Denver preboot firmware. + + + sequential + basic + 65536 + 0 + 8 + 0 + MTSPREBOOT + **Required.** Slot B; contains Denver preboot firmware. + + + + sequential + basic + 196608 + 0 + 8 + 0 + MTS_MCE + **Required.** Slot A; contains microcode associated with boot, power management, + and clocks. + + + sequential + basic + 196608 + 0 + 8 + 0 + MTS_MCE + **Required.** Slot B; contains microcode associated with boot, power management, + and clocks. + + + sequential + basic + 4194304 + 0 + 8 + 0 + MTSPROPER + **Required.** Slot A; contains microcode associated with execution + and optimization of ARM code. + + + sequential + basic + 4194304 + 0 + 8 + 0 + MTSPROPER + **Required.** Slot B; contains microcode associated with execution + and optimization of ARM code. + + + sequential + basic + 131072 + 0 + 8 + 0 + WB0BOOT + **Required.** Slot A; contains warm boot firmware. + + + sequential + basic + 131072 + 0 + 8 + 0 + WB0BOOT + **Required.** Slot B; contains warm boot firmware. + + + sequential + basic + 4096 + 65536 + 0 + 0x8 + 0 + SMDFILE + **Required.** Slot A; contains slot status for A/B boot and A/B + update. + + + sequential + basic + 4096 + 65536 + 0 + 0x8 + 0 + SMDFILE + **Required.** Slot B; contains slot status for A/B boot and A/B + update. + + + sequential + basic + 196608 + 65536 + 0 + 8 + 0 + xusb_sil_rel_fw + **Required.** Slot A; contains XUSB module’s firmware file, making XUSB + a true USB 3.0 compliant host controller. + + + sequential + basic + 196608 + 0 + 8 + 0 + xusb_sil_rel_fw + **Required.** Slot B; contains XUSB module’s firmware file, making XUSB + a true USB 3.0 compliant host controller. + + + sequential + basic + 1441792 + 0 + 8 + 0 + TBCFILE + **Required.** Slot A; contains CBoot, the final boot stage CPU Bootloader + binary that loads the binary in the kernel partition. + + + sequential + basic + 1441792 + 0 + 8 + 0 + TBCFILE + **Required.** Slot B; contains CBoot, the final boot stage CPU Bootloader + binary that loads the binary in the kernel partition. + + + sequential + basic + 458752 + 0 + 8 + 0 + TBCDTB-FILE + **Required.** Slot A; contains Bootloader device tree blob + (DTB). + + + sequential + basic + 458752 + 0 + 8 + 0 + TBCDTB-FILE + **Required.** Slot B; contains Bootloader device tree blob + (DTB). + + + sequential + basic + 196608 + 0 + 0x8 + 0 + bmp.blob + **Optional.** Slot A; contains BMP images for splash screen display during + boot. + + + sequential + basic + 196608 + 0 + 0x8 + 0 + bmp.blob + **Optional.** Slot B; contains BMP images for splash screen display during + boot. + + + sequential + basic + 2621440 + 0 + 8 + 0 + TOSFILE + **Required.** Slot A; contains the trusted OS. + + + sequential + basic + 2621440 + 0 + 8 + 0 + TOSFILE + **Required.** Slot B; contains the trusted OS. + + + sequential + basic + 65536 + 0 + 8 + 0 + EKSFILE + **Optional.** Slot A; contains the encrypted keys. + + + sequential + basic + 65536 + 0 + 8 + 0 + EKSFILE + **Optional.** Slot B; contains the encrypted keys. + + + sequential + basic + 1048576 + 0 + 8 + 0 + adsp-fw.bin + **Required.** Slot A; contains ADSP software. + + + sequential + basic + 1048576 + 0 + 8 + 0 + adsp-fw.bin + **Required.** Slot B; contains ADSP software. + + + sequential + basic + 1048576 + 0 + 8 + 0 + CAMERAFW + **Required.** Slot A; contains `camera-rtcpu-rce` firmware. + + + sequential + basic + 1048576 + 0 + 8 + 0 + CAMERAFW + **Required.** Slot B; contains `camera-rtcpu-rce` firmware. + + + sequential + basic + 1048576 + 0 + 8 + 0 + + **Required.** Contains `camera-rtcpu-sce` firmware. + + + sequential + basic + 1048576 + 0 + 8 + 0 + + **Required.** Contains `camera-rtcpu-sce` firmware. + + + sequential + basic + 1572864 + 0 + 8 + 0 + BPFFILE + **Required.** Slot A; contains BPMP firmware. + + + sequential + basic + 1572864 + 0 + 8 + 0 + BPFFILE + **Required.** Slot B; contains BPMP firmware. + + + sequential + basic + 1048576 + 0 + 8 + 0 + BPFDTB_FILE + **Required.** Slot A; contains BPMP firmware device tree blob + (DTB). + + + sequential + basic + 1048576 + 0 + 8 + 0 + BPFDTB_FILE + **Required.** Slot B; contains BPMP firmware device tree blob + (DTB). + + + sequential + basic + 65536 + 0 + 0x8 + 0 + CBOOTOPTION_FILE + **Optional.** Contains boot device selection priority list. + + + sequential + basic + 65536 + 0 + 0x8 + 0 + CBOOTOPTION_FILE + **Optional.** Contains boot device selection priority list. + + + sequential + basic + 65536 + 0 + 0 + 8 + 0 + VERFILE + **Required.** Contains BSP version information. + + + sequential + basic + 65536 + 0 + 0 + 8 + 0 + VERFILE + **Required.** Contains a redundant copy of BSP version information. + + + sequential + basic + 0xFFFFFFFFFFFFFFFF + 0 + 8 + 0 + **Required.** Contains secondary GPT of the `spi` + device. + + + + + sequential + basic + 512 + 0 + 8 + 0 + **Required.** Contains protective MBR. + + + sequential + basic + 19968 + 0 + 8 + 0 + **Required.** Contains primary GPT of the `sdmmc_user` device. All + partitions defined after this entry are configured in the kernel, and are + accessible by standard partition tools such as gdisk and parted. + + + sequential + basic + APPSIZE + 0 + 0x8 + 4096 + 0 + APPFILE + APPUUID + **Required.** Contains the rootfs. This partition must be defined + after `primary_GPT` so that it can be accessed as the fixed known special device + `/dev/mmcblk0p1`. + + + sequential + basic + 67108864 + 0 + 8 + 0 + LNXFILE + **Required.** Slot A; contains U-Boot, which loads and launches the kernel + from the rootfs at `/boot`. + + + sequential + basic + 67108864 + 0 + 8 + 0 + LNXFILE + **Required.** Slot B; contains U-Boot, which loads and launches the kernel + from the rootfs at `/boot`. + + + sequential + basic + 458752 + 0 + 8 + 0 + DTB_FILE + **Required.** Slot A; contains kernel device tree blob. + + + sequential + basic + 458752 + 0 + 8 + 0 + DTB_FILE + **Required.** Slot B; contains kernel device tree blob. + + + sequential + basic + RECSIZE + 0 + 8 + 0 + RECFILE + **Required.** Contains recovery image. + + + sequential + basic + 524288 + 0 + 8 + 0 + RECDTB-FILE + **Required.** Contains recovery DTB image. + + + sequential + basic + 262144 + 0 + 8 + 0 + BOOTCTRL-FILE + **Required.** Slot A; contains boot control data. + + + sequential + basic + 262144 + 0 + 8 + 0 + BOOTCTRL-FILE + **Required.** Slot B; contains boot control data. + + + sequential + basic + RECROOTFSSIZE + 0 + 0x8 + 0 + **Optional.** Reserved for future use by the recovery filesystem; + removable. + + + sequential + basic + APPSIZE + 0 + 0x8 + 4096 + 0 + APPFILE + APPUUID + **Required.** Contains the rootfs. This partition must be defined + after `primary_GPT` so that it can be accessed as the fixed known special device + `/dev/mmcblk0p1`. + + + sequential + basic + 18432 + 0 + 0x808 + 0 + DATAFILE + **Required.** Automatically takes all remaining space on the device except that + occupied by the `secondary_gpt` partition. Allocation attribute must be set to 0x808. + May be mounted and used to store user data. + + + sequential + basic + 0xFFFFFFFFFFFFFFFF + 0 + 8 + 0 + **Required.** Contains secondary GPT of the `sdmmc_user` + device. + + + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit-tx2-nx/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit-tx2-nx/flash_mender.xml new file mode 100644 index 000000000..af6842185 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit-tx2-nx/flash_mender.xml @@ -0,0 +1,583 @@ + + + + + + + + sequential + basic + 32768 + 0 + 8 + 0 + **Required.** Contains Boot Configuration Table. + + + sequential + basic + 262144 + 0 + 8 + 0 + MB1FILE + **Required.** Slot A; contains NVIDIA signed MB1 binary. + + + sequential + basic + 262144 + 0 + 8 + 0 + MB1FILE + **Required.** Slot B; contains NVIDIA signed MB1 binary. + + + sequential + basic + 65536 + 0 + 8 + 0 + **Required.** Slot A; contains MB1 boot configuration table. + + + sequential + basic + 65536 + 0 + 8 + 0 + **Required.** Slot B; contains MB1 boot configuration table. + + + sequential + basic + 55296 + 0 + 8 + 0 + DRAMECCFILE + **Optional.** Contains DRAM-ECC firmware. + + + sequential + basic + 4608 + 0 + 8 + 0 + BADPAGEFILE + **Optional.** Slot A; contains badpage firmware. + + + sequential + basic + 4608 + 0 + 8 + 0 + BADPAGEFILE + **Optional.** Slot B; contains badpage firmware. + + + sequential + basic + 131072 + 0 + 8 + 0 + SPEFILE + **Required.** Slot A; contains BPMP SPE-FW binary. + + + sequential + basic + 131072 + 0 + 8 + 0 + SPEFILE + **Required.** Slot B; contains BPMP SPE-FW binary. + + + sequential + basic + 262144 + 0 + 8 + 0 + MB2FILE + **Required.** Slot A; contains TegraBoot binary. + + + sequential + basic + 262144 + 0 + 8 + 0 + MB2FILE + **Required.** Slot B; contains TegraBoot binary. + + + sequential + basic + 262144 + 0 + 8 + 0 + MPBFILE + **Required.** Slot A; contains Denver preboot firmware. + + + sequential + basic + 262144 + 0 + 8 + 0 + MPBFILE + **Required.** Slot B; contains Denver preboot firmware. + + + sequential + basic + 4096 + 0 + 0x8 + 0 + slot_metadata.bin + **Required.** Slot A; contains slot status for A/B boot and A/B + update. + + + sequential + basic + 4096 + 0 + 0x8 + 0 + slot_metadata.bin + **Required.** Slot B; contains slot status for A/B boot and A/B + update. + + + sequential + basic + 65536 + 0 + 0x8 + 0 + VERFILE + **Required.** Contains a redundant copy of BSP version information. + + + sequential + basic + 65536 + 0 + 0x8 + 0 + VERFILE + **Required.** Contains BSP version information. + + + sequential + basic + 0xFFFFFFFFFFFFFFFF + 0 + 8 + 0 + **Required.** Contains secondary GPT of the `sdmmc_boot` + device. + + + + + + sequential + basic + 512 + 0 + 8 + 0 + **Required.** Contains protective MBR. + + + sequential + basic + PPTSIZE + 0 + 8 + 0 + **Required.** Contains primary GPT of the `sdmmc_user` device. All + partitions defined after this entry are configured in the kernel, and are + accessible by standard partition tools such as gdisk and parted. + + + sequential + basic + APPSIZE + 0 + 0x8 + 0 + 4096 + APPFILE + **Required.** Contains the rootfs. This partition must be defined + after `primary_GPT` so that it can be accessed as the fixed known special device + `/dev/mmcblk0p1`. + + + sequential + basic + 4194304 + 0 + 8 + 0 + MBPFILE + **Required.** Slot A; contains Denver boot pack firmware. + + + sequential + basic + 4194304 + 0 + 8 + 0 + MBPFILE + **Required.** Slot B; contains Denver boot pack firmware. + + + sequential + basic + 524288 + 0 + 8 + 0 + TBCFILE + **Required.** Slot A; contains CBoot, the final boot stage CPU Bootloader + binary that loads the binary in kernel partition. + + + sequential + basic + 524288 + 0 + 8 + 0 + TBCFILE + **Required.** Slot B; contains CBoot, the final boot stage CPU Bootloader + binary that loads the binary in kernel partition. + + + sequential + basic + 524288 + 0 + 8 + 0 + TBCDTB-FILE + **Required.** Slot A; contains Bootloader device tree blob (DTB). + + + sequential + basic + 524288 + 0 + 8 + 0 + TBCDTB-FILE + **Required.** Slot B; contains Bootloader device tree blob (DTB). + + + sequential + basic + 3145728 + 0 + 8 + 0 + TOSFILE + **Required.** Slot A; contains the trusted OS. + + + sequential + basic + 3145728 + 0 + 8 + 0 + TOSFILE + **Required.** Slot B; contains the trusted OS. + + + sequential + basic + 2097152 + 0 + 8 + 0 + EKSFILE + **Optional.** Contains the encrypted keys. + + + sequential + basic + 4194304 + 0 + 8 + 0 + adsp-fw.bin + **Required.** Slot A; contains ADSP software. + + + sequential + basic + 4194304 + 0 + 8 + 0 + adsp-fw.bin + **Required.** Slot B; contains ADSP software. + + + sequential + basic + 618144 + 0 + 8 + 0 + BPFFILE + **Required.** Slot A; contains BPMP firmware. + + + sequential + basic + 618144 + 0 + 8 + 0 + BPFFILE + **Required.** Slot B; contains BPMP firmware. + + + sequential + basic + 1048576 + 0 + 8 + 0 + BPFDTB-FILE + **Required.** Slot A; contains BPMP firmware device tree blob + (DTB). + + + sequential + basic + 1048576 + 0 + 8 + 0 + BPFDTB-FILE + **Required.** Slot B; contains BPMP firmware device tree blob + (DTB). + + + sequential + basic + 2097152 + 0 + 8 + 0 + SCEFILE + **Required.** Slot A; contains `camera-rtcpu-sce` firmware. + + + sequential + basic + 2097152 + 0 + 8 + 0 + SCEFILE + **Required.** Slot B; contains `camera-rtcpu-sce` firmware. + + + sequential + basic + 6291456 + 0 + 8 + 0 + WB0FILE + **Required.** Slot A; contains warm boot binary. + + + sequential + basic + 6291456 + 0 + 8 + 0 + WB0FILE + **Required.** Slot B; contains warm boot binary. + + + sequential + basic + 2097152 + 0 + 0x8 + 0 + FBFILE + **Optional.** Reserved for future use; removable. + + + sequential + basic + 134217728 + 0 + 0x8 + 0 + bmp.blob + **Optional.** Slot A; contains BMP images for splash screen + display during boot. + + + sequential + basic + 134217728 + 0 + 0x8 + 0 + bmp.blob + **Optional.** Slot B; contains BMP images for splash screen + display during boot. + + + sequential + basic + RECSIZE + 0 + 8 + 0 + RECFILE + **Required.** Contains recovery image. + + + sequential + basic + 524288 + 0 + 8 + 0 + RECDTB-FILE + **Required.** Contains recovery DTB image. + + + sequential + basic + 262144 + 0 + 8 + 0 + BOOTCTRL-FILE + **Required.** Slot A; contains boot control data. + + + sequential + basic + 262144 + 0 + 8 + 0 + BOOTCTRL-FILE + **Required.** Slot B; contains boot control data. + + + sequential + basic + LNXSIZE + 0 + 8 + 0 + LNXFILE + **Required.** Slot A; contains U-Boot, which loads and launches the kernel + from the rootfs at `/boot`. + + + sequential + basic + LNXSIZE + 0 + 8 + 0 + LNXFILE + **Required.** Slot B; contains U-Boot, which loads and launches the kernel + from the rootfs at `/boot`. + + + sequential + basic + 524288 + 0 + 8 + 0 + KERNELDTB-FILE + **Required.** Slot A; contains kernel device tree blob. + + + sequential + basic + 524288 + 0 + 8 + 0 + KERNELDTB-FILE + **Required.** Slot B; contains kernel device tree blob. + + + sequential + basic + 104857600 + 0 + 0x8 + 0 + **Optional.** Reserved for future use by the recovery filesystem; + removable. + + + sequential + basic + APPSIZE + 0 + 0x8 + 0 + 4096 + APPFILE + + + sequential + basic + 18432 + 0 + 0x808 + DATAFILE + 0 + **Required.** Automatically takes all remaining space on the device except that + occupied by the `secondary_gpt` partition. Allocation attribute must be set to 0x808. + May be mounted and used to store user data. + + + sequential + basic + 0xFFFFFFFFFFFFFFFF + 0 + 8 + 0 + **Required.** Contains secondary GPT of the `sdmmc_user` + device. + + + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit/flash_mender.xml new file mode 100644 index 000000000..b87219058 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-xavier-nx-devkit/flash_mender.xml @@ -0,0 +1,665 @@ + + + + sequential + basic + 131072 + 0 + 8 + 0 + **Required.** Contains Boot Configuration Table (BCT). + + + sequential + basic + 262144 + 0 + 8 + 0 + MB1FILE + **Required.** Slot A; contains NVIDIA signed MB1 binary. + + + sequential + basic + 262144 + 0 + 8 + 0 + MB1FILE + **Required.** Slot B; contains NVIDIA signed MB1 binary. + + + sequential + basic + 65536 + 0 + 8 + 0 + **Required.** Slot A; contains MB1 boot configuration table. + + + sequential + basic + 65536 + 0 + 8 + 0 + **Required.** Slot B; contains MB1 boot configuration table. + + + sequential + basic + 262144 + 0 + 8 + 0 + **Required.** Slot A; contains memory configuration table. + + + sequential + basic + 262144 + 0 + 8 + 0 + **Required.** Slot B; contains memory configuration table. + + + sequential + basic + 262144 + 0 + 8 + 0 + SPEFILE + **Required.** Slot A; contains BPMP SPE-FW binary. + + + sequential + basic + 262144 + 0 + 8 + 0 + SPEFILE + **Required.** Slot B; contains BPMP SPE-FW binary. + + + sequential + basic + 262144 + 0 + 8 + 0 + TEGRABOOT + **Required.** Slot A; contains TegraBoot binary. + + + sequential + basic + 262144 + 0 + 8 + 0 + TEGRABOOT + **Required.** Slot B; contains TegraBoot binary. + + + sequential + basic + 65536 + 0 + 8 + 0 + MTSPREBOOT + **Required.** Slot A; contains Denver preboot firmware. + + + sequential + basic + 65536 + 0 + 8 + 0 + MTSPREBOOT + **Required.** Slot B; contains Denver preboot firmware. + + + + sequential + basic + 196608 + 0 + 8 + 0 + MTS_MCE + **Required.** Slot A; contains microcode associated with boot, power management, + and clocks. + + + sequential + basic + 196608 + 0 + 8 + 0 + MTS_MCE + **Required.** Slot B; contains microcode associated with boot, power management, + and clocks. + + + sequential + basic + 4194304 + 0 + 8 + 0 + MTSPROPER + **Required.** Slot A; contains microcode associated with execution + and optimization of ARM code. + + + sequential + basic + 4194304 + 0 + 8 + 0 + MTSPROPER + **Required.** Slot B; contains microcode associated with execution + and optimization of ARM code. + + + sequential + basic + 131072 + 0 + 8 + 0 + WB0BOOT + **Required.** Slot A; contains warm boot firmware. + + + sequential + basic + 131072 + 0 + 8 + 0 + WB0BOOT + **Required.** Slot B; contains warm boot firmware. + + + sequential + basic + 4096 + 65536 + 0 + 0x8 + 0 + SMDFILE + **Required.** Slot A; contains slot status for A/B boot and A/B + update. + + + sequential + basic + 4096 + 65536 + 0 + 0x8 + 0 + SMDFILE + **Required.** Slot B; contains slot status for A/B boot and A/B + update. + + + sequential + basic + 196608 + 65536 + 0 + 8 + 0 + xusb_sil_rel_fw + **Required.** Slot A; contains XUSB module’s firmware file, making XUSB + a true USB 3.0 compliant host controller. + + + sequential + basic + 196608 + 0 + 8 + 0 + xusb_sil_rel_fw + **Required.** Slot B; contains XUSB module’s firmware file, making XUSB + a true USB 3.0 compliant host controller. + + + sequential + basic + 1441792 + 0 + 8 + 0 + TBCFILE + **Required.** Slot A; contains CBoot, the final boot stage CPU Bootloader + binary that loads the binary in the kernel partition. + + + sequential + basic + 1441792 + 0 + 8 + 0 + TBCFILE + **Required.** Slot B; contains CBoot, the final boot stage CPU Bootloader + binary that loads the binary in the kernel partition. + + + sequential + basic + 458752 + 0 + 8 + 0 + TBCDTB-FILE + **Required.** Slot A; contains Bootloader device tree blob + (DTB). + + + sequential + basic + 458752 + 0 + 8 + 0 + TBCDTB-FILE + **Required.** Slot B; contains Bootloader device tree blob + (DTB). + + + sequential + basic + 196608 + 0 + 0x8 + 0 + bmp.blob + **Optional.** Slot A; contains BMP images for splash screen display during + boot. + + + sequential + basic + 196608 + 0 + 0x8 + 0 + bmp.blob + **Optional.** Slot B; contains BMP images for splash screen display during + boot. + + + sequential + basic + 2621440 + 0 + 8 + 0 + TOSFILE + **Required.** Slot A; contains the trusted OS. + + + sequential + basic + 2621440 + 0 + 8 + 0 + TOSFILE + **Required.** Slot B; contains the trusted OS. + + + sequential + basic + 65536 + 0 + 8 + 0 + EKSFILE + **Optional.** Slot A; contains the encrypted keys. + + + sequential + basic + 65536 + 0 + 8 + 0 + EKSFILE + **Optional.** Slot B; contains the encrypted keys. + + + sequential + basic + 1048576 + 0 + 8 + 0 + adsp-fw.bin + **Required.** Slot A; contains ADSP software. + + + sequential + basic + 1048576 + 0 + 8 + 0 + adsp-fw.bin + **Required.** Slot B; contains ADSP software. + + + sequential + basic + 1048576 + 0 + 8 + 0 + CAMERAFW + **Required.** Slot A; contains `camera-rtcpu-rce` firmware. + + + sequential + basic + 1048576 + 0 + 8 + 0 + CAMERAFW + **Required.** Slot B; contains `camera-rtcpu-rce` firmware. + + + sequential + basic + 1048576 + 0 + 8 + 0 + + **Required.** Contains `camera-rtcpu-sce` firmware. + + + sequential + basic + 1048576 + 0 + 8 + 0 + + **Required.** Contains `camera-rtcpu-sce` firmware. + + + sequential + basic + 1572864 + 0 + 8 + 0 + BPFFILE + **Required.** Slot A; contains BPMP firmware. + + + sequential + basic + 1572864 + 0 + 8 + 0 + BPFFILE + **Required.** Slot B; contains BPMP firmware. + + + sequential + basic + 1048576 + 0 + 8 + 0 + BPFDTB_FILE + **Required.** Slot A; contains BPMP firmware device tree blob + (DTB). + + + sequential + basic + 1048576 + 0 + 8 + 0 + BPFDTB_FILE + **Required.** Slot B; contains BPMP firmware device tree blob + (DTB). + + + sequential + basic + 65536 + 0 + 0x8 + 0 + CBOOTOPTION_FILE + **Optional.** Contains boot device selection priority list. + + + sequential + basic + 65536 + 0 + 0x8 + 0 + CBOOTOPTION_FILE + **Optional.** Contains boot device selection priority list. + + + sequential + basic + 65536 + 0 + 0 + 8 + 0 + VERFILE + **Required.** Contains BSP version information. + + + sequential + basic + 65536 + 0 + 0 + 8 + 0 + VERFILE + **Required.** Contains a redundant copy of BSP version information. + + + sequential + basic + 0xFFFFFFFFFFFFFFFF + 0 + 8 + 0 + **Required.** Contains secondary GPT of the `spi` + device. + + + + + sequential + basic + 512 + 0 + 8 + 0 + **Required.** Contains protective MBR. + + + sequential + basic + 19968 + 0 + 8 + 0 + **Required.** Contains primary GPT of the `sdcard` device. All + partitions defined after this entry are configured in the kernel, and are + accessible by standard partition tools such as gdisk and parted. + + + sequential + basic + APPSIZE + 0 + 0x8 + 4096 + 0 + APPFILE + APPUUID + **Required.** Contains the rootfs. This partition must be defined + after `primary_GPT` so that it can be accessed as the fixed known special device + `/dev/mmcblk0p1`. + + + sequential + basic + 67108864 + 0 + 8 + 0 + LNXFILE + **Required.** Slot A; contains U-Boot, which loads and launches the kernel + from the rootfs at `/boot`. + + + sequential + basic + 67108864 + 0 + 8 + 0 + LNXFILE + **Required.** Slot B; contains U-Boot, which loads and launches the kernel + from the rootfs at `/boot`. + + + sequential + basic + 458752 + 0 + 8 + 0 + DTB_FILE + **Required.** Slot A; contains kernel device tree blob. + + + sequential + basic + 458752 + 0 + 8 + 0 + DTB_FILE + **Required.** Slot B; contains kernel device tree blob. + + + sequential + basic + RECSIZE + 0 + 8 + 0 + RECFILE + **Required.** Contains recovery image. + + + sequential + basic + 524288 + 0 + 8 + 0 + RECDTB-FILE + **Required.** Contains recovery DTB image. + + + sequential + basic + 262144 + 0 + 8 + 0 + BOOTCTRL-FILE + **Required.** Slot A; contains boot control data. + + + sequential + basic + 262144 + 0 + 8 + 0 + BOOTCTRL-FILE + **Required.** Slot B; contains boot control data. + + + sequential + basic + RECROOTFSSIZE + 0 + 0x8 + 0 + **Optional.** Reserved for future use by the recovery filesystem; + removable. + + + sequential + basic + APPSIZE + 0 + 0x8 + 4096 + 0 + APPFILE + APPUUID + **Required.** Contains the rootfs. This partition must be defined + after `primary_GPT` so that it can be accessed as the fixed known special device + `/dev/mmcblk0p1`. + + + sequential + basic + 18432 + 0 + 0x808 + 0 + DATAFILE + **Required.** Automatically takes all remaining space on the device except that + occupied by the `secondary_gpt` partition. Allocation attribute must be set to 0x808. + May be mounted and used to store user data. + + + sequential + basic + 0xFFFFFFFFFFFFFFFF + 0 + 8 + 0 + **Required.** Contains secondary GPT of the `sdcard` + device. + + + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra186/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra186/flash_mender.xml new file mode 100644 index 000000000..a4da8ee47 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra186/flash_mender.xml @@ -0,0 +1,583 @@ + + + + + + + + sequential + basic + 32768 + 0 + 8 + 0 + **Required.** Contains Boot Configuration Table. + + + sequential + basic + 262144 + 0 + 8 + 0 + MB1FILE + **Required.** Slot A; contains NVIDIA signed MB1 binary. + + + sequential + basic + 262144 + 0 + 8 + 0 + MB1FILE + **Required.** Slot B; contains NVIDIA signed MB1 binary. + + + sequential + basic + 65536 + 0 + 8 + 0 + **Required.** Slot A; contains MB1 boot configuration table. + + + sequential + basic + 65536 + 0 + 8 + 0 + **Required.** Slot B; contains MB1 boot configuration table. + + + sequential + basic + 55296 + 0 + 8 + 0 + DRAMECCFILE + **Optional.** Contains DRAM-ECC firmware. + + + sequential + basic + 4608 + 0 + 8 + 0 + BADPAGEFILE + **Optional.** Slot A; contains badpage firmware. + + + sequential + basic + 4608 + 0 + 8 + 0 + BADPAGEFILE + **Optional.** Slot B; contains badpage firmware. + + + sequential + basic + 131072 + 0 + 8 + 0 + SPEFILE + **Required.** Slot A; contains BPMP SPE-FW binary. + + + sequential + basic + 131072 + 0 + 8 + 0 + SPEFILE + **Required.** Slot B; contains BPMP SPE-FW binary. + + + sequential + basic + 262144 + 0 + 8 + 0 + MB2FILE + **Required.** Slot A; contains TegraBoot binary. + + + sequential + basic + 262144 + 0 + 8 + 0 + MB2FILE + **Required.** Slot B; contains TegraBoot binary. + + + sequential + basic + 262144 + 0 + 8 + 0 + MPBFILE + **Required.** Slot A; contains Denver preboot firmware. + + + sequential + basic + 262144 + 0 + 8 + 0 + MPBFILE + **Required.** Slot B; contains Denver preboot firmware. + + + sequential + basic + 4096 + 0 + 0x8 + 0 + SMDFILE + **Required.** Slot A; contains slot status for A/B boot and A/B + update. + + + sequential + basic + 4096 + 0 + 0x8 + 0 + SMDFILE + **Required.** Slot B; contains slot status for A/B boot and A/B + update. + + + sequential + basic + 65536 + 0 + 0x8 + 0 + VERFILE + **Required.** Contains a redundant copy of BSP version information. + + + sequential + basic + 65536 + 0 + 0x8 + 0 + VERFILE + **Required.** Contains BSP version information. + + + sequential + basic + 0xFFFFFFFFFFFFFFFF + 0 + 8 + 0 + **Required.** Contains secondary GPT of the `sdmmc_boot` + device. + + + + + + sequential + basic + 512 + 0 + 8 + 0 + **Required.** Contains protective MBR. + + + sequential + basic + PPTSIZE + 0 + 8 + 0 + **Required.** Contains primary GPT of the `sdmmc_user` device. All + partitions defined after this entry are configured in the kernel, and are + accessible by standard partition tools such as gdisk and parted. + + + sequential + basic + APPSIZE + 0 + 0x8 + 0 + 4096 + APPFILE + **Required.** Contains the rootfs. This partition must be defined + after `primary_GPT` so that it can be accessed as the fixed known special device + `/dev/mmcblk0p1`. + + + sequential + basic + 4194304 + 0 + 8 + 0 + MBPFILE + **Required.** Slot A; contains Denver boot pack firmware. + + + sequential + basic + 4194304 + 0 + 8 + 0 + MBPFILE + **Required.** Slot B; contains Denver boot pack firmware. + + + sequential + basic + 524288 + 0 + 8 + 0 + TBCFILE + **Required.** Slot A; contains CBoot, the final boot stage CPU Bootloader + binary that loads the binary in kernel partition. + + + sequential + basic + 524288 + 0 + 8 + 0 + TBCFILE + **Required.** Slot B; contains CBoot, the final boot stage CPU Bootloader + binary that loads the binary in kernel partition. + + + sequential + basic + 524288 + 0 + 8 + 0 + TBCDTB-FILE + **Required.** Slot A; contains Bootloader device tree blob (DTB). + + + sequential + basic + 524288 + 0 + 8 + 0 + TBCDTB-FILE + **Required.** Slot B; contains Bootloader device tree blob (DTB). + + + sequential + basic + 3145728 + 0 + 8 + 0 + TOSFILE + **Required.** Slot A; contains the trusted OS. + + + sequential + basic + 3145728 + 0 + 8 + 0 + TOSFILE + **Required.** Slot B; contains the trusted OS. + + + sequential + basic + 2097152 + 0 + 8 + 0 + EKSFILE + **Optional.** Contains the encrypted keys. + + + sequential + basic + 4194304 + 0 + 8 + 0 + adsp-fw.bin + **Required.** Slot A; contains ADSP software. + + + sequential + basic + 4194304 + 0 + 8 + 0 + adsp-fw.bin + **Required.** Slot B; contains ADSP software. + + + sequential + basic + 618144 + 0 + 8 + 0 + BPFFILE + **Required.** Slot A; contains BPMP firmware. + + + sequential + basic + 618144 + 0 + 8 + 0 + BPFFILE + **Required.** Slot B; contains BPMP firmware. + + + sequential + basic + 1048576 + 0 + 8 + 0 + BPFDTB-FILE + **Required.** Slot A; contains BPMP firmware device tree blob + (DTB). + + + sequential + basic + 1048576 + 0 + 8 + 0 + BPFDTB-FILE + **Required.** Slot B; contains BPMP firmware device tree blob + (DTB). + + + sequential + basic + 2097152 + 0 + 8 + 0 + SCEFILE + **Required.** Slot A; contains `camera-rtcpu-sce` firmware. + + + sequential + basic + 2097152 + 0 + 8 + 0 + SCEFILE + **Required.** Slot B; contains `camera-rtcpu-sce` firmware. + + + sequential + basic + 6291456 + 0 + 8 + 0 + WB0FILE + **Required.** Slot A; contains warm boot binary. + + + sequential + basic + 6291456 + 0 + 8 + 0 + WB0FILE + **Required.** Slot B; contains warm boot binary. + + + sequential + basic + 2097152 + 0 + 0x8 + 0 + FBFILE + **Optional.** Reserved for future use; removable. + + + sequential + basic + 134217728 + 0 + 0x8 + 0 + bmp.blob + **Optional.** Slot A; contains BMP images for splash screen + display during boot. + + + sequential + basic + 134217728 + 0 + 0x8 + 0 + bmp.blob + **Optional.** Slot B; contains BMP images for splash screen + display during boot. + + + sequential + basic + RECSIZE + 0 + 8 + 0 + RECFILE + **Required.** Contains recovery image. + + + sequential + basic + 524288 + 0 + 8 + 0 + RECDTB-FILE + **Required.** Contains recovery DTB image. + + + sequential + basic + 262144 + 0 + 8 + 0 + BOOTCTRL-FILE + **Required.** Slot A; contains boot control data. + + + sequential + basic + 262144 + 0 + 8 + 0 + BOOTCTRL-FILE + **Required.** Slot B; contains boot control data. + + + sequential + basic + LNXSIZE + 0 + 8 + 0 + LNXFILE + **Required.** Slot A; contains U-Boot, which loads and launches the kernel + from the rootfs at `/boot`. + + + sequential + basic + LNXSIZE + 0 + 8 + 0 + LNXFILE + **Required.** Slot B; contains U-Boot, which loads and launches the kernel + from the rootfs at `/boot`. + + + sequential + basic + 524288 + 0 + 8 + 0 + KERNELDTB-FILE + **Required.** Slot A; contains kernel device tree blob. + + + sequential + basic + 524288 + 0 + 8 + 0 + KERNELDTB-FILE + **Required.** Slot B; contains kernel device tree blob. + + + sequential + basic + 314572800 + 0 + 0x8 + 0 + **Optional.** Reserved for future use by the recovery filesystem; + removable. + + + sequential + basic + APPSIZE + 0 + 0x8 + 0 + 4096 + APPFILE + + + sequential + basic + 18432 + 0 + 0x808 + DATAFILE + 0 + **Required.** Automatically takes all remaining space on the device except that + occupied by the `secondary_gpt` partition. Allocation attribute must be set to 0x808. + May be mounted and used to store user data. + + + sequential + basic + 0xFFFFFFFFFFFFFFFF + 0 + 8 + 0 + **Required.** Contains secondary GPT of the `sdmmc_user` + device. + + + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra194/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra194/flash_mender.xml new file mode 100644 index 000000000..2955c590f --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra194/flash_mender.xml @@ -0,0 +1,665 @@ + + + + + + + + sequential + basic + 32768 + 0 + 8 + 0 + **Required.** Contains Boot Configuration Table (BCT). + + + sequential + basic + 262144 + 0 + 8 + 0 + MB1FILE + **Required.** Slot A; contains NVIDIA signed MB1 binary. + + + sequential + basic + 262144 + 0 + 8 + 0 + MB1FILE + **Required.** Slot B; contains NVIDIA signed MB1 binary. + + + sequential + basic + 65536 + 0 + 8 + 0 + **Required.** Slot A; contains MB1 boot configuration table. + + + sequential + basic + 65536 + 0 + 8 + 0 + **Required.** Slot B; contains MB1 boot configuration table. + + + sequential + basic + 229376 + 0 + 8 + 0 + **Required.** Slot A; contains memory configuration table. + + + sequential + basic + 229376 + 0 + 8 + 0 + **Required.** Slot B; contains memory configuration table. + + + sequential + basic + 262144 + 0 + 8 + 0 + SPEFILE + **Required.** Slot A; contains BPMP SPE-FW binary. + + + sequential + basic + 262144 + 0 + 8 + 0 + SPEFILE + **Required.** Slot B; contains BPMP SPE-FW binary. + + + sequential + basic + 229376 + 0 + 8 + 0 + TEGRABOOT + **Required.** Slot A; contains TegraBoot binary. + + + sequential + basic + 229376 + 0 + 8 + 0 + TEGRABOOT + **Required.** Slot B; contains TegraBoot binary. + + + sequential + basic + 32768 + 0 + 8 + 0 + MTSPREBOOT + **Required.** Slot A; contains Denver preboot firmware. + + + sequential + basic + 32768 + 0 + 8 + 0 + MTSPREBOOT + **Required.** Slot B; contains Denver preboot firmware. + + + sequential + basic + 4096 + 0 + 0x8 + 0 + SMDFILE + **Required.** Slot A; contains slot status for A/B boot and A/B + update. + + + sequential + basic + 4096 + 0 + 0x8 + 0 + SMDFILE + **Required.** Slot B; contains slot status for A/B boot and A/B + update. + + + sequential + basic + 65536 + 0 + 0x8 + 0 + VERFILE + **Required.** Contains a redundant copy of BSP version information. + + + sequential + basic + 65536 + 0 + 0x8 + 0 + VERFILE + **Required.** Contains BSP version information. + + + sequential + basic + 0xFFFFFFFFFFFFFFFF + 0 + 8 + 0 + **Required.** Contains secondary GPT of the `sdmmc_boot` + device. + + + + + + sequential + basic + 512 + 0 + 8 + 0 + **Required.** Contains protective MBR. + + + sequential + basic + 19968 + 0 + 8 + 0 + **Required.** Contains primary GPT of the `sdmmc_user` device. All + partitions defined after this entry are configured in the kernel, and are accessible + by standard partition tools such as gdisk and parted. + + + sequential + basic + APPSIZE + 0 + 0x8 + 4096 + 0 + APPFILE + **Required.** Contains the rootfs. This partition must be defined after + `primary_gpt` so it can be accessed as the fixed known special device + `/dev/mmcblk0p1`. + + + sequential + basic + 163840 + 0 + 8 + 0 + MTS_MCE + **Required.** Slot A; contains microcode associated with boot, power management, + and clocks. + + + sequential + basic + 163840 + 0 + 8 + 0 + MTS_MCE + **Required.** Slot B; contains microcode associated with boot, + power management, and clocks. + + + sequential + basic + 4194304 + 0 + 8 + 0 + MTSPROPER + **Required.** Slot A; contains microcode associated with execution + and optimization of ARM code. + + + sequential + basic + 4194304 + 0 + 8 + 0 + MTSPROPER + **Required.** Slot B; contains microcode associated with execution + and optimization of ARM code. + + + sequential + basic + 1409024 + 0 + 8 + 0 + TBCFILE + **Required.** Slot A; contains CBoot, the final boot stage CPU Bootloader + binary that loads the binary in the kernel partition. + + + sequential + basic + 1409024 + 0 + 8 + 0 + TBCFILE + **Required.** Slot B; contains CBoot, the final boot stage CPU Bootloader + binary that loads the binary in the kernel partition. + + + sequential + basic + 524288 + 0 + 8 + 0 + TBCDTB-FILE + **Required.** Slot A; contains Bootloader device tree blob + (DTB). + + + sequential + basic + 524288 + 0 + 8 + 0 + TBCDTB-FILE + **Required.** Slot B; contains Bootloader device tree blob + (DTB). + + + sequential + basic + 2621440 + 0 + 8 + 0 + TOSFILE + **Required.** Slot A; contains the trusted OS. + + + sequential + basic + 2621440 + 0 + 8 + 0 + TOSFILE + **Required.** Slot B; contains the trusted OS. + + + sequential + basic + 65536 + 0 + 8 + 0 + EKSFILE + **Optional.** Slot A; contains the encrypted keys. + + + sequential + basic + 65536 + 0 + 8 + 0 + EKSFILE + **Optional.** Slot B; contains the encrypted keys. + + + sequential + basic + 1572864 + 0 + 8 + 0 + BPFFILE + **Required.** Slot A; contains BPMP firmware. + + + sequential + basic + 1572864 + 0 + 8 + 0 + BPFFILE + **Required.** Slot B; contains BPMP firmware. + + + sequential + basic + 1048576 + 0 + 8 + 0 + BPFDTB_FILE + **Required.** Slot A; contains BPMP firmware device tree blob + (DTB). + + + sequential + basic + 1048576 + 0 + 8 + 0 + BPFDTB_FILE + **Required.** Slot B; contains BPMP firmware device tree blob + (DTB). + + + sequential + basic + 163840 + 0 + 8 + 0 + xusb_sil_rel_fw + **Required.** Slot A; contains XUSB module’s firmware file, making XUSB + a true USB 3.0 compliant host controller. + + + sequential + basic + 163840 + 0 + 8 + 0 + xusb_sil_rel_fw + **Required.** Slot B; contains XUSB module’s firmware file, making XUSB + a true USB 3.0 compliant host controller. + + + sequential + basic + 1048576 + 0 + 8 + 0 + CAMERAFW + **Required.** Slot A; contains `camera-rtcpu-rce` firmware. + + + sequential + basic + 1048576 + 0 + 8 + 0 + CAMERAFW + **Required.** Slot B; contains `camera-rtcpu-rce` firmware. + + + sequential + basic + 2097152 + 0 + 8 + 0 + adsp-fw.bin + **Required.** Slot A; contains ADSP software. + + + sequential + basic + 2097152 + 0 + 8 + 0 + adsp-fw.bin + **Required.** Slot B; contains ADSP software. + + + sequential + basic + 1048576 + 0 + 8 + 0 + **Required.** Contains `camera-rtcpu-sce` firmware. + + + sequential + basic + 1048576 + 0 + 8 + 0 + **Required.** Slot B; contains `camera-rtcpu-sce` firmware. + + + sequential + basic + 131072 + 0 + 8 + 0 + WB0BOOT + **Required.** Slot A; contains warm boot firmware. + + + sequential + basic + 131072 + 0 + 8 + 0 + WB0BOOT + **Required.** Slot B; contains warm boot firmware. + + + sequential + basic + 134217728 + 0 + 0x8 + 0 + bmp.blob + **Optional.** Slot A; contains BMP images for splash screen display during + boot. + + + sequential + basic + 134217728 + 0 + 0x8 + 0 + bmp.blob + **Optional.** Slot B; contains BMP images for splash screen display during + boot. + + + sequential + basic + RECSIZE + 0 + 8 + 0 + RECFILE + **Optional.** Reserved for future use by the recovery image; removable + + + sequential + basic + 524288 + 0 + 8 + 0 + RECDTB-FILE + **Optional.** Reserved for future use by the recovery DTB image; removable + + + sequential + basic + 65536 + 0 + 8 + 0 + BOOTCTRL-FILE + **Optional.** Slot A; reserved for future use by boot control data; removable + + + sequential + basic + 65536 + 0 + 8 + 0 + BOOTCTRL-FILE + **Optional.** Slot B; reserved for future use by boot control data; removable + + + sequential + basic + LNXSIZE + 0 + 8 + 0 + LNXFILE + **Required.** Slot A; contains the Linux kernel. + + + sequential + basic + LNXSIZE + 0 + 8 + 0 + LNXFILE + **Required.** Slot B; contains the Linux kernel. + + + sequential + basic + 524288 + 0 + 8 + 0 + DTB_FILE + **Required.** Slot A; contains kernel device tree blob. + + + sequential + basic + 524288 + 0 + 8 + 0 + DTB_FILE + **Required.** Slot B; contains kernel device tree blob. + + + sequential + basic + 4096 + 0 + 0x8 + 0 + CBOOTOPTION_FILE + **Optional.** Contains boot device selection priority list. + + + sequential + basic + 8388608 + 0 + 0x8 + 0 + **Optional.** A reserved partition. May be mounted and used to store user + data. + + + sequential + basic + 8388608 + 0 + 0x8 + 0 + **Optional.** A reserved partition. May be mounted and used to store user + data. + + + sequential + basic + 314572800 + 0 + 0x8 + 0 + **Optional.** Reserved for future use by the recovery filesystem; + removable. + + + sequential + basic + APPSIZE + 0 + 0x8 + 4096 + 0 + APPFILE + + + sequential + basic + 0 + 0x808 + 0 + 4096 + DATAFILE + **Required.** Automatically takes all remaining space on the device except space + occupied by `secondary_gpt`. Allocation attribute must be set to 0x808. This + partition may be mounted and used to store user data. + + + sequential + basic + 0xFFFFFFFFFFFFFFFF + 0 + 8 + 0 + **Required.** Contains secondary GPT of the `sdmmc_user` + device. + + + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra210/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra210/flash_mender.xml new file mode 100644 index 000000000..612551e0c --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra210/flash_mender.xml @@ -0,0 +1,441 @@ + + + + + + + + sequential + basic + 1048576 + 8 + **Required.** Contains Boot Configuration Table (BCT). + + + + sequential + basic + 376832 + 8 + NVCFILE + **Required.** Contains TegraBoot binary. + + + + sequential + basic + 131072 + 8 + flash.xml.bin + **Required.** Contains Partition Table. + + + + sequential + basic + 196608 + 8 + TBCFILE + **Required.** Contains TegraBoot CPU-side binary. + + + + sequential + basic + 1048576 + 8 + DTBFILE + **Required.** Contains Bootloader DTB binary. + + + + sequential + basic + 999424 + 8 + EBTFILE + **Required.** Contains CBoot, the final boot stage CPU bootloader binary + that loads the binary in the kernel partition. + + + + sequential + basic + 131072 + 8 + WB0FILE + **Required.** Contains warm boot binary. + + + + sequential + basic + 262144 + 8 + BPFFILE + **Required.** Contains SC7 entry firmware. + + + + sequential + basic + 376832 + 8 + NVCFILE + **Required.** Contains a redundant copy of the + TegraBoot binary. + + + + sequential + basic + 131072 + 8 + flash.xml.bin + **Required.** Contains a redundant copy of the + Partition Table. + + + + sequential + basic + 196608 + 8 + TBCFILE + **Required.** Contains a redundant copy of TegraBoot CPU-side + binary. + + + + sequential + basic + 1048576 + 8 + DTBFILE + **Required.** Contains a redundant copy of the Bootloader DTB + binary. + + + + sequential + basic + 999424 + 8 + EBTFILE + **Required.** Contains a redundant copy of CBoot, the final boot stage + CPU bootloader binary. + + + + sequential + basic + 131072 + 8 + WB0FILE + **Required.** Contains a redundant copy of warm boot + binary. + + + + sequential + basic + 262144 + 8 + BPFFILE + **Required.** Contains a redundant copy of the SC7 + entry firmware. + + + + + sequential + basic + 917504 + 0 + 8 + 0 + **Required.** Empty padding. + + + + sequential + basic + 65536 + 0 + 0 + 8 + 0 + VERFILE + **Required.** Contains a redundant copy of BSP version + information. + + + + sequential + basic + 65536 + 0 + 0 + 8 + 0 + VERFILE + **Required.** Contains BSP version information. + + + + + + sequential + basic + 2097152 + 8 + **Required.** Contains primary GPT of the `sdmmc_user` device. All + partitions defined after this entry are configured in the kernel, and are + accessible by standard partition tools such as gdisk and parted. + + + + sequential + basic + APPSIZE + 8 + APPFILE + **Required.** Contains the rootfs. This partition must be defined after + `primary_GPT` so that it can be accessed as the fixed known special device + `/dev/mmcblk0p1`. + + + + sequential + basic + 1048576 + 8 + DTBFILE + **Required.** Contains kernel DTB binary. + + + + sequential + basic + 6291456 + 8 + TOSFILE + **Required.** Contains TOS binary. + + + + sequential + basic + 81920 + 8 + EKSFILE + **Optional.** Contains the encrypted keys. + + + + sequential + basic + 67092480 + 8 + LNXFILE + **Required.** Contains U-Boot, which loads and launches the kernel + from the rootfs at `/boot`. + + + + sequential + basic + 1048576 + 8 + DTBFILE + **Required.** Contains a redundant copy of the kKernel DTB + binary. + + + + sequential + basic + 6291456 + 8 + TOSFILE + **Required.** Contains a redundant copy of the TOS binary. + + + + sequential + basic + 81920 + 8 + EKSFILE + **Optional.** Contains a redundant copy of the encrypted + keys. + + + + sequential + basic + 67092480 + 8 + LNXFILE + **Required.** Contains a redundant copy of U-Boot, which loads and + launches the kernel from the rootfs at `/boot`. + + + + sequential + basic + 196608 + 8 + bmp.blob + **Optional.** Contains BMP images for the splash screen display + during boot. + + + + sequential + basic + 262144 + 8 + rp4.blob + **Required.** Contains XUSB module’s firmware file, making XUSB a true + USB 3.0 compliant host controller. + + + + sequential + basic + 66060288 + 8 + 0 + **Optional.** Reserved for future use by the recovery image; removable. + + + + sequential + basic + 524288 + 8 + 0 + **Optional.** Reserved for future use by the recovery DTB image; + removable. + + + + sequential + basic + 262144 + 8 + 0 + **Optional.** Reserved for future use by boot control data; removable. + + + + sequential + basic + 262144 + 8 + 0 + **Optional.** Reserved for future use by a redundant copy of the boot control data; + removable. + + + + sequential + basic + EFISIZE + 0 + 0 + 0x8 + 0 + EFIFILE + **Optional.** Reserved for EFI image; removeable. + + + + sequential + basic + 2097152 + 0 + 0x8 + 0 + NCTFILE + **Optional.** Reserved for NCT image; removeable. + + + + sequential + basic + 6291456 + 0 + 0 + 8 + 0 + MPBFILE + **Optional.** Reserved for MTS pre-boot image; removeable. + + + + sequential + basic + 6291456 + 0 + 0 + 8 + 0 + MBPFILE + **Optional.** Reserved for MTS boot pack image; removeable. + + + + sequential + basic + 2097152 + 0 + 0x8 + 0 + **Optional.** Reserved; removeable. + + + + sequential + basic + 314572800 + 0 + 0x8 + 0 + **Optional.** Reserved for future use by the recovery filesystem; + removable. + + + + sequential + basic + APPSIZE + 8 + APPFILE + **Required.** Contains the rootfs. This partition must be defined after + `primary_GPT` so that it can be accessed as the fixed known special device + `/dev/mmcblk0p1`. + + + + sequential + basic + 2097152 + 0x808 + DATAFILE + **Required..** Automatically takes all remaining space on the device except for space + occupied by `secondary_gpt`. Allocation attribute must be set to 0x808. This + partition may be mounted and used to store user data. + + + + sequential + basic + -1 + 8 + **Required.** Contains secondary GPT of the `sdmmc_user` + device. + + + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout_1.0.bb b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout_1.0.bb new file mode 100644 index 000000000..9317aa21a --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout_1.0.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "Custom flash layout file to add Mender-specific partitions" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = "file://flash_mender.xml" + +INHIBIT_DEFAULT_DEPS = "1" +COMPATIBLE_MACHINE = "(tegra)" + +FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}-${@d.getVar('L4T_VERSION').replace('.', '-')}:" + +S = "${WORKDIR}" + +do_compile[noexec] = "1" + +do_install() { + install -d ${D}${datadir}/mender-flash-layout + install -m 0644 ${S}/flash_mender.xml ${D}${datadir}/mender-flash-layout/ +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit nopackages diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/redundant-boot-overrides/update-nvbootctrl.service.in b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/redundant-boot-overrides/update-nvbootctrl.service.in new file mode 100644 index 000000000..8e704cb0e --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/redundant-boot-overrides/update-nvbootctrl.service.in @@ -0,0 +1,14 @@ +[Unit] +Description=Update bootloader on successful boot +ConditionPathExists=!@LOCALSTATEDIR@/lib/mender/dont-mark-next-boot-successful +Requires=setup-nv-boot-control.service +After=setup-nv-boot-control.service +Before=network.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@SBINDIR@/update-nvbootctrl + +[Install] +WantedBy=multi-user.target diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/redundant-boot-overrides/update-nvbootctrl.sh.in b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/redundant-boot-overrides/update-nvbootctrl.sh.in new file mode 100644 index 000000000..e8e641275 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/redundant-boot-overrides/update-nvbootctrl.sh.in @@ -0,0 +1,10 @@ +#!/bin/sh +NVBC=@SBINDIR@/nvbootctrl +curslot=$($NVBC get-current-slot) +if [ -n "$curslot" ]; then + if $NVBC set-active-boot-slot $curslot && $NVBC mark-boot-successful; then + exit 0 + fi +fi +echo "ERR: could not update NV boot slots" >&2 +exit 1 diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/redundant-boot-overrides_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/redundant-boot-overrides_%.bbappend new file mode 100644 index 000000000..6870ae935 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/redundant-boot-overrides_%.bbappend @@ -0,0 +1,2 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" +# RDEPENDS:${PN} += "tegra-redundant-boot-nvbootctrl" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/redundant-boot-overrides_1.0.bb b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/redundant-boot-overrides_1.0.bb new file mode 100644 index 000000000..b467f5e0a --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/redundant-boot-overrides_1.0.bb @@ -0,0 +1,39 @@ +DESCRIPTION = "Configuration override to disable nv_update_verifier when using Mender" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +COMPATIBLE_MACHINE = "(tegra)" +COMPATIBLE_MACHINE:tegra210 = "(-)" + +SRC_URI = "\ + file://update-nvbootctrl.service.in \ + file://update-nvbootctrl.sh.in \ +" + +inherit systemd + +S = "${WORKDIR}" +B = "${WORKDIR}/build" + +run_sed() { + outfile=$(basename "$1" .in) + sed -e's,@SBINDIR@,${sbindir},g' \ + -e's,@LOCALSTATEDIR@,${localstatedir},g' "$1" > ${B}/$outfile +} + +do_configure() { + run_sed ${S}/update-nvbootctrl.service.in + run_sed ${S}/update-nvbootctrl.sh.in +} + +do_compile[noexec] = "1" + +do_install() { + install -d ${D}${sysconfdir}/systemd/system/ + ln -sf /dev/null ${D}${sysconfdir}/systemd/system/nv_update_verifier.service + install -d ${D}${systemd_system_unitdir} ${D}${sbindir} + install -m 0755 ${B}/update-nvbootctrl.sh ${D}${sbindir}/update-nvbootctrl + install -m 0644 ${B}/update-nvbootctrl.service ${D}${systemd_system_unitdir}/ +} + +SYSTEMD_SERVICE:${PN} = "update-nvbootctrl.service" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/tegra-bootfiles_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/tegra-bootfiles_%.bbappend new file mode 100644 index 000000000..a0ee9dd0e --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/tegra-bootfiles_%.bbappend @@ -0,0 +1,5 @@ +DEPENDS += "mender-custom-flash-layout" +MENDER_PARTITION_FILE = "${STAGING_DATADIR}/mender-flash-layout/flash_mender.xml" +PARTITION_FILE = "${MENDER_PARTITION_FILE}" + + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/tegra-nv-boot-control-config_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/tegra-nv-boot-control-config_%.bbappend new file mode 100644 index 000000000..22b98b10d --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/tegra-nv-boot-control-config_%.bbappend @@ -0,0 +1,3 @@ +do_install:append() { + ln -sf /run/tegra-nv-bootctrl/nv_boot_control.conf ${D}${sysconfdir}/ +} diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/tegra-redundant-boot_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/tegra-redundant-boot_%.bbappend new file mode 100644 index 000000000..924af6d77 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/tegra-redundant-boot_%.bbappend @@ -0,0 +1,5 @@ +EXTRADEPS = "redundant-boot-overrides" +EXTRADEPS:tegra210 = "" +EXTRADEPS:tegra234 = "" +RDEPENDS:${PN} += "${EXTRADEPS}" + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-bup-payload/tegra-bup-payload_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-bup-payload/tegra-bup-payload_%.bbappend new file mode 100644 index 000000000..65421c273 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-bup-payload/tegra-bup-payload_%.bbappend @@ -0,0 +1,2 @@ +RDEPENDS:${PN}:remove = "tegra-redundant-boot" +# RDEPENDS:${PN}:append = " tegra-boot-tools-updater" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tools/setup-nv-boot-control/target-mkdir.conf b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tools/setup-nv-boot-control/target-mkdir.conf new file mode 100644 index 000000000..e0cf18cc1 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tools/setup-nv-boot-control/target-mkdir.conf @@ -0,0 +1,2 @@ +[Service] +ExecStartPre=/bin/mkdir -p /run/tegra-nv-bootctrl diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tools/setup-nv-boot-control_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tools/setup-nv-boot-control_%.bbappend new file mode 100644 index 000000000..a3f87028f --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tools/setup-nv-boot-control_%.bbappend @@ -0,0 +1,10 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" + +SRC_URI += "file://target-mkdir.conf" + +do_install:append() { + install -d ${D}${sysconfdir}/systemd/system/setup-nv-boot-control.service.d + install -m 0644 ${WORKDIR}/target-mkdir.conf ${D}${sysconfdir}/systemd/system/setup-nv-boot-control.service.d/ +} + +FILES:${PN}-service += "${sysconfdir}/systemd/system/setup-nv-boot-control.service.d" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/libubootenv-fake/fw_printenv b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/libubootenv-fake/fw_printenv new file mode 100644 index 000000000..7001b5caf --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/libubootenv-fake/fw_printenv @@ -0,0 +1,60 @@ +#!/bin/sh +LABELCHARS="AB" + +get_bootpart() { + local current_slot=`nvbootctrl get-current-slot 2>/dev/null || tegra-boot-control --current-slot 2>/dev/null` + if [ -z "$current_slot" ]; then + echo "ERR: could not identify current boot slot" >&2 + echo "UNKNOWN" + return + fi + local cfglbl="\"RootfsPart${LABELCHARS:$current_slot:1}\"" + local devnam=`grep -h "$cfglbl:" /etc/mender/mender.conf /var/lib/mender/mender.conf | tr -d '" ,' | grep -o '[0-9]\+$'` + echo "$devnam" +} + +quiet= +if [ "$1" = "-n" ]; then + quiet="yes" + shift + if [ -z "$1" ]; then + echo "ERR: missing var name with -n" >&2 + exit 1 + fi +fi +if [ -z "$1" ]; then + bootpart=`get_bootpart` + echo "mender_boot_part=$bootpart" + exit 0 +fi +while [ -n "$1" ]; do + case "$1" in + mender_boot_part) + bootpart=`get_bootpart` + [ -n "$quiet" ] || echo -n "$1=" + echo "$bootpart" + ;; + mender_boot_part_hex) + bootpart=`get_bootpart` + bootpart_hex=`echo 16o${bootpart}p | dc` + [ -n "$quiet" ] || echo -n "$1=" + echo "$bootpart_hex" + ;; + mender_uboot_separator) + [ -n "$quiet" ] || echo -n "$1=" + echo "something other than just 1" + ;; + upgrade_available) + [ -n "$quiet" ] || echo -n "$1=" + if [ -e "/var/lib/mender/upgrade_available" ]; then + echo "1" + else + echo "0" + fi + ;; + *) + echo "ERR: no such variable: $1" >&2 + exit 1 + esac + shift +done diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/libubootenv-fake/fw_setenv b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/libubootenv-fake/fw_setenv new file mode 100644 index 000000000..201cec600 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/libubootenv-fake/fw_setenv @@ -0,0 +1,13 @@ +#!/bin/sh +if [ "$1" = "-s" ]; then + while IFS="= " read var restofline; do + if [ "$var" = "upgrade_available" ]; then + if [ "$restofline" = "1" ]; then + touch /var/lib/mender/upgrade_available + else + rm -f /var/lib/mender/upgrade_available + fi + fi + done +fi +exit 0 diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/libubootenv-fake_1.0.bb b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/libubootenv-fake_1.0.bb new file mode 100644 index 000000000..9b8e488cd --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/libubootenv-fake_1.0.bb @@ -0,0 +1,28 @@ +DESCRIPTION = "Fake implementation of fw_printenv and fw_setenv for Mender" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = " \ + file://fw_printenv \ + file://fw_setenv \ +" + +PROVIDES += "libubootenv" + +S = "${WORKDIR}" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -d ${D}${base_sbindir} + install -m 0755 ${S}/fw_printenv ${S}/fw_setenv ${D}${base_sbindir}/ +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +RPROVIDES:${PN} += "libubootenv-bin u-boot-fw-utils" +RDEPENDS:${PN} = "tegra-boot-tools" +RDEPENDS:${PN}:tegra234 = "" +RCONFLICTS:${PN} = "libubootenv-bin" +RREPLACES:${PN} = "libubootenv-bin" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/libubootenv_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/libubootenv_%.bbappend new file mode 100644 index 000000000..47daf849d --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/libubootenv_%.bbappend @@ -0,0 +1,13 @@ +include recipes-bsp/u-boot/u-boot-mender-tegra-vars.inc + +# Stash an extra copy of fw_env.config in the rootfs so we +# can handle a change in the env offset/size during an upgrade +do_install:append:tegra() { + install -d ${D}${datadir}/u-boot + install -m 0644 ${WORKDIR}/fw_env.config ${D}${datadir}/u-boot/ +} +FILES:${PN}:append:tegra = " ${datadir}/u-boot" + +# The default environment must be provided by the +# u-boot recipe +RPROVIDES:${PN}:remove:tegra = "u-boot-default-env" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0003-Integration-of-Mender-boot-code-into-U-Boot.patch b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0003-Integration-of-Mender-boot-code-into-U-Boot.patch new file mode 100644 index 000000000..cae1f2d4f --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0003-Integration-of-Mender-boot-code-into-U-Boot.patch @@ -0,0 +1,51 @@ +From de38de98f3032825d1553e83fa6957d7438bbdc4 Mon Sep 17 00:00:00 2001 +From: Marcin Pasinski +Date: Wed, 31 Jan 2018 18:10:04 +0100 +Subject: [PATCH 09/16] Integration of Mender boot code into U-Boot. + +Signed-off-by: Kristian Amlie +Signed-off-by: Maciej Borzecki +Signed-off-by: Marcin Pasinski +--- + include/env_default.h | 3 +++ + scripts/Makefile.autoconf | 3 ++- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/include/env_default.h b/include/env_default.h +index 23430dc70d..a8c782c725 100644 +--- a/include/env_default.h ++++ b/include/env_default.h +@@ -10,6 +10,8 @@ + #include + #include + ++#include ++ + #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED + env_t embedded_environment __UBOOT_ENV_SECTION__(environment) = { + ENV_CRC, /* CRC Sum */ +@@ -24,6 +26,7 @@ char default_environment[] = { + #else + const char default_environment[] = { + #endif ++ MENDER_ENV_SETTINGS + #ifndef CONFIG_USE_DEFAULT_ENV_FILE + #ifdef CONFIG_ENV_CALLBACK_LIST_DEFAULT + ENV_CALLBACK_VAR "=" CONFIG_ENV_CALLBACK_LIST_DEFAULT "\0" +diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf +index 8a3efdb2db..5f09f52b24 100644 +--- a/scripts/Makefile.autoconf ++++ b/scripts/Makefile.autoconf +@@ -108,7 +108,8 @@ define filechk_config_h + echo \#include \; \ + echo \#include \; \ + echo \#include \; \ +- echo \#include \;) ++ echo \#include \; \ ++ echo \#include \;) + endef + + include/config.h: scripts/Makefile.autoconf create_symlink FORCE +-- +2.32.0 + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0010-tegra-mender-auto-configured-modified.patch b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0010-tegra-mender-auto-configured-modified.patch new file mode 100644 index 000000000..cad074e59 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0010-tegra-mender-auto-configured-modified.patch @@ -0,0 +1,379 @@ +From c6c3285f65ff5daed41beeb271db86d89eeff2c9 Mon Sep 17 00:00:00 2001 +From: Kurt Kiefer +Date: Mon, 24 Aug 2020 22:49:32 -0700 +Subject: [PATCH 10/16] Apply mender_auto_configured.patch + +--- + configs/p2371-0000_defconfig | 33 ++++++++++++++++++++++++++++++-- + configs/p2371-2180_defconfig | 33 ++++++++++++++++++++++++++++++-- + configs/p2571_defconfig | 33 ++++++++++++++++++++++++++++++-- + configs/p2771-0000-000_defconfig | 33 ++++++++++++++++++++++++++++++-- + configs/p2771-0000-500_defconfig | 33 ++++++++++++++++++++++++++++++-- + configs/p3450-0000_defconfig | 33 +++++++++++++++++++++++++++++--- + configs/p3450-0002_defconfig | 31 ++++++++++++++++++++++++++++-- + include/config_distro_bootcmd.h | 1 - + 8 files changed, 214 insertions(+), 16 deletions(-) + +diff --git a/configs/p2371-0000_defconfig b/configs/p2371-0000_defconfig +index 4289c22886..8580db6aa0 100644 +--- a/configs/p2371-0000_defconfig ++++ b/configs/p2371-0000_defconfig +@@ -3,8 +3,6 @@ CONFIG_ARCH_TEGRA=y + CONFIG_SYS_TEXT_BASE=0x80080000 + CONFIG_SYS_MALLOC_LEN=0x2500000 + CONFIG_NR_DRAM_BANKS=16 +-CONFIG_ENV_SIZE=0x2000 +-CONFIG_ENV_OFFSET=0xFFFD8000 + CONFIG_DEFAULT_DEVICE_TREE="tegra210-p2371-0000" + CONFIG_TEGRA210=y + CONFIG_SYS_LOAD_ADDR=0x84000000 +@@ -49,3 +47,34 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x701a + CONFIG_CI_UDC=y + CONFIG_USB_GADGET_DOWNLOAD=y + CONFIG_OF_LIBFDT_OVERLAY=y ++CONFIG_ENV_SIZE=0x20000 ++CONFIG_ENV_OFFSET=0x3bb000 ++CONFIG_ENV_OFFSET_REDUND=0x3db000 ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y ++# CONFIG_ENV_IS_NOWHERE is not set ++# CONFIG_ENV_IS_IN_EEPROM is not set ++# CONFIG_ENV_IS_IN_FAT is not set ++# CONFIG_ENV_IS_IN_EXT4 is not set ++# CONFIG_ENV_IS_IN_FLASH is not set ++# CONFIG_ENV_IS_IN_NAND is not set ++# CONFIG_ENV_IS_IN_NVRAM is not set ++# CONFIG_ENV_IS_IN_ONENAND is not set ++# CONFIG_ENV_IS_IN_REMOTE is not set ++# CONFIG_ENV_IS_IN_SPI_FLASH is not set ++# CONFIG_ENV_IS_IN_UBI is not set ++CONFIG_MMC=y ++CONFIG_ENV_IS_IN_MMC=y ++CONFIG_CMD_EXT4=y ++CONFIG_CMD_FS_GENERIC=y ++# CONFIG_BOOTCOUNT_BOOTLIMIT is not set ++# CONFIG_BOOTCOUNT_GENERIC is not set ++# CONFIG_BOOTCOUNT_EXT is not set ++# CONFIG_BOOTCOUNT_AM33XX is not set ++# CONFIG_BOOTCOUNT_RAM is not set ++# CONFIG_BOOTCOUNT_I2C is not set ++# CONFIG_BOOTCOUNT_AT91 is not set ++# CONFIG_BOOTCOUNT_MEM is not set ++# CONFIG_BOOTCOUNT_ALEN is not set ++CONFIG_BOOTCOUNT_LIMIT=y ++CONFIG_BOOTCOUNT_ENV=y ++# CONFIG_BOOTCOMMAND is not set +diff --git a/configs/p2371-2180_defconfig b/configs/p2371-2180_defconfig +index 1d0228823f..329878dc90 100644 +--- a/configs/p2371-2180_defconfig ++++ b/configs/p2371-2180_defconfig +@@ -3,8 +3,6 @@ CONFIG_ARCH_TEGRA=y + CONFIG_SYS_TEXT_BASE=0x80080000 + CONFIG_SYS_MALLOC_LEN=0x2500000 + CONFIG_NR_DRAM_BANKS=16 +-CONFIG_ENV_SIZE=0x8000 +-CONFIG_ENV_OFFSET=0x3D8000 + CONFIG_DEFAULT_DEVICE_TREE="tegra210-p2371-2180" + CONFIG_TEGRA210=y + CONFIG_TARGET_P2371_2180=y +@@ -62,3 +60,34 @@ CONFIG_USB_STORAGE=y + CONFIG_DOS_PARTITION=y + CONFIG_CMD_CACHE=y + CONFIG_OF_LIBFDT_OVERLAY=y ++CONFIG_ENV_SIZE=0x20000 ++CONFIG_ENV_OFFSET=0x3bb000 ++CONFIG_ENV_OFFSET_REDUND=0x3db000 ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y ++# CONFIG_ENV_IS_NOWHERE is not set ++# CONFIG_ENV_IS_IN_EEPROM is not set ++# CONFIG_ENV_IS_IN_FAT is not set ++# CONFIG_ENV_IS_IN_EXT4 is not set ++# CONFIG_ENV_IS_IN_FLASH is not set ++# CONFIG_ENV_IS_IN_NAND is not set ++# CONFIG_ENV_IS_IN_NVRAM is not set ++# CONFIG_ENV_IS_IN_ONENAND is not set ++# CONFIG_ENV_IS_IN_REMOTE is not set ++# CONFIG_ENV_IS_IN_SPI_FLASH is not set ++# CONFIG_ENV_IS_IN_UBI is not set ++CONFIG_MMC=y ++CONFIG_ENV_IS_IN_MMC=y ++CONFIG_CMD_EXT4=y ++CONFIG_CMD_FS_GENERIC=y ++# CONFIG_BOOTCOUNT_BOOTLIMIT is not set ++# CONFIG_BOOTCOUNT_GENERIC is not set ++# CONFIG_BOOTCOUNT_EXT is not set ++# CONFIG_BOOTCOUNT_AM33XX is not set ++# CONFIG_BOOTCOUNT_RAM is not set ++# CONFIG_BOOTCOUNT_I2C is not set ++# CONFIG_BOOTCOUNT_AT91 is not set ++# CONFIG_BOOTCOUNT_MEM is not set ++# CONFIG_BOOTCOUNT_ALEN is not set ++CONFIG_BOOTCOUNT_LIMIT=y ++CONFIG_BOOTCOUNT_ENV=y ++# CONFIG_BOOTCOMMAND is not set +diff --git a/configs/p2571_defconfig b/configs/p2571_defconfig +index fbcc5072d5..d525a234c1 100644 +--- a/configs/p2571_defconfig ++++ b/configs/p2571_defconfig +@@ -3,8 +3,6 @@ CONFIG_ARCH_TEGRA=y + CONFIG_SYS_TEXT_BASE=0x80080000 + CONFIG_SYS_MALLOC_LEN=0x2500000 + CONFIG_NR_DRAM_BANKS=16 +-CONFIG_ENV_SIZE=0x2000 +-CONFIG_ENV_OFFSET=0xFFFD8000 + CONFIG_DEFAULT_DEVICE_TREE="tegra210-p2571" + CONFIG_TEGRA210=y + CONFIG_TARGET_P2571=y +@@ -50,3 +48,34 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x701a + CONFIG_CI_UDC=y + CONFIG_USB_GADGET_DOWNLOAD=y + CONFIG_OF_LIBFDT_OVERLAY=y ++CONFIG_ENV_SIZE=0x20000 ++CONFIG_ENV_OFFSET=0x3bb000 ++CONFIG_ENV_OFFSET_REDUND=0x3db000 ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y ++# CONFIG_ENV_IS_NOWHERE is not set ++# CONFIG_ENV_IS_IN_EEPROM is not set ++# CONFIG_ENV_IS_IN_FAT is not set ++# CONFIG_ENV_IS_IN_EXT4 is not set ++# CONFIG_ENV_IS_IN_FLASH is not set ++# CONFIG_ENV_IS_IN_NAND is not set ++# CONFIG_ENV_IS_IN_NVRAM is not set ++# CONFIG_ENV_IS_IN_ONENAND is not set ++# CONFIG_ENV_IS_IN_REMOTE is not set ++# CONFIG_ENV_IS_IN_SPI_FLASH is not set ++# CONFIG_ENV_IS_IN_UBI is not set ++CONFIG_MMC=y ++CONFIG_ENV_IS_IN_MMC=y ++CONFIG_CMD_EXT4=y ++CONFIG_CMD_FS_GENERIC=y ++# CONFIG_BOOTCOUNT_BOOTLIMIT is not set ++# CONFIG_BOOTCOUNT_GENERIC is not set ++# CONFIG_BOOTCOUNT_EXT is not set ++# CONFIG_BOOTCOUNT_AM33XX is not set ++# CONFIG_BOOTCOUNT_RAM is not set ++# CONFIG_BOOTCOUNT_I2C is not set ++# CONFIG_BOOTCOUNT_AT91 is not set ++# CONFIG_BOOTCOUNT_MEM is not set ++# CONFIG_BOOTCOUNT_ALEN is not set ++CONFIG_BOOTCOUNT_LIMIT=y ++CONFIG_BOOTCOUNT_ENV=y ++# CONFIG_BOOTCOMMAND is not set +diff --git a/configs/p2771-0000-000_defconfig b/configs/p2771-0000-000_defconfig +index e5a1249aeb..a781da5ef7 100644 +--- a/configs/p2771-0000-000_defconfig ++++ b/configs/p2771-0000-000_defconfig +@@ -1,8 +1,6 @@ + CONFIG_ARM=y + CONFIG_ARCH_TEGRA=y + CONFIG_SYS_TEXT_BASE=0x80080000 +-CONFIG_ENV_SIZE=0x8000 +-CONFIG_ENV_OFFSET=0x3D8000 + CONFIG_NR_DRAM_BANKS=1043 + CONFIG_DEFAULT_DEVICE_TREE="tegra186-p2771-0000-000" + CONFIG_TEGRA186=y +@@ -38,3 +36,34 @@ CONFIG_SYS_NS16550=y + CONFIG_CMD_CACHE=y + CONFIG_NVME=y + CONFIG_OF_LIBFDT_OVERLAY=y ++CONFIG_ENV_SIZE=0x20000 ++CONFIG_ENV_OFFSET=0x3bb000 ++CONFIG_ENV_OFFSET_REDUND=0x3db000 ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y ++# CONFIG_ENV_IS_NOWHERE is not set ++# CONFIG_ENV_IS_IN_EEPROM is not set ++# CONFIG_ENV_IS_IN_FAT is not set ++# CONFIG_ENV_IS_IN_EXT4 is not set ++# CONFIG_ENV_IS_IN_FLASH is not set ++# CONFIG_ENV_IS_IN_NAND is not set ++# CONFIG_ENV_IS_IN_NVRAM is not set ++# CONFIG_ENV_IS_IN_ONENAND is not set ++# CONFIG_ENV_IS_IN_REMOTE is not set ++# CONFIG_ENV_IS_IN_SPI_FLASH is not set ++# CONFIG_ENV_IS_IN_UBI is not set ++CONFIG_MMC=y ++CONFIG_ENV_IS_IN_MMC=y ++CONFIG_CMD_EXT4=y ++CONFIG_CMD_FS_GENERIC=y ++# CONFIG_BOOTCOUNT_BOOTLIMIT is not set ++# CONFIG_BOOTCOUNT_GENERIC is not set ++# CONFIG_BOOTCOUNT_EXT is not set ++# CONFIG_BOOTCOUNT_AM33XX is not set ++# CONFIG_BOOTCOUNT_RAM is not set ++# CONFIG_BOOTCOUNT_I2C is not set ++# CONFIG_BOOTCOUNT_AT91 is not set ++# CONFIG_BOOTCOUNT_MEM is not set ++# CONFIG_BOOTCOUNT_ALEN is not set ++CONFIG_BOOTCOUNT_LIMIT=y ++CONFIG_BOOTCOUNT_ENV=y ++# CONFIG_BOOTCOMMAND is not set +diff --git a/configs/p2771-0000-500_defconfig b/configs/p2771-0000-500_defconfig +index f0b56ec4c7..9bd7de8034 100644 +--- a/configs/p2771-0000-500_defconfig ++++ b/configs/p2771-0000-500_defconfig +@@ -1,8 +1,6 @@ + CONFIG_ARM=y + CONFIG_ARCH_TEGRA=y + CONFIG_SYS_TEXT_BASE=0x80080000 +-CONFIG_ENV_SIZE=0x8000 +-CONFIG_ENV_OFFSET=0x3D8000 + CONFIG_NR_DRAM_BANKS=1043 + CONFIG_DEFAULT_DEVICE_TREE="tegra186-p2771-0000-500" + CONFIG_TEGRA186=y +@@ -38,3 +36,34 @@ CONFIG_SYS_NS16550=y + CONFIG_CMD_CACHE=y + CONFIG_NVME=y + CONFIG_OF_LIBFDT_OVERLAY=y ++CONFIG_ENV_SIZE=0x20000 ++CONFIG_ENV_OFFSET=0x3bb000 ++CONFIG_ENV_OFFSET_REDUND=0x3db000 ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y ++# CONFIG_ENV_IS_NOWHERE is not set ++# CONFIG_ENV_IS_IN_EEPROM is not set ++# CONFIG_ENV_IS_IN_FAT is not set ++# CONFIG_ENV_IS_IN_EXT4 is not set ++# CONFIG_ENV_IS_IN_FLASH is not set ++# CONFIG_ENV_IS_IN_NAND is not set ++# CONFIG_ENV_IS_IN_NVRAM is not set ++# CONFIG_ENV_IS_IN_ONENAND is not set ++# CONFIG_ENV_IS_IN_REMOTE is not set ++# CONFIG_ENV_IS_IN_SPI_FLASH is not set ++# CONFIG_ENV_IS_IN_UBI is not set ++CONFIG_MMC=y ++CONFIG_ENV_IS_IN_MMC=y ++CONFIG_CMD_EXT4=y ++CONFIG_CMD_FS_GENERIC=y ++# CONFIG_BOOTCOUNT_BOOTLIMIT is not set ++# CONFIG_BOOTCOUNT_GENERIC is not set ++# CONFIG_BOOTCOUNT_EXT is not set ++# CONFIG_BOOTCOUNT_AM33XX is not set ++# CONFIG_BOOTCOUNT_RAM is not set ++# CONFIG_BOOTCOUNT_I2C is not set ++# CONFIG_BOOTCOUNT_AT91 is not set ++# CONFIG_BOOTCOUNT_MEM is not set ++# CONFIG_BOOTCOUNT_ALEN is not set ++CONFIG_BOOTCOUNT_LIMIT=y ++CONFIG_BOOTCOUNT_ENV=y ++# CONFIG_BOOTCOMMAND is not set +diff --git a/configs/p3450-0000_defconfig b/configs/p3450-0000_defconfig +index 815a6773ac..32f5aff921 100644 +--- a/configs/p3450-0000_defconfig ++++ b/configs/p3450-0000_defconfig +@@ -3,8 +3,6 @@ CONFIG_ARCH_TEGRA=y + CONFIG_SYS_TEXT_BASE=0x80080000 + CONFIG_SYS_MALLOC_LEN=0x2500000 + CONFIG_NR_DRAM_BANKS=16 +-CONFIG_ENV_SIZE=0x8000 +-CONFIG_ENV_OFFSET=0x3D8000 + CONFIG_ENV_SECT_SIZE=0x1000 + CONFIG_DEFAULT_DEVICE_TREE="tegra210-p3450-0000" + CONFIG_TEGRA210=y +@@ -31,7 +29,6 @@ CONFIG_CMD_EXT4_WRITE=y + CONFIG_OF_LIVE=y + CONFIG_ENV_OVERWRITE=y + # CONFIG_ENV_IS_IN_MMC is not set +-CONFIG_ENV_IS_IN_SPI_FLASH=y + CONFIG_DFU_MMC=y + CONFIG_DFU_RAM=y + CONFIG_DFU_SF=y +@@ -64,3 +61,33 @@ CONFIG_USB_STORAGE=y + CONFIG_DOS_PARTITION=y + CONFIG_CMD_CACHE=y + CONFIG_OF_LIBFDT_OVERLAY=y ++CONFIG_ENV_SIZE=0x20000 ++CONFIG_ENV_OFFSET=0x3b0000 ++CONFIG_ENV_OFFSET_REDUND=0x3d0000 ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y ++# CONFIG_ENV_IS_NOWHERE is not set ++# CONFIG_ENV_IS_IN_EEPROM is not set ++# CONFIG_ENV_IS_IN_FAT is not set ++# CONFIG_ENV_IS_IN_EXT4 is not set ++# CONFIG_ENV_IS_IN_FLASH is not set ++# CONFIG_ENV_IS_IN_NAND is not set ++# CONFIG_ENV_IS_IN_NVRAM is not set ++# CONFIG_ENV_IS_IN_ONENAND is not set ++# CONFIG_ENV_IS_IN_REMOTE is not set ++CONFIG_ENV_IS_IN_SPI_FLASH=y ++# CONFIG_ENV_IS_IN_UBI is not set ++# CONFIG_ENV_IS_IN_MMC is not set ++CONFIG_CMD_EXT4=y ++CONFIG_CMD_FS_GENERIC=y ++# CONFIG_BOOTCOUNT_BOOTLIMIT is not set ++# CONFIG_BOOTCOUNT_GENERIC is not set ++# CONFIG_BOOTCOUNT_EXT is not set ++# CONFIG_BOOTCOUNT_AM33XX is not set ++# CONFIG_BOOTCOUNT_RAM is not set ++# CONFIG_BOOTCOUNT_I2C is not set ++# CONFIG_BOOTCOUNT_AT91 is not set ++# CONFIG_BOOTCOUNT_MEM is not set ++# CONFIG_BOOTCOUNT_ALEN is not set ++CONFIG_BOOTCOUNT_LIMIT=y ++CONFIG_BOOTCOUNT_ENV=y ++# CONFIG_BOOTCOMMAND is not set +diff --git a/configs/p3450-0002_defconfig b/configs/p3450-0002_defconfig +index 595d270b73..d617181548 100644 +--- a/configs/p3450-0002_defconfig ++++ b/configs/p3450-0002_defconfig +@@ -3,8 +3,6 @@ CONFIG_ARCH_TEGRA=y + CONFIG_SYS_TEXT_BASE=0x80080000 + CONFIG_SYS_MALLOC_LEN=0x2500000 + CONFIG_NR_DRAM_BANKS=16 +-CONFIG_ENV_SIZE=0x8000 +-CONFIG_ENV_OFFSET=0x3D8000 + CONFIG_DEFAULT_DEVICE_TREE="tegra210-p3450-0000" + CONFIG_TEGRA210=y + CONFIG_TARGET_P3450_0000=y +@@ -28,6 +26,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y + CONFIG_BOOTP_PREFER_SERVERIP=y + # CONFIG_CMD_NFS is not set + CONFIG_CMD_EXT4_WRITE=y ++CONFIG_CMD_FS_GENERIC=y + CONFIG_OF_LIVE=y + CONFIG_ENV_OVERWRITE=y + CONFIG_ENV_IS_IN_MMC=y +@@ -64,3 +63,31 @@ CONFIG_USB_STORAGE=y + CONFIG_DOS_PARTITION=y + CONFIG_CMD_CACHE=y + CONFIG_OF_LIBFDT_OVERLAY=y ++CONFIG_ENV_SIZE=0x20000 ++CONFIG_ENV_OFFSET=0x3bb000 ++CONFIG_ENV_OFFSET_REDUND=0x3db000 ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y ++# CONFIG_ENV_IS_NOWHERE is not set ++# CONFIG_ENV_IS_IN_EEPROM is not set ++# CONFIG_ENV_IS_IN_FAT is not set ++# CONFIG_ENV_IS_IN_EXT4 is not set ++# CONFIG_ENV_IS_IN_FLASH is not set ++# CONFIG_ENV_IS_IN_NAND is not set ++# CONFIG_ENV_IS_IN_NVRAM is not set ++# CONFIG_ENV_IS_IN_ONENAND is not set ++# CONFIG_ENV_IS_IN_REMOTE is not set ++# CONFIG_ENV_IS_IN_SPI_FLASH is not set ++# CONFIG_ENV_IS_IN_UBI is not set ++CONFIG_MMC=y ++# CONFIG_BOOTCOUNT_BOOTLIMIT is not set ++# CONFIG_BOOTCOUNT_GENERIC is not set ++# CONFIG_BOOTCOUNT_EXT is not set ++# CONFIG_BOOTCOUNT_AM33XX is not set ++# CONFIG_BOOTCOUNT_RAM is not set ++# CONFIG_BOOTCOUNT_I2C is not set ++# CONFIG_BOOTCOUNT_AT91 is not set ++# CONFIG_BOOTCOUNT_MEM is not set ++# CONFIG_BOOTCOUNT_ALEN is not set ++CONFIG_BOOTCOUNT_LIMIT=y ++CONFIG_BOOTCOUNT_ENV=y ++# CONFIG_BOOTCOMMAND is not set +diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h +index 2169695506..1578dad536 100644 +--- a/include/config_distro_bootcmd.h ++++ b/include/config_distro_bootcmd.h +@@ -511,7 +511,6 @@ + "done\0" + + #ifndef CONFIG_BOOTCOMMAND +-#define CONFIG_BOOTCOMMAND "run distro_bootcmd" + #endif + + #endif /* _CONFIG_CMD_DISTRO_BOOTCMD_H */ +-- +2.32.0 + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0011-Jetson-TX2-mender-boot-commands.patch b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0011-Jetson-TX2-mender-boot-commands.patch new file mode 100644 index 000000000..dd6d4ffae --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0011-Jetson-TX2-mender-boot-commands.patch @@ -0,0 +1,48 @@ +From 424fd871ab8b39d828d738949f809fd123d2afde Mon Sep 17 00:00:00 2001 +From: Dan Walkes +Date: Tue, 1 Jan 2019 18:00:39 -0700 +Subject: [PATCH 5/7] Jetson TX2 mender boot commands + +Modify u-boot to use bootcmd setting based on +values which support jetson-tx2 boot partition layout +and setup. +--- + include/env_default.h | 4 ++-- + include/env_mender.h | 9 ++++++--- + 2 files changed, 8 insertions(+), 5 deletions(-) + +Index: git/include/env_default.h +=================================================================== +--- git.orig/include/env_default.h ++++ git/include/env_default.h +@@ -37,8 +37,8 @@ const char default_environment[] = { + #ifdef CONFIG_USE_BOOTARGS + "bootargs=" CONFIG_BOOTARGS "\0" + #endif +-#ifdef CONFIG_BOOTCOMMAND +- "bootcmd=" CONFIG_BOOTCOMMAND "\0" ++#ifdef CONFIG_MENDER_BOOTCOMMAND ++ "bootcmd=" CONFIG_MENDER_BOOTCOMMAND "\0" + #endif + #ifdef CONFIG_RAMBOOTCOMMAND + "ramboot=" CONFIG_RAMBOOTCOMMAND "\0" +Index: git/include/env_mender.h +=================================================================== +--- git.orig/include/env_mender.h ++++ git/include/env_mender.h +@@ -146,9 +146,12 @@ + + #define CONFIG_MENDER_BOOTCOMMAND \ + "run mender_setup; " \ +- MENDER_BOOTARGS \ +- MENDER_LOAD_KERNEL_AND_FDT \ +- "${mender_boot_kernel_type} ${kernel_addr_r} - ${fdt_addr_r}; " \ ++ "setenv distro_bootpart ${mender_boot_part}; " \ ++ "setenv distro_bootpart_hex ${mender_boot_part_hex}; " \ ++ "setenv devnum " __stringify(MENDER_UBOOT_STORAGE_DEVICE) "; " \ ++ "setenv devtype " __stringify(MENDER_UBOOT_STORAGE_INTERFACE) "; " \ ++ "setenv prefix /boot/; " \ ++ "sysboot ${devtype} ${devnum}:${distro_bootpart_hex} any ${scriptaddr} ${prefix}extlinux/extlinux.conf; " \ + "run mender_try_to_recover" + + #endif /* !MENDER_AUTO_PROBING */ diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0012-p3541-0000_defconfig-Mender-patch.patch b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0012-p3541-0000_defconfig-Mender-patch.patch new file mode 100644 index 000000000..f31db5852 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0012-p3541-0000_defconfig-Mender-patch.patch @@ -0,0 +1,39 @@ +From 0dfa77478807a433716f130b57fdff6f68aabb02 Mon Sep 17 00:00:00 2001 +From: Matt Madison +Date: Fri, 30 Oct 2020 14:29:08 -0700 +Subject: [PATCH 12/16] p3541-0000_defconfig: Mender patch + +Signed-off-by: Matt Madison + +%% original patch: 0012-p3541-0000_defconfig-Mender-patch.patch +--- + configs/p3541-0000_defconfig | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/configs/p3541-0000_defconfig b/configs/p3541-0000_defconfig +index 35dda4228b..fe3f00a30e 100644 +--- a/configs/p3541-0000_defconfig ++++ b/configs/p3541-0000_defconfig +@@ -3,8 +3,10 @@ CONFIG_ARCH_TEGRA=y + CONFIG_SYS_TEXT_BASE=0x80080000 + CONFIG_SYS_MALLOC_LEN=0x2500000 + CONFIG_NR_DRAM_BANKS=16 +-CONFIG_ENV_SIZE=0x8000 +-CONFIG_ENV_OFFSET=0x3D8000 ++CONFIG_ENV_SIZE=0x10000 ++CONFIG_ENV_OFFSET=0x3b0000 ++CONFIG_ENV_OFFSET_REDUND=0x3c0000 ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y + CONFIG_ENV_SECT_SIZE=0x1000 + CONFIG_DEFAULT_DEVICE_TREE="tegra210-p3541-0000" + CONFIG_TEGRA210=y +@@ -64,3 +66,6 @@ CONFIG_USB_STORAGE=y + CONFIG_DOS_PARTITION=y + CONFIG_CMD_CACHE=y + CONFIG_OF_LIBFDT_OVERLAY=y ++CONFIG_BOOTCOUNT_LIMIT=y ++CONFIG_BOOTCOUNT_ENV=y ++# CONFIG_BOOTCOMMAND is not set +-- +2.32.0 + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0013-Reduce-env-size-on-p3450-0000-to-64KiB.patch b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0013-Reduce-env-size-on-p3450-0000-to-64KiB.patch new file mode 100644 index 000000000..f1739e984 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0013-Reduce-env-size-on-p3450-0000-to-64KiB.patch @@ -0,0 +1,29 @@ +From 4b6e083fda09a390fe597186a6f7f537333a0e50 Mon Sep 17 00:00:00 2001 +From: Matt Madison +Date: Mon, 2 Nov 2020 08:24:14 -0800 +Subject: [PATCH 13/16] Reduce env size on p3450-0000 to 64KiB + +Signed-off-by: Matt Madison +--- + configs/p3450-0000_defconfig | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configs/p3450-0000_defconfig b/configs/p3450-0000_defconfig +index 32f5aff921..8bed4aafef 100644 +--- a/configs/p3450-0000_defconfig ++++ b/configs/p3450-0000_defconfig +@@ -61,9 +61,9 @@ CONFIG_USB_STORAGE=y + CONFIG_DOS_PARTITION=y + CONFIG_CMD_CACHE=y + CONFIG_OF_LIBFDT_OVERLAY=y +-CONFIG_ENV_SIZE=0x20000 ++CONFIG_ENV_SIZE=0x10000 + CONFIG_ENV_OFFSET=0x3b0000 +-CONFIG_ENV_OFFSET_REDUND=0x3d0000 ++CONFIG_ENV_OFFSET_REDUND=0x3c0000 + CONFIG_SYS_REDUNDAND_ENVIRONMENT=y + # CONFIG_ENV_IS_NOWHERE is not set + # CONFIG_ENV_IS_IN_EEPROM is not set +-- +2.32.0 + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0015-Update-TX1-nano-emmc-defconfigs-for-new-UBENV-locati.patch b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0015-Update-TX1-nano-emmc-defconfigs-for-new-UBENV-locati.patch new file mode 100644 index 000000000..59085bda9 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0015-Update-TX1-nano-emmc-defconfigs-for-new-UBENV-locati.patch @@ -0,0 +1,46 @@ +From 1d56e39b15e264ddd96aecdbc21cb9f1e5b3dad7 Mon Sep 17 00:00:00 2001 +From: Matt Madison +Date: Sun, 29 Nov 2020 08:30:37 -0800 +Subject: [PATCH 14/16] Update TX1/nano-emmc defconfigs for new UBENV location + +Signed-off-by: Matt Madison +--- + configs/p2371-2180_defconfig | 4 ++-- + configs/p3450-0002_defconfig | 5 +++-- + 2 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/configs/p2371-2180_defconfig b/configs/p2371-2180_defconfig +index 329878dc90..f62228c805 100644 +--- a/configs/p2371-2180_defconfig ++++ b/configs/p2371-2180_defconfig +@@ -61,8 +61,8 @@ CONFIG_DOS_PARTITION=y + CONFIG_CMD_CACHE=y + CONFIG_OF_LIBFDT_OVERLAY=y + CONFIG_ENV_SIZE=0x20000 +-CONFIG_ENV_OFFSET=0x3bb000 +-CONFIG_ENV_OFFSET_REDUND=0x3db000 ++CONFIG_ENV_OFFSET=0x3a0000 ++CONFIG_ENV_OFFSET_REDUND=0x3c0000 + CONFIG_SYS_REDUNDAND_ENVIRONMENT=y + # CONFIG_ENV_IS_NOWHERE is not set + # CONFIG_ENV_IS_IN_EEPROM is not set +diff --git a/configs/p3450-0002_defconfig b/configs/p3450-0002_defconfig +index d617181548..81698df8b9 100644 +--- a/configs/p3450-0002_defconfig ++++ b/configs/p3450-0002_defconfig +@@ -64,9 +64,10 @@ CONFIG_DOS_PARTITION=y + CONFIG_CMD_CACHE=y + CONFIG_OF_LIBFDT_OVERLAY=y + CONFIG_ENV_SIZE=0x20000 +-CONFIG_ENV_OFFSET=0x3bb000 +-CONFIG_ENV_OFFSET_REDUND=0x3db000 ++CONFIG_ENV_OFFSET=0x3a0000 ++CONFIG_ENV_OFFSET_REDUND=0x3c0000 + CONFIG_SYS_REDUNDAND_ENVIRONMENT=y ++CONFIG_SYS_MMC_ENV_PART=2 + # CONFIG_ENV_IS_NOWHERE is not set + # CONFIG_ENV_IS_IN_EEPROM is not set + # CONFIG_ENV_IS_IN_FAT is not set +-- +2.32.0 + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0016-Update-env-for-SPIflash-Nanos-for-R32.5.0-with-Mende.patch b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0016-Update-env-for-SPIflash-Nanos-for-R32.5.0-with-Mende.patch new file mode 100644 index 000000000..423b7cbf4 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0016-Update-env-for-SPIflash-Nanos-for-R32.5.0-with-Mende.patch @@ -0,0 +1,52 @@ +From 8594f2beccd0ce6e780858e868e898798dc41c4e Mon Sep 17 00:00:00 2001 +From: Matt Madison +Date: Thu, 3 Feb 2022 12:34:15 -0800 +Subject: [PATCH 15/16] Update env for SPIflash Nanos for R32.5.0 with Mender + +Need to move the environment area and reduce its +size in order to fit redundant copies between RP4 +and VER_b. + +Signed-off-by: Matt Madison +--- + configs/p3450-0000_defconfig | 6 +++--- + configs/p3541-0000_defconfig | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/configs/p3450-0000_defconfig b/configs/p3450-0000_defconfig +index 8bed4aafef..97e7d70fb7 100644 +--- a/configs/p3450-0000_defconfig ++++ b/configs/p3450-0000_defconfig +@@ -61,9 +61,9 @@ CONFIG_USB_STORAGE=y + CONFIG_DOS_PARTITION=y + CONFIG_CMD_CACHE=y + CONFIG_OF_LIBFDT_OVERLAY=y +-CONFIG_ENV_SIZE=0x10000 +-CONFIG_ENV_OFFSET=0x3b0000 +-CONFIG_ENV_OFFSET_REDUND=0x3c0000 ++CONFIG_ENV_SIZE=0x8000 ++CONFIG_ENV_OFFSET=0x3d0000 ++CONFIG_ENV_OFFSET_REDUND=0x3d8000 + CONFIG_SYS_REDUNDAND_ENVIRONMENT=y + # CONFIG_ENV_IS_NOWHERE is not set + # CONFIG_ENV_IS_IN_EEPROM is not set +diff --git a/configs/p3541-0000_defconfig b/configs/p3541-0000_defconfig +index fe3f00a30e..d9c161483a 100644 +--- a/configs/p3541-0000_defconfig ++++ b/configs/p3541-0000_defconfig +@@ -3,9 +3,9 @@ CONFIG_ARCH_TEGRA=y + CONFIG_SYS_TEXT_BASE=0x80080000 + CONFIG_SYS_MALLOC_LEN=0x2500000 + CONFIG_NR_DRAM_BANKS=16 +-CONFIG_ENV_SIZE=0x10000 +-CONFIG_ENV_OFFSET=0x3b0000 +-CONFIG_ENV_OFFSET_REDUND=0x3c0000 ++CONFIG_ENV_SIZE=0x8000 ++CONFIG_ENV_OFFSET=0x3d0000 ++CONFIG_ENV_OFFSET_REDUND=0x3d8000 + CONFIG_SYS_REDUNDAND_ENVIRONMENT=y + CONFIG_ENV_SECT_SIZE=0x1000 + CONFIG_DEFAULT_DEVICE_TREE="tegra210-p3541-0000" +-- +2.32.0 + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0017-Jetson-Xavier-NX-TX2-NX-mender.patch b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0017-Jetson-Xavier-NX-TX2-NX-mender.patch new file mode 100644 index 000000000..e7fce64a9 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0017-Jetson-Xavier-NX-TX2-NX-mender.patch @@ -0,0 +1,61 @@ +From 0836e2cf2ba76c50cc25915d398e1684d86396d2 Mon Sep 17 00:00:00 2001 +From: Matt Madison +Date: Thu, 3 Feb 2022 12:34:52 -0800 +Subject: [PATCH 16/16] Jetson Xavier NX TX2-NX mender + +Signed-off-by: Matt Madison +--- + configs/p3636-0001_defconfig | 33 +++++++++++++++++++++++++++++++-- + 1 file changed, 31 insertions(+), 2 deletions(-) + +diff --git a/configs/p3636-0001_defconfig b/configs/p3636-0001_defconfig +index 9e90f1ff8a..3da443ae8b 100644 +--- a/configs/p3636-0001_defconfig ++++ b/configs/p3636-0001_defconfig +@@ -1,8 +1,6 @@ + CONFIG_ARM=y + CONFIG_ARCH_TEGRA=y + CONFIG_SYS_TEXT_BASE=0x80080000 +-CONFIG_ENV_SIZE=0x8000 +-CONFIG_ENV_OFFSET=0x3D8000 + CONFIG_NR_DRAM_BANKS=1043 + CONFIG_DEFAULT_DEVICE_TREE="tegra186-p3636-0001" + CONFIG_TEGRA186=y +@@ -39,3 +37,34 @@ CONFIG_SYS_NS16550=y + CONFIG_CMD_CACHE=y + CONFIG_NVME=y + CONFIG_OF_LIBFDT_OVERLAY=y ++CONFIG_ENV_SIZE=0x20000 ++CONFIG_ENV_OFFSET=0x3bb000 ++CONFIG_ENV_OFFSET_REDUND=0x3db000 ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y ++# CONFIG_ENV_IS_NOWHERE is not set ++# CONFIG_ENV_IS_IN_EEPROM is not set ++# CONFIG_ENV_IS_IN_FAT is not set ++# CONFIG_ENV_IS_IN_EXT4 is not set ++# CONFIG_ENV_IS_IN_FLASH is not set ++# CONFIG_ENV_IS_IN_NAND is not set ++# CONFIG_ENV_IS_IN_NVRAM is not set ++# CONFIG_ENV_IS_IN_ONENAND is not set ++# CONFIG_ENV_IS_IN_REMOTE is not set ++# CONFIG_ENV_IS_IN_SPI_FLASH is not set ++# CONFIG_ENV_IS_IN_UBI is not set ++CONFIG_MMC=y ++CONFIG_ENV_IS_IN_MMC=y ++CONFIG_CMD_EXT4=y ++CONFIG_CMD_FS_GENERIC=y ++# CONFIG_BOOTCOUNT_BOOTLIMIT is not set ++# CONFIG_BOOTCOUNT_GENERIC is not set ++# CONFIG_BOOTCOUNT_EXT is not set ++# CONFIG_BOOTCOUNT_AM33XX is not set ++# CONFIG_BOOTCOUNT_RAM is not set ++# CONFIG_BOOTCOUNT_I2C is not set ++# CONFIG_BOOTCOUNT_AT91 is not set ++# CONFIG_BOOTCOUNT_MEM is not set ++# CONFIG_BOOTCOUNT_ALEN is not set ++CONFIG_BOOTCOUNT_LIMIT=y ++CONFIG_BOOTCOUNT_ENV=y ++# CONFIG_BOOTCOMMAND is not set +-- +2.32.0 + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-bup-payload.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-bup-payload.bbappend new file mode 100644 index 000000000..98aa58dfe --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-bup-payload.bbappend @@ -0,0 +1 @@ +inherit image_types_mender_tegra diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-mender-tegra-vars.inc b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-mender-tegra-vars.inc new file mode 100644 index 000000000..64051c14e --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-mender-tegra-vars.inc @@ -0,0 +1,29 @@ +MENDER_UBOOT_AUTO_CONFIGURE = "0" +MENDER_UBOOT_CONFIG_SYS_MMC_ENV_PART = "2" + +TEGRA_MENDER_BOOTENV_SIZE_DEFAULT = "0x20000" +TEGRA_MENDER_BOOTENV_SIZE_DEFAULT:tegra210 = "${@'0x10000' if (d.getVar('TEGRA_SPIFLASH_BOOT') or '') == '1' else '0x20000'}" +BOOTENV_SIZE ?= "${TEGRA_MENDER_BOOTENV_SIZE_DEFAULT}" + +# Calculate this offset by adding up the offsets of each partition preceeding the uboot_env partition in sdmmc_boot and aligning to the next +# 4096 byte boundary, then subtracting 4 MiB (4194304) since the sdmmc_boot represents the combined boot0 and boot1 partitions +# Please note the suggestions in the nvidia thread at https://devtalk.nvidia.com/default/topic/1063652/jetson-tx2/mmcblk0boot1-usage-at-address-4177408-and-u-boot-parameter-storage-space-availability/ +# regarding suggestions about locating this environment area in mmcblk0boot1 at 0x3BB000 (3911680) +# We use the same offset for tegra210 eMMC. For tegra210 SPI/SD, we +# locate the environment in the padding block, before the VER +# partition when using SPI flash. Otherwise, we use the location of +# the ENV partition on the SDcard - 0xC00000 (12582912). +MENDER_UBOOT_ENV_STORAGE_DEVICE_OFFSET:tegra186 = "3911680" +# Env offset changed on t210 eMMC platforms in L4T R32.5.x and later +TEGRA_210_EMMC_UBOOT_ENV_OFFSET:l4t-mender-32-4-3 = "3911680" +TEGRA_210_EMMC_UBOOT_ENV_OFFSET = "3801088" +MENDER_UBOOT_ENV_STORAGE_DEVICE_OFFSET:tegra210 = "${@'3866624' if (d.getVar('TEGRA_SPIFLASH_BOOT') or '') == '1' else '${TEGRA_210_EMMC_UBOOT_ENV_OFFSET}'}" +MENDER_UBOOT_MMC_ENV_LINUX_DEVICE_PATH:tegra210 = "${@'/dev/mtd0' if (d.getVar('TEGRA_SPIFLASH_BOOT') or '') == '1' else mender_get_uboot_env_mmc_linux_device_path(d)}" + +# Optionally use SDcard instead of SPI flash on Jetson Nano dev kits. +# Starting with meta-tegra zeus branch, Nano dev kits use the SPI flash +# for the U-Boot environment (as NVIDIA does with L4T R32.3.1 and +# later). Note that the u-boot environment will still live on SPI flash +# and relocating the environment also to SD may be possible but is not +# supported. +MENDER_UBOOT_STORAGE_DEVICE:tegra210 = "${@'1' if (d.getVar('TEGRA_SPIFLASH_BOOT') or '') == '1' else '0'}" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-mender-tegra.inc b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-mender-tegra.inc new file mode 100644 index 000000000..a10df896f --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-mender-tegra.inc @@ -0,0 +1,30 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/patches:" + +SRC_URI:append:mender-uboot = " file://0010-tegra-mender-auto-configured-modified.patch" +SRC_URI:append:mender-uboot = " file://0011-Jetson-TX2-mender-boot-commands.patch" +SRC_URI:append:mender-uboot = " file://0013-Reduce-env-size-on-p3450-0000-to-64KiB.patch" +ADDITIONAL_PATCHES = " \ + file://0012-p3541-0000_defconfig-Mender-patch.patch \ + file://0015-Update-TX1-nano-emmc-defconfigs-for-new-UBENV-locati.patch \ + file://0017-Jetson-Xavier-NX-TX2-NX-mender.patch \ +" +SRC_URI:append:mender-uboot = "${ADDITIONAL_PATCHES}" + +do_provide_mender_defines:append:tegra210() { + if [ "${TEGRA_SPIFLASH_BOOT}" = "1" ]; then + sed -i -e'/^CONFIG_SYS_MMC_ENV/d' ${S}/mender_Kconfig_fragment + fi +} + +mender_get_clean_kernel_devicetree:tegra() { + # Singleton device tree is not required on all platforms, + # and the value is not used on tegra platforms, so just provide a + # dummy value. + echo "dummy" +} + +# Work around Mender's installation of this file (symlink) +# in its libubootenv bbappend +do_install:append:mender-uboot() { + rm -f ${D}${sysconfdir}/fw_env.config +} diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-tegra_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-tegra_%.bbappend new file mode 100644 index 000000000..88eb8b1d0 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-tegra_%.bbappend @@ -0,0 +1,3 @@ +require recipes-bsp/u-boot/u-boot-mender.inc +require recipes-bsp/u-boot/u-boot-mender-tegra.inc +require recipes-bsp/u-boot/u-boot-mender-tegra-vars.inc diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-tegra_2022.01.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-tegra_2022.01.bbappend new file mode 100644 index 000000000..ff5a4054f --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-tegra_2022.01.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/patches:" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/uefi/edk2-firmware-tegra_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/uefi/edk2-firmware-tegra_%.bbappend new file mode 100644 index 000000000..d030091b6 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/uefi/edk2-firmware-tegra_%.bbappend @@ -0,0 +1,9 @@ + +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + +SRC_URI += "file://0007-runtime-access-for-KernelCommandLine-efivar.patch;patchdir=.." +SRC_URI += "file://0008-enable-rootfs-redundancy.patch;patchdir=.." +SRC_URI += "file://0009-BootChainDxe-fix.patch;patchdir=.." + + + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/uefi/files/0007-runtime-access-for-KernelCommandLine-efivar.patch b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/uefi/files/0007-runtime-access-for-KernelCommandLine-efivar.patch new file mode 100644 index 000000000..f41c26682 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/uefi/files/0007-runtime-access-for-KernelCommandLine-efivar.patch @@ -0,0 +1,39 @@ +diff --git edk2-tegra.a/edk2-nvidia/Silicon/NVIDIA/Drivers/NvidiaConfigDxe/NvidiaConfigDxe.c edk2-tegra.b/edk2-nvidia/Silicon/NVIDIA/Drivers/NvidiaConfigDxe/NvidiaConfigDxe.c +index 90e515ae..a00efb6c 100644 +--- edk2-tegra.a/edk2-nvidia/Silicon/NVIDIA/Drivers/NvidiaConfigDxe/NvidiaConfigDxe.c ++++ edk2-tegra.b/edk2-nvidia/Silicon/NVIDIA/Drivers/NvidiaConfigDxe/NvidiaConfigDxe.c +@@ -133,7 +133,7 @@ InitializeSettings ( + if (KernelCmdLineLen < sizeof (CmdLine)) { + KernelCmdLineLen = sizeof (CmdLine); + ZeroMem (&CmdLine, KernelCmdLineLen); +- Status = gRT->SetVariable (L"KernelCommandLine", &gNVIDIAPublicVariableGuid, EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS, KernelCmdLineLen, (VOID *)&CmdLine); ++ Status = gRT->SetVariable (L"KernelCommandLine", &gNVIDIAPublicVariableGuid, EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS, KernelCmdLineLen, (VOID *)&CmdLine); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: Error setting command line variable %r\r\n", __FUNCTION__, Status)); + } +diff --git edk2-tegra.a/edk2-nvidia/Silicon/NVIDIA/Drivers/NvidiaConfigDxe/NvidiaConfigHii.vfr edk2-tegra.b/edk2-nvidia/Silicon/NVIDIA/Drivers/NvidiaConfigDxe/NvidiaConfigHii.vfr +index dbc26647..58c9aa91 100644 +--- edk2-tegra.a/edk2-nvidia/Silicon/NVIDIA/Drivers/NvidiaConfigDxe/NvidiaConfigHii.vfr ++++ edk2-tegra.b/edk2-nvidia/Silicon/NVIDIA/Drivers/NvidiaConfigDxe/NvidiaConfigHii.vfr +@@ -58,7 +58,7 @@ formset + guid = NVIDIA_TOKEN_SPACE_GUID; + + efivarstore NVIDIA_KERNEL_COMMAND_LINE, +- attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE, // EFI variable attributes ++ attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS, // EFI variable attributes + name = KernelCommandLine, + guid = NVIDIA_PUBLIC_VARIABLE_GUID; + +diff --git edk2-tegra.a/edk2-nvidia/Silicon/NVIDIA/Library/PlatformBootManagerLib/PlatformBm.c edk2-tegra.b/edk2-nvidia/Silicon/NVIDIA/Library/PlatformBootManagerLib/PlatformBm.c +index a3fb49d6..f642b433 100644 +--- edk2-tegra.a/edk2-nvidia/Silicon/NVIDIA/Library/PlatformBootManagerLib/PlatformBm.c ++++ edk2-tegra.b/edk2-nvidia/Silicon/NVIDIA/Library/PlatformBootManagerLib/PlatformBm.c +@@ -1023,7 +1023,7 @@ IsPlatformConfigurationNeeded ( + AddlCmdLen = sizeof (AddlCmdLine); + Status = gRT->GetVariable (L"KernelCommandLine", &gNVIDIAPublicVariableGuid, &AddlCmdLineAttributes, &AddlCmdLen, &AddlCmdLine); + if (EFI_ERROR (Status)) { +- AddlCmdLineAttributes = EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS; ++ AddlCmdLineAttributes = EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS; + ZeroMem (&AddlCmdLine, sizeof (AddlCmdLine)); + } + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/uefi/files/0008-enable-rootfs-redundancy.patch b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/uefi/files/0008-enable-rootfs-redundancy.patch new file mode 100644 index 000000000..556b92e12 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/uefi/files/0008-enable-rootfs-redundancy.patch @@ -0,0 +1,13 @@ +diff --git edk2-tegra.a/edk2-nvidia/Silicon/NVIDIA/Tegra/DeviceTree/L4TConfiguration.dts edk2-tegra.b/edk2-nvidia/Silicon/NVIDIA/Tegra/DeviceTree/L4TConfiguration.dts +index 2c619e21..b254ae76 100644 +--- edk2-tegra.a/edk2-nvidia/Silicon/NVIDIA/Tegra/DeviceTree/L4TConfiguration.dts ++++ edk2-tegra.b/edk2-nvidia/Silicon/NVIDIA/Tegra/DeviceTree/L4TConfiguration.dts +@@ -37,7 +37,7 @@ + locked; + }; + RootfsRedundancyLevel { +- data = [00 00 00 00]; ++ data = [01 00 00 00]; + runtime; + locked; + }; diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/uefi/files/0009-BootChainDxe-fix.patch b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/uefi/files/0009-BootChainDxe-fix.patch new file mode 100644 index 000000000..d8d568668 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/uefi/files/0009-BootChainDxe-fix.patch @@ -0,0 +1,15 @@ +diff --git edk2-tegra.a/edk2-nvidia/Silicon/NVIDIA/Drivers/BootChainDxe/BootChainDxe.c edk2-tegra.b/edk2-nvidia/Silicon/NVIDIA/Drivers/BootChainDxe/BootChainDxe.c +index cfaf6872..d7eaf0f3 100644 +--- edk2-tegra.a/edk2-nvidia/Silicon/NVIDIA/Drivers/BootChainDxe/BootChainDxe.c ++++ edk2-tegra.b/edk2-nvidia/Silicon/NVIDIA/Drivers/BootChainDxe/BootChainDxe.c +@@ -336,8 +336,8 @@ BootChainExecuteUpdate ( + BCStatus = STATUS_ERROR_BOOT_CHAIN_FAILED; + goto SetStatusAndBootOs; + } +- } else { +- // Status is already ERROR or SUCCESS, finish the update and boot OS ++ } else if (BCStatus != STATUS_SUCCESS) { ++ // Status is already ERROR, finish the update and boot OS + goto FinishUpdateAndBootOs; + } + } diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/images/tegra-minimal-initramfs.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/images/tegra-minimal-initramfs.bbappend new file mode 100644 index 000000000..40aa47228 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/images/tegra-minimal-initramfs.bbappend @@ -0,0 +1,3 @@ +# Prevents circular dependency on u-boot due to EXTRA_IMAGEDEPENDS. +# See https://hub.mender.io/t/warrior-tegra-build-cicular-dependencies/757/5 and comments from Mirza +EXTRA_IMAGEDEPENDS:remove = "u-boot" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/initrdscripts/tegra-minimal-init/platform-preboot-cboot.sh b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/initrdscripts/tegra-minimal-init/platform-preboot-cboot.sh new file mode 100644 index 000000000..88574cba0 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/initrdscripts/tegra-minimal-init/platform-preboot-cboot.sh @@ -0,0 +1,23 @@ +slotsfx="" +mayberoot="" +for bootarg in `cat /proc/cmdline`; do + case "$bootarg" in + boot.slot_suffix=*) slotsfx="${bootarg##boot.slot_suffix=}" ;; + root=*) mayberoot="${bootarg##root=}" ;; + ro) opt="ro" ;; + rootwait) wait="yes" ;; + esac +done +rootdev=`blkid -l -t PARTLABEL=APP$slotsfx | cut -d: -f1` +if [ -z "$rootdev" ]; then + if [ -n "$mayberoot" ]; then + rootdev="$mayberoot" + else + rootdev="/dev/mmcblk0p1" + fi +fi + +if which bootcountcheck >/dev/null 2>&1; then + bootcountcheck +fi + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/initrdscripts/tegra-minimal-init_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/initrdscripts/tegra-minimal-init_%.bbappend new file mode 100644 index 000000000..cb33efc35 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/initrdscripts/tegra-minimal-init_%.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" + +EXTRADEPS = "" +EXTRADEPS:tegra = "tegra-boot-tools-earlyboot" +EXTRADEPS:tegra210 = "" +EXTRADEPS:tegra234 = "" +RDEPENDS:${PN} += "${EXTRADEPS}" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-kernel/linux/linux-tegra_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-kernel/linux/linux-tegra_%.bbappend new file mode 100644 index 000000000..61dd95f5f --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-kernel/linux/linux-tegra_%.bbappend @@ -0,0 +1,9 @@ +# Rather ugly hack to ensure that meta-mender-core's files directory +# is also removed from consideration, since linux-yocto.bbclass adds +# all directories that contain config fragments into its file-cksums +# list, which needlessly (for us) changes the task hash. +python() { + extrapaths = d.getVar('FILESEXTRAPATHS').split(':') + newpaths = ':'.join([path for path in extrapaths if not path.endswith('meta-mender-core/recipes-kernel/linux/files')]) + d.setVar('FILESEXTRAPATHS', newpaths) +} diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-client/files/tegra234/efi_systemd_machine_id.sh b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-client/files/tegra234/efi_systemd_machine_id.sh new file mode 100644 index 000000000..c5ea52b7a --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-client/files/tegra234/efi_systemd_machine_id.sh @@ -0,0 +1,128 @@ +#!/bin/sh + +function to_unicode() { + local in="$1" + local out + + for (( i=0; i<${#in}; i++)); do + char=${in:i:1} + out+="$char" + out+="\x00" + done + echo -n "$out" +} + + +function fill_to_size() { + local size="$2" + local out="$1" + local fill_size=$(( $size - (${#out}*2/5) )) + + for i in $(seq $fill_size) + do + out+="\x00" + done + + echo -n "$out" +} + + +function write_efivar() { + local readonly varname="781e084c-a330-417c-b678-38e696380cb9-KernelCommandLine" + local readonly total_size=514 + local readonly attr_size=4 + local readonly data_size=$(( $total_size - $attr_size)) + local in="$1" + + #printf "\nin=$in\n" + local out="$(to_unicode "$in")" + out="$(fill_to_size "$out" $data_size)" + + local f=$(mktemp) + printf "$out" > $f + efivar -n $varname -f $f -w + rm ${f} +} + +function read_efivar() { + local readonly varname="/sys/firmware/efi/efivars/KernelCommandLine-781e084c-a330-417c-b678-38e696380cb9" + local var=$(cat $varname | tail -c +5 | tr -d '[\000]') + + echo -n "$var" +} + + +function read_efi_machine_id() { + local var=$(read_efivar) + local id + + for i in $var; do + case $i in + systemd.machine_id=*) + id="${i#*=}" + ;; + *) + ;; + esac + done + echo -n "$id" +} + + +function write_efi_machine_id() { + local id="$1" + local var=$(read_efivar) + local out_var + local sep="" + local id_mod=false + + for i in $var; do + out_var+="$sep" + case $i in + systemd.machine_id=*) + out_var+="systemd.machine_id=$id" + id_mod=true + ;; + *) + out_var+="$i" + ;; + esac + sep=" " + done + + if [ "$id_mod" = false ] ; then + out_var+="${sep}systemd.machine_id=$id" + fi + + write_efivar "$out_var" +} + + +usage="Usage: efi_systemd_machine_id.sh [-r] [-w val]" + +while getopts "rw:" opt; do + case ${opt} in + r ) + printf "$(read_efi_machine_id)\n" + ;; + w ) + write_efi_machine_id $OPTARG + ;; + \? ) + echo "$usage";exit 2 + ;; + esac +done + + +if [ $OPTIND -eq 1 ]; then + echo "$usage"; exit 1 +fi + + + + + + + + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-client/files/tegra234/tegra234-mender-client-set-systemd-machine-id.sh b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-client/files/tegra234/tegra234-mender-client-set-systemd-machine-id.sh new file mode 100644 index 000000000..841ab4fcb --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-client/files/tegra234/tegra234-mender-client-set-systemd-machine-id.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +set -eu + +BOOTENV_PRINT="efi_systemd_machine_id.sh -r" +BOOTENV_SET="efi_systemd_machine_id.sh -w" + +CURRENT_BOOTLOADER_ID=$($BOOTENV_PRINT 2>/dev/null | cut -d= -f2) +CURRENT_SYSTEMD_ID=$(cat /etc/machine-id) + +rc=0 +if [ -z "${CURRENT_BOOTLOADER_ID}" ] && [ ! -z "${CURRENT_SYSTEMD_ID}" ]; then + $BOOTENV_SET "${CURRENT_SYSTEMD_ID}" + rc=$? +elif [ "${CURRENT_BOOTLOADER_ID}" != "${CURRENT_SYSTEMD_ID}" ]; then + echo "Error; bootloader and systemd disagree on machine-id." >&2 + rc=1 +fi + +exit $rc diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-client/mender-client_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-client/mender-client_%.bbappend new file mode 100644 index 000000000..61601c2ce --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-client/mender-client_%.bbappend @@ -0,0 +1,21 @@ +EXTRADEPS = "" +EXTRADEPS:tegra = "tegra-bup-payload tegra-boot-tools tegra-boot-tools-nvbootctrl tegra-boot-tools-lateboot${@' libubootenv-fake' if d.getVar('PREFERRED_PROVIDER_virtual/bootloader').startswith('cboot') else ''}" +EXTRADEPS:tegra210 = "tegra-bup-payload tegra-boot-tools" +EXTRADEPS:jetson-agx-orin-devkit = "tegra-bup-payload libubootenv-fake mender-update-verifier" +RDEPENDS:${PN} += "${EXTRADEPS}" + +FILESEXTRAPATHS:prepend:tegra234 := "${THISDIR}/files/tegra234:" + +SRC_URI:remove:mender-persist-systemd-machine-id = " \ + file://mender-client-set-systemd-machine-id.sh \ +" +SRC_URI:append:tegra234:mender-persist-systemd-machine-id = " \ + file://tegra234-mender-client-set-systemd-machine-id.sh \ + file://efi_systemd_machine_id.sh \ +" + +do_install:prepend:tegra234:class-target:mender-persist-systemd-machine-id() { + install -d -m 755 ${D}${bindir} + install -m 755 ${WORKDIR}/efi_systemd_machine_id.sh ${D}${bindir}/ + cp ${WORKDIR}/tegra234-mender-client-set-systemd-machine-id.sh ${WORKDIR}/mender-client-set-systemd-machine-id.sh +} diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-update-verifier/files/mender-update-verifier.service b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-update-verifier/files/mender-update-verifier.service new file mode 100644 index 000000000..43e9f3b72 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-update-verifier/files/mender-update-verifier.service @@ -0,0 +1,11 @@ +[Unit] +Description=Mender update verifier +Requires=nv_update_verifier.service +Before=mender-client.service + +[Service] +Type=oneshot +ExecStart=mender-update-verifier.sh + +[Install] +WantedBy=multi-user.target diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-update-verifier/files/mender-update-verifier.sh b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-update-verifier/files/mender-update-verifier.sh new file mode 100755 index 000000000..cbc63e884 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-update-verifier/files/mender-update-verifier.sh @@ -0,0 +1,33 @@ +#!/bin/sh + + +function read_efivar() { + local AB="AB" + local slot="Slot${AB:$1:1}" + local varname="/sys/firmware/efi/efivars/RootfsStatus${slot}-781e084c-a330-417c-b678-38e696380cb9" + local var=$(cat $varname | tail -c +5 | tr -d '[\000]') + + echo -n "$var" +} + + + +function get_bootable_status() { + local status="$(read_efivar "${1}")" + local size="${#status}" + return $size +} + + +function set_update_status() { + get_bootable_status 0 + local slot0=$? + get_bootable_status 1 + local slot1=$? + if [[ "$slot0" -ne 0 || "$slot1" -ne 0 ]]; then + fw_setenv -s <<< upgrade_available=0 + fi +} + +set_update_status + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-update-verifier/mender-update-verifier.bb b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-update-verifier/mender-update-verifier.bb new file mode 100644 index 000000000..02a3b877f --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/mender-update-verifier/mender-update-verifier.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "Mender update verifier" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = "\ + file://mender-update-verifier.service \ + file://mender-update-verifier.sh \ +" + +S = "${WORKDIR}" + +do_install() { + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${S}/mender-update-verifier.service ${D}${systemd_system_unitdir} + install -d -m 755 ${D}${bindir} + install -m 755 ${WORKDIR}/mender-update-verifier.sh ${D}${bindir}/ +} + +inherit systemd + +SYSTEMD_SERVICE:${PN} = "mender-update-verifier.service" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-commit-check-script-uboot b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-commit-check-script-uboot new file mode 100644 index 000000000..f2764b572 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-commit-check-script-uboot @@ -0,0 +1,38 @@ +#!/bin/sh + +LABELCHARS="AB" + +echo "Verifying Tegra bootloader update" +curslot=`nvbootctrl get-current-slot 2>/dev/null || tegra-boot-control --current-slot 2>/dev/null` +cfglbl="\"RootfsPart${LABELCHARS:$curslot:1}\"" +devnam=`grep -h "$cfglbl:" /etc/mender/mender.conf /var/lib/mender/mender.conf | cut -d: -f2 | cut -d, -f1 | tr -d '" '` +if [ -z "$devnam" ]; then + echo "ERR: could not determine expected mender device name for boot slot $curslot" >&2 + exit 1 +fi + +# If the rootfs partitions are eMMC/SDcard device names, verify that +# the mender boot partition in U-Boot and the Tegra bootloader boot +# slot match. If not, the Tegra bootloader update failed, and we +# need to reset the boot slot to get the Tegra bootloader and Mender +# resynchronized. +if [ "${devnam##/dev/mmcblk}" != "${devnam}" ]; then + bootpart=`fw_printenv -n mender_boot_part` + if [ -z "$bootpart" ]; then + echo "ERR: could not retrieve mender_boot_part from U-Boot env" >&2 + exit 1 + fi + devnampart=`expr "${devnam##/dev/mmcblk*p}" \+ 0 2>/dev/null` + if [ -z "$devnampart" ]; then + echo "ERR: could not extract partition number from rootfs device name" >&2 + exit 1 + fi + if [ $bootpart -ne $devnampart ]; then + altslot=$(expr 1 - $curslot) + echo "Detected Tegra bootloader upgrade failure, resetting boot slot to $altslot" >&2 + echo "*** Reboot required ***" >&2 + tegra-boot-control --set-active $altslot + exit 1 + fi +fi +exit 0 diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script new file mode 100644 index 000000000..5779ac86b --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script @@ -0,0 +1,69 @@ +#!/bin/sh + +mnt= +LABELCHARS="AB" +COPY_MACHINE_ID=@COPY_MACHINE_ID@ + +cleanup() { + [ -n "$mnt" ] || return + for d in sys proc dev run; do + if mountpoint -q "${mnt}/${d}"; then + umount "${mnt}/${d}" >/dev/null 2>&1 || true + fi + done + if mountpoint -q "$mnt"; then + umount "$mnt" >/dev/null 2>&1 || true + fi + rmdir "$mnt" >/dev/null 2>&1 || true +} + +echo "Installing NVIDIA bootloader update payload" + +if which tegra-boot-control >/dev/null 2>&1; then + current_slot=`tegra-boot-control --current-slot` +else + current_slot=`nvbootctrl get-current-slot` +fi +echo "Current boot slot: $current_slot" +otherslot=`expr 1 - $current_slot` +cfglbl="\"RootfsPart${LABELCHARS:$otherslot:1}\"" +devnam=`grep -h "$cfglbl:" /etc/mender/mender.conf /var/lib/mender/mender.conf | cut -d: -f2 | cut -d, -f1 | tr -d '" '` +if [ -z "$devnam" ]; then + echo "ERR: could not determine device name for boot slot $otherslot" >&2 + exit 1 +fi +mnt=`mktemp -d -t nvbup.XXXXXX` +if [ -z "$mnt" -o ! -d "$mnt" ]; then + echo "ERR: could not create directory for mounting install partition" >&2 + exit 1 +fi +mount -o ro "$devnam" "$mnt" +if [ ! -d "${mnt}/opt/ota_package" ]; then + echo "ERR: Missing /opt/ota_package directory in installed rootfs" >&2 + cleanup + exit 1 +fi +# tegra-bootloader-update needs access to these filesystems, +# so bind-mount them into the new rootfs for the chroot +mount --bind /sys "${mnt}/sys" +mount --bind /proc "${mnt}/proc" +mount --bind /dev "${mnt}/dev" +# for tegra-bootinfo +mount --bind /run "${mnt}/run" + +if ! chroot "${mnt}" /usr/bin/tegra-bootloader-update /opt/ota_package/bl_update_payload; then + echo "ERR: bootloader update failed" >&2 + cleanup + exit 1 +fi +echo "Successful bootloader update" +if [ -n "$COPY_MACHINE_ID" ]; then + curid=$(systemd-machine-id-setup --print) + storedid=$(chroot "${mnt}" /usr/bin/tegra-bootinfo -n -v machine_id 2>/dev/null) + if [ "$curid" != "$storedid" ]; then + chroot "${mnt}" /usr/bin/tegra-bootinfo --initialize 2>/dev/null + chroot "${mnt}" /usr/bin/tegra-bootinfo -V machine_id "$curid" + fi +fi +cleanup +exit 0 diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script-uboot b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script-uboot new file mode 100644 index 000000000..27932951a --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script-uboot @@ -0,0 +1,101 @@ +#!/bin/sh + +mnt= +UBOOTVARS="bootcount mender_boot_part mender_boot_part_hex upgrade_available" +ubvarfile= +install_fwenv= + +cleanup() { + [ -n "$mnt" ] || return + for d in sys proc dev run; do + if mountpoint -q "${mnt}/${d}"; then + umount "${mnt}/${d}" >/dev/null 2>&1 || true + fi + done + if mountpoint -q "$mnt"; then + umount "$mnt" >/dev/null 2>&1 || true + fi + rmdir "$mnt" >/dev/null 2>&1 || true +} + +save_vars() { + local v + ubvarfile=$(mktemp -p "$1" ubvars.XXXXXX) + for v in $UBOOTVARS; do + fw_printenv $v >>$ubvarfile + done +} + +echo "Installing NVIDIA bootloader update payload" + +new_boot_part=`fw_printenv -n mender_boot_part` +mnt=`mktemp -d -t nvbup.XXXXXX` +if [ -z "$mnt" -o ! -d "$mnt" ]; then + echo "ERR: could not create directory for mounting install partition" >&2 + exit 1 +fi +mount -o ro /dev/mmcblk0p${new_boot_part} "$mnt" +if [ ! -d "${mnt}/opt/ota_package" ]; then + echo "ERR: Missing /opt/ota_package directory in installed rootfs" >&2 + cleanup + exit 1 +fi +# tegra-bootloader-update needs access to these filesystems, +# so bind-mount them into the new rootfs for the chroot +mount --bind /sys "${mnt}/sys" +mount --bind /proc "${mnt}/proc" +mount --bind /dev "${mnt}/dev" +mount -t tmpfs tmpfs "${mnt}/run" + +# Check for u-boot environment location change; save vars for restoration +# into the new environment after the update +if [ -e "$mnt/usr/share/u-boot/fw_env.config" ]; then + if ! diff -qbi /etc/fw_env.config $mnt/usr/share/u-boot/fw_env.config > /dev/null 2>&1; then + save_vars "${mnt}/run" + install_fwenv=yes + fi +fi + +if ! chroot "${mnt}" /usr/bin/tegra-bootloader-update --dry-run /opt/ota_package/bl_update_payload >/dev/null 2>&1; then + # If the tool reports that the version partitions are corrupted, this is an update on a tegra210 + # device with the old partition layout where the U-Boot environment overwrote the version partition(s), + # in which case we recover via complete initialization. + if chroot "${mnt}" /usr/bin/tegra-bootloader-update --dry-run /opt/ota_package/bl_update_payload 2>&1 | grep -q 'version partitions are corrupted'; then + # For the recoverable case, we will have also detected a change the U-Boot environment change + if [ -n "$install_fwenv" ]; then + echo "Detected bootloader partition upgrade, reinitializing" >&2 + if ! chroot "${mnt}" /usr/bin/tegra-bootloader-update --initialize /opt/ota_package/bl_update_payload; then + echo "ERR: bootloader re-initialization failed" >&2 + cleanup + exit 1 + fi + else + echo "WARN: VER partitions are corrupted" >&2 + echo "WARN: Please refer to https://github.com/OE4T/tegra-demo-distro/pull/113 for additional context" >&2 + echo "WARN: Attempting update anyway" >&2 + fi + else + echo "ERR: cannot perform bootloader update" >&2 + cleanup + exit 1 + fi +elif ! chroot "${mnt}" /usr/bin/tegra-bootloader-update /opt/ota_package/bl_update_payload; then + echo "ERR: bootloader update failed" >&2 + cleanup + exit 1 +fi +# If the U-Boot environment config has changed, propagate the important variables +# to the new environment +if [ -n "$install_fwenv" ]; then + if ! chroot "${mnt}" /usr/bin/fw_setenv -c /usr/share/u-boot/fw_env.config -s /run/$(basename "$ubvarfile"); then + echo "ERR: could not restore U-Boot environment after bootloader update" >&2 + cleanup + exit 1 + fi + if [ -L /etc/fw_env.config ]; then + cp $mnt/usr/share/u-boot/fw_env.config $(readlink /etc/fw_env.config) + fi +fi +echo "Successful bootloader update" +cleanup +exit 0 diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/switch-rootfs b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/switch-rootfs new file mode 100644 index 000000000..1d4c5774d --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/switch-rootfs @@ -0,0 +1,40 @@ +#!/bin/sh +echo "$(mender show-artifact): $(basename "$0") was called!" >&2 + +get_bootpart() { + local current_slot=`nvbootctrl get-current-slot 2>/dev/null` + if [ -z "$current_slot" ]; then + echo "ERR: could not identify current boot slot" >&2 + echo "UNKNOWN" + return + fi + echo "$current_slot" +} + +reset_unbootable_status() { + local AB="AB" + local slot="Slot${AB:$1:1}" + local varname="781e084c-a330-417c-b678-38e696380cb9-RootfsStatus${slot}" + + local f=$(mktemp) + printf "\x00\x00\x00\x00" > $f + efivar -n "${varname}" -f $f -w + rm ${f} +} + + +current_slot=`get_bootpart` +echo "current_slot=$current_slot" >&2 + +next_slot= +if [ $current_slot = "0" ]; then + next_slot="1" +else + next_slot="0" +fi + +echo "next_slot=$next_slot" >&2 +nvbootctrl set-active-boot-slot $next_slot +reset_unbootable_status $next_slot + +exit 0 diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/tegra-state-scripts_1.0.bb b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/tegra-state-scripts_1.0.bb new file mode 100644 index 000000000..85bd8fc34 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/tegra-state-scripts_1.0.bb @@ -0,0 +1,56 @@ +SRC_URI = " \ + file://redundant-boot-commit-check-script-uboot \ + file://redundant-boot-install-script \ + file://redundant-boot-install-script-uboot \ + file://switch-rootfs \ +" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +S = "${WORKDIR}" + +inherit mender-state-scripts + +PERSIST_MACHINE_ID="" +PERSIST_MACHINE_ID:mender-persist-systemd-machine-id = "yes" + +# We have a different install script for U-Boot vs. cboot, since +# the mechanism for determining boot partitions is different between +# the two, and with cboot there is no U-Boot environment for copying +# the machine-id. +copy_install_script() { + sed -e's,@COPY_MACHINE_ID@,${PERSIST_MACHINE_ID},' ${S}/redundant-boot-install-script > ${MENDER_STATE_SCRIPTS_DIR}/ArtifactInstall_Leave_80_bl-update +} + +copy_install_script:mender-uboot() { + cp ${S}/redundant-boot-install-script-uboot ${MENDER_STATE_SCRIPTS_DIR}/ArtifactInstall_Leave_80_bl-update + cp ${S}/redundant-boot-commit-check-script-uboot ${MENDER_STATE_SCRIPTS_DIR}/ArtifactCommit_Enter_80_bl-check-update +} + +do_compile() { + : +} + +do_compile:tegra194() { + copy_install_script +} + +do_compile:tegra186() { + copy_install_script +} + +do_compile:tegra210() { + cp ${S}/redundant-boot-install-script-uboot ${MENDER_STATE_SCRIPTS_DIR}/ArtifactInstall_Leave_80_bl-update +} + +do_compile:tegra234() { + cp ${S}/switch-rootfs ${MENDER_STATE_SCRIPTS_DIR}/ArtifactInstall_Leave_50_switch-rootfs +} + +# Make sure scripts aren't left around from old builds +do_deploy:prepend() { + rm -rf ${DEPLOYDIR}/mender-state-scripts +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/manifest-tegra.xml b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/manifest-tegra.xml new file mode 100644 index 000000000..ab004ff8c --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/manifest-tegra.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/README.md b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/README.md new file mode 100644 index 000000000..91af2942d --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/README.md @@ -0,0 +1,54 @@ +# Tegra Mender Torture Tests + +To help find problems with tegra redundant boot +mender integration +the scrips in this directory can perform testing on mender based targets. + +The scripts currently only support cboot based targets, see [this pr](https://github.com/BoulderAI/meta-mender-community/pull/1) +for a discussion of additional complexities to support uboot based targets. + +# Setup Python + +Run +``` +pip3 install -r requirements.txt +``` + +## Setup http server + +If using tegra-demo-distro layout you can set this up with the +`meta-mender-tegra/scripts/test/setup_image_server.sh` script. +If using a different layout, use this as an example with the detail below. + +The tests require a http server hosting a .mender update file. + +Start a simple http server on a httpserver machine like this, running in +the directory where the mender image is located (or any directory above it). +``` +python -m SimpleHTTPServer 8080 +``` +You'll want to run this in a different terminal window or screen session. + + +## Running the command + +If using tegra-demo-distro layout you can invoke with the +`meta-mender-tegra/scripts/test/do_mender_test.sh` script. +If using a different layout, use this script as an example with the detail below. + +Execute a command like this to start the mender test, replacing arguments as needed +``` +export devicename= +export httpserver= +export menderfile= +export logfile=/tmp/mender-tegra-torture.log +./mender_tegra_test.py --device ${devicename} --install http://${httpserver}:8080/${menderfile} 2>&1 | tee -a ${logfile} +``` + +If testing on a production target where an SSH key is required, use the `--key ` arguement +to specify the key to use for ssh connectivity. + +The script repeats the steps below 10 times +* Standalone mender updates 10 times in a row, ensuring boot slot changes with each reboot. +* Reboots 20 times in a row, ensuring the boot slot does not change. + +The end result should be 100 mender updates interleaved with 200 reboots. diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/device_test.py b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/device_test.py new file mode 100644 index 000000000..5221cce3d --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/device_test.py @@ -0,0 +1,134 @@ +import fabric2 +from fabric2 import Connection +import argparse +import time +import traceback +import sys +import re +import subprocess +import platform + +class DeviceTest: + DEFAULT_USER = 'root' + DEFAULT_BOOT_METHOD = 'cboot' + args = None + connection = None + argparser = None + + def get_parser(self,parent_test="",parent_description=""): + if self.argparser is None: + ''' + Argument parsing for new deployment and provisioning process + ''' + argparser = argparse.ArgumentParser(prog=parent_test, + usage='%(prog)s [options]', + description=parent_description, + formatter_class=argparse.RawTextHelpFormatter) + argparser.add_argument('-d', + '--device', + help='The IP address or name of the device') + + argparser.add_argument('-u', + '--user', + help=f"The SSH username (default is {self.DEFAULT_USER})") + + argparser.add_argument('-p', + '--password', + help='The SSH password (default is no password)') + + argparser.add_argument('-k', + '--key', + help='The SSH key file (used instead of password if specified)') + + self.argparser = argparser + return self.argparser + + + def get_args(self): + if self.args is None: + self.args = self.get_parser().parse_args() + + if self.args.user is None: + print(f"No user specified, using {self.DEFAULT_USER}") + self.args.user=self.DEFAULT_USER + return self.args + + def get_connection(self): + args = self.get_args() + if args.device is None: + print("Missing device argument") + self.get_parser().print_help() + raise RuntimeError("Must specify device as argument") + if self.connection is None: + if args.key is not None: + self.connection = Connection( + host=f'{args.user}@{args.device}', + connect_kwargs={ + "key_filename": args.key, + "password": args.password + }) + elif args.password is not None: + self.connection = Connection( + host=f'{args.user}@{args.device}', + connect_kwargs={ + "password": args.password + }) + else: + self.connection = Connection( + host=f'{args.user}@{args.device}', + connect_kwargs={ + "password": "", + "look_for_keys": False + }) + return self.connection + + def wait_for_device(self): + conn = self.get_connection() + print(f'Trying to connect to {self.get_args().device}....') + success = False + ip = None + quiet = False + while not success: + try: + conn.open() + success = True + except Exception as e: + if not quiet: + print(e) + print('Exception connecting, retrying..') + quiet = True + time.sleep(3) + time.sleep(15) + + def ping(self): + args=self.get_args() + """ + Returns True if host (str) responds to a ping request. + Remember that a host may not respond to a ping (ICMP) request even if the host name is valid. + See https://stackoverflow.com/a/32684938/1446624 + """ + + # Option for the number of packets as a function of + param = '-n' if platform.system().lower() == 'windows' else '-c' + + # Building the command. Ex: "ping -c 1 google.com" + command = ['ping', param, '1', args.device] + + return subprocess.call(command, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT) == 0 + + def wait_for_device_removal(self): + while self.ping(): + pass + + def reboot(self): + conn = self.get_connection() + print("Rebooting device") + result = conn.run("reboot", warn=True) + self.wait_for_device_removal() + self.wait_for_device() + self.get_machine_id() # This tests the connection + + def get_machine_id(self): + conn = self.get_connection() + result = conn.run("systemd-machine-id-setup --print", hide=True, timeout=3) + return result.stdout diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/do_mender_test.sh b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/do_mender_test.sh new file mode 100755 index 000000000..aff8dc63c --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/do_mender_test.sh @@ -0,0 +1,78 @@ +#! /bin/bash +set -e +scriptdir="$(dirname "$(readlink -f "$0")")" +PROGNAME=$(basename $0) + +usage() +{ + cat >&2 < --image -- +Options: + -h, --h Print this usage message + -m, --machine Set the MACHINE used for this script. + -i, --image Set the IMAGE used for this script + -d, --device Set the target device hostname or IP address used + for the test. Defaults to MACHINE.local if not + specified + -u, --url Set the mender install url argument to use with the test + Defaults to http://:8080/MACHINE/IMAGE-MACHINE.mender if + not specified (based on defaults in setup_image_server.sh) +Examples: +- To kick off a single mender upgrade test for jetson-xavier-nx-devkit + booted on the local network with name jetson-xavier-nx-devkit.local + with http server running locally based on setup_image_server.sh + $ $0 --machine jetson-xavier-nx-devkit --image demo-image-base +EOF +} + +# get command line options +SHORTOPTS="hm:i:d:u:" +LONGOPTS="help,machine:,image:,device:,url:" + +ARGS=$(getopt --options $SHORTOPTS --longoptions $LONGOPTS --name $PROGNAME -- "$@" ) +if [ $? != 0 ]; then + usage + exit 1 +fi + +eval set -- "$ARGS" +while true; +do + case $1 in + -h | --help) usage; exit 0 ;; + -m | --machine) MACHINE="$2"; shift 2;; + -i | --image) IMAGE="$2"; shift 2;; + -d | --device) DEVICE="$2"; shift 2;; +-u | --url ) MENDER_INSTALL="$2"; shift 2;; + -- ) shift; break ;; + * ) break ;; + esac +done + +if [ -z "${MENDER_INSTALL}" ]; then + if [ -z "$MACHINE" -o -z "$IMAGE" ]; then + echo "Must specify both machine and image if not specifying mender_install" + usage + exit 1 + fi + MENDER_INSTALL="http://$(hostname -I | awk '{print $1}'):8080/${MACHINE}/${IMAGE}-${MACHINE}.mender" + echo "Using mender install argument ${MENDER_INSTALL}." + echo "This assumes you've setup a http mender server locally using" + echo "setup_image_server.sh or similar commands" +fi + +if [ -z "${DEVICE}" ]; then + if [ -z "$MACHINE" ]; then + echo "Must specify machine if not specifying device" + usage + exit 1 + fi + DEVICE="${MACHINE}.local" + echo "Using device ${DEVICE} based on ${MACHINE}. This assumes you are" + echo "using the default hostname for ${MACHINE} builds and you are able to" + echo "resolve .local network names with your network setup. If you have" + echo "issues with this try an IP address for device instead" +fi + +${scriptdir}/mender_tegra_test.py --device ${DEVICE} --mender_install ${MENDER_INSTALL} $@ diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/mender_tegra_test.py b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/mender_tegra_test.py new file mode 100755 index 000000000..15329f9c7 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/mender_tegra_test.py @@ -0,0 +1,198 @@ +#!/usr/bin/env python3 +import fabric2 +from fabric2 import Connection +import argparse +import time +import traceback +import sys +import re +import subprocess +import platform +import textwrap +from device_test import DeviceTest + +class MenderTegraTest(DeviceTest): + + def get_parser(self): + if self.argparser is None: + argparser=super().get_parser("mender_tegra_tests.py","Tests mender functionality on tegra devices") + + argparser.add_argument('-m', + '--mender_install', + help=textwrap.dedent('''\ + The mender install argument to use with standalone install, + for instance, http://mylocalserver:8080/machine/imagename.mender + where you've used setup_image_server.sh to setup your image + server in your build/tmp/deploy/images directory or set this + up manually yourself.''')) + + argparser.add_argument('-t', + '--test', + help=textwrap.dedent('''\ + The test to run. Options are: + single [default] - run a single mender update + mender_torture - run the mender torture test + reboot_torture - run the reboot torture test''')) + + return self.argparser + + def mender_install(self): + args = self.get_args() + conn = self.get_connection() + if args.mender_install is None: + self.get_parser().print_help() + print("Missing argument install") + raise RuntimeError("Missing argument mender_install") + result = conn.run(f"mender -install {args.mender_install}") + # Mender doesn't return error states, so we can't check return codes here + match = re.search(r' level=error ', result.stderr, re.MULTILINE) + if match is not None: + raise RuntimeError("Mender install failed with error messages in the logs") + + def add_sentinel_file(self): + conn = self.get_connection() + conn.run("mkdir -p /var/lib/mender") + conn.run("touch /var/lib/mender/dont-mark-next-boot-successful") + + def mender_commit(self): + self.get_connection().run("mender -commit") + + def reboot(self): + conn = self.get_connection() + print("Rebooting device") + result = conn.run("reboot", warn=True) + self.wait_for_device_removal() + self.wait_for_device() + + def nvbootctrl_current_slot(self): + conn = self.get_connection() + result = conn.run("nvbootctrl get-current-slot", hide=True) + return result.stdout.strip() + + def check_partition_mismatch(self): + conn = self.get_connection() + boot_slot = self.nvbootctrl_current_slot() + rootfs_part = None + if boot_slot == '0': + rootfs_part = 'RootfsPartA' + elif boot_slot == '1': + rootfs_part = 'RootfsPartB' + + if rootfs_part != None: + blockdev_result = conn.run(f'grep -h {rootfs_part} /etc/mender/mender.conf /var/lib/mender/mender.conf | cut -d: -f2 | cut -d, -f1 | tr -d \'" \'') + result = conn.run(f'df -h | grep {blockdev_result.stdout.strip()}') + if result.return_code != 0: + raise RuntimeError(f"Boot and Rootfs Partition Mismatch detected, rootfs should be mounted to {blockdev_result} for boot slot {boot_slot}") + else: + raise RuntimeError("Cannot Identify Rootfs Partition Slot") + + + def do_mender_update(self): + # Connecting to the device + print("Starting mender update") + self.wait_for_device() + prev_machine_id = self.get_machine_id() + # mender install + self.mender_install() + # Check Partition Mismatch + self.check_partition_mismatch() + # Get current boot slot after mender update and before reboot + prev_boot_slot = self.nvbootctrl_current_slot() + # reboot the device + self.reboot() + # Getting current_boot_slot after reboot + current_boot_slot = self.nvbootctrl_current_slot() + current_machine_id = self.get_machine_id() + # Check if update was successful after reboot + if prev_boot_slot == current_boot_slot: + raise RuntimeError("Mender Install successful but slot change not reflected after reboot") + if current_machine_id != prev_machine_id: + raise RuntimeError(f"machine ID changed from {prev_machine_id} to {current_machine_id} during mender update") + print(f"Mender update applied successfully with expected boot slot change from" \ + f" {prev_boot_slot} to {current_boot_slot} and no change in machine ID {current_machine_id}") + return current_boot_slot + + ''' + This test isn't currently supported. We'd need a way to prevent the startup script from marking successful + boot in order to prove rollback is happening + ''' + def check_rollback(self): + print("****************************************") + print("Starting test case") + expected_rollback_reboots=7 + boot_slot = self.mender_install() + for i in range(expected_rollback_reboots): + # Check Partition Mismatch + self.check_partition_mismatch() + # check the current boot_slot + if boot_slot != self.nvbootctrl_current_slot(): + raise RuntimeError("Mender Rollback occurred earlier than expected") + self.reboot() + # Device expected to rollback here + if boot_slot != self.nvbootctrl_current_slot(): + print(f"Success: Rollback after {expected_rollback_reboots} reboots") + else: + raise RuntimeError(f"ERROR: No rollback after {expected_rollback_reboots} reboots") + + def do_mender_torture(self): + """ + Do 10 mender updates in a row followed by 20 reboots, then repeat the + entire loop 10 times + """ + big_loops = 10 + mender_updates_per_loop = 10 + reboots_per_loop = 20 + print(f"Starting mender torture tests with {big_loops} loops of {mender_updates_per_loop} mender updates" \ + f" followed by {reboots_per_loop} reboots") + boot_slot = None + for bigloop in range (big_loops): + for i in range (mender_updates_per_loop): + print(f"Starting mender update {mender_updates_per_loop*bigloop+i+1}") + boot_slot = self.do_mender_update() + for i in range (reboots_per_loop): + print(f"Starting reboot {reboots_per_loop*bigloop+i+1}") + prev_boot_slot = self.nvbootctrl_current_slot() + self.reboot() + boot_slot = self.nvbootctrl_current_slot() + if boot_slot != prev_boot_slot: + raise RuntimeError(f"Boot slot changed from {prev_boot_slot} to {boot_slot} after {i} reboots on iteration {bigloop}") + + def do_reboot_torture(self): + """ + Do 200 reboots, making sure boot slot doesn't change + """ + num_reboots=100 + print(f"Starting reboot torture tests with {num_reboots} reboots") + boot_slot = None + for i in range (num_reboots): + print("Starting reboot {}".format(i)) + prev_boot_slot = self.nvbootctrl_current_slot() + self.reboot() + boot_slot = self.nvbootctrl_current_slot() + if boot_slot != prev_boot_slot: + raise RuntimeError(f"Boot slot changed from {prev_boot_slot} to {boot_slot} after {i} reboots") + + def do_test(self): + print("Starting test") + args = self.get_args() + test = args.test + ret = 0 + if test is None: + print("No test specified, using single test type") + test = "single" + if test == "single": + print("Starting single mender install test") + self.do_mender_update() + elif test == "mender_torture": + self.do_mender_torture() + elif test == "reboot_torture": + self.do_reboot_torture() + else: + ret = -1 + self.get_parser().print_help() + print(f"Unsupported test argument {test}") + return ret + +if __name__ == '__main__': + test = MenderTegraTest() + sys.exit(test.do_test()) diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/requirements.txt b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/requirements.txt new file mode 100644 index 000000000..a9e5175ed --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/requirements.txt @@ -0,0 +1 @@ +fabric2>=2.5.0 \ No newline at end of file diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/setup_image_server.sh b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/setup_image_server.sh new file mode 100755 index 000000000..a5e3e10f1 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/setup_image_server.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -e +scriptdir="$(dirname "$(readlink -f "$0")")" +imagesdir=$(realpath ${scriptdir}/../../../../../build/tmp/deploy/images) +echo "Serving images from ${imagesdir}" +pushd ${imagesdir} +python -m SimpleHTTPServer 8080 diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/templates/bblayers.conf.sample b/meta-mender-tegra/meta-mender-tegra-jetpack5/templates/bblayers.conf.sample new file mode 100644 index 000000000..d213006ce --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/templates/bblayers.conf.sample @@ -0,0 +1,16 @@ +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "1" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ${TOPDIR}/../sources/poky/meta \ + ${TOPDIR}/../sources/poky/meta-poky \ + ${TOPDIR}/../sources/poky/meta-yocto-bsp \ + ${TOPDIR}/../sources/meta-tegra \ + ${TOPDIR}/../sources/meta-mender/meta-mender-core \ + ${TOPDIR}/../sources/meta-mender/meta-mender-demo \ + ${TOPDIR}/../sources/meta-mender-community/meta-mender-tegra \ +" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/templates/local.conf.append b/meta-mender-tegra/meta-mender-tegra-jetpack5/templates/local.conf.append new file mode 100644 index 000000000..7d41a6cd1 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/templates/local.conf.append @@ -0,0 +1,14 @@ +# See README for other supported options +MACHINE ?= "jetson-tx2" + +# Tegra specific mender setup variables +INHERIT += "tegra-mender-setup" + +# Grow the data partition by default +MENDER_FEATURES_ENABLE:append = " mender-growfs-data" + +# Not required for mender support, but gives you access via SSH by default +# Note that the ssh key will change on each upgrade. To fix this you need to +# symlink /etc/dropbear/dropbear_rsa_host_key to the data partition or use an +# overlay setup that maps the key to the data partition +EXTRA_IMAGE_FEATURES += " ssh-server-dropbear" From 8fe8d48a1906796b4c57519adee4e77652d4048c Mon Sep 17 00:00:00 2001 From: Josef Holzmayr Date: Sun, 23 Jul 2023 22:07:13 +0200 Subject: [PATCH 05/11] feat: Tegra: update Jetpack 5 Readme This reflects efcbadb2826cd7463f769be80a399f6ab4e651f6 for the Jetpack 5-based board integration layer. Signed-off-by: Josef Holzmayr --- .../meta-mender-tegra-jetpack5/README.md | 16 +++++++++------- .../scripts/manifest-tegra.xml | 13 ------------- .../templates/bblayers.conf.sample | 16 ---------------- .../templates/local.conf.append | 14 -------------- 4 files changed, 9 insertions(+), 50 deletions(-) delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/manifest-tegra.xml delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/templates/bblayers.conf.sample delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/templates/local.conf.append diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/README.md b/meta-mender-tegra/meta-mender-tegra-jetpack5/README.md index 2a0edc533..de5866898 100644 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/README.md +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/README.md @@ -4,10 +4,7 @@ Mender integration layer for NVIDIA Tegra hardware. The supported and tested boards are: -- [Jetson TX2](https://hub.mender.io/t/nvidia-tegra-jetson-tx2/123) -- [Jetson Nano](https://hub.mender.io/t/nvidia-tegra-jetson-nano/1360) -- [Jetson Xavier NX](https://hub.mender.io/t/nvidia-tegra-jetson-xavier-nx/2615) -- [Jetson AGX Xavier](https://hub.mender.io/t/nvidia-tegra-agx-xavier/2616) +- AGX Orin Visit the individual board links above for more information on status of the integration and more detailed instructions on how to build and use images @@ -21,24 +18,29 @@ This layer depends on: ``` URI: https://github.com/madisongh/meta-tegra.git layers: meta-tegra -branch: dunfell-l4t-r32.4.3 +branch: kirkstone-l4t-r32.7.x revision: HEAD ``` ``` URI: https://github.com/mendersoftware/meta-mender.git layers: meta-mender-core -branch: dunfell +branch: kirkstone revision: HEAD ``` - ## Quick start See the mender hub pages and the documentation for the `tegrademo-mender` distro on the [tegra-demo-distro](https://github.com/OE4T/tegra-demo-distro) repository for the most up to date instructions on starting out with mender and tegra. +## [`kas`](https://github.com/siemens/kas) configurations + +The following configuration files for building using the `kas` tool are provided: + +- [jetson-agx-orin-devkit.yml](../../kas/jetson-agx-orin-devkit.yml) + ## Acknowlegements Special thanks to [Matt Madison](https://github.com/madisongh) for his contributions to diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/manifest-tegra.xml b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/manifest-tegra.xml deleted file mode 100644 index ab004ff8c..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/manifest-tegra.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/templates/bblayers.conf.sample b/meta-mender-tegra/meta-mender-tegra-jetpack5/templates/bblayers.conf.sample deleted file mode 100644 index d213006ce..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/templates/bblayers.conf.sample +++ /dev/null @@ -1,16 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "1" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../sources/poky/meta \ - ${TOPDIR}/../sources/poky/meta-poky \ - ${TOPDIR}/../sources/poky/meta-yocto-bsp \ - ${TOPDIR}/../sources/meta-tegra \ - ${TOPDIR}/../sources/meta-mender/meta-mender-core \ - ${TOPDIR}/../sources/meta-mender/meta-mender-demo \ - ${TOPDIR}/../sources/meta-mender-community/meta-mender-tegra \ -" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/templates/local.conf.append b/meta-mender-tegra/meta-mender-tegra-jetpack5/templates/local.conf.append deleted file mode 100644 index 7d41a6cd1..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/templates/local.conf.append +++ /dev/null @@ -1,14 +0,0 @@ -# See README for other supported options -MACHINE ?= "jetson-tx2" - -# Tegra specific mender setup variables -INHERIT += "tegra-mender-setup" - -# Grow the data partition by default -MENDER_FEATURES_ENABLE:append = " mender-growfs-data" - -# Not required for mender support, but gives you access via SSH by default -# Note that the ssh key will change on each upgrade. To fix this you need to -# symlink /etc/dropbear/dropbear_rsa_host_key to the data partition or use an -# overlay setup that maps the key to the data partition -EXTRA_IMAGE_FEATURES += " ssh-server-dropbear" From 8b5a190accfd8cee238ca499632d725cf00e1079 Mon Sep 17 00:00:00 2001 From: Josef Holzmayr Date: Sun, 23 Jul 2023 22:22:57 +0200 Subject: [PATCH 06/11] fix: Tegra, Jetpack 5: remove deprecated test scripts Changelog: Title Ticket: None Signed-off-by: Josef Holzmayr --- .../scripts/test/README.md | 54 ----- .../scripts/test/device_test.py | 134 ------------ .../scripts/test/do_mender_test.sh | 78 ------- .../scripts/test/mender_tegra_test.py | 198 ------------------ .../scripts/test/requirements.txt | 1 - .../scripts/test/setup_image_server.sh | 7 - 6 files changed, 472 deletions(-) delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/README.md delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/device_test.py delete mode 100755 meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/do_mender_test.sh delete mode 100755 meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/mender_tegra_test.py delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/requirements.txt delete mode 100755 meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/setup_image_server.sh diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/README.md b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/README.md deleted file mode 100644 index 91af2942d..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# Tegra Mender Torture Tests - -To help find problems with tegra redundant boot +mender integration -the scrips in this directory can perform testing on mender based targets. - -The scripts currently only support cboot based targets, see [this pr](https://github.com/BoulderAI/meta-mender-community/pull/1) -for a discussion of additional complexities to support uboot based targets. - -# Setup Python - -Run -``` -pip3 install -r requirements.txt -``` - -## Setup http server - -If using tegra-demo-distro layout you can set this up with the -`meta-mender-tegra/scripts/test/setup_image_server.sh` script. -If using a different layout, use this as an example with the detail below. - -The tests require a http server hosting a .mender update file. - -Start a simple http server on a httpserver machine like this, running in -the directory where the mender image is located (or any directory above it). -``` -python -m SimpleHTTPServer 8080 -``` -You'll want to run this in a different terminal window or screen session. - - -## Running the command - -If using tegra-demo-distro layout you can invoke with the -`meta-mender-tegra/scripts/test/do_mender_test.sh` script. -If using a different layout, use this script as an example with the detail below. - -Execute a command like this to start the mender test, replacing arguments as needed -``` -export devicename= -export httpserver= -export menderfile= -export logfile=/tmp/mender-tegra-torture.log -./mender_tegra_test.py --device ${devicename} --install http://${httpserver}:8080/${menderfile} 2>&1 | tee -a ${logfile} -``` - -If testing on a production target where an SSH key is required, use the `--key ` arguement -to specify the key to use for ssh connectivity. - -The script repeats the steps below 10 times -* Standalone mender updates 10 times in a row, ensuring boot slot changes with each reboot. -* Reboots 20 times in a row, ensuring the boot slot does not change. - -The end result should be 100 mender updates interleaved with 200 reboots. diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/device_test.py b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/device_test.py deleted file mode 100644 index 5221cce3d..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/device_test.py +++ /dev/null @@ -1,134 +0,0 @@ -import fabric2 -from fabric2 import Connection -import argparse -import time -import traceback -import sys -import re -import subprocess -import platform - -class DeviceTest: - DEFAULT_USER = 'root' - DEFAULT_BOOT_METHOD = 'cboot' - args = None - connection = None - argparser = None - - def get_parser(self,parent_test="",parent_description=""): - if self.argparser is None: - ''' - Argument parsing for new deployment and provisioning process - ''' - argparser = argparse.ArgumentParser(prog=parent_test, - usage='%(prog)s [options]', - description=parent_description, - formatter_class=argparse.RawTextHelpFormatter) - argparser.add_argument('-d', - '--device', - help='The IP address or name of the device') - - argparser.add_argument('-u', - '--user', - help=f"The SSH username (default is {self.DEFAULT_USER})") - - argparser.add_argument('-p', - '--password', - help='The SSH password (default is no password)') - - argparser.add_argument('-k', - '--key', - help='The SSH key file (used instead of password if specified)') - - self.argparser = argparser - return self.argparser - - - def get_args(self): - if self.args is None: - self.args = self.get_parser().parse_args() - - if self.args.user is None: - print(f"No user specified, using {self.DEFAULT_USER}") - self.args.user=self.DEFAULT_USER - return self.args - - def get_connection(self): - args = self.get_args() - if args.device is None: - print("Missing device argument") - self.get_parser().print_help() - raise RuntimeError("Must specify device as argument") - if self.connection is None: - if args.key is not None: - self.connection = Connection( - host=f'{args.user}@{args.device}', - connect_kwargs={ - "key_filename": args.key, - "password": args.password - }) - elif args.password is not None: - self.connection = Connection( - host=f'{args.user}@{args.device}', - connect_kwargs={ - "password": args.password - }) - else: - self.connection = Connection( - host=f'{args.user}@{args.device}', - connect_kwargs={ - "password": "", - "look_for_keys": False - }) - return self.connection - - def wait_for_device(self): - conn = self.get_connection() - print(f'Trying to connect to {self.get_args().device}....') - success = False - ip = None - quiet = False - while not success: - try: - conn.open() - success = True - except Exception as e: - if not quiet: - print(e) - print('Exception connecting, retrying..') - quiet = True - time.sleep(3) - time.sleep(15) - - def ping(self): - args=self.get_args() - """ - Returns True if host (str) responds to a ping request. - Remember that a host may not respond to a ping (ICMP) request even if the host name is valid. - See https://stackoverflow.com/a/32684938/1446624 - """ - - # Option for the number of packets as a function of - param = '-n' if platform.system().lower() == 'windows' else '-c' - - # Building the command. Ex: "ping -c 1 google.com" - command = ['ping', param, '1', args.device] - - return subprocess.call(command, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT) == 0 - - def wait_for_device_removal(self): - while self.ping(): - pass - - def reboot(self): - conn = self.get_connection() - print("Rebooting device") - result = conn.run("reboot", warn=True) - self.wait_for_device_removal() - self.wait_for_device() - self.get_machine_id() # This tests the connection - - def get_machine_id(self): - conn = self.get_connection() - result = conn.run("systemd-machine-id-setup --print", hide=True, timeout=3) - return result.stdout diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/do_mender_test.sh b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/do_mender_test.sh deleted file mode 100755 index aff8dc63c..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/do_mender_test.sh +++ /dev/null @@ -1,78 +0,0 @@ -#! /bin/bash -set -e -scriptdir="$(dirname "$(readlink -f "$0")")" -PROGNAME=$(basename $0) - -usage() -{ - cat >&2 < --image -- -Options: - -h, --h Print this usage message - -m, --machine Set the MACHINE used for this script. - -i, --image Set the IMAGE used for this script - -d, --device Set the target device hostname or IP address used - for the test. Defaults to MACHINE.local if not - specified - -u, --url Set the mender install url argument to use with the test - Defaults to http://:8080/MACHINE/IMAGE-MACHINE.mender if - not specified (based on defaults in setup_image_server.sh) -Examples: -- To kick off a single mender upgrade test for jetson-xavier-nx-devkit - booted on the local network with name jetson-xavier-nx-devkit.local - with http server running locally based on setup_image_server.sh - $ $0 --machine jetson-xavier-nx-devkit --image demo-image-base -EOF -} - -# get command line options -SHORTOPTS="hm:i:d:u:" -LONGOPTS="help,machine:,image:,device:,url:" - -ARGS=$(getopt --options $SHORTOPTS --longoptions $LONGOPTS --name $PROGNAME -- "$@" ) -if [ $? != 0 ]; then - usage - exit 1 -fi - -eval set -- "$ARGS" -while true; -do - case $1 in - -h | --help) usage; exit 0 ;; - -m | --machine) MACHINE="$2"; shift 2;; - -i | --image) IMAGE="$2"; shift 2;; - -d | --device) DEVICE="$2"; shift 2;; --u | --url ) MENDER_INSTALL="$2"; shift 2;; - -- ) shift; break ;; - * ) break ;; - esac -done - -if [ -z "${MENDER_INSTALL}" ]; then - if [ -z "$MACHINE" -o -z "$IMAGE" ]; then - echo "Must specify both machine and image if not specifying mender_install" - usage - exit 1 - fi - MENDER_INSTALL="http://$(hostname -I | awk '{print $1}'):8080/${MACHINE}/${IMAGE}-${MACHINE}.mender" - echo "Using mender install argument ${MENDER_INSTALL}." - echo "This assumes you've setup a http mender server locally using" - echo "setup_image_server.sh or similar commands" -fi - -if [ -z "${DEVICE}" ]; then - if [ -z "$MACHINE" ]; then - echo "Must specify machine if not specifying device" - usage - exit 1 - fi - DEVICE="${MACHINE}.local" - echo "Using device ${DEVICE} based on ${MACHINE}. This assumes you are" - echo "using the default hostname for ${MACHINE} builds and you are able to" - echo "resolve .local network names with your network setup. If you have" - echo "issues with this try an IP address for device instead" -fi - -${scriptdir}/mender_tegra_test.py --device ${DEVICE} --mender_install ${MENDER_INSTALL} $@ diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/mender_tegra_test.py b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/mender_tegra_test.py deleted file mode 100755 index 15329f9c7..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/mender_tegra_test.py +++ /dev/null @@ -1,198 +0,0 @@ -#!/usr/bin/env python3 -import fabric2 -from fabric2 import Connection -import argparse -import time -import traceback -import sys -import re -import subprocess -import platform -import textwrap -from device_test import DeviceTest - -class MenderTegraTest(DeviceTest): - - def get_parser(self): - if self.argparser is None: - argparser=super().get_parser("mender_tegra_tests.py","Tests mender functionality on tegra devices") - - argparser.add_argument('-m', - '--mender_install', - help=textwrap.dedent('''\ - The mender install argument to use with standalone install, - for instance, http://mylocalserver:8080/machine/imagename.mender - where you've used setup_image_server.sh to setup your image - server in your build/tmp/deploy/images directory or set this - up manually yourself.''')) - - argparser.add_argument('-t', - '--test', - help=textwrap.dedent('''\ - The test to run. Options are: - single [default] - run a single mender update - mender_torture - run the mender torture test - reboot_torture - run the reboot torture test''')) - - return self.argparser - - def mender_install(self): - args = self.get_args() - conn = self.get_connection() - if args.mender_install is None: - self.get_parser().print_help() - print("Missing argument install") - raise RuntimeError("Missing argument mender_install") - result = conn.run(f"mender -install {args.mender_install}") - # Mender doesn't return error states, so we can't check return codes here - match = re.search(r' level=error ', result.stderr, re.MULTILINE) - if match is not None: - raise RuntimeError("Mender install failed with error messages in the logs") - - def add_sentinel_file(self): - conn = self.get_connection() - conn.run("mkdir -p /var/lib/mender") - conn.run("touch /var/lib/mender/dont-mark-next-boot-successful") - - def mender_commit(self): - self.get_connection().run("mender -commit") - - def reboot(self): - conn = self.get_connection() - print("Rebooting device") - result = conn.run("reboot", warn=True) - self.wait_for_device_removal() - self.wait_for_device() - - def nvbootctrl_current_slot(self): - conn = self.get_connection() - result = conn.run("nvbootctrl get-current-slot", hide=True) - return result.stdout.strip() - - def check_partition_mismatch(self): - conn = self.get_connection() - boot_slot = self.nvbootctrl_current_slot() - rootfs_part = None - if boot_slot == '0': - rootfs_part = 'RootfsPartA' - elif boot_slot == '1': - rootfs_part = 'RootfsPartB' - - if rootfs_part != None: - blockdev_result = conn.run(f'grep -h {rootfs_part} /etc/mender/mender.conf /var/lib/mender/mender.conf | cut -d: -f2 | cut -d, -f1 | tr -d \'" \'') - result = conn.run(f'df -h | grep {blockdev_result.stdout.strip()}') - if result.return_code != 0: - raise RuntimeError(f"Boot and Rootfs Partition Mismatch detected, rootfs should be mounted to {blockdev_result} for boot slot {boot_slot}") - else: - raise RuntimeError("Cannot Identify Rootfs Partition Slot") - - - def do_mender_update(self): - # Connecting to the device - print("Starting mender update") - self.wait_for_device() - prev_machine_id = self.get_machine_id() - # mender install - self.mender_install() - # Check Partition Mismatch - self.check_partition_mismatch() - # Get current boot slot after mender update and before reboot - prev_boot_slot = self.nvbootctrl_current_slot() - # reboot the device - self.reboot() - # Getting current_boot_slot after reboot - current_boot_slot = self.nvbootctrl_current_slot() - current_machine_id = self.get_machine_id() - # Check if update was successful after reboot - if prev_boot_slot == current_boot_slot: - raise RuntimeError("Mender Install successful but slot change not reflected after reboot") - if current_machine_id != prev_machine_id: - raise RuntimeError(f"machine ID changed from {prev_machine_id} to {current_machine_id} during mender update") - print(f"Mender update applied successfully with expected boot slot change from" \ - f" {prev_boot_slot} to {current_boot_slot} and no change in machine ID {current_machine_id}") - return current_boot_slot - - ''' - This test isn't currently supported. We'd need a way to prevent the startup script from marking successful - boot in order to prove rollback is happening - ''' - def check_rollback(self): - print("****************************************") - print("Starting test case") - expected_rollback_reboots=7 - boot_slot = self.mender_install() - for i in range(expected_rollback_reboots): - # Check Partition Mismatch - self.check_partition_mismatch() - # check the current boot_slot - if boot_slot != self.nvbootctrl_current_slot(): - raise RuntimeError("Mender Rollback occurred earlier than expected") - self.reboot() - # Device expected to rollback here - if boot_slot != self.nvbootctrl_current_slot(): - print(f"Success: Rollback after {expected_rollback_reboots} reboots") - else: - raise RuntimeError(f"ERROR: No rollback after {expected_rollback_reboots} reboots") - - def do_mender_torture(self): - """ - Do 10 mender updates in a row followed by 20 reboots, then repeat the - entire loop 10 times - """ - big_loops = 10 - mender_updates_per_loop = 10 - reboots_per_loop = 20 - print(f"Starting mender torture tests with {big_loops} loops of {mender_updates_per_loop} mender updates" \ - f" followed by {reboots_per_loop} reboots") - boot_slot = None - for bigloop in range (big_loops): - for i in range (mender_updates_per_loop): - print(f"Starting mender update {mender_updates_per_loop*bigloop+i+1}") - boot_slot = self.do_mender_update() - for i in range (reboots_per_loop): - print(f"Starting reboot {reboots_per_loop*bigloop+i+1}") - prev_boot_slot = self.nvbootctrl_current_slot() - self.reboot() - boot_slot = self.nvbootctrl_current_slot() - if boot_slot != prev_boot_slot: - raise RuntimeError(f"Boot slot changed from {prev_boot_slot} to {boot_slot} after {i} reboots on iteration {bigloop}") - - def do_reboot_torture(self): - """ - Do 200 reboots, making sure boot slot doesn't change - """ - num_reboots=100 - print(f"Starting reboot torture tests with {num_reboots} reboots") - boot_slot = None - for i in range (num_reboots): - print("Starting reboot {}".format(i)) - prev_boot_slot = self.nvbootctrl_current_slot() - self.reboot() - boot_slot = self.nvbootctrl_current_slot() - if boot_slot != prev_boot_slot: - raise RuntimeError(f"Boot slot changed from {prev_boot_slot} to {boot_slot} after {i} reboots") - - def do_test(self): - print("Starting test") - args = self.get_args() - test = args.test - ret = 0 - if test is None: - print("No test specified, using single test type") - test = "single" - if test == "single": - print("Starting single mender install test") - self.do_mender_update() - elif test == "mender_torture": - self.do_mender_torture() - elif test == "reboot_torture": - self.do_reboot_torture() - else: - ret = -1 - self.get_parser().print_help() - print(f"Unsupported test argument {test}") - return ret - -if __name__ == '__main__': - test = MenderTegraTest() - sys.exit(test.do_test()) diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/requirements.txt b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/requirements.txt deleted file mode 100644 index a9e5175ed..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -fabric2>=2.5.0 \ No newline at end of file diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/setup_image_server.sh b/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/setup_image_server.sh deleted file mode 100755 index a5e3e10f1..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/scripts/test/setup_image_server.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -set -e -scriptdir="$(dirname "$(readlink -f "$0")")" -imagesdir=$(realpath ${scriptdir}/../../../../../build/tmp/deploy/images) -echo "Serving images from ${imagesdir}" -pushd ${imagesdir} -python -m SimpleHTTPServer 8080 From 57ba51c843ba4354d9444abfbfc5d860d6828dcd Mon Sep 17 00:00:00 2001 From: Josef Holzmayr Date: Sun, 23 Jul 2023 22:44:36 +0200 Subject: [PATCH 07/11] fix: Tegra, Jetpack 5: remove u-boot Remove all leftover u-boot references, as it is not supported anymore on Jetpack 5. See comment: https://github.com/OE4T/meta-mender-community/pull/18#discussion_r1271039052 Signed-off-by: Josef Holzmayr --- .../conf/layer.conf | 3 - .../recipes-bsp/u-boot/libubootenv_%.bbappend | 13 - ...tion-of-Mender-boot-code-into-U-Boot.patch | 51 --- ...egra-mender-auto-configured-modified.patch | 379 ------------------ ...0011-Jetson-TX2-mender-boot-commands.patch | 48 --- ...12-p3541-0000_defconfig-Mender-patch.patch | 39 -- ...duce-env-size-on-p3450-0000-to-64KiB.patch | 29 -- ...emmc-defconfigs-for-new-UBENV-locati.patch | 46 --- ...PIflash-Nanos-for-R32.5.0-with-Mende.patch | 52 --- .../0017-Jetson-Xavier-NX-TX2-NX-mender.patch | 61 --- .../u-boot/u-boot-bup-payload.bbappend | 1 - .../u-boot/u-boot-mender-tegra-vars.inc | 29 -- .../u-boot/u-boot-mender-tegra.inc | 30 -- .../u-boot/u-boot-tegra_%.bbappend | 3 - .../u-boot/u-boot-tegra_2022.01.bbappend | 1 - .../images/tegra-minimal-initramfs.bbappend | 3 - 16 files changed, 788 deletions(-) delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/libubootenv_%.bbappend delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0003-Integration-of-Mender-boot-code-into-U-Boot.patch delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0010-tegra-mender-auto-configured-modified.patch delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0011-Jetson-TX2-mender-boot-commands.patch delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0012-p3541-0000_defconfig-Mender-patch.patch delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0013-Reduce-env-size-on-p3450-0000-to-64KiB.patch delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0015-Update-TX1-nano-emmc-defconfigs-for-new-UBENV-locati.patch delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0016-Update-env-for-SPIflash-Nanos-for-R32.5.0-with-Mende.patch delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0017-Jetson-Xavier-NX-TX2-NX-mender.patch delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-bup-payload.bbappend delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-mender-tegra-vars.inc delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-mender-tegra.inc delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-tegra_%.bbappend delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-tegra_2022.01.bbappend delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/images/tegra-minimal-initramfs.bbappend diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/conf/layer.conf b/meta-mender-tegra/meta-mender-tegra-jetpack5/conf/layer.conf index 56848cd41..114d954c6 100644 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/conf/layer.conf +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/conf/layer.conf @@ -13,7 +13,4 @@ LAYERDEPENDS_meta-mender-tegra-jetpack5 = "tegra" BBMASK:tegra234:append = " \ recipes-bsp/cboot/ \ - recipes-bsp/u-boot/patches \ - recipes-bsp/u-boot/libubootenv_.* \ - recipes-bsp/u-boot/u-boot.* \ " diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/libubootenv_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/libubootenv_%.bbappend deleted file mode 100644 index 47daf849d..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/libubootenv_%.bbappend +++ /dev/null @@ -1,13 +0,0 @@ -include recipes-bsp/u-boot/u-boot-mender-tegra-vars.inc - -# Stash an extra copy of fw_env.config in the rootfs so we -# can handle a change in the env offset/size during an upgrade -do_install:append:tegra() { - install -d ${D}${datadir}/u-boot - install -m 0644 ${WORKDIR}/fw_env.config ${D}${datadir}/u-boot/ -} -FILES:${PN}:append:tegra = " ${datadir}/u-boot" - -# The default environment must be provided by the -# u-boot recipe -RPROVIDES:${PN}:remove:tegra = "u-boot-default-env" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0003-Integration-of-Mender-boot-code-into-U-Boot.patch b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0003-Integration-of-Mender-boot-code-into-U-Boot.patch deleted file mode 100644 index cae1f2d4f..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0003-Integration-of-Mender-boot-code-into-U-Boot.patch +++ /dev/null @@ -1,51 +0,0 @@ -From de38de98f3032825d1553e83fa6957d7438bbdc4 Mon Sep 17 00:00:00 2001 -From: Marcin Pasinski -Date: Wed, 31 Jan 2018 18:10:04 +0100 -Subject: [PATCH 09/16] Integration of Mender boot code into U-Boot. - -Signed-off-by: Kristian Amlie -Signed-off-by: Maciej Borzecki -Signed-off-by: Marcin Pasinski ---- - include/env_default.h | 3 +++ - scripts/Makefile.autoconf | 3 ++- - 2 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/include/env_default.h b/include/env_default.h -index 23430dc70d..a8c782c725 100644 ---- a/include/env_default.h -+++ b/include/env_default.h -@@ -10,6 +10,8 @@ - #include - #include - -+#include -+ - #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED - env_t embedded_environment __UBOOT_ENV_SECTION__(environment) = { - ENV_CRC, /* CRC Sum */ -@@ -24,6 +26,7 @@ char default_environment[] = { - #else - const char default_environment[] = { - #endif -+ MENDER_ENV_SETTINGS - #ifndef CONFIG_USE_DEFAULT_ENV_FILE - #ifdef CONFIG_ENV_CALLBACK_LIST_DEFAULT - ENV_CALLBACK_VAR "=" CONFIG_ENV_CALLBACK_LIST_DEFAULT "\0" -diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf -index 8a3efdb2db..5f09f52b24 100644 ---- a/scripts/Makefile.autoconf -+++ b/scripts/Makefile.autoconf -@@ -108,7 +108,8 @@ define filechk_config_h - echo \#include \; \ - echo \#include \; \ - echo \#include \; \ -- echo \#include \;) -+ echo \#include \; \ -+ echo \#include \;) - endef - - include/config.h: scripts/Makefile.autoconf create_symlink FORCE --- -2.32.0 - diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0010-tegra-mender-auto-configured-modified.patch b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0010-tegra-mender-auto-configured-modified.patch deleted file mode 100644 index cad074e59..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0010-tegra-mender-auto-configured-modified.patch +++ /dev/null @@ -1,379 +0,0 @@ -From c6c3285f65ff5daed41beeb271db86d89eeff2c9 Mon Sep 17 00:00:00 2001 -From: Kurt Kiefer -Date: Mon, 24 Aug 2020 22:49:32 -0700 -Subject: [PATCH 10/16] Apply mender_auto_configured.patch - ---- - configs/p2371-0000_defconfig | 33 ++++++++++++++++++++++++++++++-- - configs/p2371-2180_defconfig | 33 ++++++++++++++++++++++++++++++-- - configs/p2571_defconfig | 33 ++++++++++++++++++++++++++++++-- - configs/p2771-0000-000_defconfig | 33 ++++++++++++++++++++++++++++++-- - configs/p2771-0000-500_defconfig | 33 ++++++++++++++++++++++++++++++-- - configs/p3450-0000_defconfig | 33 +++++++++++++++++++++++++++++--- - configs/p3450-0002_defconfig | 31 ++++++++++++++++++++++++++++-- - include/config_distro_bootcmd.h | 1 - - 8 files changed, 214 insertions(+), 16 deletions(-) - -diff --git a/configs/p2371-0000_defconfig b/configs/p2371-0000_defconfig -index 4289c22886..8580db6aa0 100644 ---- a/configs/p2371-0000_defconfig -+++ b/configs/p2371-0000_defconfig -@@ -3,8 +3,6 @@ CONFIG_ARCH_TEGRA=y - CONFIG_SYS_TEXT_BASE=0x80080000 - CONFIG_SYS_MALLOC_LEN=0x2500000 - CONFIG_NR_DRAM_BANKS=16 --CONFIG_ENV_SIZE=0x2000 --CONFIG_ENV_OFFSET=0xFFFD8000 - CONFIG_DEFAULT_DEVICE_TREE="tegra210-p2371-0000" - CONFIG_TEGRA210=y - CONFIG_SYS_LOAD_ADDR=0x84000000 -@@ -49,3 +47,34 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x701a - CONFIG_CI_UDC=y - CONFIG_USB_GADGET_DOWNLOAD=y - CONFIG_OF_LIBFDT_OVERLAY=y -+CONFIG_ENV_SIZE=0x20000 -+CONFIG_ENV_OFFSET=0x3bb000 -+CONFIG_ENV_OFFSET_REDUND=0x3db000 -+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -+# CONFIG_ENV_IS_NOWHERE is not set -+# CONFIG_ENV_IS_IN_EEPROM is not set -+# CONFIG_ENV_IS_IN_FAT is not set -+# CONFIG_ENV_IS_IN_EXT4 is not set -+# CONFIG_ENV_IS_IN_FLASH is not set -+# CONFIG_ENV_IS_IN_NAND is not set -+# CONFIG_ENV_IS_IN_NVRAM is not set -+# CONFIG_ENV_IS_IN_ONENAND is not set -+# CONFIG_ENV_IS_IN_REMOTE is not set -+# CONFIG_ENV_IS_IN_SPI_FLASH is not set -+# CONFIG_ENV_IS_IN_UBI is not set -+CONFIG_MMC=y -+CONFIG_ENV_IS_IN_MMC=y -+CONFIG_CMD_EXT4=y -+CONFIG_CMD_FS_GENERIC=y -+# CONFIG_BOOTCOUNT_BOOTLIMIT is not set -+# CONFIG_BOOTCOUNT_GENERIC is not set -+# CONFIG_BOOTCOUNT_EXT is not set -+# CONFIG_BOOTCOUNT_AM33XX is not set -+# CONFIG_BOOTCOUNT_RAM is not set -+# CONFIG_BOOTCOUNT_I2C is not set -+# CONFIG_BOOTCOUNT_AT91 is not set -+# CONFIG_BOOTCOUNT_MEM is not set -+# CONFIG_BOOTCOUNT_ALEN is not set -+CONFIG_BOOTCOUNT_LIMIT=y -+CONFIG_BOOTCOUNT_ENV=y -+# CONFIG_BOOTCOMMAND is not set -diff --git a/configs/p2371-2180_defconfig b/configs/p2371-2180_defconfig -index 1d0228823f..329878dc90 100644 ---- a/configs/p2371-2180_defconfig -+++ b/configs/p2371-2180_defconfig -@@ -3,8 +3,6 @@ CONFIG_ARCH_TEGRA=y - CONFIG_SYS_TEXT_BASE=0x80080000 - CONFIG_SYS_MALLOC_LEN=0x2500000 - CONFIG_NR_DRAM_BANKS=16 --CONFIG_ENV_SIZE=0x8000 --CONFIG_ENV_OFFSET=0x3D8000 - CONFIG_DEFAULT_DEVICE_TREE="tegra210-p2371-2180" - CONFIG_TEGRA210=y - CONFIG_TARGET_P2371_2180=y -@@ -62,3 +60,34 @@ CONFIG_USB_STORAGE=y - CONFIG_DOS_PARTITION=y - CONFIG_CMD_CACHE=y - CONFIG_OF_LIBFDT_OVERLAY=y -+CONFIG_ENV_SIZE=0x20000 -+CONFIG_ENV_OFFSET=0x3bb000 -+CONFIG_ENV_OFFSET_REDUND=0x3db000 -+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -+# CONFIG_ENV_IS_NOWHERE is not set -+# CONFIG_ENV_IS_IN_EEPROM is not set -+# CONFIG_ENV_IS_IN_FAT is not set -+# CONFIG_ENV_IS_IN_EXT4 is not set -+# CONFIG_ENV_IS_IN_FLASH is not set -+# CONFIG_ENV_IS_IN_NAND is not set -+# CONFIG_ENV_IS_IN_NVRAM is not set -+# CONFIG_ENV_IS_IN_ONENAND is not set -+# CONFIG_ENV_IS_IN_REMOTE is not set -+# CONFIG_ENV_IS_IN_SPI_FLASH is not set -+# CONFIG_ENV_IS_IN_UBI is not set -+CONFIG_MMC=y -+CONFIG_ENV_IS_IN_MMC=y -+CONFIG_CMD_EXT4=y -+CONFIG_CMD_FS_GENERIC=y -+# CONFIG_BOOTCOUNT_BOOTLIMIT is not set -+# CONFIG_BOOTCOUNT_GENERIC is not set -+# CONFIG_BOOTCOUNT_EXT is not set -+# CONFIG_BOOTCOUNT_AM33XX is not set -+# CONFIG_BOOTCOUNT_RAM is not set -+# CONFIG_BOOTCOUNT_I2C is not set -+# CONFIG_BOOTCOUNT_AT91 is not set -+# CONFIG_BOOTCOUNT_MEM is not set -+# CONFIG_BOOTCOUNT_ALEN is not set -+CONFIG_BOOTCOUNT_LIMIT=y -+CONFIG_BOOTCOUNT_ENV=y -+# CONFIG_BOOTCOMMAND is not set -diff --git a/configs/p2571_defconfig b/configs/p2571_defconfig -index fbcc5072d5..d525a234c1 100644 ---- a/configs/p2571_defconfig -+++ b/configs/p2571_defconfig -@@ -3,8 +3,6 @@ CONFIG_ARCH_TEGRA=y - CONFIG_SYS_TEXT_BASE=0x80080000 - CONFIG_SYS_MALLOC_LEN=0x2500000 - CONFIG_NR_DRAM_BANKS=16 --CONFIG_ENV_SIZE=0x2000 --CONFIG_ENV_OFFSET=0xFFFD8000 - CONFIG_DEFAULT_DEVICE_TREE="tegra210-p2571" - CONFIG_TEGRA210=y - CONFIG_TARGET_P2571=y -@@ -50,3 +48,34 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x701a - CONFIG_CI_UDC=y - CONFIG_USB_GADGET_DOWNLOAD=y - CONFIG_OF_LIBFDT_OVERLAY=y -+CONFIG_ENV_SIZE=0x20000 -+CONFIG_ENV_OFFSET=0x3bb000 -+CONFIG_ENV_OFFSET_REDUND=0x3db000 -+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -+# CONFIG_ENV_IS_NOWHERE is not set -+# CONFIG_ENV_IS_IN_EEPROM is not set -+# CONFIG_ENV_IS_IN_FAT is not set -+# CONFIG_ENV_IS_IN_EXT4 is not set -+# CONFIG_ENV_IS_IN_FLASH is not set -+# CONFIG_ENV_IS_IN_NAND is not set -+# CONFIG_ENV_IS_IN_NVRAM is not set -+# CONFIG_ENV_IS_IN_ONENAND is not set -+# CONFIG_ENV_IS_IN_REMOTE is not set -+# CONFIG_ENV_IS_IN_SPI_FLASH is not set -+# CONFIG_ENV_IS_IN_UBI is not set -+CONFIG_MMC=y -+CONFIG_ENV_IS_IN_MMC=y -+CONFIG_CMD_EXT4=y -+CONFIG_CMD_FS_GENERIC=y -+# CONFIG_BOOTCOUNT_BOOTLIMIT is not set -+# CONFIG_BOOTCOUNT_GENERIC is not set -+# CONFIG_BOOTCOUNT_EXT is not set -+# CONFIG_BOOTCOUNT_AM33XX is not set -+# CONFIG_BOOTCOUNT_RAM is not set -+# CONFIG_BOOTCOUNT_I2C is not set -+# CONFIG_BOOTCOUNT_AT91 is not set -+# CONFIG_BOOTCOUNT_MEM is not set -+# CONFIG_BOOTCOUNT_ALEN is not set -+CONFIG_BOOTCOUNT_LIMIT=y -+CONFIG_BOOTCOUNT_ENV=y -+# CONFIG_BOOTCOMMAND is not set -diff --git a/configs/p2771-0000-000_defconfig b/configs/p2771-0000-000_defconfig -index e5a1249aeb..a781da5ef7 100644 ---- a/configs/p2771-0000-000_defconfig -+++ b/configs/p2771-0000-000_defconfig -@@ -1,8 +1,6 @@ - CONFIG_ARM=y - CONFIG_ARCH_TEGRA=y - CONFIG_SYS_TEXT_BASE=0x80080000 --CONFIG_ENV_SIZE=0x8000 --CONFIG_ENV_OFFSET=0x3D8000 - CONFIG_NR_DRAM_BANKS=1043 - CONFIG_DEFAULT_DEVICE_TREE="tegra186-p2771-0000-000" - CONFIG_TEGRA186=y -@@ -38,3 +36,34 @@ CONFIG_SYS_NS16550=y - CONFIG_CMD_CACHE=y - CONFIG_NVME=y - CONFIG_OF_LIBFDT_OVERLAY=y -+CONFIG_ENV_SIZE=0x20000 -+CONFIG_ENV_OFFSET=0x3bb000 -+CONFIG_ENV_OFFSET_REDUND=0x3db000 -+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -+# CONFIG_ENV_IS_NOWHERE is not set -+# CONFIG_ENV_IS_IN_EEPROM is not set -+# CONFIG_ENV_IS_IN_FAT is not set -+# CONFIG_ENV_IS_IN_EXT4 is not set -+# CONFIG_ENV_IS_IN_FLASH is not set -+# CONFIG_ENV_IS_IN_NAND is not set -+# CONFIG_ENV_IS_IN_NVRAM is not set -+# CONFIG_ENV_IS_IN_ONENAND is not set -+# CONFIG_ENV_IS_IN_REMOTE is not set -+# CONFIG_ENV_IS_IN_SPI_FLASH is not set -+# CONFIG_ENV_IS_IN_UBI is not set -+CONFIG_MMC=y -+CONFIG_ENV_IS_IN_MMC=y -+CONFIG_CMD_EXT4=y -+CONFIG_CMD_FS_GENERIC=y -+# CONFIG_BOOTCOUNT_BOOTLIMIT is not set -+# CONFIG_BOOTCOUNT_GENERIC is not set -+# CONFIG_BOOTCOUNT_EXT is not set -+# CONFIG_BOOTCOUNT_AM33XX is not set -+# CONFIG_BOOTCOUNT_RAM is not set -+# CONFIG_BOOTCOUNT_I2C is not set -+# CONFIG_BOOTCOUNT_AT91 is not set -+# CONFIG_BOOTCOUNT_MEM is not set -+# CONFIG_BOOTCOUNT_ALEN is not set -+CONFIG_BOOTCOUNT_LIMIT=y -+CONFIG_BOOTCOUNT_ENV=y -+# CONFIG_BOOTCOMMAND is not set -diff --git a/configs/p2771-0000-500_defconfig b/configs/p2771-0000-500_defconfig -index f0b56ec4c7..9bd7de8034 100644 ---- a/configs/p2771-0000-500_defconfig -+++ b/configs/p2771-0000-500_defconfig -@@ -1,8 +1,6 @@ - CONFIG_ARM=y - CONFIG_ARCH_TEGRA=y - CONFIG_SYS_TEXT_BASE=0x80080000 --CONFIG_ENV_SIZE=0x8000 --CONFIG_ENV_OFFSET=0x3D8000 - CONFIG_NR_DRAM_BANKS=1043 - CONFIG_DEFAULT_DEVICE_TREE="tegra186-p2771-0000-500" - CONFIG_TEGRA186=y -@@ -38,3 +36,34 @@ CONFIG_SYS_NS16550=y - CONFIG_CMD_CACHE=y - CONFIG_NVME=y - CONFIG_OF_LIBFDT_OVERLAY=y -+CONFIG_ENV_SIZE=0x20000 -+CONFIG_ENV_OFFSET=0x3bb000 -+CONFIG_ENV_OFFSET_REDUND=0x3db000 -+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -+# CONFIG_ENV_IS_NOWHERE is not set -+# CONFIG_ENV_IS_IN_EEPROM is not set -+# CONFIG_ENV_IS_IN_FAT is not set -+# CONFIG_ENV_IS_IN_EXT4 is not set -+# CONFIG_ENV_IS_IN_FLASH is not set -+# CONFIG_ENV_IS_IN_NAND is not set -+# CONFIG_ENV_IS_IN_NVRAM is not set -+# CONFIG_ENV_IS_IN_ONENAND is not set -+# CONFIG_ENV_IS_IN_REMOTE is not set -+# CONFIG_ENV_IS_IN_SPI_FLASH is not set -+# CONFIG_ENV_IS_IN_UBI is not set -+CONFIG_MMC=y -+CONFIG_ENV_IS_IN_MMC=y -+CONFIG_CMD_EXT4=y -+CONFIG_CMD_FS_GENERIC=y -+# CONFIG_BOOTCOUNT_BOOTLIMIT is not set -+# CONFIG_BOOTCOUNT_GENERIC is not set -+# CONFIG_BOOTCOUNT_EXT is not set -+# CONFIG_BOOTCOUNT_AM33XX is not set -+# CONFIG_BOOTCOUNT_RAM is not set -+# CONFIG_BOOTCOUNT_I2C is not set -+# CONFIG_BOOTCOUNT_AT91 is not set -+# CONFIG_BOOTCOUNT_MEM is not set -+# CONFIG_BOOTCOUNT_ALEN is not set -+CONFIG_BOOTCOUNT_LIMIT=y -+CONFIG_BOOTCOUNT_ENV=y -+# CONFIG_BOOTCOMMAND is not set -diff --git a/configs/p3450-0000_defconfig b/configs/p3450-0000_defconfig -index 815a6773ac..32f5aff921 100644 ---- a/configs/p3450-0000_defconfig -+++ b/configs/p3450-0000_defconfig -@@ -3,8 +3,6 @@ CONFIG_ARCH_TEGRA=y - CONFIG_SYS_TEXT_BASE=0x80080000 - CONFIG_SYS_MALLOC_LEN=0x2500000 - CONFIG_NR_DRAM_BANKS=16 --CONFIG_ENV_SIZE=0x8000 --CONFIG_ENV_OFFSET=0x3D8000 - CONFIG_ENV_SECT_SIZE=0x1000 - CONFIG_DEFAULT_DEVICE_TREE="tegra210-p3450-0000" - CONFIG_TEGRA210=y -@@ -31,7 +29,6 @@ CONFIG_CMD_EXT4_WRITE=y - CONFIG_OF_LIVE=y - CONFIG_ENV_OVERWRITE=y - # CONFIG_ENV_IS_IN_MMC is not set --CONFIG_ENV_IS_IN_SPI_FLASH=y - CONFIG_DFU_MMC=y - CONFIG_DFU_RAM=y - CONFIG_DFU_SF=y -@@ -64,3 +61,33 @@ CONFIG_USB_STORAGE=y - CONFIG_DOS_PARTITION=y - CONFIG_CMD_CACHE=y - CONFIG_OF_LIBFDT_OVERLAY=y -+CONFIG_ENV_SIZE=0x20000 -+CONFIG_ENV_OFFSET=0x3b0000 -+CONFIG_ENV_OFFSET_REDUND=0x3d0000 -+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -+# CONFIG_ENV_IS_NOWHERE is not set -+# CONFIG_ENV_IS_IN_EEPROM is not set -+# CONFIG_ENV_IS_IN_FAT is not set -+# CONFIG_ENV_IS_IN_EXT4 is not set -+# CONFIG_ENV_IS_IN_FLASH is not set -+# CONFIG_ENV_IS_IN_NAND is not set -+# CONFIG_ENV_IS_IN_NVRAM is not set -+# CONFIG_ENV_IS_IN_ONENAND is not set -+# CONFIG_ENV_IS_IN_REMOTE is not set -+CONFIG_ENV_IS_IN_SPI_FLASH=y -+# CONFIG_ENV_IS_IN_UBI is not set -+# CONFIG_ENV_IS_IN_MMC is not set -+CONFIG_CMD_EXT4=y -+CONFIG_CMD_FS_GENERIC=y -+# CONFIG_BOOTCOUNT_BOOTLIMIT is not set -+# CONFIG_BOOTCOUNT_GENERIC is not set -+# CONFIG_BOOTCOUNT_EXT is not set -+# CONFIG_BOOTCOUNT_AM33XX is not set -+# CONFIG_BOOTCOUNT_RAM is not set -+# CONFIG_BOOTCOUNT_I2C is not set -+# CONFIG_BOOTCOUNT_AT91 is not set -+# CONFIG_BOOTCOUNT_MEM is not set -+# CONFIG_BOOTCOUNT_ALEN is not set -+CONFIG_BOOTCOUNT_LIMIT=y -+CONFIG_BOOTCOUNT_ENV=y -+# CONFIG_BOOTCOMMAND is not set -diff --git a/configs/p3450-0002_defconfig b/configs/p3450-0002_defconfig -index 595d270b73..d617181548 100644 ---- a/configs/p3450-0002_defconfig -+++ b/configs/p3450-0002_defconfig -@@ -3,8 +3,6 @@ CONFIG_ARCH_TEGRA=y - CONFIG_SYS_TEXT_BASE=0x80080000 - CONFIG_SYS_MALLOC_LEN=0x2500000 - CONFIG_NR_DRAM_BANKS=16 --CONFIG_ENV_SIZE=0x8000 --CONFIG_ENV_OFFSET=0x3D8000 - CONFIG_DEFAULT_DEVICE_TREE="tegra210-p3450-0000" - CONFIG_TEGRA210=y - CONFIG_TARGET_P3450_0000=y -@@ -28,6 +26,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y - CONFIG_BOOTP_PREFER_SERVERIP=y - # CONFIG_CMD_NFS is not set - CONFIG_CMD_EXT4_WRITE=y -+CONFIG_CMD_FS_GENERIC=y - CONFIG_OF_LIVE=y - CONFIG_ENV_OVERWRITE=y - CONFIG_ENV_IS_IN_MMC=y -@@ -64,3 +63,31 @@ CONFIG_USB_STORAGE=y - CONFIG_DOS_PARTITION=y - CONFIG_CMD_CACHE=y - CONFIG_OF_LIBFDT_OVERLAY=y -+CONFIG_ENV_SIZE=0x20000 -+CONFIG_ENV_OFFSET=0x3bb000 -+CONFIG_ENV_OFFSET_REDUND=0x3db000 -+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -+# CONFIG_ENV_IS_NOWHERE is not set -+# CONFIG_ENV_IS_IN_EEPROM is not set -+# CONFIG_ENV_IS_IN_FAT is not set -+# CONFIG_ENV_IS_IN_EXT4 is not set -+# CONFIG_ENV_IS_IN_FLASH is not set -+# CONFIG_ENV_IS_IN_NAND is not set -+# CONFIG_ENV_IS_IN_NVRAM is not set -+# CONFIG_ENV_IS_IN_ONENAND is not set -+# CONFIG_ENV_IS_IN_REMOTE is not set -+# CONFIG_ENV_IS_IN_SPI_FLASH is not set -+# CONFIG_ENV_IS_IN_UBI is not set -+CONFIG_MMC=y -+# CONFIG_BOOTCOUNT_BOOTLIMIT is not set -+# CONFIG_BOOTCOUNT_GENERIC is not set -+# CONFIG_BOOTCOUNT_EXT is not set -+# CONFIG_BOOTCOUNT_AM33XX is not set -+# CONFIG_BOOTCOUNT_RAM is not set -+# CONFIG_BOOTCOUNT_I2C is not set -+# CONFIG_BOOTCOUNT_AT91 is not set -+# CONFIG_BOOTCOUNT_MEM is not set -+# CONFIG_BOOTCOUNT_ALEN is not set -+CONFIG_BOOTCOUNT_LIMIT=y -+CONFIG_BOOTCOUNT_ENV=y -+# CONFIG_BOOTCOMMAND is not set -diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h -index 2169695506..1578dad536 100644 ---- a/include/config_distro_bootcmd.h -+++ b/include/config_distro_bootcmd.h -@@ -511,7 +511,6 @@ - "done\0" - - #ifndef CONFIG_BOOTCOMMAND --#define CONFIG_BOOTCOMMAND "run distro_bootcmd" - #endif - - #endif /* _CONFIG_CMD_DISTRO_BOOTCMD_H */ --- -2.32.0 - diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0011-Jetson-TX2-mender-boot-commands.patch b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0011-Jetson-TX2-mender-boot-commands.patch deleted file mode 100644 index dd6d4ffae..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0011-Jetson-TX2-mender-boot-commands.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 424fd871ab8b39d828d738949f809fd123d2afde Mon Sep 17 00:00:00 2001 -From: Dan Walkes -Date: Tue, 1 Jan 2019 18:00:39 -0700 -Subject: [PATCH 5/7] Jetson TX2 mender boot commands - -Modify u-boot to use bootcmd setting based on -values which support jetson-tx2 boot partition layout -and setup. ---- - include/env_default.h | 4 ++-- - include/env_mender.h | 9 ++++++--- - 2 files changed, 8 insertions(+), 5 deletions(-) - -Index: git/include/env_default.h -=================================================================== ---- git.orig/include/env_default.h -+++ git/include/env_default.h -@@ -37,8 +37,8 @@ const char default_environment[] = { - #ifdef CONFIG_USE_BOOTARGS - "bootargs=" CONFIG_BOOTARGS "\0" - #endif --#ifdef CONFIG_BOOTCOMMAND -- "bootcmd=" CONFIG_BOOTCOMMAND "\0" -+#ifdef CONFIG_MENDER_BOOTCOMMAND -+ "bootcmd=" CONFIG_MENDER_BOOTCOMMAND "\0" - #endif - #ifdef CONFIG_RAMBOOTCOMMAND - "ramboot=" CONFIG_RAMBOOTCOMMAND "\0" -Index: git/include/env_mender.h -=================================================================== ---- git.orig/include/env_mender.h -+++ git/include/env_mender.h -@@ -146,9 +146,12 @@ - - #define CONFIG_MENDER_BOOTCOMMAND \ - "run mender_setup; " \ -- MENDER_BOOTARGS \ -- MENDER_LOAD_KERNEL_AND_FDT \ -- "${mender_boot_kernel_type} ${kernel_addr_r} - ${fdt_addr_r}; " \ -+ "setenv distro_bootpart ${mender_boot_part}; " \ -+ "setenv distro_bootpart_hex ${mender_boot_part_hex}; " \ -+ "setenv devnum " __stringify(MENDER_UBOOT_STORAGE_DEVICE) "; " \ -+ "setenv devtype " __stringify(MENDER_UBOOT_STORAGE_INTERFACE) "; " \ -+ "setenv prefix /boot/; " \ -+ "sysboot ${devtype} ${devnum}:${distro_bootpart_hex} any ${scriptaddr} ${prefix}extlinux/extlinux.conf; " \ - "run mender_try_to_recover" - - #endif /* !MENDER_AUTO_PROBING */ diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0012-p3541-0000_defconfig-Mender-patch.patch b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0012-p3541-0000_defconfig-Mender-patch.patch deleted file mode 100644 index f31db5852..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0012-p3541-0000_defconfig-Mender-patch.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 0dfa77478807a433716f130b57fdff6f68aabb02 Mon Sep 17 00:00:00 2001 -From: Matt Madison -Date: Fri, 30 Oct 2020 14:29:08 -0700 -Subject: [PATCH 12/16] p3541-0000_defconfig: Mender patch - -Signed-off-by: Matt Madison - -%% original patch: 0012-p3541-0000_defconfig-Mender-patch.patch ---- - configs/p3541-0000_defconfig | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/configs/p3541-0000_defconfig b/configs/p3541-0000_defconfig -index 35dda4228b..fe3f00a30e 100644 ---- a/configs/p3541-0000_defconfig -+++ b/configs/p3541-0000_defconfig -@@ -3,8 +3,10 @@ CONFIG_ARCH_TEGRA=y - CONFIG_SYS_TEXT_BASE=0x80080000 - CONFIG_SYS_MALLOC_LEN=0x2500000 - CONFIG_NR_DRAM_BANKS=16 --CONFIG_ENV_SIZE=0x8000 --CONFIG_ENV_OFFSET=0x3D8000 -+CONFIG_ENV_SIZE=0x10000 -+CONFIG_ENV_OFFSET=0x3b0000 -+CONFIG_ENV_OFFSET_REDUND=0x3c0000 -+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y - CONFIG_ENV_SECT_SIZE=0x1000 - CONFIG_DEFAULT_DEVICE_TREE="tegra210-p3541-0000" - CONFIG_TEGRA210=y -@@ -64,3 +66,6 @@ CONFIG_USB_STORAGE=y - CONFIG_DOS_PARTITION=y - CONFIG_CMD_CACHE=y - CONFIG_OF_LIBFDT_OVERLAY=y -+CONFIG_BOOTCOUNT_LIMIT=y -+CONFIG_BOOTCOUNT_ENV=y -+# CONFIG_BOOTCOMMAND is not set --- -2.32.0 - diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0013-Reduce-env-size-on-p3450-0000-to-64KiB.patch b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0013-Reduce-env-size-on-p3450-0000-to-64KiB.patch deleted file mode 100644 index f1739e984..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0013-Reduce-env-size-on-p3450-0000-to-64KiB.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 4b6e083fda09a390fe597186a6f7f537333a0e50 Mon Sep 17 00:00:00 2001 -From: Matt Madison -Date: Mon, 2 Nov 2020 08:24:14 -0800 -Subject: [PATCH 13/16] Reduce env size on p3450-0000 to 64KiB - -Signed-off-by: Matt Madison ---- - configs/p3450-0000_defconfig | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configs/p3450-0000_defconfig b/configs/p3450-0000_defconfig -index 32f5aff921..8bed4aafef 100644 ---- a/configs/p3450-0000_defconfig -+++ b/configs/p3450-0000_defconfig -@@ -61,9 +61,9 @@ CONFIG_USB_STORAGE=y - CONFIG_DOS_PARTITION=y - CONFIG_CMD_CACHE=y - CONFIG_OF_LIBFDT_OVERLAY=y --CONFIG_ENV_SIZE=0x20000 -+CONFIG_ENV_SIZE=0x10000 - CONFIG_ENV_OFFSET=0x3b0000 --CONFIG_ENV_OFFSET_REDUND=0x3d0000 -+CONFIG_ENV_OFFSET_REDUND=0x3c0000 - CONFIG_SYS_REDUNDAND_ENVIRONMENT=y - # CONFIG_ENV_IS_NOWHERE is not set - # CONFIG_ENV_IS_IN_EEPROM is not set --- -2.32.0 - diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0015-Update-TX1-nano-emmc-defconfigs-for-new-UBENV-locati.patch b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0015-Update-TX1-nano-emmc-defconfigs-for-new-UBENV-locati.patch deleted file mode 100644 index 59085bda9..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0015-Update-TX1-nano-emmc-defconfigs-for-new-UBENV-locati.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 1d56e39b15e264ddd96aecdbc21cb9f1e5b3dad7 Mon Sep 17 00:00:00 2001 -From: Matt Madison -Date: Sun, 29 Nov 2020 08:30:37 -0800 -Subject: [PATCH 14/16] Update TX1/nano-emmc defconfigs for new UBENV location - -Signed-off-by: Matt Madison ---- - configs/p2371-2180_defconfig | 4 ++-- - configs/p3450-0002_defconfig | 5 +++-- - 2 files changed, 5 insertions(+), 4 deletions(-) - -diff --git a/configs/p2371-2180_defconfig b/configs/p2371-2180_defconfig -index 329878dc90..f62228c805 100644 ---- a/configs/p2371-2180_defconfig -+++ b/configs/p2371-2180_defconfig -@@ -61,8 +61,8 @@ CONFIG_DOS_PARTITION=y - CONFIG_CMD_CACHE=y - CONFIG_OF_LIBFDT_OVERLAY=y - CONFIG_ENV_SIZE=0x20000 --CONFIG_ENV_OFFSET=0x3bb000 --CONFIG_ENV_OFFSET_REDUND=0x3db000 -+CONFIG_ENV_OFFSET=0x3a0000 -+CONFIG_ENV_OFFSET_REDUND=0x3c0000 - CONFIG_SYS_REDUNDAND_ENVIRONMENT=y - # CONFIG_ENV_IS_NOWHERE is not set - # CONFIG_ENV_IS_IN_EEPROM is not set -diff --git a/configs/p3450-0002_defconfig b/configs/p3450-0002_defconfig -index d617181548..81698df8b9 100644 ---- a/configs/p3450-0002_defconfig -+++ b/configs/p3450-0002_defconfig -@@ -64,9 +64,10 @@ CONFIG_DOS_PARTITION=y - CONFIG_CMD_CACHE=y - CONFIG_OF_LIBFDT_OVERLAY=y - CONFIG_ENV_SIZE=0x20000 --CONFIG_ENV_OFFSET=0x3bb000 --CONFIG_ENV_OFFSET_REDUND=0x3db000 -+CONFIG_ENV_OFFSET=0x3a0000 -+CONFIG_ENV_OFFSET_REDUND=0x3c0000 - CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -+CONFIG_SYS_MMC_ENV_PART=2 - # CONFIG_ENV_IS_NOWHERE is not set - # CONFIG_ENV_IS_IN_EEPROM is not set - # CONFIG_ENV_IS_IN_FAT is not set --- -2.32.0 - diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0016-Update-env-for-SPIflash-Nanos-for-R32.5.0-with-Mende.patch b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0016-Update-env-for-SPIflash-Nanos-for-R32.5.0-with-Mende.patch deleted file mode 100644 index 423b7cbf4..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0016-Update-env-for-SPIflash-Nanos-for-R32.5.0-with-Mende.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 8594f2beccd0ce6e780858e868e898798dc41c4e Mon Sep 17 00:00:00 2001 -From: Matt Madison -Date: Thu, 3 Feb 2022 12:34:15 -0800 -Subject: [PATCH 15/16] Update env for SPIflash Nanos for R32.5.0 with Mender - -Need to move the environment area and reduce its -size in order to fit redundant copies between RP4 -and VER_b. - -Signed-off-by: Matt Madison ---- - configs/p3450-0000_defconfig | 6 +++--- - configs/p3541-0000_defconfig | 6 +++--- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/configs/p3450-0000_defconfig b/configs/p3450-0000_defconfig -index 8bed4aafef..97e7d70fb7 100644 ---- a/configs/p3450-0000_defconfig -+++ b/configs/p3450-0000_defconfig -@@ -61,9 +61,9 @@ CONFIG_USB_STORAGE=y - CONFIG_DOS_PARTITION=y - CONFIG_CMD_CACHE=y - CONFIG_OF_LIBFDT_OVERLAY=y --CONFIG_ENV_SIZE=0x10000 --CONFIG_ENV_OFFSET=0x3b0000 --CONFIG_ENV_OFFSET_REDUND=0x3c0000 -+CONFIG_ENV_SIZE=0x8000 -+CONFIG_ENV_OFFSET=0x3d0000 -+CONFIG_ENV_OFFSET_REDUND=0x3d8000 - CONFIG_SYS_REDUNDAND_ENVIRONMENT=y - # CONFIG_ENV_IS_NOWHERE is not set - # CONFIG_ENV_IS_IN_EEPROM is not set -diff --git a/configs/p3541-0000_defconfig b/configs/p3541-0000_defconfig -index fe3f00a30e..d9c161483a 100644 ---- a/configs/p3541-0000_defconfig -+++ b/configs/p3541-0000_defconfig -@@ -3,9 +3,9 @@ CONFIG_ARCH_TEGRA=y - CONFIG_SYS_TEXT_BASE=0x80080000 - CONFIG_SYS_MALLOC_LEN=0x2500000 - CONFIG_NR_DRAM_BANKS=16 --CONFIG_ENV_SIZE=0x10000 --CONFIG_ENV_OFFSET=0x3b0000 --CONFIG_ENV_OFFSET_REDUND=0x3c0000 -+CONFIG_ENV_SIZE=0x8000 -+CONFIG_ENV_OFFSET=0x3d0000 -+CONFIG_ENV_OFFSET_REDUND=0x3d8000 - CONFIG_SYS_REDUNDAND_ENVIRONMENT=y - CONFIG_ENV_SECT_SIZE=0x1000 - CONFIG_DEFAULT_DEVICE_TREE="tegra210-p3541-0000" --- -2.32.0 - diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0017-Jetson-Xavier-NX-TX2-NX-mender.patch b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0017-Jetson-Xavier-NX-TX2-NX-mender.patch deleted file mode 100644 index e7fce64a9..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/patches/0017-Jetson-Xavier-NX-TX2-NX-mender.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 0836e2cf2ba76c50cc25915d398e1684d86396d2 Mon Sep 17 00:00:00 2001 -From: Matt Madison -Date: Thu, 3 Feb 2022 12:34:52 -0800 -Subject: [PATCH 16/16] Jetson Xavier NX TX2-NX mender - -Signed-off-by: Matt Madison ---- - configs/p3636-0001_defconfig | 33 +++++++++++++++++++++++++++++++-- - 1 file changed, 31 insertions(+), 2 deletions(-) - -diff --git a/configs/p3636-0001_defconfig b/configs/p3636-0001_defconfig -index 9e90f1ff8a..3da443ae8b 100644 ---- a/configs/p3636-0001_defconfig -+++ b/configs/p3636-0001_defconfig -@@ -1,8 +1,6 @@ - CONFIG_ARM=y - CONFIG_ARCH_TEGRA=y - CONFIG_SYS_TEXT_BASE=0x80080000 --CONFIG_ENV_SIZE=0x8000 --CONFIG_ENV_OFFSET=0x3D8000 - CONFIG_NR_DRAM_BANKS=1043 - CONFIG_DEFAULT_DEVICE_TREE="tegra186-p3636-0001" - CONFIG_TEGRA186=y -@@ -39,3 +37,34 @@ CONFIG_SYS_NS16550=y - CONFIG_CMD_CACHE=y - CONFIG_NVME=y - CONFIG_OF_LIBFDT_OVERLAY=y -+CONFIG_ENV_SIZE=0x20000 -+CONFIG_ENV_OFFSET=0x3bb000 -+CONFIG_ENV_OFFSET_REDUND=0x3db000 -+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -+# CONFIG_ENV_IS_NOWHERE is not set -+# CONFIG_ENV_IS_IN_EEPROM is not set -+# CONFIG_ENV_IS_IN_FAT is not set -+# CONFIG_ENV_IS_IN_EXT4 is not set -+# CONFIG_ENV_IS_IN_FLASH is not set -+# CONFIG_ENV_IS_IN_NAND is not set -+# CONFIG_ENV_IS_IN_NVRAM is not set -+# CONFIG_ENV_IS_IN_ONENAND is not set -+# CONFIG_ENV_IS_IN_REMOTE is not set -+# CONFIG_ENV_IS_IN_SPI_FLASH is not set -+# CONFIG_ENV_IS_IN_UBI is not set -+CONFIG_MMC=y -+CONFIG_ENV_IS_IN_MMC=y -+CONFIG_CMD_EXT4=y -+CONFIG_CMD_FS_GENERIC=y -+# CONFIG_BOOTCOUNT_BOOTLIMIT is not set -+# CONFIG_BOOTCOUNT_GENERIC is not set -+# CONFIG_BOOTCOUNT_EXT is not set -+# CONFIG_BOOTCOUNT_AM33XX is not set -+# CONFIG_BOOTCOUNT_RAM is not set -+# CONFIG_BOOTCOUNT_I2C is not set -+# CONFIG_BOOTCOUNT_AT91 is not set -+# CONFIG_BOOTCOUNT_MEM is not set -+# CONFIG_BOOTCOUNT_ALEN is not set -+CONFIG_BOOTCOUNT_LIMIT=y -+CONFIG_BOOTCOUNT_ENV=y -+# CONFIG_BOOTCOMMAND is not set --- -2.32.0 - diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-bup-payload.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-bup-payload.bbappend deleted file mode 100644 index 98aa58dfe..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-bup-payload.bbappend +++ /dev/null @@ -1 +0,0 @@ -inherit image_types_mender_tegra diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-mender-tegra-vars.inc b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-mender-tegra-vars.inc deleted file mode 100644 index 64051c14e..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-mender-tegra-vars.inc +++ /dev/null @@ -1,29 +0,0 @@ -MENDER_UBOOT_AUTO_CONFIGURE = "0" -MENDER_UBOOT_CONFIG_SYS_MMC_ENV_PART = "2" - -TEGRA_MENDER_BOOTENV_SIZE_DEFAULT = "0x20000" -TEGRA_MENDER_BOOTENV_SIZE_DEFAULT:tegra210 = "${@'0x10000' if (d.getVar('TEGRA_SPIFLASH_BOOT') or '') == '1' else '0x20000'}" -BOOTENV_SIZE ?= "${TEGRA_MENDER_BOOTENV_SIZE_DEFAULT}" - -# Calculate this offset by adding up the offsets of each partition preceeding the uboot_env partition in sdmmc_boot and aligning to the next -# 4096 byte boundary, then subtracting 4 MiB (4194304) since the sdmmc_boot represents the combined boot0 and boot1 partitions -# Please note the suggestions in the nvidia thread at https://devtalk.nvidia.com/default/topic/1063652/jetson-tx2/mmcblk0boot1-usage-at-address-4177408-and-u-boot-parameter-storage-space-availability/ -# regarding suggestions about locating this environment area in mmcblk0boot1 at 0x3BB000 (3911680) -# We use the same offset for tegra210 eMMC. For tegra210 SPI/SD, we -# locate the environment in the padding block, before the VER -# partition when using SPI flash. Otherwise, we use the location of -# the ENV partition on the SDcard - 0xC00000 (12582912). -MENDER_UBOOT_ENV_STORAGE_DEVICE_OFFSET:tegra186 = "3911680" -# Env offset changed on t210 eMMC platforms in L4T R32.5.x and later -TEGRA_210_EMMC_UBOOT_ENV_OFFSET:l4t-mender-32-4-3 = "3911680" -TEGRA_210_EMMC_UBOOT_ENV_OFFSET = "3801088" -MENDER_UBOOT_ENV_STORAGE_DEVICE_OFFSET:tegra210 = "${@'3866624' if (d.getVar('TEGRA_SPIFLASH_BOOT') or '') == '1' else '${TEGRA_210_EMMC_UBOOT_ENV_OFFSET}'}" -MENDER_UBOOT_MMC_ENV_LINUX_DEVICE_PATH:tegra210 = "${@'/dev/mtd0' if (d.getVar('TEGRA_SPIFLASH_BOOT') or '') == '1' else mender_get_uboot_env_mmc_linux_device_path(d)}" - -# Optionally use SDcard instead of SPI flash on Jetson Nano dev kits. -# Starting with meta-tegra zeus branch, Nano dev kits use the SPI flash -# for the U-Boot environment (as NVIDIA does with L4T R32.3.1 and -# later). Note that the u-boot environment will still live on SPI flash -# and relocating the environment also to SD may be possible but is not -# supported. -MENDER_UBOOT_STORAGE_DEVICE:tegra210 = "${@'1' if (d.getVar('TEGRA_SPIFLASH_BOOT') or '') == '1' else '0'}" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-mender-tegra.inc b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-mender-tegra.inc deleted file mode 100644 index a10df896f..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-mender-tegra.inc +++ /dev/null @@ -1,30 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/patches:" - -SRC_URI:append:mender-uboot = " file://0010-tegra-mender-auto-configured-modified.patch" -SRC_URI:append:mender-uboot = " file://0011-Jetson-TX2-mender-boot-commands.patch" -SRC_URI:append:mender-uboot = " file://0013-Reduce-env-size-on-p3450-0000-to-64KiB.patch" -ADDITIONAL_PATCHES = " \ - file://0012-p3541-0000_defconfig-Mender-patch.patch \ - file://0015-Update-TX1-nano-emmc-defconfigs-for-new-UBENV-locati.patch \ - file://0017-Jetson-Xavier-NX-TX2-NX-mender.patch \ -" -SRC_URI:append:mender-uboot = "${ADDITIONAL_PATCHES}" - -do_provide_mender_defines:append:tegra210() { - if [ "${TEGRA_SPIFLASH_BOOT}" = "1" ]; then - sed -i -e'/^CONFIG_SYS_MMC_ENV/d' ${S}/mender_Kconfig_fragment - fi -} - -mender_get_clean_kernel_devicetree:tegra() { - # Singleton device tree is not required on all platforms, - # and the value is not used on tegra platforms, so just provide a - # dummy value. - echo "dummy" -} - -# Work around Mender's installation of this file (symlink) -# in its libubootenv bbappend -do_install:append:mender-uboot() { - rm -f ${D}${sysconfdir}/fw_env.config -} diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-tegra_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-tegra_%.bbappend deleted file mode 100644 index 88eb8b1d0..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-tegra_%.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -require recipes-bsp/u-boot/u-boot-mender.inc -require recipes-bsp/u-boot/u-boot-mender-tegra.inc -require recipes-bsp/u-boot/u-boot-mender-tegra-vars.inc diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-tegra_2022.01.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-tegra_2022.01.bbappend deleted file mode 100644 index ff5a4054f..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/u-boot/u-boot-tegra_2022.01.bbappend +++ /dev/null @@ -1 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/patches:" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/images/tegra-minimal-initramfs.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/images/tegra-minimal-initramfs.bbappend deleted file mode 100644 index 40aa47228..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/images/tegra-minimal-initramfs.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -# Prevents circular dependency on u-boot due to EXTRA_IMAGEDEPENDS. -# See https://hub.mender.io/t/warrior-tegra-build-cicular-dependencies/757/5 and comments from Mirza -EXTRA_IMAGEDEPENDS:remove = "u-boot" From 523135edad7294b2baf181f3b78dddb82ba88bdf Mon Sep 17 00:00:00 2001 From: Josef Holzmayr Date: Sun, 23 Jul 2023 22:47:25 +0200 Subject: [PATCH 08/11] fix: Tegra, Jetpack 5: remove init scripts Remove outdated init scripts, see comment: https://github.com/OE4T/meta-mender-community/pull/18#discussion_r1271042249 Changelog: Title Ticket: None Signed-off-by: Josef Holzmayr --- .../platform-preboot-cboot.sh | 23 ------------------- .../tegra-minimal-init_%.bbappend | 7 ------ 2 files changed, 30 deletions(-) delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/initrdscripts/tegra-minimal-init/platform-preboot-cboot.sh delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/initrdscripts/tegra-minimal-init_%.bbappend diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/initrdscripts/tegra-minimal-init/platform-preboot-cboot.sh b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/initrdscripts/tegra-minimal-init/platform-preboot-cboot.sh deleted file mode 100644 index 88574cba0..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/initrdscripts/tegra-minimal-init/platform-preboot-cboot.sh +++ /dev/null @@ -1,23 +0,0 @@ -slotsfx="" -mayberoot="" -for bootarg in `cat /proc/cmdline`; do - case "$bootarg" in - boot.slot_suffix=*) slotsfx="${bootarg##boot.slot_suffix=}" ;; - root=*) mayberoot="${bootarg##root=}" ;; - ro) opt="ro" ;; - rootwait) wait="yes" ;; - esac -done -rootdev=`blkid -l -t PARTLABEL=APP$slotsfx | cut -d: -f1` -if [ -z "$rootdev" ]; then - if [ -n "$mayberoot" ]; then - rootdev="$mayberoot" - else - rootdev="/dev/mmcblk0p1" - fi -fi - -if which bootcountcheck >/dev/null 2>&1; then - bootcountcheck -fi - diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/initrdscripts/tegra-minimal-init_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/initrdscripts/tegra-minimal-init_%.bbappend deleted file mode 100644 index cb33efc35..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-core/initrdscripts/tegra-minimal-init_%.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" - -EXTRADEPS = "" -EXTRADEPS:tegra = "tegra-boot-tools-earlyboot" -EXTRADEPS:tegra210 = "" -EXTRADEPS:tegra234 = "" -RDEPENDS:${PN} += "${EXTRADEPS}" From b694e90365cffb3e99bfe9582cb87e1df18196ea Mon Sep 17 00:00:00 2001 From: Josef Holzmayr Date: Sun, 23 Jul 2023 22:51:55 +0200 Subject: [PATCH 09/11] fix: Tegra, Jetpack5: remove outdated state scripts State scripts referring to TX2 and Nano can be removed. See also comment: https://github.com/OE4T/meta-mender-community/pull/18#discussion_r1271045501 Signed-off-by: Josef Holzmayr --- .../redundant-boot-commit-check-script-uboot | 38 ------- .../files/redundant-boot-install-script | 69 ------------ .../files/redundant-boot-install-script-uboot | 101 ------------------ .../tegra-state-scripts_1.0.bb | 28 ----- 4 files changed, 236 deletions(-) delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-commit-check-script-uboot delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script-uboot diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-commit-check-script-uboot b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-commit-check-script-uboot deleted file mode 100644 index f2764b572..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-commit-check-script-uboot +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -LABELCHARS="AB" - -echo "Verifying Tegra bootloader update" -curslot=`nvbootctrl get-current-slot 2>/dev/null || tegra-boot-control --current-slot 2>/dev/null` -cfglbl="\"RootfsPart${LABELCHARS:$curslot:1}\"" -devnam=`grep -h "$cfglbl:" /etc/mender/mender.conf /var/lib/mender/mender.conf | cut -d: -f2 | cut -d, -f1 | tr -d '" '` -if [ -z "$devnam" ]; then - echo "ERR: could not determine expected mender device name for boot slot $curslot" >&2 - exit 1 -fi - -# If the rootfs partitions are eMMC/SDcard device names, verify that -# the mender boot partition in U-Boot and the Tegra bootloader boot -# slot match. If not, the Tegra bootloader update failed, and we -# need to reset the boot slot to get the Tegra bootloader and Mender -# resynchronized. -if [ "${devnam##/dev/mmcblk}" != "${devnam}" ]; then - bootpart=`fw_printenv -n mender_boot_part` - if [ -z "$bootpart" ]; then - echo "ERR: could not retrieve mender_boot_part from U-Boot env" >&2 - exit 1 - fi - devnampart=`expr "${devnam##/dev/mmcblk*p}" \+ 0 2>/dev/null` - if [ -z "$devnampart" ]; then - echo "ERR: could not extract partition number from rootfs device name" >&2 - exit 1 - fi - if [ $bootpart -ne $devnampart ]; then - altslot=$(expr 1 - $curslot) - echo "Detected Tegra bootloader upgrade failure, resetting boot slot to $altslot" >&2 - echo "*** Reboot required ***" >&2 - tegra-boot-control --set-active $altslot - exit 1 - fi -fi -exit 0 diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script deleted file mode 100644 index 5779ac86b..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh - -mnt= -LABELCHARS="AB" -COPY_MACHINE_ID=@COPY_MACHINE_ID@ - -cleanup() { - [ -n "$mnt" ] || return - for d in sys proc dev run; do - if mountpoint -q "${mnt}/${d}"; then - umount "${mnt}/${d}" >/dev/null 2>&1 || true - fi - done - if mountpoint -q "$mnt"; then - umount "$mnt" >/dev/null 2>&1 || true - fi - rmdir "$mnt" >/dev/null 2>&1 || true -} - -echo "Installing NVIDIA bootloader update payload" - -if which tegra-boot-control >/dev/null 2>&1; then - current_slot=`tegra-boot-control --current-slot` -else - current_slot=`nvbootctrl get-current-slot` -fi -echo "Current boot slot: $current_slot" -otherslot=`expr 1 - $current_slot` -cfglbl="\"RootfsPart${LABELCHARS:$otherslot:1}\"" -devnam=`grep -h "$cfglbl:" /etc/mender/mender.conf /var/lib/mender/mender.conf | cut -d: -f2 | cut -d, -f1 | tr -d '" '` -if [ -z "$devnam" ]; then - echo "ERR: could not determine device name for boot slot $otherslot" >&2 - exit 1 -fi -mnt=`mktemp -d -t nvbup.XXXXXX` -if [ -z "$mnt" -o ! -d "$mnt" ]; then - echo "ERR: could not create directory for mounting install partition" >&2 - exit 1 -fi -mount -o ro "$devnam" "$mnt" -if [ ! -d "${mnt}/opt/ota_package" ]; then - echo "ERR: Missing /opt/ota_package directory in installed rootfs" >&2 - cleanup - exit 1 -fi -# tegra-bootloader-update needs access to these filesystems, -# so bind-mount them into the new rootfs for the chroot -mount --bind /sys "${mnt}/sys" -mount --bind /proc "${mnt}/proc" -mount --bind /dev "${mnt}/dev" -# for tegra-bootinfo -mount --bind /run "${mnt}/run" - -if ! chroot "${mnt}" /usr/bin/tegra-bootloader-update /opt/ota_package/bl_update_payload; then - echo "ERR: bootloader update failed" >&2 - cleanup - exit 1 -fi -echo "Successful bootloader update" -if [ -n "$COPY_MACHINE_ID" ]; then - curid=$(systemd-machine-id-setup --print) - storedid=$(chroot "${mnt}" /usr/bin/tegra-bootinfo -n -v machine_id 2>/dev/null) - if [ "$curid" != "$storedid" ]; then - chroot "${mnt}" /usr/bin/tegra-bootinfo --initialize 2>/dev/null - chroot "${mnt}" /usr/bin/tegra-bootinfo -V machine_id "$curid" - fi -fi -cleanup -exit 0 diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script-uboot b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script-uboot deleted file mode 100644 index 27932951a..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/files/redundant-boot-install-script-uboot +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/sh - -mnt= -UBOOTVARS="bootcount mender_boot_part mender_boot_part_hex upgrade_available" -ubvarfile= -install_fwenv= - -cleanup() { - [ -n "$mnt" ] || return - for d in sys proc dev run; do - if mountpoint -q "${mnt}/${d}"; then - umount "${mnt}/${d}" >/dev/null 2>&1 || true - fi - done - if mountpoint -q "$mnt"; then - umount "$mnt" >/dev/null 2>&1 || true - fi - rmdir "$mnt" >/dev/null 2>&1 || true -} - -save_vars() { - local v - ubvarfile=$(mktemp -p "$1" ubvars.XXXXXX) - for v in $UBOOTVARS; do - fw_printenv $v >>$ubvarfile - done -} - -echo "Installing NVIDIA bootloader update payload" - -new_boot_part=`fw_printenv -n mender_boot_part` -mnt=`mktemp -d -t nvbup.XXXXXX` -if [ -z "$mnt" -o ! -d "$mnt" ]; then - echo "ERR: could not create directory for mounting install partition" >&2 - exit 1 -fi -mount -o ro /dev/mmcblk0p${new_boot_part} "$mnt" -if [ ! -d "${mnt}/opt/ota_package" ]; then - echo "ERR: Missing /opt/ota_package directory in installed rootfs" >&2 - cleanup - exit 1 -fi -# tegra-bootloader-update needs access to these filesystems, -# so bind-mount them into the new rootfs for the chroot -mount --bind /sys "${mnt}/sys" -mount --bind /proc "${mnt}/proc" -mount --bind /dev "${mnt}/dev" -mount -t tmpfs tmpfs "${mnt}/run" - -# Check for u-boot environment location change; save vars for restoration -# into the new environment after the update -if [ -e "$mnt/usr/share/u-boot/fw_env.config" ]; then - if ! diff -qbi /etc/fw_env.config $mnt/usr/share/u-boot/fw_env.config > /dev/null 2>&1; then - save_vars "${mnt}/run" - install_fwenv=yes - fi -fi - -if ! chroot "${mnt}" /usr/bin/tegra-bootloader-update --dry-run /opt/ota_package/bl_update_payload >/dev/null 2>&1; then - # If the tool reports that the version partitions are corrupted, this is an update on a tegra210 - # device with the old partition layout where the U-Boot environment overwrote the version partition(s), - # in which case we recover via complete initialization. - if chroot "${mnt}" /usr/bin/tegra-bootloader-update --dry-run /opt/ota_package/bl_update_payload 2>&1 | grep -q 'version partitions are corrupted'; then - # For the recoverable case, we will have also detected a change the U-Boot environment change - if [ -n "$install_fwenv" ]; then - echo "Detected bootloader partition upgrade, reinitializing" >&2 - if ! chroot "${mnt}" /usr/bin/tegra-bootloader-update --initialize /opt/ota_package/bl_update_payload; then - echo "ERR: bootloader re-initialization failed" >&2 - cleanup - exit 1 - fi - else - echo "WARN: VER partitions are corrupted" >&2 - echo "WARN: Please refer to https://github.com/OE4T/tegra-demo-distro/pull/113 for additional context" >&2 - echo "WARN: Attempting update anyway" >&2 - fi - else - echo "ERR: cannot perform bootloader update" >&2 - cleanup - exit 1 - fi -elif ! chroot "${mnt}" /usr/bin/tegra-bootloader-update /opt/ota_package/bl_update_payload; then - echo "ERR: bootloader update failed" >&2 - cleanup - exit 1 -fi -# If the U-Boot environment config has changed, propagate the important variables -# to the new environment -if [ -n "$install_fwenv" ]; then - if ! chroot "${mnt}" /usr/bin/fw_setenv -c /usr/share/u-boot/fw_env.config -s /run/$(basename "$ubvarfile"); then - echo "ERR: could not restore U-Boot environment after bootloader update" >&2 - cleanup - exit 1 - fi - if [ -L /etc/fw_env.config ]; then - cp $mnt/usr/share/u-boot/fw_env.config $(readlink /etc/fw_env.config) - fi -fi -echo "Successful bootloader update" -cleanup -exit 0 diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/tegra-state-scripts_1.0.bb b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/tegra-state-scripts_1.0.bb index 85bd8fc34..58d95ca64 100644 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/tegra-state-scripts_1.0.bb +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/tegra-state-scripts_1.0.bb @@ -1,7 +1,4 @@ SRC_URI = " \ - file://redundant-boot-commit-check-script-uboot \ - file://redundant-boot-install-script \ - file://redundant-boot-install-script-uboot \ file://switch-rootfs \ " @@ -15,35 +12,10 @@ inherit mender-state-scripts PERSIST_MACHINE_ID="" PERSIST_MACHINE_ID:mender-persist-systemd-machine-id = "yes" -# We have a different install script for U-Boot vs. cboot, since -# the mechanism for determining boot partitions is different between -# the two, and with cboot there is no U-Boot environment for copying -# the machine-id. -copy_install_script() { - sed -e's,@COPY_MACHINE_ID@,${PERSIST_MACHINE_ID},' ${S}/redundant-boot-install-script > ${MENDER_STATE_SCRIPTS_DIR}/ArtifactInstall_Leave_80_bl-update -} - -copy_install_script:mender-uboot() { - cp ${S}/redundant-boot-install-script-uboot ${MENDER_STATE_SCRIPTS_DIR}/ArtifactInstall_Leave_80_bl-update - cp ${S}/redundant-boot-commit-check-script-uboot ${MENDER_STATE_SCRIPTS_DIR}/ArtifactCommit_Enter_80_bl-check-update -} - do_compile() { : } -do_compile:tegra194() { - copy_install_script -} - -do_compile:tegra186() { - copy_install_script -} - -do_compile:tegra210() { - cp ${S}/redundant-boot-install-script-uboot ${MENDER_STATE_SCRIPTS_DIR}/ArtifactInstall_Leave_80_bl-update -} - do_compile:tegra234() { cp ${S}/switch-rootfs ${MENDER_STATE_SCRIPTS_DIR}/ArtifactInstall_Leave_50_switch-rootfs } From 2e7488faaa8eac72181495a08da6e893516a6b28 Mon Sep 17 00:00:00 2001 From: Josef Holzmayr Date: Mon, 24 Jul 2023 11:54:11 +0200 Subject: [PATCH 10/11] fix: Tegra, Jetpack5: remove cboot appends In Jetpack5, cboot is not used anymore. Remove the appends which placed an additional dependency on machine-id. Changelog: Title Ticket: None Signed-off-by: Josef Holzmayr --- meta-mender-tegra/meta-mender-tegra-jetpack5/conf/layer.conf | 4 ---- .../recipes-bsp/cboot/cboot-t18x_%.bbappend | 1 - .../recipes-bsp/cboot/cboot-t19x_%.bbappend | 1 - 3 files changed, 6 deletions(-) delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/cboot/cboot-t18x_%.bbappend delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/cboot/cboot-t19x_%.bbappend diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/conf/layer.conf b/meta-mender-tegra/meta-mender-tegra-jetpack5/conf/layer.conf index 114d954c6..9dcdc7745 100644 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/conf/layer.conf +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/conf/layer.conf @@ -10,7 +10,3 @@ BBFILE_PRIORITY_meta-mender-tegra-jetpack5 = "10" LAYERVERSION_meta-mender-tegra-jetpack5 = "1" LAYERSERIES_COMPAT_meta-mender-tegra-jetpack5 = "kirkstone" LAYERDEPENDS_meta-mender-tegra-jetpack5 = "tegra" - -BBMASK:tegra234:append = " \ - recipes-bsp/cboot/ \ - " diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/cboot/cboot-t18x_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/cboot/cboot-t18x_%.bbappend deleted file mode 100644 index 1a0b38479..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/cboot/cboot-t18x_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -PACKAGECONFIG:append = " machine-id" diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/cboot/cboot-t19x_%.bbappend b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/cboot/cboot-t19x_%.bbappend deleted file mode 100644 index 1a0b38479..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/cboot/cboot-t19x_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -PACKAGECONFIG:append = " machine-id" From 6f963ae9178073c68db7987266ac53f5458c5881 Mon Sep 17 00:00:00 2001 From: Josef Holzmayr Date: Mon, 24 Jul 2023 11:55:53 +0200 Subject: [PATCH 11/11] fix: Tegra, Jetpack 5: remove deprecated flash layouts The TX2 and Nano platforms are not supported on Jetpack 5 anymore, so the respective flash layouts can be removed. Changelog: Title Ticket: None Signed-off-by: Josef Holzmayr --- .../jetson-nano-2gb-devkit/flash_mender.xml | 272 -------- .../jetson-nano-devkit-emmc/flash_mender.xml | 408 ------------ .../jetson-nano-devkit/flash_mender.xml | 262 -------- .../jetson-nano-emmc/flash_mender.xml | 406 ------------ .../jetson-nano-qspi-sd/flash_mender.xml | 296 --------- .../tegra186/flash_mender.xml | 583 ------------------ 6 files changed, 2227 deletions(-) delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-2gb-devkit/flash_mender.xml delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit-emmc/flash_mender.xml delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit/flash_mender.xml delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-emmc/flash_mender.xml delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-qspi-sd/flash_mender.xml delete mode 100644 meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra186/flash_mender.xml diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-2gb-devkit/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-2gb-devkit/flash_mender.xml deleted file mode 100644 index 769deec4f..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-2gb-devkit/flash_mender.xml +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - - - sequential - basic - 262144 - 0 - 8 - 0 - **Required.** Contains Boot Configuration Table (BCT). - - - - sequential - basic - 196608 - 0 - 8 - 0 - NVCFILE - **Required.** Contains TegraBoot binary. - - - - sequential - basic - 65536 - 0 - 8 - 0 - flash.xml.bin - **Required.** Contains Partition Table. - - - - sequential - basic - 196608 - 0 - 8 - 0 - NVCFILE - **Required.** Contains a redundant copy of the TegraBoot - binary. - - - - sequential - basic - 131072 - 0 - 8 - 0 - TBCFILE - **Required.** Contains TegraBoot CPU-side binary. - - - - sequential - basic - 327680 - 0 - 0x8 - 0 - DTBFILE - **Required.** Contains Bootloader DTB binary. - - - - sequential - basic - 589824 - 0 - 8 - 0 - EBTFILE - **Required.** Contains CBoot, the final boot stage CPU bootloader - binary that loads the binary in the kernel partition.. - - - - sequential - basic - 65536 - 0 - 8 - 0 - WB0FILE - **Required.** Contains warm boot binary. - - - - sequential - basic - 196608 - 0 - 0 - 8 - 0 - BPFFILE - **Required.** Contains SC7 entry firmware. - - - - sequential - basic - 65536 - 0 - 8 - 0 - BPFDTB-FILE - **Optional.** Reserved for future use by BPMP DTB binary; - can't remove. - - - - sequential - basic - 458752 - 0 - 0 - 8 - 0 - TOSFILE - **Required.** Contains TOS binary. - - - - sequential - basic - 327680 - 0 - 0x8 - 0 - DTBFILE - **Required.** Contains kernel DTB binary. - - - - sequential - basic - 753664 - 0 - 0x8 - 0 - LNXFILE - **Required.** Contains U-Boot, which loads and launches the kernel from - the rootfs at `/boot`. - - - - sequential - basic - 131072 - 0 - 0x8 - 0 - rp4.blob - **Required.** Contains XUSB firmware file, making XUSB - a true USB 3.0 compliant host controller. - - - - sequential - basic - 0x3B0000 - 131072 - 0 - 8 - 0 - U-Boot environment area - - - - sequential - basic - 0x3E0000 - 32768 - 0 - 0 - 8 - 0 - VERFILE - **Required.** Contains a redundant copy of BSP version - information. - - - - sequential - basic - 0x3F0000 - 32768 - 0 - 0 - 8 - 0 - VERFILE - **Required.** Contains BSP version information. - - - - - - sequential - basic - 2097152 - 0 - 8 - 0 - **Required.** Contains primary GPT of the `sdcard` device. All - partitions defined after this entry are configured in the kernel, and are accessible - by standard partition tools such as gdisk and parted. - - - - sequential - basic - APPSIZE - 0 - 0x8 - 0 - 4096 - APPFILE - **Required.** Contains the rootfs. This partition must be defined after - `primary_GPT` so that it can be accessed as the fixed known special device - `/dev/mmcblk0p1`. - - - - sequential - basic - APPSIZE - 0 - 0x8 - 0 - 4096 - APPFILE - - - - sequential - basic - 4294967296 - 0 - 0x8 - 0 - 4096 - - - - sequential - basic - 2097152 - 0x808 - DATAFILE - - - - sequential - basic - 2097152 - 0 - 8 - 0 - **Required.** Contains secondary GPT of the `sdcard` device. - - - diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit-emmc/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit-emmc/flash_mender.xml deleted file mode 100644 index cd91e0037..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit-emmc/flash_mender.xml +++ /dev/null @@ -1,408 +0,0 @@ - - - - - - - - sequential - basic - 1048576 - 8 - **Required.** Contains Boot Configuration Table (BCT). - - - - sequential - basic - 262144 - 8 - NVCFILE - **Required.** Contains TegraBoot binary. - - - - sequential - basic - 131072 - 8 - flash.xml.bin - **Required.** Contains Partition Table. - - - - sequential - basic - 196608 - 8 - TBCFILE - **Required.** Contains TegraBoot CPU-side binary. - - - - sequential - basic - 1048576 - 8 - DTBFILE - **Required.** Contains Bootloader DTB binary. - - - - sequential - basic - 655360 - 8 - EBTFILE - **Required.** Contains CBoot, the final boot stage CPU bootloader binary - that loads the binary in kernel partition. - - - - sequential - basic - 131072 - 8 - WB0FILE - **Required.** Contains warm boot binary. - - - - sequential - basic - 262144 - 8 - BPFFILE - **Required.** Contains SC7 entry firmware. - - - - sequential - basic - 458752 - 0 - 8 - 0 - BPFDTB-FILE - **Optional.** Reserved for future use by BPMP DTB binary; can't remove - - - - sequential - basic - 262144 - 8 - NVCFILE - **Required.** Contains a redundant copy of the TegraBoot - binary. - - - - sequential - basic - 131072 - 8 - flash.xml.bin - **Required.** Contains a redundant copy of the Partition - Table. - - - - sequential - basic - 196608 - 8 - TBCFILE - **Required.** Contains a redundant copy of TegraBoot CPU-side binary. - - - - sequential - basic - 1048576 - 8 - DTBFILE - **Required.** Contains a redundant copy of the Bootloader - DTB binary. - - - - sequential - basic - 655360 - 8 - EBTFILE - **Required.** Contains a redundant copy of CBoot. - - - - sequential - basic - 131072 - 8 - WB0FILE - **Required.** Contains a redundant copy of the - warm boot binary. - - - - sequential - basic - 262144 - 8 - BPFFILE - **Required.** Contains a redundant copy of the - SC7 Entry Firmware. - - - - sequential - basic - 458752 - 0 - 8 - 0 - BPFDTB-FILE - **Optional.** Reserved for future use by BPMP DTB binary; can't remove - - - - sequential - basic - 0x7A0000 - 262144 - 0 - 8 - 0 - **Required.** Reserved for U-Boot environment. - - - - sequential - basic - 0x7E0000 - 32768 - 0 - 0 - 8 - 0 - VERFILE - **Required.** Contains a redundant copy of the - BSP version info. - - - - sequential - basic - 0x7F0000 - 32768 - 0 - 0 - 8 - 0 - VERFILE - **Required.** Contains BSP version information. - - - - - - sequential - basic - 2097152 - 8 - **Required.** Contains primary GPT of the `sdmmc_user` device. All - partitions defined after this entry are configured in the kernel, and are accessible - by standard partition tools such as gdisk and parted. - - - - sequential - basic - APPSIZE - 8 - APPFILE - **Required.** Contains the rootfs. This partition must be defined after - `primary_GPT` so it can be accessed as the fixed known special device - `/dev/mmcblk0p1`. - - - - sequential - basic - 1048576 - 8 - DTBFILE - **Required.** Contains kernel DTB binary. - - - - sequential - basic - 6291456 - 8 - TOSFILE - **Required.** Contains TOS binary. - - - - sequential - basic - 81920 - 8 - EKSFILE - **Optional.** Contains the encrypted keys. - - - - sequential - basic - 67092480 - 8 - LNXFILE - **Required.** Contains U-Boot, which loads and launches the kernel from - the rootfs at `/boot`. - - - - sequential - basic - 1048576 - 8 - DTBFILE - **Required.** Contains a redundant copy of the - kernel DTB binary. - - - - sequential - basic - 6291456 - 8 - TOSFILE - **Required.** Contains a redundant copy of the - TOS binary. - - - - sequential - basic - 81920 - 8 - EKSFILE - **Optional.** Contains a redundant copy of the encrypted - keys. - - - - sequential - basic - 67092480 - 8 - LNXFILE - **Required.** Contains a redundant copy of U-Boot, which loads and - launches the kernel from the rootfs at `/boot`. - - - - sequential - basic - 196608 - 8 - bmp.blob - **Optional.** Contains BMP images for splash screen display during - boot. - - - - sequential - basic - 262144 - 8 - rp4.blob - **Required.** Contains the XUSB module’s firmware file, making XUSB a - true USB 3.0 compliant host controller. - - - - sequential - basic - 66060288 - 8 - 0 - **Optional.** Reserved for future use by the recovery image; removable. - - - - sequential - basic - 524288 - 8 - 0 - **Optional.** Reserved for future use by the recovery DTB image; - removable. - - - - sequential - basic - 262144 - 8 - 0 - **Optional.** Reserved for future use by boot control data; removable. - - - - sequential - basic - 262144 - 8 - 0 - **Optional.** Reserved for future use by a redundant copy of the boot control data; - removable. - - - - sequential - basic - 314572800 - 0 - 0x8 - 0 - **Optional.** Reserved for future use by the recovery filesystem; - removable. - - - - sequential - basic - 262144 - 8 - - - - sequential - basic - APPSIZE - 8 - APPFILE - - - - sequential - basic - 2097152 - 0x808 - DATAFILE - - - - sequential - basic - -1 - 8 - **Required.** Contains secondary GPT of the `sdmmc_user` - device. - - - diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit/flash_mender.xml deleted file mode 100644 index f185b7904..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-devkit/flash_mender.xml +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - - - sequential - basic - 262144 - 0 - 8 - 0 - **Required.** Contains Boot Configuration Table (BCT). - - - - sequential - basic - 196608 - 0 - 8 - 0 - NVCFILE - **Required.** Contains TegraBoot binary. - - - - sequential - basic - 65536 - 0 - 8 - 0 - flash.xml.bin - **Required.** Contains Partition Table. - - - - sequential - basic - 196608 - 0 - 8 - 0 - NVCFILE - **Required.** Contains a redundant copy of the TegraBoot - binary. - - - - sequential - basic - 131072 - 0 - 8 - 0 - TBCFILE - **Required.** Contains TegraBoot CPU-side binary. - - - - sequential - basic - 327680 - 0 - 0x8 - 0 - DTBFILE - **Required.** Contains Bootloader DTB binary. - - - - sequential - basic - 589824 - 0 - 8 - 0 - EBTFILE - **Required.** Contains CBoot, the final boot stage CPU bootloader - binary that loads the binary in the kernel partition.. - - - - sequential - basic - 65536 - 0 - 8 - 0 - WB0FILE - **Required.** Contains warm boot binary. - - - - sequential - basic - 196608 - 0 - 0 - 8 - 0 - BPFFILE - **Required.** Contains SC7 entry firmware. - - - - sequential - basic - 65536 - 0 - 8 - 0 - BPFDTB-FILE - **Optional.** Reserved for future use by BPMP DTB binary; - can't remove. - - - - sequential - basic - 458752 - 0 - 0 - 8 - 0 - TOSFILE - **Required.** Contains TOS binary. - - - - sequential - basic - 327680 - 0 - 0x8 - 0 - DTBFILE - **Required.** Contains kernel DTB binary. - - - - sequential - basic - 753664 - 0 - 0x8 - 0 - LNXFILE - **Required.** Contains U-Boot, which loads and launches the kernel from - the rootfs at `/boot`. - - - - sequential - basic - 131072 - 0 - 0x8 - 0 - rp4.blob - **Required.** Contains XUSB firmware file, making XUSB - a true USB 3.0 compliant host controller. - - - - sequential - basic - 0x3B0000 - 131072 - 0 - 8 - 0 - U-Boot environment area - - - - sequential - basic - 0x3E0000 - 32768 - 0 - 0 - 8 - 0 - VERFILE - **Required.** Contains a redundant copy of BSP version - information. - - - - sequential - basic - 0x3F0000 - 32768 - 0 - 0 - 8 - 0 - VERFILE - **Required.** Contains BSP version information. - - - - - - sequential - basic - 2097152 - 0 - 8 - 0 - **Required.** Contains primary GPT of the `sdcard` device. All - partitions defined after this entry are configured in the kernel, and are accessible - by standard partition tools such as gdisk and parted. - - - - sequential - basic - APPSIZE - 0 - 0x8 - 0 - 4096 - APPFILE - **Required.** Contains the rootfs. This partition must be defined after - `primary_GPT` so that it can be accessed as the fixed known special device - `/dev/mmcblk0p1`. - - - - sequential - basic - APPSIZE - 0 - 0x8 - 0 - 4096 - APPFILE - - - - sequential - basic - 2097152 - 0x808 - DATAFILE - - - - sequential - basic - 2097152 - 0 - 8 - 0 - **Required.** Contains secondary GPT of the `sdcard` device. - - - diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-emmc/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-emmc/flash_mender.xml deleted file mode 100644 index f0eb1bea1..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-emmc/flash_mender.xml +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - - - sequential - basic - 1048576 - 8 - **Required.** Contains Boot Configuration Table (BCT). - - - - sequential - basic - 262144 - 8 - NVCFILE - **Required.** Contains TegraBoot binary. - - - - sequential - basic - 131072 - 8 - flash.xml.bin - **Required.** Contains Partition Table. - - - - sequential - basic - 196608 - 8 - TBCFILE - **Required.** Contains TegraBoot CPU-side binary. - - - - sequential - basic - 1048576 - 8 - DTBFILE - **Required.** Contains Bootloader DTB binary. - - - - sequential - basic - 655360 - 8 - EBTFILE - **Required.** Contains CBoot, the final boot stage CPU bootloader binary - that loads the binary in kernel partition. - - - - sequential - basic - 131072 - 8 - WB0FILE - **Required.** Contains warm boot binary. - - - - sequential - basic - 262144 - 8 - BPFFILE - **Required.** Contains SC7 entry firmware. - - - - sequential - basic - 458752 - 0 - 8 - 0 - BPFDTB-FILE - **Optional.** Reserved for future use by BPMP DTB binary; can't remove - - - - sequential - basic - 262144 - 8 - NVCFILE - **Required.** Contains a redundant copy of the TegraBoot - binary. - - - - sequential - basic - 131072 - 8 - flash.xml.bin - **Required.** Contains a redundant copy of the Partition - Table. - - - - sequential - basic - 196608 - 8 - TBCFILE - **Required.** Contains a redundant copy of TegraBoot CPU-side binary. - - - - sequential - basic - 1048576 - 8 - DTBFILE - **Required.** Contains a redundant copy of the Bootloader - DTB binary. - - - - sequential - basic - 655360 - 8 - EBTFILE - **Required.** Contains a redundant copy of CBoot. - - - - sequential - basic - 131072 - 8 - WB0FILE - **Required.** Contains a redundant copy of the - warm boot binary. - - - - sequential - basic - 262144 - 8 - BPFFILE - **Required.** Contains a redundant copy of the - SC7 Entry Firmware. - - - - sequential - basic - 458752 - 0 - 8 - 0 - BPFDTB-FILE - **Optional.** Reserved for future use by BPMP DTB binary; can't remove - - - - - sequential - basic - 917504 - 0 - 8 - 0 - **Required.** Empty padding. - - - - sequential - basic - 65536 - 0 - 0 - 8 - 0 - VERFILE - **Required.** Contains a redundant copy of the - BSP version info. - - - - sequential - basic - 65536 - 0 - 0 - 8 - 0 - VERFILE - **Required.** Contains BSP version information. - - - - - - sequential - basic - 2097152 - 8 - **Required.** Contains primary GPT of the `sdmmc_user` device. All - partitions defined after this entry are configured in the kernel, and are accessible - by standard partition tools such as gdisk and parted. - - - - sequential - basic - APPSIZE - 8 - APPFILE - **Required.** Contains the rootfs. This partition must be defined after - `primary_GPT` so it can be accessed as the fixed known special device - `/dev/mmcblk0p1`. - - - - sequential - basic - 1048576 - 8 - DTBFILE - **Required.** Contains kernel DTB binary. - - - - sequential - basic - 6291456 - 8 - TOSFILE - **Required.** Contains TOS binary. - - - - sequential - basic - 81920 - 8 - EKSFILE - **Optional.** Contains the encrypted keys. - - - - sequential - basic - 67092480 - 8 - LNXFILE - **Required.** Contains U-Boot, which loads and launches the kernel from - the rootfs at `/boot`. - - - - sequential - basic - 1048576 - 8 - DTBFILE - **Required.** Contains a redundant copy of the - kernel DTB binary. - - - - sequential - basic - 6291456 - 8 - TOSFILE - **Required.** Contains a redundant copy of the - TOS binary. - - - - sequential - basic - 81920 - 8 - EKSFILE - **Optional.** Contains a redundant copy of the encrypted - keys. - - - - sequential - basic - 67092480 - 8 - LNXFILE - **Required.** Contains a redundant copy of U-Boot, which loads and - launches the kernel from the rootfs at `/boot`. - - - - sequential - basic - 196608 - 8 - bmp.blob - **Optional.** Contains BMP images for splash screen display during - boot. - - - - sequential - basic - 262144 - 8 - rp4.blob - **Required.** Contains the XUSB module’s firmware file, making XUSB a - true USB 3.0 compliant host controller. - - - - sequential - basic - 66060288 - 8 - 0 - **Optional.** Reserved for future use by the recovery image; removable. - - - - sequential - basic - 524288 - 8 - 0 - **Optional.** Reserved for future use by the recovery DTB image; - removable. - - - - sequential - basic - 262144 - 8 - 0 - **Optional.** Reserved for future use by boot control data; removable. - - - - sequential - basic - 262144 - 8 - 0 - **Optional.** Reserved for future use by a redundant copy of the boot control data; - removable. - - - - sequential - basic - 314572800 - 0 - 0x8 - 0 - **Optional.** Reserved for future use by the recovery filesystem; - removable. - - - - sequential - basic - 262144 - 8 - - - - sequential - basic - APPSIZE - 8 - APPFILE - - - - sequential - basic - 2097152 - 0x808 - DATAFILE - - - - sequential - basic - -1 - 8 - **Required.** Contains secondary GPT of the `sdmmc_user` - device. - - - diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-qspi-sd/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-qspi-sd/flash_mender.xml deleted file mode 100644 index 5a974231c..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/jetson-nano-qspi-sd/flash_mender.xml +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - - - sequential - basic - 262144 - 0 - 8 - 0 - **Required.** Contains Boot Configuration Table (BCT). - - - - sequential - basic - 196608 - 0 - 8 - 0 - NVCFILE - **Required.** Contains TegraBoot binary. - - - - sequential - basic - 65536 - 0 - 8 - 0 - flash.xml.bin - **Required.** Contains Partition Table. - - - - sequential - basic - 196608 - 0 - 8 - 0 - NVCFILE - **Required.** Contains a redundant copy of the TegraBoot - binary. - - - - sequential - basic - 0x3B0000 - 131072 - 0 - 8 - 0 - U-Boot environment area - - - - sequential - basic - 0x3E0000 - 32768 - 0 - 0 - 8 - 0 - VERFILE - **Required.** Contains a redundant copy of BSP version - information. - - - - sequential - basic - 0x3F0000 - 32768 - 0 - 0 - 8 - 0 - VERFILE - **Required.** Contains BSP version information. - - - - - - sequential - basic - 2097152 - 0 - 8 - 0 - **Required.** Contains primary GPT of the `sdcard` device. All - partitions defined after this entry are configured in the kernel, and are accessible - by standard partition tools such as gdisk and parted. - - - - sequential - basic - APPSIZE - 0 - 0x8 - 0 - 4096 - APPFILE - **Required.** Contains the rootfs. This partition must be defined after - `primary_GPT` so that it can be accessed as the fixed known special device - `/dev/mmcblk0p1`. - - - - sequential - basic - 131072 - 0 - 8 - 0 - TBCFILE - **Required.** Contains TegraBoot CPU-side binary. - - - - sequential - basic - 458752 - 0 - 0x8 - 0 - DTBFILE - **Required.** Contains Bootloader DTB binary. - - - - sequential - basic - 589824 - 0 - 8 - 0 - EBTFILE - **Required.** Contains CBoot, the final boot stage CPU bootloader - binary that loads the binary in the kernel partition.. - - - - sequential - basic - 65536 - 0 - 8 - 0 - WB0FILE - **Required.** Contains warm boot binary. - - - - sequential - basic - 196608 - 0 - 0 - 8 - 0 - BPFFILE - **Required.** Contains SC7 entry firmware. - - - - sequential - basic - 393216 - 0 - 8 - 0 - BPFDTB-FILE - **Optional.** Reserved for future use by BPMP DTB binary; can't remove. - - - - sequential - basic - 65536 - 0 - 0x8 - 0 - FBFILE - **Optional.** Reserved for fuse bypass; removeable. - - - - sequential - basic - 458752 - 0 - 0 - 8 - 0 - TOSFILE - **Required.** Contains TOS binary. - - - - sequential - basic - 458752 - 0 - 0x8 - 0 - DTBFILE - **Required.** Contains kernel DTB binary. - - - - sequential - basic - 786432 - 0 - 0x8 - 0 - LNXFILE - **Required.** Contains U-Boot, which loads and launches the kernel from - the rootfs at `/boot`. - - - - sequential - basic - 65536 - 0 - 0 - 8 - 0 - EKSFILE - **Optional.** Contains the encrypted keys. - - - - sequential - basic - 81920 - 0 - 0x8 - 0 - bmp.blob - **Optional.** Contains BMP images for splash screen display during - boot. - - - - sequential - basic - 131072 - 0 - 0x8 - 0 - rp4.blob - **Required.** Contains XUSB module’s firmware file, making XUSB - a true USB 3.0 compliant host controller. - - - - sequential - basic - APPSIZE - 0 - 0x8 - 0 - 4096 - APPFILE - - - - sequential - basic - 2097152 - 0x808 - DATAFILE - - - - sequential - basic - 2097152 - 0 - 8 - 0 - **Required.** Contains secondary GPT of the `sdcard` device. - - - diff --git a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra186/flash_mender.xml b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra186/flash_mender.xml deleted file mode 100644 index a4da8ee47..000000000 --- a/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-bsp/tegra-binaries/mender-custom-flash-layout/tegra186/flash_mender.xml +++ /dev/null @@ -1,583 +0,0 @@ - - - - - - - - sequential - basic - 32768 - 0 - 8 - 0 - **Required.** Contains Boot Configuration Table. - - - sequential - basic - 262144 - 0 - 8 - 0 - MB1FILE - **Required.** Slot A; contains NVIDIA signed MB1 binary. - - - sequential - basic - 262144 - 0 - 8 - 0 - MB1FILE - **Required.** Slot B; contains NVIDIA signed MB1 binary. - - - sequential - basic - 65536 - 0 - 8 - 0 - **Required.** Slot A; contains MB1 boot configuration table. - - - sequential - basic - 65536 - 0 - 8 - 0 - **Required.** Slot B; contains MB1 boot configuration table. - - - sequential - basic - 55296 - 0 - 8 - 0 - DRAMECCFILE - **Optional.** Contains DRAM-ECC firmware. - - - sequential - basic - 4608 - 0 - 8 - 0 - BADPAGEFILE - **Optional.** Slot A; contains badpage firmware. - - - sequential - basic - 4608 - 0 - 8 - 0 - BADPAGEFILE - **Optional.** Slot B; contains badpage firmware. - - - sequential - basic - 131072 - 0 - 8 - 0 - SPEFILE - **Required.** Slot A; contains BPMP SPE-FW binary. - - - sequential - basic - 131072 - 0 - 8 - 0 - SPEFILE - **Required.** Slot B; contains BPMP SPE-FW binary. - - - sequential - basic - 262144 - 0 - 8 - 0 - MB2FILE - **Required.** Slot A; contains TegraBoot binary. - - - sequential - basic - 262144 - 0 - 8 - 0 - MB2FILE - **Required.** Slot B; contains TegraBoot binary. - - - sequential - basic - 262144 - 0 - 8 - 0 - MPBFILE - **Required.** Slot A; contains Denver preboot firmware. - - - sequential - basic - 262144 - 0 - 8 - 0 - MPBFILE - **Required.** Slot B; contains Denver preboot firmware. - - - sequential - basic - 4096 - 0 - 0x8 - 0 - SMDFILE - **Required.** Slot A; contains slot status for A/B boot and A/B - update. - - - sequential - basic - 4096 - 0 - 0x8 - 0 - SMDFILE - **Required.** Slot B; contains slot status for A/B boot and A/B - update. - - - sequential - basic - 65536 - 0 - 0x8 - 0 - VERFILE - **Required.** Contains a redundant copy of BSP version information. - - - sequential - basic - 65536 - 0 - 0x8 - 0 - VERFILE - **Required.** Contains BSP version information. - - - sequential - basic - 0xFFFFFFFFFFFFFFFF - 0 - 8 - 0 - **Required.** Contains secondary GPT of the `sdmmc_boot` - device. - - - - - - sequential - basic - 512 - 0 - 8 - 0 - **Required.** Contains protective MBR. - - - sequential - basic - PPTSIZE - 0 - 8 - 0 - **Required.** Contains primary GPT of the `sdmmc_user` device. All - partitions defined after this entry are configured in the kernel, and are - accessible by standard partition tools such as gdisk and parted. - - - sequential - basic - APPSIZE - 0 - 0x8 - 0 - 4096 - APPFILE - **Required.** Contains the rootfs. This partition must be defined - after `primary_GPT` so that it can be accessed as the fixed known special device - `/dev/mmcblk0p1`. - - - sequential - basic - 4194304 - 0 - 8 - 0 - MBPFILE - **Required.** Slot A; contains Denver boot pack firmware. - - - sequential - basic - 4194304 - 0 - 8 - 0 - MBPFILE - **Required.** Slot B; contains Denver boot pack firmware. - - - sequential - basic - 524288 - 0 - 8 - 0 - TBCFILE - **Required.** Slot A; contains CBoot, the final boot stage CPU Bootloader - binary that loads the binary in kernel partition. - - - sequential - basic - 524288 - 0 - 8 - 0 - TBCFILE - **Required.** Slot B; contains CBoot, the final boot stage CPU Bootloader - binary that loads the binary in kernel partition. - - - sequential - basic - 524288 - 0 - 8 - 0 - TBCDTB-FILE - **Required.** Slot A; contains Bootloader device tree blob (DTB). - - - sequential - basic - 524288 - 0 - 8 - 0 - TBCDTB-FILE - **Required.** Slot B; contains Bootloader device tree blob (DTB). - - - sequential - basic - 3145728 - 0 - 8 - 0 - TOSFILE - **Required.** Slot A; contains the trusted OS. - - - sequential - basic - 3145728 - 0 - 8 - 0 - TOSFILE - **Required.** Slot B; contains the trusted OS. - - - sequential - basic - 2097152 - 0 - 8 - 0 - EKSFILE - **Optional.** Contains the encrypted keys. - - - sequential - basic - 4194304 - 0 - 8 - 0 - adsp-fw.bin - **Required.** Slot A; contains ADSP software. - - - sequential - basic - 4194304 - 0 - 8 - 0 - adsp-fw.bin - **Required.** Slot B; contains ADSP software. - - - sequential - basic - 618144 - 0 - 8 - 0 - BPFFILE - **Required.** Slot A; contains BPMP firmware. - - - sequential - basic - 618144 - 0 - 8 - 0 - BPFFILE - **Required.** Slot B; contains BPMP firmware. - - - sequential - basic - 1048576 - 0 - 8 - 0 - BPFDTB-FILE - **Required.** Slot A; contains BPMP firmware device tree blob - (DTB). - - - sequential - basic - 1048576 - 0 - 8 - 0 - BPFDTB-FILE - **Required.** Slot B; contains BPMP firmware device tree blob - (DTB). - - - sequential - basic - 2097152 - 0 - 8 - 0 - SCEFILE - **Required.** Slot A; contains `camera-rtcpu-sce` firmware. - - - sequential - basic - 2097152 - 0 - 8 - 0 - SCEFILE - **Required.** Slot B; contains `camera-rtcpu-sce` firmware. - - - sequential - basic - 6291456 - 0 - 8 - 0 - WB0FILE - **Required.** Slot A; contains warm boot binary. - - - sequential - basic - 6291456 - 0 - 8 - 0 - WB0FILE - **Required.** Slot B; contains warm boot binary. - - - sequential - basic - 2097152 - 0 - 0x8 - 0 - FBFILE - **Optional.** Reserved for future use; removable. - - - sequential - basic - 134217728 - 0 - 0x8 - 0 - bmp.blob - **Optional.** Slot A; contains BMP images for splash screen - display during boot. - - - sequential - basic - 134217728 - 0 - 0x8 - 0 - bmp.blob - **Optional.** Slot B; contains BMP images for splash screen - display during boot. - - - sequential - basic - RECSIZE - 0 - 8 - 0 - RECFILE - **Required.** Contains recovery image. - - - sequential - basic - 524288 - 0 - 8 - 0 - RECDTB-FILE - **Required.** Contains recovery DTB image. - - - sequential - basic - 262144 - 0 - 8 - 0 - BOOTCTRL-FILE - **Required.** Slot A; contains boot control data. - - - sequential - basic - 262144 - 0 - 8 - 0 - BOOTCTRL-FILE - **Required.** Slot B; contains boot control data. - - - sequential - basic - LNXSIZE - 0 - 8 - 0 - LNXFILE - **Required.** Slot A; contains U-Boot, which loads and launches the kernel - from the rootfs at `/boot`. - - - sequential - basic - LNXSIZE - 0 - 8 - 0 - LNXFILE - **Required.** Slot B; contains U-Boot, which loads and launches the kernel - from the rootfs at `/boot`. - - - sequential - basic - 524288 - 0 - 8 - 0 - KERNELDTB-FILE - **Required.** Slot A; contains kernel device tree blob. - - - sequential - basic - 524288 - 0 - 8 - 0 - KERNELDTB-FILE - **Required.** Slot B; contains kernel device tree blob. - - - sequential - basic - 314572800 - 0 - 0x8 - 0 - **Optional.** Reserved for future use by the recovery filesystem; - removable. - - - sequential - basic - APPSIZE - 0 - 0x8 - 0 - 4096 - APPFILE - - - sequential - basic - 18432 - 0 - 0x808 - DATAFILE - 0 - **Required.** Automatically takes all remaining space on the device except that - occupied by the `secondary_gpt` partition. Allocation attribute must be set to 0x808. - May be mounted and used to store user data. - - - sequential - basic - 0xFFFFFFFFFFFFFFFF - 0 - 8 - 0 - **Required.** Contains secondary GPT of the `sdmmc_user` - device. - - -