clearfog: Introduce a /cfg partition for persistent changes
The idea is to store whatever important bits that need real persistence
in there.
Note that I am deliberately *not* using this as the upper directory for
the /etc overlay. I inherited that company-wide worrying about flash
lifetime, and hence I would like to limit the amount of writes to some
reasonable minimum. That doesn't play terribly well with SW such as
sysrepo which happily stores both persistent and run-time data on disk,
in the same directory -- hence these ugly detours...
I've tried to do the right thing with the alignment:
- we need a 1MB of nothing at the very beginning for U-Boot and its
environment
- the eMMC version of the microSOM has 8GB of storage
- it probably makes sense to split that into two halves for
future-proofness, so that we don't have to deal with overlapping
partitions later
- finally, the 1MB gap between the end of cfg-A and the beginning of
rootfs-B is there to be symmetric with regards to the U-Boot's reserved
space in the first 1MB
Hopefully, we should be able to just (more or less) `dd` stuff in-place.
There's one missing piece: nothing explicitly puts stuff to /cfg/etc/,
yet.
Change-Id: Idc540ecfedf1b17615b01f28cdce5dca9b976260
diff --git a/configs/czechlight_clearfog_defconfig b/configs/czechlight_clearfog_defconfig
index 863bed3..7bebbd4 100644
--- a/configs/czechlight_clearfog_defconfig
+++ b/configs/czechlight_clearfog_defconfig
@@ -12,6 +12,7 @@
BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/common/overlay/ $(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/overlay/"
+BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/common/mk-empty-cfg-fs.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c $(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/genimage.cfg"
BR2_LINUX_KERNEL=y