libubootenv: readonly: add hardcoded configuration for readonly systems

We can't run a post installation script in a readonly file system.

We need to provide a configuration file beforehand.

https://onedigi.atlassian.net/browse/DEL-8556

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
This commit is contained in:
Francisco Gil 2023-05-30 10:00:42 +02:00
parent 1fe0a0dfe0
commit 36804ef13d
2 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1,11 @@
# Configuration file for fw_(printenv/setenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash.
# Futhermore, if the Flash sector size is omitted, this value is assumed to
# be the same as the Environment size, which is valid for NOR and SPI-dataflash
# Device offset must be prefixed with 0x to be parsed as a hexadecimal value.
# UBI volume by name Offset Size Erase-size
/dev/ubi0:uboot_config 0x0 0x20000 0x20000
/dev/ubi0:uboot_config_r 0x0 0x20000 0x20000

View File

@ -11,7 +11,9 @@ FW_CONFIG_FILE = "${@bb.utils.contains('STORAGE_MEDIA', 'mtd', \
'${STORAGE_MEDIA}/fw_env.config', \
d)}"
FW_CONFIG_FILE:ccmp1 = "ubi/fw_env.config"
FW_CONFIG_FILE:ccmp1 = "${@bb.utils.contains('IMAGE_FEATURES', 'read-only-rootfs', \
'ubi/fw_env.config_default', \
'ubi/fw_env.config', d)}"
SRC_URI += " \
file://${FW_CONFIG_FILE} \