Hi,

On Jun 2, 2012, at 10:36 PM, Elvis Dowson wrote:

> How can I debug the value of ${TARGET_ARCH} in 
> meta-xilinx/classes/xilinx-boot.class, for the following function:
> 
> do_export_xparam() {
> bbnote "Replacing xparameters header to match hardware model"
> xparam=$1
> if [ "${TARGET_ARCH}" == "powerpc" ]; then
>       cpu="PPC`echo ${TARGET_CPU} | tr '[:lower:]' '[:upper:]'`"
> else
>       cpu=`echo ${TARGET_CPU} | tr '[:lower:]' '[:upper:]'`
> fi
> cp ${xparam} ${S}/board/xilinx/${XILINX_BOARD}
> echo "/*** Cannonical definitions ***/
> #define XPAR_PLB_CLOCK_FREQ_HZ XPAR_PROC_BUS_0_FREQ_HZ
> #define XPAR_CORE_CLOCK_FREQ_HZ XPAR_CPU_${cpu}_CORE_CLOCK_FREQ_HZ
> #ifndef XPAR_DDR2_SDRAM_MEM_BASEADDR
> # define XPAR_DDR2_SDRAM_MEM_BASEADDR XPAR_DDR_SDRAM_MPMC_BASEADDR
> #endif
> #define XPAR_PCI_0_CLOCK_FREQ_HZ    0" >> 
> ${S}/board/xilinx/${XILINX_BOARD}/xparameters.h
> }

In the above code ${TARGET_ARCH} always evaluates to "powerpc". I just inserted 
${TARGET_ARCH} in the echo statements, and saw the value in the file.

Now what I can't seem to figure out is why, for the following if condition, the 
first branch isn't being take; the else branch is always evaluated, and the 
value for cpu is always set to "440" instead of "PPC440"

if [ "${TARGET_ARCH}" == "powerpc" ]; then
        cpu="PPC`echo ${TARGET_CPU} | tr '[:lower:]' '[:upper:]'`"
else
        cpu="`echo ${TARGET_CPU} | tr '[:lower:]' '[:upper:]'`"
fi

Best regards,

Elvis Dowson
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to