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 c5e33e753..000000000 --- a/kas/include/tegra.yml +++ /dev/null @@ -1,25 +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: - url: https://git.openembedded.org/meta-openembedded - refspec: kirkstone - layers: - meta-python: - - meta-mender-community: - layers: - meta-mender-tegra: - -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/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/meta-mender-tegra-jetpack4/README.md b/meta-mender-tegra/meta-mender-tegra-jetpack4/README.md new file mode 100644 index 000000000..5439213cb --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack4/README.md @@ -0,0 +1,63 @@ +# 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/OE4T/meta-tegra.git +layers: meta-tegra +branch: kirkstone-l4t-r32.7.x +revision: HEAD +``` + +``` +URI: https://github.com/mendersoftware/meta-mender.git +layers: meta-mender-core +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 +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/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 diff --git a/meta-mender-tegra/README.md b/meta-mender-tegra/meta-mender-tegra-jetpack5/README.md similarity index 77% rename from meta-mender-tegra/README.md rename to meta-mender-tegra/meta-mender-tegra-jetpack5/README.md index 2a0edc533..de5866898 100644 --- a/meta-mender-tegra/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/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..9dcdc7745 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/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-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" 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-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/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/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-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/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..58d95ca64 --- /dev/null +++ b/meta-mender-tegra/meta-mender-tegra-jetpack5/recipes-mender/tegra-state-scripts/tegra-state-scripts_1.0.bb @@ -0,0 +1,28 @@ +SRC_URI = " \ + 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" + +do_compile() { + : +} + +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/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"