How to apply squashfs to root filesystem of Colibri iMX6ULL?

Hello!

I want to apply “squashfs”, a compressed read-only filesystem, to the root filesystem of Colibri iMX6ULL.
Could you tell me, if you know how to apply it?

I built a Reference-Minimal-Image referring to the URL below.
https://developer.toradex.com/linux-bsp/os-development/build-yocto/build-a-reference-image-with-yocto-projectopenembedded/#build-an-image

Hi @TKJ , have you checked this documentation?

Kind regards,
Alvaro.

Hi @alvaro.tx

Thank you for your answer.

yes, I checked it.
This URL has instructions for Colibri-iMX6 (equipped with eMMC flash), but I’m using Colibri-iMX6ULL (equipped with raw NAND flash), so it doesn’t work.

In the image shown below (“changing the emmcargs_set parameter”), I think I have to replace the settings for eMMC with the settings for raw NAND.
But I don’t know how to change it.
Do you know how to change the settings?

Best regards,
TKJ.

UBI is as well compressed, so I wonder why you want squashfs. zstd? UBI supports zstd as well.

Freeing space for yet another MTD volume would require U-Boot mods. You may temporarily override U-Boot’s mtdparts variable, but it is not safe, since you may loose your U-Boot environment. So I would recommend squashfs on top of UBI volume if you really need it. You may need to change kernel config a bit for it.

Memory Technology Device (MTD) Subsystem for Linux. (infradead.org)

UBI provides not only wear leveling, but as well ubihealthd, which checks in a random order blocks, and in case of bit flip, moves (scrubs) data to another block (with lowest wear?). That’s advantage, since even SLC cells do self discharge.

The simplest would be to mount UBI rootfs in ro mode. If you don’t like ability to remount it to rw temporarily, then what about authenticated UBI FS? As advertised, with unknown auth key, you could mount it only in ro mode, though I didn’t try it my self.

1 Like

Thanks for your fast reply. No, unfortunately, I don’t think we have more info about SquashFS in NAND. Is your goal to create a read only file system? We have this other documentation that is not exclusive to eMMC:

Kind regards,
Alvaro.

Thank you for your answer.

My goal is to compress files.
However, it seems that UBI already supports compression, so it served its purpose.

Thank you for your cooperation!

Best regards
TKJ

Thank you for your answer.

I didn’t know that UBI already supported compression because I didn’t understand UBI very well.
Apparently, my goal had already been achieved.

Thank you for your cooperation!

Best regards,
TKJ.