Skip to content

Commit

Permalink
Only use custom flash layout on agx-xavier
Browse files Browse the repository at this point in the history
meta-tegra uses a different flash layouts for xavier-nx and agx-xavier.
The custom layout is based on the one for agx-xavier. It doesn't use the spi on xaver-nx
and causes initrd-flash to fail
  • Loading branch information
cakre committed Jul 2, 2024
1 parent 27bc5e8 commit 19d761e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ IMAGE_BOOT_FILES = "u-boot-dtb.bin"
# or use the uboot console to look at mtdparts
MENDER_DATA_PART_NUMBER_DEFAULT:tegra186 = "34"
MENDER_DATA_PART_NUMBER_DEFAULT:tegra194 = "42"
MENDER_DATA_PART_NUMBER_DEFAULT:xavier-nx = "23"
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:tegra234 = "15"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ 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:tegra194 = "file://flash_mender.xml"
SRC_URI:agx-xavier = "file://flash_mender.xml"

INHIBIT_DEFAULT_DEPS = "1"
COMPATIBLE_MACHINE = "(tegra)"

FILESEXTRAPATHS:prepend:tegra194 := "${THISDIR}/${BPN}-${@d.getVar('L4T_VERSION').replace('.', '-')}:"
FILESEXTRAPATHS:prepend:agx-xavier := "${THISDIR}/${BPN}-${@d.getVar('L4T_VERSION').replace('.', '-')}:"

S = "${WORKDIR}"

do_compile[noexec] = "1"

do_install:tegra194() {
do_install:agx-xavier() {
install -d ${D}${datadir}/mender-flash-layout
install -m 0644 ${S}/flash_mender.xml ${D}${datadir}/mender-flash-layout/
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DEPENDS += "mender-custom-flash-layout"
MENDER_PARTITION_FILE:tegra194 = "${STAGING_DATADIR}/mender-flash-layout/flash_mender.xml"
PARTITION_FILE:tegra194 = "${MENDER_PARTITION_FILE}"
MENDER_PARTITION_FILE:agx-xavier = "${STAGING_DATADIR}/mender-flash-layout/flash_mender.xml"
PARTITION_FILE:agx-xavier = "${MENDER_PARTITION_FILE}"

do_install:append() {
cat <<EOF >${WORKDIR}/UDA.xml
Expand All @@ -20,6 +20,6 @@ EOF
mv ${D}${datadir}/tegraflash/${PARTITION_LAYOUT_EXTERNAL}.patched ${D}${datadir}/tegraflash/${PARTITION_LAYOUT_EXTERNAL}
}

do_install:append:tegra194() {
do_install:append:agx-xavier() {
# Do nothing
}

0 comments on commit 19d761e

Please sign in to comment.