diff --git a/conf/machine/ucm-imx8m-mini.conf b/conf/machine/ucm-imx8m-mini.conf index fb832ad..8705c08 100644 --- a/conf/machine/ucm-imx8m-mini.conf +++ b/conf/machine/ucm-imx8m-mini.conf @@ -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" diff --git a/recipes-bsp/u-boot/u-boot-fslc-fw-utils_%.bbappend b/recipes-bsp/u-boot/u-boot-fslc-fw-utils_%.bbappend index cf6cce0..066dd82 100644 --- a/recipes-bsp/u-boot/u-boot-fslc-fw-utils_%.bbappend +++ b/recipes-bsp/u-boot/u-boot-fslc-fw-utils_%.bbappend @@ -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" diff --git a/recipes-bsp/u-boot/u-boot-imx_%.bbappend b/recipes-bsp/u-boot/u-boot-imx_%.bbappend new file mode 100644 index 0000000..d33959e --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-imx_%.bbappend @@ -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 +} diff --git a/recipes-bsp/u-boot/u-boot-imx_2017.03.bbappend b/recipes-bsp/u-boot/u-boot-imx_2017.03.bbappend deleted file mode 100644 index 0b765ec..0000000 --- a/recipes-bsp/u-boot/u-boot-imx_2017.03.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/compulab/imx8mm:" - -include compulab/imx8mm.inc diff --git a/recipes-bsp/u-boot/u-boot-imx_2018.03.bbappend b/recipes-bsp/u-boot/u-boot-imx_2018.03.bbappend deleted file mode 100644 index 0b765ec..0000000 --- a/recipes-bsp/u-boot/u-boot-imx_2018.03.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/compulab/imx8mm:" - -include compulab/imx8mm.inc