Skip to content

Commit

Permalink
contrib: add ftd2xx into cross build steps
Browse files Browse the repository at this point in the history
Change-Id: I23b2498d651d2ec1d8bda04c684c3f69724126b0
Signed-off-by: Huaqi Fang <[email protected]>
  • Loading branch information
fanghuaqi committed Jan 25, 2024
1 parent 4f0697a commit 06cf8f7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions contrib/cross-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ WORK_DIR=$PWD
: ${HIDAPI_SRC:=/path/to/hidapi}
: ${LIBFTDI_SRC:=/path/to/libftdi}
: ${CAPSTONE_SRC:=/path/to/capstone}
: ${FTD2XX_SRC:=/path/to/ftd2xx}

OPENOCD_SRC=`readlink -m $OPENOCD_SRC`
LIBUSB1_SRC=`readlink -m $LIBUSB1_SRC`
HIDAPI_SRC=`readlink -m $HIDAPI_SRC`
LIBFTDI_SRC=`readlink -m $LIBFTDI_SRC`
CAPSTONE_SRC=`readlink -m $CAPSTONE_SRC`
FTD2XX_SRC=`readlink -m $FTD2XX_SRC`

HOST_TRIPLET=$1
BUILD_DIR=$WORK_DIR/$HOST_TRIPLET-build
Expand Down Expand Up @@ -151,6 +153,14 @@ libdir=${exec_prefix}/lib \
includedir=${prefix}/include\n\n;' $CAPSTONE_PC_FILE
fi

# ftd2xx copy to sysroot
if [ -d $FTD2XX_SRC ] ; then
FTD2XX_LIB_SRC=${FTD2XX_SRC}/Static/amd64/
if [[ "$HOST_TRIPLET" == *"w32"* ]] ; then
FTD2XX_LIB_SRC=${FTD2XX_SRC}/Static/i686/
fi
cp -f ${FTD2XX_LIB_SRC}/* $SYSROOT/lib/
fi

# OpenOCD build & install into sysroot
mkdir -p $OPENOCD_BUILD_DIR
Expand Down

0 comments on commit 06cf8f7

Please sign in to comment.