Extra Partitions Minimal Example

For context: I want a second mini /data-style partition which is empty on initial build, and can be flashed separately to the main image. This will contain files specific to each individual device, e.g. certificate/ keys. If you can think of a better way - but without a TPM - then please let me know.

I am developing for a Jetson Xavier NX (eMMC) using Yocto, on Dunfell v2021.10. As an experiment, I took my existing working build, and added this to local.conf:

MENDER_EXTRA_PARTS = "part1"
MENDER_EXTRA_PARTS[part1] = "--label=static --fstype=ext4"
MENDER_EXTRA_PARTS_SIZES_MB[part1] = "8"
MENDER_EXTRA_PARTS_FSTAB[part1] = "ext4 defaults 0 0"

After flashing the image, the device fails to boot, with the following dmesg output appearing a few times:
EXT4-fs (mmcblk0p4): VFS: Can’t find ext4 filesystem

I have a couple of questions around this:

  • Should that be code be enough to create a new, functional partition? If so, could someone offer some suggestions on how to resolve it? Otherwise, what is the minimum that’s required to achieve this?
  • Assuming p4 is my new partition, does that mean it replaces the default /data partition, so I’d have to create two partitions using MENDER_EXTRA_PARTS?

I am familiar-ish with Yocto but haven’t had to dig into it that much until now.

Thanks in advance.

Hi @teebr,

Thanks for getting in touch. However, I can’t directly reproduce this. Tried on a beaglebone-yocto target, and this mounted /dev/mmcblk0p6 right away. However the partition number 4 in your log is irritating. So I guess that there is actually something wrong with one of the other partitions. Did it work without the added MENDER_EXTRA_PARTS?

Greetz,
Josef

Hello Josef,

Sorry for the slow reply, I wasn’t able to do any device testing last week. Yes I have a working main image, and all I did was add the above to local.conf. I will add it to a separate recipe and run it in a from-scratch CI build to be sure, but i suspect it might be quite specific to some of the Tegra stuff, e.g. the flash layout. I will keep investigating for now.

Thanks,

Tom