Uploaded image for project: 'Mender'
  1. Mender
  2. MEN-3514

Fix redundant environment configuration for Flash boards

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Done
    • Priority: (None)
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: yocto-3.0-zeus
    • Labels:

      Description

      The problem exhibits on vexpress-qemu-flash which produces this message:

      ERROR: u-boot-fw-utils-mender-auto-provided-1.0-r0 do_configure: U-Boot configuration vexpress_ca9x4_config has setting:
      CONFIG_ENV_UBI_VOLUME_REDUND=""
      but Mender expects:
      CONFIG_ENV_UBI_VOLUME_REDUND="u-boot-env-2"
      Please fix U-Boot's configuration file.
      

      These are the beginnings of a patch, however at the moment it results in an infinite loop for the same reasons as in MEN-3476, so it needs more work:

      diff --git a/meta-mender-core/recipes-bsp/u-boot/files/uboot_auto_patch.sh b/meta-mender-core/recipes-bsp/u-boot/files/uboot_auto_patch.sh
      index 933b8d45..aa5afd4f 100755
      --- a/meta-mender-core/recipes-bsp/u-boot/files/uboot_auto_patch.sh
      +++ b/meta-mender-core/recipes-bsp/u-boot/files/uboot_auto_patch.sh
      @@ -376,6 +376,14 @@ patch_all_candidates_ubi() {
               'CONFIG_ENV_IS_(NOWHERE|IN_[^ ]*)' \
               'CONFIG_ENV_IS_IN_UBI'
       
      +    replace_definition \
      +        'CONFIG_ENV_OFFSET' \
      +        'CONFIG_ENV_OFFSET' \
      +        "$CONFIG_ENV_OFFSET"
      +    replace_definition \
      +        'CONFIG_ENV_OFFSET_REDUND' \
      +        'CONFIG_ENV_OFFSET_REDUND' \
      +        "$CONFIG_ENV_OFFSET_REDUND"
           replace_definition \
               'CONFIG_SYS_REDUNDAND_ENVIRONMENT' \
               'CONFIG_SYS_REDUNDAND_ENVIRONMENT'
      @@ -389,6 +397,10 @@ patch_all_candidates_ubi() {
               'CONFIG_ENV_UBI_VOLUME' \
               'CONFIG_ENV_UBI_VOLUME' \
               "$CONFIG_ENV_UBI_VOLUME"
      +    replace_definition \
      +        'CONFIG_ENV_UBI_VOLUME_REDUND' \
      +        'CONFIG_ENV_UBI_VOLUME_REDUND' \
      +        "$CONFIG_ENV_UBI_VOLUME_REDUND"
       
           add_definition \
               'CONFIG_CMD_MTDPARTS'
      diff --git a/meta-mender-core/recipes-bsp/u-boot/u-boot-mender-common.inc b/meta-mender-core/recipes-bsp/u-boot/u-boot-mender-common.inc
      index 801095ec..072965c9 100644
      --- a/meta-mender-core/recipes-bsp/u-boot/u-boot-mender-common.inc
      +++ b/meta-mender-core/recipes-bsp/u-boot/u-boot-mender-common.inc
      @@ -198,6 +198,8 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=${MENDER_MTDPARTS}"
       CONFIG_ENV_UBI_PART="${MENDER_MTD_UBI_DEVICE_NAME}"
       CONFIG_ENV_UBI_VOLUME="u-boot-env-1"
       CONFIG_ENV_UBI_VOLUME_REDUND="u-boot-env-2"
      +CONFIG_ENV_OFFSET=0x0
      +CONFIG_ENV_OFFSET_REDUND=0x0
       EOF
           else
               cat >> ${S}/mender_Kconfig_fragment <<EOF
      

        Attachments

          Activity

            People

            • Assignee:
              a10040 Kristian Amlie
              Reporter:
              a10040 Kristian Amlie
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel