Aligning os_args Values and the Mass Storage Layout

When flashing a device, the flashing script uses the configuration file to determine how to flash individual partitions. os_args attributes provide a kernel command line that specifies file system and partition attributes. Of particular interest are the settings for Memory Technology Device (MTD) devices, which use QSPI flash.

If you change your flash partition layout, you must also modify the attributes in os_args to be consistent with the mass storage layout. For example, if you move the data partition, you must also update the offsets or indices in the os_args value. Such modifications are required to ensure non-overlapping partitions.

By default, the OS kernel has no knowledge of the mass storage layout created when flashing (i.e., QSPI partition offset and size, and file system type). At runtime, the kernel cannot determine all layout settings. In particular, the os_args attribute may need to specify the Linux kernel settings described in the following table.

os_args Settings Description
rootfstype=ubifs Required if the root file system is UBIFS. Unlike the ext2/ext3/ext4 file systems, the kernel cannot at runtime detect UBIFS.

root=ubi<n>_<m>

Where:

<n> is the sequential number of the UBI device (usually 0)

<m> is the "id" attribute on the partition.

Required if the root device is a UBI volume.

The alternative form of this value is ubi<n>:<name>, where <name> is the partition name, such as EARLY_FS_VIDEO.

ubi.mtd=<x>

Where <x> is an MTD partition number.

Required to attach the UBI to the MTD partition at boot, for example, if the root device is a UBI volume.

mtdparts=tegra-nor:<size>@<offset>(<name>)

Where:

<size> is the partition size in kilobytes.

<offset> specifies the beginning of the partition.

<name> is the symbolic name for the partition. For example: whole_device or userspace.

Required to export NOR partitions as mtdN and mtdblockN devices. For example, use this key-value pair to export the partition at offset <offset> so UBI can attach itself to such devices. You can get the value for <size>and <offset> from the default CFG file for your platform.

tegra-nor is the flash device name and must not be changed.

For information on all supported kernel command parameters, see the following file.

kernel/Documentation/kernel-parameters.txt