Modifications to createOpenCPIZynqSD.sh for matchstiq_z1

MR
Munro, Robert M.
Tue, Nov 6, 2018 8:09 PM

I am currently working with the release_1.4 branch to run example code on a Matchstiq_Z1 target and saw some issues during SD card generation.  I've noted below the changes that needed to be made to createOpenCPIZynqSD.sh to get it to complete properly.  These are likely not be the best approach for the changes, but can help someone more familiar with the build system track down the root cause.

-Robert Munro

N.B.: The script now takes three input parameters instead of two as previously.  E.g. createOpenCPIZynqSD.sh 13_4 matchstiq_z1 xilinx13_4.

Inside the script:
....

OCPI_BOOTSTRAP=$OCPI_CDK_DIR/scripts/ocpibootstrap.sh; source $OCPI_BOOTSTRAP

comment the line below as it will produce an error message: "Error: Cannot find the platform directory for platform 13_4"

source $OCPI_CDK_DIR/scripts/ocpitarget.sh $OCPI_TARGET_PLATFORM

EXAMPLES_ROOTDIR=$(getProjectRegistryDir)/ocpi.assets

....

add repetition of these two export variable settings because they are getting unset somewhere between beginning of script and here

export OCPI_TARGET_PLATFORM=${3:-$(basename $(pwd))}

export OCPI_TARGET_DIR=$OCPI_TARGET_PLATFORM

BIN_DIR=${OCPI_CDK_DIR}/${OCPI_TARGET_DIR}/bin

....

cp -L ${KERNEL_LIB_DIR}/mdev-opencpi.rules $sd/opencpi/lib/${OCPI_TARGET_PLATFORM}

add setting of cross compile path here because it is becoming unset somewhere

export OCPI_TARGET_CROSS_COMPILE=/opt/Xilinx/14.7/ISE_DS/EDK/gnu/arm/lin/bin/arm-xilinx-linux-gnueabi-

for b in run hdl zynq serve xml; do

I am currently working with the release_1.4 branch to run example code on a Matchstiq_Z1 target and saw some issues during SD card generation. I've noted below the changes that needed to be made to createOpenCPIZynqSD.sh to get it to complete properly. These are likely not be the best approach for the changes, but can help someone more familiar with the build system track down the root cause. -Robert Munro N.B.: The script now takes three input parameters instead of two as previously. E.g. createOpenCPIZynqSD.sh 13_4 matchstiq_z1 xilinx13_4. Inside the script: .... OCPI_BOOTSTRAP=$OCPI_CDK_DIR/scripts/ocpibootstrap.sh; source $OCPI_BOOTSTRAP # comment the line below as it will produce an error message: "Error: Cannot find the platform directory for platform 13_4" # source $OCPI_CDK_DIR/scripts/ocpitarget.sh $OCPI_TARGET_PLATFORM EXAMPLES_ROOTDIR=$(getProjectRegistryDir)/ocpi.assets .... # add repetition of these two export variable settings because they are getting unset somewhere between beginning of script and here export OCPI_TARGET_PLATFORM=${3:-$(basename $(pwd))} export OCPI_TARGET_DIR=$OCPI_TARGET_PLATFORM BIN_DIR=${OCPI_CDK_DIR}/${OCPI_TARGET_DIR}/bin .... cp -L ${KERNEL_LIB_DIR}/mdev-opencpi.rules $sd/opencpi/lib/${OCPI_TARGET_PLATFORM} # add setting of cross compile path here because it is becoming unset somewhere export OCPI_TARGET_CROSS_COMPILE=/opt/Xilinx/14.7/ISE_DS/EDK/gnu/arm/lin/bin/arm-xilinx-linux-gnueabi- for b in run hdl zynq serve xml; do
JK
James Kulp
Tue, Nov 6, 2018 8:38 PM

Thanks for the clear and useful feedback.

On 11/6/18 3:09 PM, Munro, Robert M. wrote:

I am currently working with the release_1.4 branch to run example code on a Matchstiq_Z1 target and saw some issues during SD card generation.  I've noted below the changes that needed to be made to createOpenCPIZynqSD.sh to get it to complete properly.  These are likely not be the best approach for the changes, but can help someone more familiar with the build system track down the root cause.

-Robert Munro

N.B.: The script now takes three input parameters instead of two as previously.  E.g. createOpenCPIZynqSD.sh 13_4 matchstiq_z1 xilinx13_4.

Inside the script:
....

OCPI_BOOTSTRAP=$OCPI_CDK_DIR/scripts/ocpibootstrap.sh; source $OCPI_BOOTSTRAP

comment the line below as it will produce an error message: "Error: Cannot find the platform directory for platform 13_4"

source $OCPI_CDK_DIR/scripts/ocpitarget.sh $OCPI_TARGET_PLATFORM

EXAMPLES_ROOTDIR=$(getProjectRegistryDir)/ocpi.assets

....

add repetition of these two export variable settings because they are getting unset somewhere between beginning of script and here

export OCPI_TARGET_PLATFORM=${3:-$(basename $(pwd))}

export OCPI_TARGET_DIR=$OCPI_TARGET_PLATFORM

BIN_DIR=${OCPI_CDK_DIR}/${OCPI_TARGET_DIR}/bin

....

cp -L ${KERNEL_LIB_DIR}/mdev-opencpi.rules $sd/opencpi/lib/${OCPI_TARGET_PLATFORM}

add setting of cross compile path here because it is becoming unset somewhere

export OCPI_TARGET_CROSS_COMPILE=/opt/Xilinx/14.7/ISE_DS/EDK/gnu/arm/lin/bin/arm-xilinx-linux-gnueabi-

for b in run hdl zynq serve xml; do

Thanks for the clear and useful feedback. On 11/6/18 3:09 PM, Munro, Robert M. wrote: > I am currently working with the release_1.4 branch to run example code on a Matchstiq_Z1 target and saw some issues during SD card generation. I've noted below the changes that needed to be made to createOpenCPIZynqSD.sh to get it to complete properly. These are likely not be the best approach for the changes, but can help someone more familiar with the build system track down the root cause. > > -Robert Munro > > N.B.: The script now takes three input parameters instead of two as previously. E.g. createOpenCPIZynqSD.sh 13_4 matchstiq_z1 xilinx13_4. > > Inside the script: > .... > > OCPI_BOOTSTRAP=$OCPI_CDK_DIR/scripts/ocpibootstrap.sh; source $OCPI_BOOTSTRAP > > # comment the line below as it will produce an error message: "Error: Cannot find the platform directory for platform 13_4" > > # source $OCPI_CDK_DIR/scripts/ocpitarget.sh $OCPI_TARGET_PLATFORM > > EXAMPLES_ROOTDIR=$(getProjectRegistryDir)/ocpi.assets > > .... > > # add repetition of these two export variable settings because they are getting unset somewhere between beginning of script and here > > export OCPI_TARGET_PLATFORM=${3:-$(basename $(pwd))} > > export OCPI_TARGET_DIR=$OCPI_TARGET_PLATFORM > > BIN_DIR=${OCPI_CDK_DIR}/${OCPI_TARGET_DIR}/bin > > .... > > cp -L ${KERNEL_LIB_DIR}/mdev-opencpi.rules $sd/opencpi/lib/${OCPI_TARGET_PLATFORM} > > # add setting of cross compile path here because it is becoming unset somewhere > > export OCPI_TARGET_CROSS_COMPILE=/opt/Xilinx/14.7/ISE_DS/EDK/gnu/arm/lin/bin/arm-xilinx-linux-gnueabi- > > for b in run hdl zynq serve xml; do > > >