* [PATCH v3] u-boot: Restore valid default environment for running system
@ 2020-04-02 0:14 Otavio Salvador
2020-04-02 8:10 ` [OE-core] " Stefano Babic
2020-04-12 21:07 ` Denys Dmytriyenko
0 siblings, 2 replies; 5+ messages in thread
From: Otavio Salvador @ 2020-04-02 0:14 UTC (permalink / raw)
To: OpenEmbedded Core Mailing List; +Cc: Stefano Babic, Tom Rini, Otavio Salvador
One significant change from previous OE-Core releases was the move from
u-boot-fw-utils to libubootenv which offers a generic and not machine
specific alternative. However, it is not fully functional as currently
we don't provide the default environment nor the required configuration
file to be used by it.
This change address this and include on the default u-boot.inc the
needed code to generate, install and deploy the default environment.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
This change is late in the cycle but it is critical in my opinion.
The lack of default environment as well as the configuration for the
tool is a regression from the previous release and this mitigates it.
Changes in v3:
- Remove rrecommends in libubootenv
- Add ${MACHINE} to the files following other binaries
- Change commit log
Changes in v2:
- Fix wrong path on do_install
- Change virtual/bootloader-env to u-boot-default-env (RP)
- Add Tom Rini and Stefano Babic to Cc
meta/recipes-bsp/u-boot/u-boot.inc | 62 +++++++++++++++++++++++++-----
1 file changed, 53 insertions(+), 9 deletions(-)
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index d4ab9c3222e..dc4f7884b82 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -134,6 +134,11 @@ do_compile () {
cp ${B}/${config}/${binary} ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX}
fi
done
+
+ # Generate the uboot-initial-env
+ oe_runmake -C ${S} O=${B}/${config} u-boot-initial-env
+ cp ${B}/${config}/u-boot-initial-env ${B}/${config}/u-boot-initial-env-${type}
+
unset k
fi
done
@@ -142,6 +147,9 @@ do_compile () {
unset i
else
oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_TARGET}
+
+ # Generate the uboot-initial-env
+ oe_runmake -C ${S} O=${B} u-boot-initial-env
fi
}
@@ -155,19 +163,28 @@ do_install () {
j=$(expr $j + 1);
if [ $j -eq $i ]
then
- install -d ${D}/boot
- install -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
+ install -D -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}
+
+ # Install the uboot-initial-env
+ install -D -m 644 ${B}/${config}/u-boot-initial-env-${type} ${D}/${sysconfdir}/u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR}
+ ln -sf u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR} ${D}/${sysconfdir}/u-boot-initial-env-${MACHINE}-${type}
+ ln -sf u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR} ${D}/${sysconfdir}/u-boot-initial-env-${type}
+ ln -sf u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR} ${D}/${sysconfdir}/u-boot-initial-env
fi
done
unset j
done
unset i
else
- install -d ${D}/boot
- install -m 644 ${B}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
+ install -D -m 644 ${B}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
+
+ # Install the uboot-initial-env
+ install -D -m 644 ${B}/u-boot-initial-env ${D}/${sysconfdir}/u-boot-initial-env-${MACHINE}-${PV}-${PR}
+ ln -sf u-boot-initial-env-${MACHINE}-${PV}-${PR} ${D}/${sysconfdir}/u-boot-initial-env-${MACHINE}
+ ln -sf u-boot-initial-env-${MACHINE}-${PV}-${PR} ${D}/${sysconfdir}/u-boot-initial-env
fi
if [ -n "${UBOOT_ELF}" ]
@@ -236,7 +253,16 @@ do_install () {
}
-FILES_${PN} = "/boot ${sysconfdir} ${datadir}"
+PACKAGE_BEFORE_PN += "${PN}-env"
+
+RPROVIDES_${PN}-env += "u-boot-default-env"
+FILES_${PN}-env = " \
+ ${sysconfdir}/u-boot-initial-env* \
+ ${sysconfdir}/fw_env.config \
+"
+
+FILES_${PN} = "/boot ${datadir}"
+RDEPENDS_${PN} += "${PN}-env"
do_deploy () {
if [ -n "${UBOOT_CONFIG}" ]
@@ -247,25 +273,43 @@ do_deploy () {
j=$(expr $j + 1);
if [ $j -eq $i ]
then
- install -d ${DEPLOYDIR}
- install -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
+ install -D -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
cd ${DEPLOYDIR}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}
+
+ # Deploy the uboot-initial-env
+ install -D -m 644 ${B}/${config}/u-boot-initial-env-${type} ${DEPLOYDIR}/u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR}
+ cd ${DEPLOYDIR}
+ ln -sf u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR} u-boot-initial-env-${MACHINE}-${type}
+ ln -sf u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR} u-boot-initial-env-${type}
fi
done
unset j
done
unset i
else
- install -d ${DEPLOYDIR}
- install -m 644 ${B}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
+ install -D -m 644 ${B}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
+
cd ${DEPLOYDIR}
rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK}
ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY}
+
+ # Deploy the uboot-initial-env
+ install -D -m 644 ${B}/u-boot-initial-env ${DEPLOYDIR}/u-boot-initial-env-${MACHINE}-${PV}-${PR}
+ cd ${DEPLOYDIR}
+ ln -sf u-boot-initial-env-${MACHINE}-${PV}-${PR} u-boot-initial-env-${MACHINE}
+ ln -sf u-boot-initial-env-${MACHINE}-${PV}-${PR} u-boot-initial-env
+ fi
+
+ if [ -e ${WORKDIR}/fw_env.config ] ; then
+ install -D -m 644 ${WORKDIR}/fw_env.config ${DEPLOYDIR}/fw_env.config-${MACHINE}-${PV}-${PR}
+ cd ${DEPLOYDIR}
+ ln -sf fw_env.config-${MACHINE}-${PV}-${PR} fw_env.config-${MACHINE}
+ ln -sf fw_env.config-${MACHINE}-${PV}-${PR} fw_env.config
fi
if [ -n "${UBOOT_ELF}" ]
--
2.26.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH v3] u-boot: Restore valid default environment for running system
2020-04-02 0:14 [PATCH v3] u-boot: Restore valid default environment for running system Otavio Salvador
@ 2020-04-02 8:10 ` Stefano Babic
2020-04-12 21:07 ` Denys Dmytriyenko
1 sibling, 0 replies; 5+ messages in thread
From: Stefano Babic @ 2020-04-02 8:10 UTC (permalink / raw)
To: Otavio Salvador, OpenEmbedded Core Mailing List
Cc: Stefano Babic, Tom Rini, Otavio Salvador
On 02.04.20 02:14, Otavio Salvador wrote:
> One significant change from previous OE-Core releases was the move from
> u-boot-fw-utils to libubootenv which offers a generic and not machine
> specific alternative. However, it is not fully functional as currently
> we don't provide the default environment nor the required configuration
> file to be used by it.
>
> This change address this and include on the default u-boot.inc the
> needed code to generate, install and deploy the default environment.
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
> This change is late in the cycle but it is critical in my opinion.
>
> The lack of default environment as well as the configuration for the
> tool is a regression from the previous release and this mitigates it.
>
> Changes in v3:
> - Remove rrecommends in libubootenv
> - Add ${MACHINE} to the files following other binaries
> - Change commit log
>
> Changes in v2:
> - Fix wrong path on do_install
> - Change virtual/bootloader-env to u-boot-default-env (RP)
> - Add Tom Rini and Stefano Babic to Cc
>
> meta/recipes-bsp/u-boot/u-boot.inc | 62 +++++++++++++++++++++++++-----
> 1 file changed, 53 insertions(+), 9 deletions(-)
>
> diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
> index d4ab9c3222e..dc4f7884b82 100644
> --- a/meta/recipes-bsp/u-boot/u-boot.inc
> +++ b/meta/recipes-bsp/u-boot/u-boot.inc
> @@ -134,6 +134,11 @@ do_compile () {
> cp ${B}/${config}/${binary} ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX}
> fi
> done
> +
> + # Generate the uboot-initial-env
> + oe_runmake -C ${S} O=${B}/${config} u-boot-initial-env
> + cp ${B}/${config}/u-boot-initial-env ${B}/${config}/u-boot-initial-env-${type}
> +
> unset k
> fi
> done
> @@ -142,6 +147,9 @@ do_compile () {
> unset i
> else
> oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_TARGET}
> +
> + # Generate the uboot-initial-env
> + oe_runmake -C ${S} O=${B} u-boot-initial-env
> fi
>
> }
> @@ -155,19 +163,28 @@ do_install () {
> j=$(expr $j + 1);
> if [ $j -eq $i ]
> then
> - install -d ${D}/boot
> - install -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
> + install -D -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
> ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
> ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}
> +
> + # Install the uboot-initial-env
> + install -D -m 644 ${B}/${config}/u-boot-initial-env-${type} ${D}/${sysconfdir}/u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR}
> + ln -sf u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR} ${D}/${sysconfdir}/u-boot-initial-env-${MACHINE}-${type}
> + ln -sf u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR} ${D}/${sysconfdir}/u-boot-initial-env-${type}
> + ln -sf u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR} ${D}/${sysconfdir}/u-boot-initial-env
> fi
> done
> unset j
> done
> unset i
> else
> - install -d ${D}/boot
> - install -m 644 ${B}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
> + install -D -m 644 ${B}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
> ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
> +
> + # Install the uboot-initial-env
> + install -D -m 644 ${B}/u-boot-initial-env ${D}/${sysconfdir}/u-boot-initial-env-${MACHINE}-${PV}-${PR}
> + ln -sf u-boot-initial-env-${MACHINE}-${PV}-${PR} ${D}/${sysconfdir}/u-boot-initial-env-${MACHINE}
> + ln -sf u-boot-initial-env-${MACHINE}-${PV}-${PR} ${D}/${sysconfdir}/u-boot-initial-env
> fi
>
> if [ -n "${UBOOT_ELF}" ]
> @@ -236,7 +253,16 @@ do_install () {
>
> }
>
> -FILES_${PN} = "/boot ${sysconfdir} ${datadir}"
> +PACKAGE_BEFORE_PN += "${PN}-env"
> +
> +RPROVIDES_${PN}-env += "u-boot-default-env"
> +FILES_${PN}-env = " \
> + ${sysconfdir}/u-boot-initial-env* \
> + ${sysconfdir}/fw_env.config \
> +"
> +
> +FILES_${PN} = "/boot ${datadir}"
> +RDEPENDS_${PN} += "${PN}-env"
>
> do_deploy () {
> if [ -n "${UBOOT_CONFIG}" ]
> @@ -247,25 +273,43 @@ do_deploy () {
> j=$(expr $j + 1);
> if [ $j -eq $i ]
> then
> - install -d ${DEPLOYDIR}
> - install -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
> + install -D -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
> cd ${DEPLOYDIR}
> ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type}
> ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}
> ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type}
> ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}
> +
> + # Deploy the uboot-initial-env
> + install -D -m 644 ${B}/${config}/u-boot-initial-env-${type} ${DEPLOYDIR}/u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR}
> + cd ${DEPLOYDIR}
> + ln -sf u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR} u-boot-initial-env-${MACHINE}-${type}
> + ln -sf u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR} u-boot-initial-env-${type}
> fi
> done
> unset j
> done
> unset i
> else
> - install -d ${DEPLOYDIR}
> - install -m 644 ${B}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
> + install -D -m 644 ${B}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
> +
> cd ${DEPLOYDIR}
> rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK}
> ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
> ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY}
> +
> + # Deploy the uboot-initial-env
> + install -D -m 644 ${B}/u-boot-initial-env ${DEPLOYDIR}/u-boot-initial-env-${MACHINE}-${PV}-${PR}
> + cd ${DEPLOYDIR}
> + ln -sf u-boot-initial-env-${MACHINE}-${PV}-${PR} u-boot-initial-env-${MACHINE}
> + ln -sf u-boot-initial-env-${MACHINE}-${PV}-${PR} u-boot-initial-env
> + fi
> +
> + if [ -e ${WORKDIR}/fw_env.config ] ; then
> + install -D -m 644 ${WORKDIR}/fw_env.config ${DEPLOYDIR}/fw_env.config-${MACHINE}-${PV}-${PR}
> + cd ${DEPLOYDIR}
> + ln -sf fw_env.config-${MACHINE}-${PV}-${PR} fw_env.config-${MACHINE}
> + ln -sf fw_env.config-${MACHINE}-${PV}-${PR} fw_env.config
> fi
>
> if [ -n "${UBOOT_ELF}" ]
>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH v3] u-boot: Restore valid default environment for running system
2020-04-02 0:14 [PATCH v3] u-boot: Restore valid default environment for running system Otavio Salvador
2020-04-02 8:10 ` [OE-core] " Stefano Babic
@ 2020-04-12 21:07 ` Denys Dmytriyenko
2020-04-13 11:47 ` Otavio Salvador
1 sibling, 1 reply; 5+ messages in thread
From: Denys Dmytriyenko @ 2020-04-12 21:07 UTC (permalink / raw)
To: Otavio Salvador
Cc: OpenEmbedded Core Mailing List, Stefano Babic, Tom Rini,
Otavio Salvador
On Wed, Apr 01, 2020 at 09:14:31PM -0300, Otavio Salvador wrote:
> One significant change from previous OE-Core releases was the move from
> u-boot-fw-utils to libubootenv which offers a generic and not machine
> specific alternative. However, it is not fully functional as currently
> we don't provide the default environment nor the required configuration
> file to be used by it.
>
> This change address this and include on the default u-boot.inc the
> needed code to generate, install and deploy the default environment.
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
> This change is late in the cycle but it is critical in my opinion.
>
> The lack of default environment as well as the configuration for the
> tool is a regression from the previous release and this mitigates it.
>
> Changes in v3:
> - Remove rrecommends in libubootenv
> - Add ${MACHINE} to the files following other binaries
> - Change commit log
>
> Changes in v2:
> - Fix wrong path on do_install
> - Change virtual/bootloader-env to u-boot-default-env (RP)
> - Add Tom Rini and Stefano Babic to Cc
>
> meta/recipes-bsp/u-boot/u-boot.inc | 62 +++++++++++++++++++++++++-----
> 1 file changed, 53 insertions(+), 9 deletions(-)
>
> diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
> index d4ab9c3222e..dc4f7884b82 100644
> --- a/meta/recipes-bsp/u-boot/u-boot.inc
> +++ b/meta/recipes-bsp/u-boot/u-boot.inc
> @@ -134,6 +134,11 @@ do_compile () {
> cp ${B}/${config}/${binary} ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX}
> fi
> done
> +
> + # Generate the uboot-initial-env
> + oe_runmake -C ${S} O=${B}/${config} u-boot-initial-env
> + cp ${B}/${config}/u-boot-initial-env ${B}/${config}/u-boot-initial-env-${type}
> +
> unset k
> fi
> done
> @@ -142,6 +147,9 @@ do_compile () {
> unset i
> else
> oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_TARGET}
> +
> + # Generate the uboot-initial-env
> + oe_runmake -C ${S} O=${B} u-boot-initial-env
So, why is this enabled unconditionally? Should this be in UBOOT_MAKE_TARGET?
I use this .inc file for building different u-boot pieces by different recipes
(main u-boot, SPL, etc., etc.) controlling the build with UBOOT_MAKE_TARGET
below. Now each of those generate u-boot-initial-env and they clash in deploy.
> This change is late in the cycle but it is critical in my opinion.
>
> The lack of default environment as well as the configuration for the
> tool is a regression from the previous release and this mitigates it.
Well, I would rather live w/o env rather than unable to build u-boot at all...
> fi
>
> }
> @@ -155,19 +163,28 @@ do_install () {
> j=$(expr $j + 1);
> if [ $j -eq $i ]
> then
> - install -d ${D}/boot
> - install -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
> + install -D -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
> ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
> ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}
> +
> + # Install the uboot-initial-env
> + install -D -m 644 ${B}/${config}/u-boot-initial-env-${type} ${D}/${sysconfdir}/u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR}
> + ln -sf u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR} ${D}/${sysconfdir}/u-boot-initial-env-${MACHINE}-${type}
> + ln -sf u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR} ${D}/${sysconfdir}/u-boot-initial-env-${type}
> + ln -sf u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR} ${D}/${sysconfdir}/u-boot-initial-env
> fi
> done
> unset j
> done
> unset i
> else
> - install -d ${D}/boot
> - install -m 644 ${B}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
> + install -D -m 644 ${B}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
> ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
> +
> + # Install the uboot-initial-env
> + install -D -m 644 ${B}/u-boot-initial-env ${D}/${sysconfdir}/u-boot-initial-env-${MACHINE}-${PV}-${PR}
> + ln -sf u-boot-initial-env-${MACHINE}-${PV}-${PR} ${D}/${sysconfdir}/u-boot-initial-env-${MACHINE}
> + ln -sf u-boot-initial-env-${MACHINE}-${PV}-${PR} ${D}/${sysconfdir}/u-boot-initial-env
> fi
>
> if [ -n "${UBOOT_ELF}" ]
> @@ -236,7 +253,16 @@ do_install () {
>
> }
>
> -FILES_${PN} = "/boot ${sysconfdir} ${datadir}"
> +PACKAGE_BEFORE_PN += "${PN}-env"
> +
> +RPROVIDES_${PN}-env += "u-boot-default-env"
> +FILES_${PN}-env = " \
> + ${sysconfdir}/u-boot-initial-env* \
> + ${sysconfdir}/fw_env.config \
> +"
> +
> +FILES_${PN} = "/boot ${datadir}"
> +RDEPENDS_${PN} += "${PN}-env"
>
> do_deploy () {
> if [ -n "${UBOOT_CONFIG}" ]
> @@ -247,25 +273,43 @@ do_deploy () {
> j=$(expr $j + 1);
> if [ $j -eq $i ]
> then
> - install -d ${DEPLOYDIR}
> - install -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
> + install -D -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
> cd ${DEPLOYDIR}
> ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type}
> ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}
> ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type}
> ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}
> +
> + # Deploy the uboot-initial-env
> + install -D -m 644 ${B}/${config}/u-boot-initial-env-${type} ${DEPLOYDIR}/u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR}
> + cd ${DEPLOYDIR}
> + ln -sf u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR} u-boot-initial-env-${MACHINE}-${type}
> + ln -sf u-boot-initial-env-${MACHINE}-${type}-${PV}-${PR} u-boot-initial-env-${type}
> fi
> done
> unset j
> done
> unset i
> else
> - install -d ${DEPLOYDIR}
> - install -m 644 ${B}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
> + install -D -m 644 ${B}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
> +
> cd ${DEPLOYDIR}
> rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK}
> ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
> ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY}
> +
> + # Deploy the uboot-initial-env
> + install -D -m 644 ${B}/u-boot-initial-env ${DEPLOYDIR}/u-boot-initial-env-${MACHINE}-${PV}-${PR}
> + cd ${DEPLOYDIR}
> + ln -sf u-boot-initial-env-${MACHINE}-${PV}-${PR} u-boot-initial-env-${MACHINE}
> + ln -sf u-boot-initial-env-${MACHINE}-${PV}-${PR} u-boot-initial-env
> + fi
> +
> + if [ -e ${WORKDIR}/fw_env.config ] ; then
> + install -D -m 644 ${WORKDIR}/fw_env.config ${DEPLOYDIR}/fw_env.config-${MACHINE}-${PV}-${PR}
> + cd ${DEPLOYDIR}
> + ln -sf fw_env.config-${MACHINE}-${PV}-${PR} fw_env.config-${MACHINE}
> + ln -sf fw_env.config-${MACHINE}-${PV}-${PR} fw_env.config
> fi
>
> if [ -n "${UBOOT_ELF}" ]
> --
> 2.26.0
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH v3] u-boot: Restore valid default environment for running system
2020-04-12 21:07 ` Denys Dmytriyenko
@ 2020-04-13 11:47 ` Otavio Salvador
2020-04-13 16:09 ` Denys Dmytriyenko
0 siblings, 1 reply; 5+ messages in thread
From: Otavio Salvador @ 2020-04-13 11:47 UTC (permalink / raw)
To: Denys Dmytriyenko
Cc: OpenEmbedded Core Mailing List, Stefano Babic, Tom Rini,
Otavio Salvador
On Sun, Apr 12, 2020 at 6:07 PM Denys Dmytriyenko <denis@denix.org> wrote:
> > +
> > + # Generate the uboot-initial-env
> > + oe_runmake -C ${S} O=${B} u-boot-initial-env
>
> So, why is this enabled unconditionally? Should this be in UBOOT_MAKE_TARGET?
>
> I use this .inc file for building different u-boot pieces by different recipes
> (main u-boot, SPL, etc., etc.) controlling the build with UBOOT_MAKE_TARGET
> below. Now each of those generate u-boot-initial-env and they clash in deploy.
They clash? how so? it generates different filenames so should not have a clash.
> > This change is late in the cycle but it is critical in my opinion.
> >
> > The lack of default environment as well as the configuration for the
> > tool is a regression from the previous release and this mitigates it.
>
> Well, I would rather live w/o env rather than unable to build u-boot at all...
Please provide more information as I did not figure out what is not
working by your report.
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH v3] u-boot: Restore valid default environment for running system
2020-04-13 11:47 ` Otavio Salvador
@ 2020-04-13 16:09 ` Denys Dmytriyenko
0 siblings, 0 replies; 5+ messages in thread
From: Denys Dmytriyenko @ 2020-04-13 16:09 UTC (permalink / raw)
To: Otavio Salvador
Cc: OpenEmbedded Core Mailing List, Stefano Babic, Tom Rini,
Otavio Salvador
On Mon, Apr 13, 2020 at 08:47:21AM -0300, Otavio Salvador wrote:
> On Sun, Apr 12, 2020 at 6:07 PM Denys Dmytriyenko <denis@denix.org> wrote:
> > > +
> > > + # Generate the uboot-initial-env
> > > + oe_runmake -C ${S} O=${B} u-boot-initial-env
> >
> > So, why is this enabled unconditionally? Should this be in UBOOT_MAKE_TARGET?
> >
> > I use this .inc file for building different u-boot pieces by different recipes
> > (main u-boot, SPL, etc., etc.) controlling the build with UBOOT_MAKE_TARGET
> > below. Now each of those generate u-boot-initial-env and they clash in deploy.
>
> They clash? how so? it generates different filenames so should not have a clash.
Different filenames? It's always u-boot-initial-env in deploy and /etc...
I already sent a patch last night to actually do different names...
> > > This change is late in the cycle but it is critical in my opinion.
> > >
> > > The lack of default environment as well as the configuration for the
> > > tool is a regression from the previous release and this mitigates it.
> >
> > Well, I would rather live w/o env rather than unable to build u-boot at all...
>
> Please provide more information as I did not figure out what is not
> working by your report.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-04-13 16:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-02 0:14 [PATCH v3] u-boot: Restore valid default environment for running system Otavio Salvador
2020-04-02 8:10 ` [OE-core] " Stefano Babic
2020-04-12 21:07 ` Denys Dmytriyenko
2020-04-13 11:47 ` Otavio Salvador
2020-04-13 16:09 ` Denys Dmytriyenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox