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 <hector.palacios@digi.com>

https://jira.digi.com/browse/DEL-2552
This commit is contained in:
Hector Palacios 2016-07-18 16:55:19 +02:00
parent 24fb7f5bd4
commit b71f2dacb5
3 changed files with 13 additions and 7 deletions

View File

@ -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"

View File

@ -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

View File

@ -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)"