
On Sun, Jun 26, 2022 at 2:02 AM Daniel Golle daniel@makrotopia.org wrote:
On Sat, Jun 25, 2022 at 10:10:08AM +0200, Kegl Rohit wrote:
Hello!
Is it possible to store the environment inside a mtd partition when using a single qspi nand chip as storage? CONFIG_MTD_SPI_NAND=y
The idea is to separate the NAND into two system A/B. [...]
CONFIG_ENV_IS_IN_UBI will do badblock handling, but it would be a huge overhead to create an extra ubifs mtd partition only for the environment.
Actually it's not. The overhead of allocating a UBI volume is minimal and typical logical block sizes are small enough to not be complete overkill for something like a U-Boot environment.
For 1.Solution it is not a big overhead. But if i want to isolate a/b completely e.g.
3.Solution: mtdparts_nand0=2m(uboot),1m(env_ubi),8m(system_a),8m(system_b) system_a/b ubifs is completely isolated and environment and environment_redundant stored in addtional env_ubi. It looks like ubi needs at least 2mb @ 128kb eraseblocks for itself. So a lot of wasted space for e.g. 128kb environment.
Has anyone already created the A/B system approach with the mtd spi nand interface and can give me some input?
Maybe see here for inspiration: https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/boot/uboot-m...
This seems to match my 1.Solution. system_a/b volumes are in same ubi mtd partition and are not really isolated.