Skip to content

Commit 2fbb887

Browse files
committed
ci: fix github ci build for nuclei openocd (#13)
Change-Id: Id644958753ee29694824032eaf54df4eab1428bd Signed-off-by: Huaqi Fang <[email protected]>
1 parent 1862736 commit 2fbb887

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

.github/workflows/linux-build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
sudo apt-get update
1818
sudo apt-get install clang gcc-multilib
1919
- run: ./bootstrap
20-
- run: ./configure --enable-remote-bitbang --enable-jtag_vpi --disable-target64
20+
- run: ./configure --enable-remote-bitbang --enable-jtag_vpi --disable-target64 --disable-werror
2121
- run: make -j`nproc`
2222
- run: file src/openocd | grep 32-bit
2323
- run: src/openocd --version
@@ -40,8 +40,9 @@ jobs:
4040
run: |
4141
sudo apt-get update
4242
sudo apt-get install libusb-1.0-0 libusb-1.0-0-dev
43+
sudo apt-get install libftdi1-2 libftdi1-dev
4344
- run: ./bootstrap
44-
- run: ./configure --enable-remote-bitbang --enable-jtag_vpi --enable-ftdi-cjtag --prefix /tmp/${{ env.NAME }}
45+
- run: ./configure --enable-remote-bitbang --enable-jtag_vpi --enable-ftdi-cjtag --enable-jlink --enable-ftdi --disable-werror
4546
- run: make -j`nproc`
4647
- name: Check that we built something
4748
run: |

.github/workflows/snapshot.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install needed packages
1717
run: |
1818
sudo apt-get update
19-
sudo apt-get install autotools-dev autoconf automake libtool pkg-config cmake texinfo texlive g++-mingw-w64-i686
19+
sudo apt-get install autotools-dev autoconf automake libtool pkg-config cmake texinfo texlive g++-mingw-w64-i686 unzip
2020
- name: Checkout Code
2121
uses: actions/checkout@v4
2222
- run: ./bootstrap
@@ -66,6 +66,16 @@ jobs:
6666
cd libjaylink-${LIBJAYLINK_VER}
6767
./autogen.sh
6868
echo "LIBJAYLINK_SRC=$PWD" >> $GITHUB_ENV
69+
- name: Prepare FTD2XX
70+
env:
71+
FTD2XX_VER: 2.12.36.4
72+
run: |
73+
mkdir -p $DL_DIR && cd $DL_DIR
74+
FTD2XX_NAME=${FTD2XX_VER}
75+
FTD2XX_FOLDER=ftd2XX-${FTD2XX_VER}
76+
wget "https://ftdichip.com/wp-content/uploads/2023/09/CDM-v${FTD2XX_VER}-WHQL-Certified.zip"
77+
unzip -d ${FTD2XX_FOLDER} CDM-v${FTD2XX_VER}-WHQL-Certified.zip
78+
echo "FTD2XX_SRC=$PWD/${FTD2XX_FOLDER}" >> $GITHUB_ENV
6979
- name: Package OpenOCD for windows
7080
env:
7181
MAKE_JOBS: 2
@@ -87,7 +97,7 @@ jobs:
8797
# set env and call cross-build.sh
8898
export OPENOCD_TAG=$OPENOCD_TAG
8999
export OPENOCD_SRC=$PWD
90-
export OPENOCD_CONFIG=""
100+
export OPENOCD_CONFIG="--disable-werror"
91101
mkdir -p $BUILD_DIR && cd $BUILD_DIR
92102
bash $OPENOCD_SRC/contrib/cross-build.sh $HOST
93103
# add missing dlls

contrib/cross-build.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,15 @@ WORK_DIR=$PWD
4242
: ${LIBFTDI_SRC:=/path/to/libftdi}
4343
: ${CAPSTONE_SRC:=/path/to/capstone}
4444
: ${LIBJAYLINK_SRC:=/path/to/libjaylink}
45+
: ${FTD2XX_SRC:=/path/to/ftd2xx}
4546

4647
OPENOCD_SRC=`readlink -m $OPENOCD_SRC`
4748
LIBUSB1_SRC=`readlink -m $LIBUSB1_SRC`
4849
HIDAPI_SRC=`readlink -m $HIDAPI_SRC`
4950
LIBFTDI_SRC=`readlink -m $LIBFTDI_SRC`
5051
CAPSTONE_SRC=`readlink -m $CAPSTONE_SRC`
5152
LIBJAYLINK_SRC=`readlink -m $LIBJAYLINK_SRC`
53+
FTD2XX_SRC=`readlink -m $FTD2XX_SRC`
5254

5355
HOST_TRIPLET=$1
5456
BUILD_DIR=$WORK_DIR/$HOST_TRIPLET-build
@@ -170,6 +172,13 @@ if [ -d $LIBJAYLINK_SRC ] ; then
170172
$LIBJAYLINK_CONFIG
171173
make -j $MAKE_JOBS
172174
make install DESTDIR=$SYSROOT
175+
# ftd2xx copy to sysroot
176+
if [ -d $FTD2XX_SRC ] ; then
177+
FTD2XX_LIB_SRC=${FTD2XX_SRC}/amd64
178+
if [[ "$HOST_TRIPLET" == *"w32"* ]] ; then
179+
FTD2XX_LIB_SRC=${FTD2XX_SRC}/i386
180+
fi
181+
cp -f ${FTD2XX_LIB_SRC}/* $SYSROOT/usr/lib/
173182
fi
174183

175184
# OpenOCD build & install into sysroot

0 commit comments

Comments
 (0)