From b71f2dacb5f0030933e80f692f828aeff5a50bfb Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Mon, 18 Jul 2016 16:55:19 +0200 Subject: [PATCH] u-boot-fw-utils: add support and config file for CC6UL platform U-Boot environment on the CC6UL NAND is located at partition /dev/mtd1: - original copy is located at offset 0 in the partition - redundant copy is located 1 erase block (128K) after the original copy Signed-off-by: Hector Palacios https://jira.digi.com/browse/DEL-2552 --- meta-digi-arm/conf/machine/include/ccimx6ul.inc | 1 + .../u-boot/u-boot-fw-utils/ccimx6ul/fw_env.config | 7 +++++++ .../recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend | 12 +++++------- 3 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils/ccimx6ul/fw_env.config diff --git a/meta-digi-arm/conf/machine/include/ccimx6ul.inc b/meta-digi-arm/conf/machine/include/ccimx6ul.inc index 47235b8f9..e8aa9ce89 100644 --- a/meta-digi-arm/conf/machine/include/ccimx6ul.inc +++ b/meta-digi-arm/conf/machine/include/ccimx6ul.inc @@ -22,6 +22,7 @@ MACHINE_FIRMWARE ?= "" MACHINE_EXTRA_RDEPENDS += " \ imx-kobs \ mtd-utils-ubifs \ + u-boot-fw-utils \ " MACHINE_EXTRA_RRECOMMENDS += "${MACHINE_FIRMWARE} ${WIRELESS_MODULE}" MACHINE_EXTRA_RRECOMMENDS += "fsl-alsa-plugins cryptodev-module" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils/ccimx6ul/fw_env.config b/meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils/ccimx6ul/fw_env.config new file mode 100644 index 000000000..be29acc2f --- /dev/null +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils/ccimx6ul/fw_env.config @@ -0,0 +1,7 @@ +# Configuration file for fw_(printenv/setenv) utility. +# Up to two entries are valid, in this case the redundant +# environment sector is assumed present. + +# Device name Offset Size +/dev/mtd1 0x0 0x20000 +/dev/mtd1 0x20000 0x20000 diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend b/meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend index 8540dc4cb..89240d47b 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend @@ -2,12 +2,10 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" -SRC_URI += " \ - file://0002-fw_env-add-support-to-unlock-emmc-boot-partition.patch \ - file://fw_env.config \ -" +SRC_URI += "file://fw_env.config" +SRC_URI_append_ccimx6 = " file://0002-fw_env-add-support-to-unlock-emmc-boot-partition.patch" -# We do not have a CC6 defconfig in this version of u-boot, so just use the generic +# We do not have a platform defconfig in this version of u-boot, so just use the generic # sandbox defconfig, which is enough to build the Linux user-space tool (fw_printenv) UBOOT_CONFIG = "sandbox" UBOOT_CONFIG[sandbox] = "sandbox_defconfig" @@ -16,7 +14,7 @@ do_install_append() { install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/ } -pkg_postinst_${PN}() { +pkg_postinst_${PN}_ccimx6() { # run the postinst script on first boot if [ x"$D" != "x" ]; then exit 1 @@ -27,4 +25,4 @@ pkg_postinst_${PN}() { fi } -COMPATIBLE_MACHINE = "(ccimx6$)" +COMPATIBLE_MACHINE = "(ccimx6$|ccimx6ul)"