diff --git a/meta-digi-arm/conf/machine/include/ccimx6.inc b/meta-digi-arm/conf/machine/include/ccimx6.inc index fb0859a9d..49e31c9d1 100644 --- a/meta-digi-arm/conf/machine/include/ccimx6.inc +++ b/meta-digi-arm/conf/machine/include/ccimx6.inc @@ -26,7 +26,7 @@ MACHINE_EXTRA_RDEPENDS += " \ e2fsprogs-mke2fs \ e2fsprogs-resize2fs \ parted \ - u-boot-dey-fw-utils \ + u-boot-fw-utils \ " MACHINE_EXTRA_RRECOMMENDS += "${MACHINE_FIRMWARE}" MACHINE_EXTRA_RRECOMMENDS += "fsl-alsa-plugins" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-fw-utils_2013.04.bb b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-fw-utils_2013.04.bb deleted file mode 100644 index 91dd8e9d7..000000000 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-fw-utils_2013.04.bb +++ /dev/null @@ -1,55 +0,0 @@ -DESCRIPTION = "U-boot bootloader fw_printenv/setenv utils" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb" -SECTION = "bootloader" - -include u-boot-dey-rev_${PV}.inc - -SRC_URI += " \ - file://0001-fw_env-add-support-to-unlock-emmc-boot-partition.patch \ - file://fw_env.config \ -" - -S = "${WORKDIR}/git" - -# -# In a u-boot multiconfig case, UBOOT_MACHINE has multiple values. Using -# parallel build leads to build failures: -# -# ln: failed to create symbolic link 'asm/arch/arch-mx6': File exists -# ln: failed to create symbolic link 'asm/arch': No such file or directory -# -# Without parallel make, UBOOT_MACHINE's last entry is used to configure uboot -# -PARALLEL_MAKE = "" - -EXTRA_OEMAKE = 'HOSTCC="${CC}" HOSTSTRIP="true"' - -inherit uboot-config - -do_compile() { - oe_runmake ${UBOOT_MACHINE} - oe_runmake env -} - -do_install() { - install -d ${D}${base_sbindir} ${D}${sysconfdir} - install -m 0755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv - ln -sf fw_printenv ${D}${base_sbindir}/fw_setenv - install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/ -} - -pkg_postinst_${PN}() { - # run the postinst script on first boot - if [ x"$D" != "x" ]; then - exit 1 - fi - MMCDEV="$(sed -ne 's,.*root=/dev/mmcblk\([0-9]\)p.*,\1,g;T;p' /proc/cmdline)" - if [ -n "${MMCDEV}" ]; then - sed -i -e "s,^/dev/mmcblk[^[:blank:]]\+,/dev/mmcblk${MMCDEV},g" /etc/fw_env.config - fi -} - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -COMPATIBLE_MACHINE = "(ccimx6)" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-fw-utils-2013.04/0001-fw_env-add-support-to-unlock-emmc-boot-partition.patch b/meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils/0002-fw_env-add-support-to-unlock-emmc-boot-partition.patch similarity index 88% rename from meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-fw-utils-2013.04/0001-fw_env-add-support-to-unlock-emmc-boot-partition.patch rename to meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils/0002-fw_env-add-support-to-unlock-emmc-boot-partition.patch index 42729bd3e..e283118ee 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-fw-utils-2013.04/0001-fw_env-add-support-to-unlock-emmc-boot-partition.patch +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils/0002-fw_env-add-support-to-unlock-emmc-boot-partition.patch @@ -8,11 +8,11 @@ Signed-off-by: Javier Viguera 1 file changed, 33 insertions(+) diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c -index 12fe7539d2f9..395c5351c9a0 100644 +index 698fe5181bc0..d7e61a467e73 100644 --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c -@@ -1001,6 +1001,27 @@ static int flash_read (int fd) - return (rc != CUR_ENVSIZE) ? -1 : 0; +@@ -1097,6 +1097,27 @@ static int flash_read (int fd) + return 0; } +/* @@ -39,7 +39,7 @@ index 12fe7539d2f9..395c5351c9a0 100644 static int flash_io (int mode) { int fd_current, fd_target, rc, dev_target; -@@ -1033,8 +1054,20 @@ static int flash_io (int mode) +@@ -1129,8 +1150,20 @@ static int flash_io (int mode) fd_target = fd_current; } diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-fw-utils-2013.04/ccimx6/fw_env.config b/meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils/ccimx6/fw_env.config similarity index 100% rename from meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-fw-utils-2013.04/ccimx6/fw_env.config rename to meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils/ccimx6/fw_env.config 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 new file mode 100644 index 000000000..ca253e736 --- /dev/null +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend @@ -0,0 +1,30 @@ +# Copyright (C) 2015 Digi International + +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" + +SRC_URI += " \ + file://0002-fw_env-add-support-to-unlock-emmc-boot-partition.patch \ + file://fw_env.config \ +" + +# We do not have a CC6 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" + +do_install_append() { + install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/ +} + +pkg_postinst_${PN}() { + # run the postinst script on first boot + if [ x"$D" != "x" ]; then + exit 1 + fi + MMCDEV="$(sed -ne 's,.*root=/dev/mmcblk\([0-9]\)p.*,\1,g;T;p' /proc/cmdline)" + if [ -n "${MMCDEV}" ]; then + sed -i -e "s,^/dev/mmcblk[^[:blank:]]\+,/dev/mmcblk${MMCDEV},g" /etc/fw_env.config + fi +} + +COMPATIBLE_MACHINE = "(ccimx6)"