Patchwork [meta-xilinx] xilinx-boot: Change string comparision checks to use strict POSIX compliance.

login
register
mail settings
Submitter Elvis Dowson
Date June 2, 2012, 10:28 p.m.
Message ID <1338676087-29276-1-git-send-email-elvis.dowson@gmail.com>
Download mbox | patch
Permalink /patch/29175/
State Accepted
Headers show

Comments

Elvis Dowson - June 2, 2012, 10:28 p.m.
This commit fixes an issue with string comparision checks failing because
of not using strict POSIX compliance, therby resulting in wrong definitions
being generated into the ${xparam} file.

Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
---
 classes/xilinx-boot.bbclass |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Patch

diff --git a/classes/xilinx-boot.bbclass b/classes/xilinx-boot.bbclass
index d85ab80..a7f1f1d 100644
--- a/classes/xilinx-boot.bbclass
+++ b/classes/xilinx-boot.bbclass
@@ -21,10 +21,10 @@ 
 do_export_xparam() {
 bbnote "Replacing xparameters header to match hardware model"
 xparam=$1
-if [ "${TARGET_ARCH}" == "powerpc" ]; then
+if [ "${TARGET_ARCH}" = "powerpc" ]; then
 	cpu="PPC`echo ${TARGET_CPU} | tr '[:lower:]' '[:upper:]'`"
 else
-	cpu=`echo ${TARGET_CPU} | tr '[:lower:]' '[:upper:]'`
+	cpu="`echo ${TARGET_CPU} | tr '[:lower:]' '[:upper:]'`"
 fi
 cp ${xparam} ${S}/board/xilinx/${XILINX_BOARD}
 echo "/*** Cannonical definitions ***/
@@ -39,7 +39,7 @@  echo "/*** Cannonical definitions ***/
 do_mk_xparam() {
 bbnote "Replacing xparameters.mk configuration file"
 xparam=$1
-if [ "${TARGET_ARCH}" == "powerpc" ]; then
+if [ "${TARGET_ARCH}" = "powerpc" ]; then
     if grep -qoe XPAR_IIC_0_DEVICE_ID ${xparam}; then
         echo -e "XPAR_IIC        := y" > ${S}/board/xilinx/${XILINX_BOARD}/xparameters.mk
     else
@@ -65,7 +65,7 @@  bbnote "Generate system ace image"
 # Set Xilinx EDK tools
 if [ -z ${XILINX_EDK} ]; then
 	# Get Xilinx version
-	if [ ${BUILD_ARCH} == "x86_64" ]; then
+	if [ "${BUILD_ARCH}" = "x86_64" ]; then
 		EDK_SRCIPT="settings64.sh"
 	else
 		EDK_SRCIPT="settings.sh"
@@ -98,7 +98,7 @@  if [ ! -f implementation/download.bit ]; then
 	make -f ${XILINX_BSP_PATH}/system.make init_bram
 fi
 
-if [ "${TARGET_ARCH}" == "powerpc" ]; then
+if [ "${TARGET_ARCH}" = "powerpc" ]; then
 	# Find u-boot start address
 	start_address=`${TARGET_PREFIX}objdump -x u-boot | grep -w "start address" | cut -d ' ' -f3`
 	# Generate ACE image