u-boot: Reengineering of environment allocation

The offset and size of the environment block for u-boot compiling and fw_utils
are described in the single file ucm-imx8m-mini.conf to avoid data nsynchronizing.

Signed-off-by: Kirill Kapranov <kirill.kapranov@compulab.co.il>
This commit is contained in:
Kirill Kapranov
2020-08-19 22:05:08 +03:00
parent 16c03ca9d6
commit 2decaaf821
5 changed files with 24 additions and 7 deletions
+3 -1
View File
@@ -43,7 +43,9 @@ LOADADDR = ""
UBOOT_SUFFIX = "bin"
UBOOT_MAKE_TARGET = ""
IMX_BOOT_SEEK = "33"
# Max GPT size is 34 * 512
UBOOT_ENV_OFFSET = "0x4400"
UBOOT_ENV_SIZE = "0x1000"
OPTEE_BIN_EXT = "8mm"
PLATFORM_FLAVOR_ucm-imx8m-mini = "mx8mmevk"
@@ -17,4 +17,15 @@ do_compile () {
oe_runmake envtools
}
do_install_prepend () {
if [ -e ${WORKDIR}/fw_env.config ]; then
sed -i -e \
's:\(.*/dev/mmcblk[^[:blank:]]*\)[[:blank:]].*$:\1 ${UBOOT_ENV_OFFSET} ${UBOOT_ENV_SIZE}:' \
${WORKDIR}/fw_env.config
else
bbfatal "fw_env.config not found in ${WORKDIR}"
fi
}
RPROVIDES_${PN} += "u-boot-fw-utils"
+10
View File
@@ -0,0 +1,10 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/compulab/imx8mm:"
include compulab/imx8mm.inc
do_compile_prepend () {
sed -i -e \
"s/^\(#define[[:blank:]]*CONFIG_ENV_OFFSET[[:blank:]]*\).*$/\1${UBOOT_ENV_OFFSET}/"\
-e "s/^\(#define[[:blank:]]*CONFIG_ENV_SIZE[[:blank:]]*\).*$/\1${UBOOT_ENV_SIZE}/" \
${S}/include/configs/ucm-imx8m-mini.h
}
@@ -1,3 +0,0 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/compulab/imx8mm:"
include compulab/imx8mm.inc
@@ -1,3 +0,0 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/compulab/imx8mm:"
include compulab/imx8mm.inc