From: OpenOCD-Gerrit <ope...@us...> - 2022-06-03 23:46:41
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 975fb2a4faaaabbacae16a468840dab4b3eb3618 (commit) from 93e2c082d60586a765d925fb59604b315fbf9dc9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 975fb2a4faaaabbacae16a468840dab4b3eb3618 Author: Tarek BOCHKATI <tar...@gm...> Date: Mon May 30 14:48:06 2022 +0100 github/workflow: enable libftdi based adapters Change-Id: I74b07b21573294dd7d9d3caf41c5755622c77149 Signed-off-by: Tarek BOCHKATI <tar...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/7008 Tested-by: jenkins Reviewed-by: Xiaofan Chen <xia...@gm...> Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 0de0cf3f6..e5997a055 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -38,6 +38,14 @@ jobs: cd hidapi-hidapi-${HIDAPI_VER} ./bootstrap echo "HIDAPI_SRC=$PWD" >> $GITHUB_ENV + - name: Prepare libftdi + env: + LIBFTDI_VER: 1.5 + run: | + mkdir -p $DL_DIR && cd $DL_DIR + wget "http://www.intra2net.com/en/developer/libftdi/download/libftdi1-${LIBFTDI_VER}.tar.bz2" + tar -xjf libftdi1-${LIBFTDI_VER}.tar.bz2 + echo "LIBFTDI_SRC=$PWD/libftdi1-${LIBFTDI_VER}" >> $GITHUB_ENV - name: Prepare capstone env: CAPSTONE_VER: 4.0.2 @@ -54,6 +62,7 @@ jobs: HOST: i686-w64-mingw32 LIBUSB1_CONFIG: --enable-shared --disable-static HIDAPI_CONFIG: --enable-shared --disable-static --disable-testgui + LIBFTDI_CONFIG: -DSTATICLIBS=OFF -DEXAMPLES=OFF -DFTDI_EEPROM=OFF CAPSTONE_CONFIG: "CAPSTONE_BUILD_CORE_ONLY=yes CAPSTONE_STATIC=yes CAPSTONE_SHARED=no" run: | # check if there is tag pointing at HEAD, otherwise take the HEAD SHA-1 as OPENOCD_TAG diff --git a/contrib/cross-build.sh b/contrib/cross-build.sh index 7c572f55d..9328c3ab6 100755 --- a/contrib/cross-build.sh +++ b/contrib/cross-build.sh @@ -121,11 +121,17 @@ fi if [ -d $LIBFTDI_SRC ] ; then mkdir -p $LIBFTDI_BUILD_DIR cd $LIBFTDI_BUILD_DIR - # libftdi requires libusb1 static libraries, granted by: - # export LIBUSB1_CONFIG="--enable-static ..." + # note : libftdi versions < 1.5 requires libusb1 static + # hint use : # export LIBUSB1_CONFIG="--enable-static ..." + # not needed since libftdi-1.5 when LIBFTDI_CONFIG="-DSTATICLIBS=OFF ..." + + # fix <toolchain>.cmake file + ESCAPED_SYSROOT=$(printf '%s\n' "$SYSROOT" | sed -e 's/[\/&]/\\&/g') + sed -i -E "s/(SET\(CMAKE_FIND_ROOT_PATH\s+).+\)/\1${ESCAPED_SYSROOT})/" \ + ${LIBFTDI_SRC}/cmake/Toolchain-${HOST_TRIPLET}.cmake + cmake $LIBFTDI_CONFIG \ - -DLIBUSB_INCLUDE_DIR=${SYSROOT}${PREFIX}/include/libusb-1.0 \ - -DLIBUSB_LIBRARIES=${SYSROOT}${PREFIX}/lib/libusb-1.0.a \ + -DCMAKE_TOOLCHAIN_FILE=${LIBFTDI_SRC}/cmake/Toolchain-${HOST_TRIPLET}.cmake \ -DCMAKE_INSTALL_PREFIX=${PREFIX} \ -DPKG_CONFIG_EXECUTABLE=`which pkg-config` \ $LIBFTDI_SRC ----------------------------------------------------------------------- Summary of changes: .github/workflows/snapshot.yml | 9 +++++++++ contrib/cross-build.sh | 14 ++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) hooks/post-receive -- Main OpenOCD repository |