meta-digi-arm: use u-boot fw-utils from Poky
Instead of creating a new recipe for u-boot fw-utils (fw_printenv) just bbappend the recipe in Poky. https://jira.digi.com/browse/DEL-1829 Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
3b0d4e1797
commit
6fdcbf5f40
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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)"
|
||||
|
|
@ -8,11 +8,11 @@ Signed-off-by: Javier Viguera <javier.viguera@digi.com>
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
@ -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)"
|
||||
Loading…
Reference in New Issue