u-boot.inc: fix rename image error
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} (From OE-Core rev: c3c7265aa3931d47af53433f3c2d25f0e447d52e) Signed-off-by: Chunrong Guo <B40290@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
dd52ac56c5
commit
a879c89b83
|
@ -66,20 +66,17 @@ do_compile () {
|
|||
if [ "x${UBOOT_CONFIG}" != "x" ]
|
||||
then
|
||||
for config in ${UBOOT_MACHINE}; do
|
||||
for type in in ${UBOOT_CONFIG}; do
|
||||
if [ "${type}"x = "in"x ]
|
||||
i=`expr $i + 1`;
|
||||
for type in ${UBOOT_CONFIG}; do
|
||||
j=`expr $j + 1`;
|
||||
if [ $j -eq $i ]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
if [ -d "${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX}" ]
|
||||
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}
|
||||
fi
|
||||
done
|
||||
unset j
|
||||
done
|
||||
else
|
||||
oe_runmake ${UBOOT_MACHINE}
|
||||
|
@ -92,20 +89,17 @@ 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 ]
|
||||
i=`expr $i + 1`;
|
||||
for type in ${UBOOT_CONFIG}; do
|
||||
j=`expr $j + 1`;
|
||||
if [ $j -eq $i ]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
if [ -d "${D}/boot/u-boot-${type}.${UBOOT_SUFFIX}" ]
|
||||
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}
|
||||
install ${S}/${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}
|
||||
fi
|
||||
done
|
||||
unset j
|
||||
done
|
||||
else
|
||||
install -d ${D}/boot
|
||||
|
@ -123,20 +117,17 @@ 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/${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}
|
||||
fi
|
||||
i=`expr $i + 1`;
|
||||
for type in ${UBOOT_CONFIG}; do
|
||||
j=`expr $j + 1`;
|
||||
if [ $j -eq $i ]
|
||||
then
|
||||
install ${S}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR}
|
||||
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARY}-${type}
|
||||
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARY}
|
||||
fi
|
||||
done
|
||||
unset j
|
||||
done
|
||||
else
|
||||
install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
|
||||
|
@ -157,22 +148,19 @@ 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 ]
|
||||
i=`expr $i + 1`;
|
||||
for type in ${UBOOT_CONFIG}; do
|
||||
j=`expr $j + 1`;
|
||||
if [ $j -eq $i ]
|
||||
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}
|
||||
install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
|
||||
cd ${DEPLOYDIR}
|
||||
ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}
|
||||
ln -sf u-boot-${type}.${UBOOT_SUFFIX} ${UBOOT_BINARY}
|
||||
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}
|
||||
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}
|
||||
fi
|
||||
done
|
||||
unset j
|
||||
done
|
||||
else
|
||||
install -d ${DEPLOYDIR}
|
||||
|
@ -190,23 +178,20 @@ 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}" ]
|
||||
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}
|
||||
ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_BINARY}
|
||||
ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
|
||||
ln -sf ${SPL_IMAGE}-${type} ${DEPLOYDIR}/${SPL_SYMLINK}
|
||||
fi
|
||||
i=`expr $i + 1`;
|
||||
for type in ${UBOOT_CONFIG}; do
|
||||
j=`expr $j + 1`;
|
||||
if [ $j -eq $i ]
|
||||
then
|
||||
install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR}
|
||||
rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
|
||||
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARY}-${type}
|
||||
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARY}
|
||||
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
|
||||
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}
|
||||
fi
|
||||
done
|
||||
unset j
|
||||
done
|
||||
else
|
||||
install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
|
||||
|
|
Loading…
Reference in New Issue