summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
authorAndrew Shadura <andrew.shadura@collabora.co.uk>2016-05-26 17:13:10 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-30 15:58:15 +0100
commit8d7f58bac1fe528d2a8d442073398336d4fdbc22 (patch)
treed640569b94b187ba11bda2601e6fb50630e7ff8d /meta/recipes-bsp
parent6b38e77493b36fbbd8be835ba9dd7bb38b91c2f6 (diff)
downloadopenembedded-core-contrib-8d7f58bac1fe528d2a8d442073398336d4fdbc22.tar.gz
openembedded-core-contrib-8d7f58bac1fe528d2a8d442073398336d4fdbc22.tar.bz2
openembedded-core-contrib-8d7f58bac1fe528d2a8d442073398336d4fdbc22.zip
u-boot: replace old-style shell syntax with the modern one
Use "-n" operation instead of comparing with an "x"-ed empty string, use $(...) notation instead of the deprecated backticks. (From OE-Core rev: b8436a9c470f1e27ff7fdd952b2743eaf97cadf8) Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r--meta/recipes-bsp/u-boot/u-boot.inc60
1 files changed, 30 insertions, 30 deletions
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index 037f35cfc3..1071d1f270 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -79,13 +79,13 @@ do_compile () {
echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion
echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion
fi
-
- if [ "x${UBOOT_CONFIG}" != "x" ]
+
+ if [ -n "${UBOOT_CONFIG}" ]
then
for config in ${UBOOT_MACHINE}; do
- i=`expr $i + 1`;
+ i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
- j=`expr $j + 1`;
+ j=$(expr $j + 1);
if [ $j -eq $i ]
then
oe_runmake O=${config} ${config}
@@ -104,12 +104,12 @@ do_compile () {
}
do_install () {
- if [ "x${UBOOT_CONFIG}" != "x" ]
+ if [ -n "${UBOOT_CONFIG}" ]
then
for config in ${UBOOT_MACHINE}; do
- i=`expr $i + 1`;
+ i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
- j=`expr $j + 1`;
+ j=$(expr $j + 1);
if [ $j -eq $i ]
then
install -d ${D}/boot
@@ -127,14 +127,14 @@ do_install () {
ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
fi
- if [ "x${UBOOT_ELF}" != "x" ]
+ if [ -n "${UBOOT_ELF}" ]
then
- if [ "x${UBOOT_CONFIG}" != "x" ]
+ if [ -n "${UBOOT_CONFIG}" ]
then
for config in ${UBOOT_MACHINE}; do
- i=`expr $i + 1`;
+ i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
- j=`expr $j + 1`;
+ j=$(expr $j + 1);
if [ $j -eq $i ]
then
install ${S}/${config}/${UBOOT_ELF} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}
@@ -156,14 +156,14 @@ do_install () {
install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
fi
- if [ "x${SPL_BINARY}" != "x" ]
+ if [ -n "${SPL_BINARY}" ]
then
- if [ "x${UBOOT_CONFIG}" != "x" ]
+ if [ -n "${UBOOT_CONFIG}" ]
then
for config in ${UBOOT_MACHINE}; do
- i=`expr $i + 1`;
+ i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
- j=`expr $j + 1`;
+ j=$(expr $j + 1);
if [ $j -eq $i ]
then
install ${S}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR}
@@ -180,7 +180,7 @@ do_install () {
fi
fi
- if [ "x${UBOOT_ENV}" != "x" ]
+ if [ -n "${UBOOT_ENV}" ]
then
install ${WORKDIR}/${UBOOT_ENV_BINARY} ${D}/boot/${UBOOT_ENV_IMAGE}
ln -sf ${UBOOT_ENV_IMAGE} ${D}/boot/${UBOOT_ENV_BINARY}
@@ -190,12 +190,12 @@ do_install () {
FILES_${PN} = "/boot ${sysconfdir}"
do_deploy () {
- if [ "x${UBOOT_CONFIG}" != "x" ]
+ if [ -n "${UBOOT_CONFIG}" ]
then
for config in ${UBOOT_MACHINE}; do
- i=`expr $i + 1`;
+ i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
- j=`expr $j + 1`;
+ j=$(expr $j + 1);
if [ $j -eq $i ]
then
install -d ${DEPLOYDIR}
@@ -205,8 +205,8 @@ do_deploy () {
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}
- fi
- done
+ fi
+ done
unset j
done
unset i
@@ -219,14 +219,14 @@ do_deploy () {
ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY}
fi
- if [ "x${UBOOT_ELF}" != "x" ]
+ if [ -n "${UBOOT_ELF}" ]
then
- if [ "x${UBOOT_CONFIG}" != "x" ]
+ if [ -n "${UBOOT_CONFIG}" ]
then
for config in ${UBOOT_MACHINE}; do
- i=`expr $i + 1`;
+ i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
- j=`expr $j + 1`;
+ j=$(expr $j + 1);
if [ $j -eq $i ]
then
install ${S}/${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}
@@ -247,14 +247,14 @@ do_deploy () {
fi
- if [ "x${SPL_BINARY}" != "x" ]
+ if [ -n "${SPL_BINARY}" ]
then
- if [ "x${UBOOT_CONFIG}" != "x" ]
+ if [ -n "${UBOOT_CONFIG}" ]
then
for config in ${UBOOT_MACHINE}; do
- i=`expr $i + 1`;
+ i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
- j=`expr $j + 1`;
+ j=$(expr $j + 1);
if [ $j -eq $i ]
then
install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR}
@@ -277,7 +277,7 @@ do_deploy () {
fi
- if [ "x${UBOOT_ENV}" != "x" ]
+ if [ -n "${UBOOT_ENV}" ]
then
install ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE}
rm -f ${DEPLOYDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK}