diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2019-08-22 21:31:12 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2019-08-22 21:32:15 +0200 |
commit | 4f7863e34220e25ff49ebc4555dd819bb77280c6 (patch) | |
tree | ce6d8b1ab46fc8dbbd8fefc3fd3917abca3809e2 | |
parent | 6b384d407aaae9267700de0488086353b71bdbcd (diff) |
u-boot-toradex-fw-utils: apalis-mx6: follow changed emmc instance
The kernel for Apalis iMX6 now uses mmc2 as the instance for the eMMC.
Follow that.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
-rw-r--r-- | recipes-bsp/u-boot/files/apalis-imx6/fw_env.config | 17 | ||||
-rw-r--r-- | recipes-bsp/u-boot/files/apalis-imx6/fw_unlock_mmc.sh | 6 |
2 files changed, 23 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/files/apalis-imx6/fw_env.config b/recipes-bsp/u-boot/files/apalis-imx6/fw_env.config new file mode 100644 index 0000000..be25811 --- /dev/null +++ b/recipes-bsp/u-boot/files/apalis-imx6/fw_env.config @@ -0,0 +1,17 @@ +# Configuration file for fw_(printenv/setenv) utility. +# Up to two entries are valid, in this case the redundant +# environment sector is assumed present. +# Device offset must be prefixed with 0x to be parsed as a hexadecimal value. +# On a block device a negative offset is treated as a backwards offset from the +# end of the device/partition, rather than a forwards offset from the start. + +# Colibri iMX6/Apalis iMX6 +# U-Boot environment is stored at the end of the first eMMC boot partition +# hence use a negative value. The environment is just in front of the config +# block which occupies the last sector (hence -0x200) +# Note that /dev/mmcblk0boot0 by default is read only +# To use fw_setenv you have to first make it writeable, on the cmdline e.g. by +# $ echo 0 > /sys/block/mmcblk0boot0/force_ro + +# Block device name Device offset Env. size +/dev/mmcblk2boot0 -0x2200 0x2000 diff --git a/recipes-bsp/u-boot/files/apalis-imx6/fw_unlock_mmc.sh b/recipes-bsp/u-boot/files/apalis-imx6/fw_unlock_mmc.sh new file mode 100644 index 0000000..130a425 --- /dev/null +++ b/recipes-bsp/u-boot/files/apalis-imx6/fw_unlock_mmc.sh @@ -0,0 +1,6 @@ +# Give fw_setenv mmcblkXboot0 write permissions +fw_setenv() { + echo 0 > /sys/block/mmcblk2boot0/force_ro + /sbin/fw_setenv "$@" + echo 1 > /sys/block/mmcblk2boot0/force_ro +} |