From: Chunrong Guo <B40290@freescale.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH v3] u-boot.inc: fix rename image error
Date: Mon, 9 Mar 2015 15:24:54 +0800 [thread overview]
Message-ID: <1425885894-9030-1-git-send-email-B40290@freescale.com> (raw)
Resolve mismatch between U-Boot configs and uboot image name.
The ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} may alway be false
and repeat compile or install so we need to check if ${type} match ${config} .
Signed-off-by: Chunrong Guo <B40290@freescale.com>
---
meta/recipes-bsp/u-boot/u-boot.inc | 52 ++++++++------------------------------
1 file changed, 11 insertions(+), 41 deletions(-)
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index 6bdc86a..27fa809 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -62,19 +62,13 @@ do_compile () {
echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion
echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion
fi
-
+
if [ "x${UBOOT_CONFIG}" != "x" ]
then
for config in ${UBOOT_MACHINE}; do
- for type in in ${UBOOT_CONFIG}; do
- if [ "${type}"x = "in"x ]
- then
- continue
- fi
- if [ -d "${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX}" ]
+ for type in ${UBOOT_CONFIG}; do
+ if [ "`echo ${config} | cut -d'_' -f2`" = "${type}" ]
then
- break
- else
oe_runmake O=${config} ${config}
oe_runmake O=${config} ${UBOOT_MAKE_TARGET}
cp ${S}/${config}/${UBOOT_BINARY} ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX}
@@ -92,15 +86,9 @@ do_install () {
if [ "x${UBOOT_CONFIG}" != "x" ]
then
for config in ${UBOOT_MACHINE}; do
- for type in in ${UBOOT_CONFIG}; do
- if [ "${type}"x = "in"x ]
- then
- continue
- fi
- if [ -d "${D}/boot/u-boot-${type}.${UBOOT_SUFFIX}" ]
+ for type in ${UBOOT_CONFIG}; do
+ if [ "`echo ${config} | cut -d'_' -f2`" = "${type}" ]
then
- break
- else
install -d ${D}/boot
install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}.${UBOOT_SUFFIX}
ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}
@@ -123,15 +111,9 @@ do_install () {
if [ "x${UBOOT_CONFIG}" != "x" ]
then
for config in ${UBOOT_MACHINE}; do
- for type in in ${UBOOT_CONFIG}; do
- if [ "${type}"x = "in"x ]
+ for type in ${UBOOT_CONFIG}; do
+ if [ "`echo ${config} | cut -d'_' -f2`" = "${type}" ]
then
- continue
- fi
- if [ -d "${D}/boot/${SPL_IMAGE}-${type}" ]
- then
- break
- else
install ${S}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}
ln -sf ${SPL_IMAGE}-${type} ${D}/boot/${SPL_BINARY}-${type}
ln -sf ${SPL_IMAGE}-${type} ${D}/boot/${SPL_BINARY}
@@ -157,15 +139,9 @@ do_deploy () {
if [ "x${UBOOT_CONFIG}" != "x" ]
then
for config in ${UBOOT_MACHINE}; do
- for type in in ${UBOOT_CONFIG}; do
- if [ "${type}"x = "in"x ]
+ for type in ${UBOOT_CONFIG}; do
+ if [ "`echo ${config} | cut -d'_' -f2`" = "${type}" ]
then
- continue
- fi
- if [ -d "${DEPLOYDIR}/u-boot-${type}.${UBOOT_SUFFIX}" ]
- then
- break
- else
install -d ${DEPLOYDIR}
install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}.${UBOOT_SUFFIX}
cd ${DEPLOYDIR}
@@ -190,15 +166,9 @@ do_deploy () {
if [ "x${UBOOT_CONFIG}" != "x" ]
then
for config in ${UBOOT_MACHINE}; do
- for type in in ${UBOOT_CONFIG}; do
- if [ "${type}"x = "in"x ]
- then
- continue
- fi
- if [ -d "${DEPLOYDIR}/${SPL_IMAGE}-${type}" ]
+ for type in ${UBOOT_CONFIG}; do
+ if [ "`echo ${config} | cut -d'_' -f2`" = "${type}" ]
then
- break
- else
install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}
rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}-${type}
--
1.9.2
next reply other threads:[~2015-03-09 7:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-09 7:24 Chunrong Guo [this message]
2015-03-09 16:29 ` [PATCH v3] u-boot.inc: fix rename image error Otavio Salvador
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1425885894-9030-1-git-send-email-B40290@freescale.com \
--to=b40290@freescale.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.