How to add partition on Colibri imx6ull

I want to add custom partition.

This partition use aprication rw data.

Please tell me how to create a partition.

Also, I use readonly filesystem as shown below.

Option 1: For this, you could use the OpenEmbedded Kickstart Reference (.wks):

The (For example can be placed on a wic folder on your own layer my-layer/wic.

Then, you have details here to create this exact file:

Note that this only contains part or partition and bootloader commands. Nothing else. You have an example of what it looks like on /meta-toradex-nxp/wic

Then you would need to add this WIK file to the image recipe .bb you will be using WKS_FILE variable.

WKS_FILE ?= ""

Option 2: Using OverlaysFS and SquashFs.

Here we have a Chinese blog on how you can do this:

Google translate works surprisingly well, so please use it as reference.

Kindly try this and let us know how it goes.

Kind regards,

Do I need to run both Option 1 and Option 2?

Is only option 2 okay?

Is the following not recommended?

I think you can choose Option 1 or Option 2. No need to do both. Yes, you can do only Option 2.

Hmm, I think that Option 2 also uses fstab in addition to a systemd service to automatically mount the overlayfs.

This said, in that case I think you don’t need to add the EXTRA_IMAGE_FEATURES_append = " read-only-rootfs" because squashfs is already RO and that would make the overlayfs RO also (I think) and you don’t want that.

For option 1,how do you create the recipe?
Please Sample recipe bb.

I’m afraid we don’t have a sample recipe for this. Please use the available recipes in the repository as reference.