From bd8075409fa55d0bcf526231c394099f48d588c3 Mon Sep 17 00:00:00 2001 From: Hugo Serrat Date: Wed, 18 Dec 2024 17:23:59 +0100 Subject: [PATCH] feat: add support for jetson orin nx Signed-off-by: Hugo Serrat --- kas/jetson-orin-16gb-nx-p3786.yml | 19 ++ .../flash_l4t_t234_nvme_rootfs_ab.xml | 212 ++++++++++++++++++ .../tegra-storage-layout_%.bbappend | 7 + 3 files changed, 238 insertions(+) create mode 100644 kas/jetson-orin-16gb-nx-p3786.yml create mode 100644 meta-mender-tegra/recipes-bsp/tegra-binaries/tegra-storage-layout/flash_l4t_t234_nvme_rootfs_ab.xml create mode 100644 meta-mender-tegra/recipes-bsp/tegra-binaries/tegra-storage-layout_%.bbappend diff --git a/kas/jetson-orin-16gb-nx-p3786.yml b/kas/jetson-orin-16gb-nx-p3786.yml new file mode 100644 index 00000000..62d325c0 --- /dev/null +++ b/kas/jetson-orin-16gb-nx-p3786.yml @@ -0,0 +1,19 @@ +header: + version: 14 + includes: + - kas/include/mender-full.yml + - kas/include/tegra-jetpack6.yml + +machine: p3768-0000-p3767-0000 + +local_conf_header: + AB-upgrades: | + UBOOT_EXTLINUX = "1" + USE_REDUNDANT_FLASH_LAYOUT_DEFAULT = "1" + eMMC: | + # equivalent: EMMC_SIZE = "32 * 1024 * 1024 * 1024" + EMMC_SIZE = "34359738368" + # Not needed with the custom partition layout + MENDER_FEATURES_DISABLE:append = " mender-growfs-data" + MENDER_DATA_PART_NUMBER = "17" + MENDER_STORAGE_DEVICE = "/dev/nvme0n1" diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/tegra-storage-layout/flash_l4t_t234_nvme_rootfs_ab.xml b/meta-mender-tegra/recipes-bsp/tegra-binaries/tegra-storage-layout/flash_l4t_t234_nvme_rootfs_ab.xml new file mode 100644 index 00000000..117d5306 --- /dev/null +++ b/meta-mender-tegra/recipes-bsp/tegra-binaries/tegra-storage-layout/flash_l4t_t234_nvme_rootfs_ab.xml @@ -0,0 +1,212 @@ + + + + + + + + + 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 + 419430400 + 0 + 8 + 0 + 16384 + **Required.** This partition may be mounted and used to store user + data. + + + sequential + basic + 502792192 + 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/nvme0n1p1`. + + + sequential + basic + APPSIZE + 0 + 0x8 + 16384 + 0 + APPUUID_b + APPFILE_b + **Required.** Contains the rootfs. This partition must be assigned + the "2" 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/nvme0n1p2`. + + + sequential + basic + 419430400 + 0 + 0x808 + 0 + 16384 + DATAFILE + **Required.** This partition is used to store permanent user + and device data between A/B updates + + + sequential + basic + 0xFFFFFFFFFFFFFFFF + 0 + 8 + 0 + + + diff --git a/meta-mender-tegra/recipes-bsp/tegra-binaries/tegra-storage-layout_%.bbappend b/meta-mender-tegra/recipes-bsp/tegra-binaries/tegra-storage-layout_%.bbappend new file mode 100644 index 00000000..50c29e8c --- /dev/null +++ b/meta-mender-tegra/recipes-bsp/tegra-binaries/tegra-storage-layout_%.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI:append = " \ + file://flash_l4t_t234_nvme_rootfs_ab.xml \ +" + +PARTITION_FILE_EXTERNAL = "${WORKDIR}/flash_l4t_t234_nvme_rootfs_ab.xml"