Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update partition layout settings for Orin Nano/NX modules #1295

Merged
merged 1 commit into from
Jul 16, 2023

Conversation

madisongh
Copy link
Member

See #1286

For all Orin Nano and Orin NX modules (P3767-xxxx), switch to using the
QSPI-only layout for internal storage and the generic flash_l4t_external
layout for the external drive.  (The Orin Nano devkit, which has an SD
card slot, continues with the qspi-sd layout for internal storage.)

This aligns with how stock L4T supports these boards, requiring initrd
flashing.

Even though the tools and boot firmware appear to support direct flashing
to NVME drives without having to boot a Linux kernel, doing so appears
to cause some kind of memory corruption, sometimes leading to hangs during
reboot after flashing.

Signed-off-by: Matt Madison <[email protected]>
@madisongh madisongh merged commit 5cb18c8 into master Jul 16, 2023
@madisongh madisongh deleted the wip-orin-layout-changes branch July 16, 2023 13:52
dwalkes added a commit to Trellis-Logic/meta-tegra that referenced this pull request Dec 2, 2023
NVIDIA provides redundant flash layouts with A/B support
for most platforms.  Prior to this commit, the default
flash layout used by meta-tegra used the default partition
layout which did not support A/B.

If you are starting with a tegraflash deployment and later
may want to support A/B updates your life will be much easier
if you start with an A/B flash layout which already contains
necessary sectors to support this.  For this reason and
as discussed in [1] this commit adds support for redundant
flash layouts.

* Add a variable USE_REDUNDANT_FLASH_LAYOUT to control whether
to use the default flash layout or the redundant flash layout
for both internal and external layouts.  Set to use redundant
layouts by default for all platforms with the exception of
those which use the flash_l4t_external.xml file by default,
since NVIDIA does not provide an A/B version of this file and
since there were previously issues noticed on these platforms
when using the NVMe default file in [2].
* Build a PARTITION_LAYOUT_TEMPLATE_REDUNDANT variable
which appends the rootfs_ab string to the partition layout file
for all cases other than when PARTITION_LAYOUT_TEMPLATE_DEFAULT_SUPPORTS_REDUNDANT
is set, where PARTITION_LAYOUT_TEMPLATE_DEFAULT_SUPPORTS_REDUNDANT
is set for nano platforms using flash_t234_qspi.xml which already
contains redundant partitions.
* Build a PARTITION_LAYOUT_EXTERNAL_REDUNDANT variable which
appends the rootfs_ab string to the PARTITION_LAYOUT_EXTERNAL file
for all platforms with the exception of orin nano platforms which
 use "flash_l4t_external.xml" by default.
* Add a ROOTFSPART_SIZE_DEFAULT var which sets the default rootfs
partition size for the MACHINE when not using dual redundancy.
* Add a ROOTFSPART_SIZE_REDUNDANT var which divides the
ROOTFSPART_SIZE_DEFAULT by two when USE_REDUNDANT_FLASH_LAYOUT
is specified.

After this commit:
* All platforms with the exception of orin nano based should
support a default flash layout which supports a/b redundancy.
* orin-nano-devkit-nvme can support an NVMe A/B redundancy
layout by defining 'USE_REDUNDANT_FLASH_LAYOUT = "1"' in local.conf.
The user should then test for whether [2] is an issue in their
configuration.
* Other orin nano platforms should define their own
PARTITION_LAYOUT_EXTERNAL_REDUNDANT before
using USE_REDUNDANT_FLASH_LAYOUT, or set to match the value
in jetson-orin-nano-devkit-nvme.conf if using NVMe.
* Custom MACHINE types which need to support multiple flash
layouts for redundancy can name their layouts to match the
NVIDIA syntax, ending with _rootfs_ab, define
PARTITION_LAYOUT_EXTERNAL_DEFAULT as well as
PARTITION_LAYOUT_TEMPLATE_DEAFULT and the
USE_REDUNDANT_FLASH_LAYOUT will function as expected for
these platforms as well to select the appropriate xml files.
* Custom MACHINEs which don't need to support multiple flash
layouts can just define PARTITION_LAYOUT_EXTERNAL and/or
PARTITION_LAYOUT_TEMPLATE as done previously to override
the default assignments for these variables in tegra-common.inc
* Custom MACHINEs which need to specify a custom partition size
can either specify ROOTFSPART_SIZE_DEFAULT to let the size be
set based on USE_REDUNDANT_FLASH_LAYOUT, or set ROOTFSPART_SIZE
to force to a specific size regardless of USE_REDUNDANT_FLASH_LAYOUT

1: OE4T#1389
2: OE4T#1295

Signed-off-by: Dan Walkes <[email protected]>

squashme - roootfssize
Signed-off-by: Dan Walkes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant