ci: fix github ci build for nuclei openocd (#13)
Change-Id: Id644958753ee29694824032eaf54df4eab1428bd Signed-off-by: Huaqi Fang <578567190@qq.com>
This commit is contained in:
parent
18627364f9
commit
2fbb887163
|
@ -17,7 +17,7 @@ jobs:
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install clang gcc-multilib
|
sudo apt-get install clang gcc-multilib
|
||||||
- run: ./bootstrap
|
- run: ./bootstrap
|
||||||
- run: ./configure --enable-remote-bitbang --enable-jtag_vpi --disable-target64
|
- run: ./configure --enable-remote-bitbang --enable-jtag_vpi --disable-target64 --disable-werror
|
||||||
- run: make -j`nproc`
|
- run: make -j`nproc`
|
||||||
- run: file src/openocd | grep 32-bit
|
- run: file src/openocd | grep 32-bit
|
||||||
- run: src/openocd --version
|
- run: src/openocd --version
|
||||||
|
@ -40,8 +40,9 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install libusb-1.0-0 libusb-1.0-0-dev
|
sudo apt-get install libusb-1.0-0 libusb-1.0-0-dev
|
||||||
|
sudo apt-get install libftdi1-2 libftdi1-dev
|
||||||
- run: ./bootstrap
|
- run: ./bootstrap
|
||||||
- run: ./configure --enable-remote-bitbang --enable-jtag_vpi --enable-ftdi-cjtag --prefix /tmp/${{ env.NAME }}
|
- run: ./configure --enable-remote-bitbang --enable-jtag_vpi --enable-ftdi-cjtag --enable-jlink --enable-ftdi --disable-werror
|
||||||
- run: make -j`nproc`
|
- run: make -j`nproc`
|
||||||
- name: Check that we built something
|
- name: Check that we built something
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -16,7 +16,7 @@ jobs:
|
||||||
- name: Install needed packages
|
- name: Install needed packages
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install autotools-dev autoconf automake libtool pkg-config cmake texinfo texlive g++-mingw-w64-i686
|
sudo apt-get install autotools-dev autoconf automake libtool pkg-config cmake texinfo texlive g++-mingw-w64-i686 unzip
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- run: ./bootstrap
|
- run: ./bootstrap
|
||||||
|
@ -66,6 +66,16 @@ jobs:
|
||||||
cd libjaylink-${LIBJAYLINK_VER}
|
cd libjaylink-${LIBJAYLINK_VER}
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
echo "LIBJAYLINK_SRC=$PWD" >> $GITHUB_ENV
|
echo "LIBJAYLINK_SRC=$PWD" >> $GITHUB_ENV
|
||||||
|
- name: Prepare FTD2XX
|
||||||
|
env:
|
||||||
|
FTD2XX_VER: 2.12.36.4
|
||||||
|
run: |
|
||||||
|
mkdir -p $DL_DIR && cd $DL_DIR
|
||||||
|
FTD2XX_NAME=${FTD2XX_VER}
|
||||||
|
FTD2XX_FOLDER=ftd2XX-${FTD2XX_VER}
|
||||||
|
wget "https://ftdichip.com/wp-content/uploads/2023/09/CDM-v${FTD2XX_VER}-WHQL-Certified.zip"
|
||||||
|
unzip -d ${FTD2XX_FOLDER} CDM-v${FTD2XX_VER}-WHQL-Certified.zip
|
||||||
|
echo "FTD2XX_SRC=$PWD/${FTD2XX_FOLDER}" >> $GITHUB_ENV
|
||||||
- name: Package OpenOCD for windows
|
- name: Package OpenOCD for windows
|
||||||
env:
|
env:
|
||||||
MAKE_JOBS: 2
|
MAKE_JOBS: 2
|
||||||
|
@ -87,7 +97,7 @@ jobs:
|
||||||
# set env and call cross-build.sh
|
# set env and call cross-build.sh
|
||||||
export OPENOCD_TAG=$OPENOCD_TAG
|
export OPENOCD_TAG=$OPENOCD_TAG
|
||||||
export OPENOCD_SRC=$PWD
|
export OPENOCD_SRC=$PWD
|
||||||
export OPENOCD_CONFIG=""
|
export OPENOCD_CONFIG="--disable-werror"
|
||||||
mkdir -p $BUILD_DIR && cd $BUILD_DIR
|
mkdir -p $BUILD_DIR && cd $BUILD_DIR
|
||||||
bash $OPENOCD_SRC/contrib/cross-build.sh $HOST
|
bash $OPENOCD_SRC/contrib/cross-build.sh $HOST
|
||||||
# add missing dlls
|
# add missing dlls
|
||||||
|
|
|
@ -42,6 +42,7 @@ WORK_DIR=$PWD
|
||||||
: ${LIBFTDI_SRC:=/path/to/libftdi}
|
: ${LIBFTDI_SRC:=/path/to/libftdi}
|
||||||
: ${CAPSTONE_SRC:=/path/to/capstone}
|
: ${CAPSTONE_SRC:=/path/to/capstone}
|
||||||
: ${LIBJAYLINK_SRC:=/path/to/libjaylink}
|
: ${LIBJAYLINK_SRC:=/path/to/libjaylink}
|
||||||
|
: ${FTD2XX_SRC:=/path/to/ftd2xx}
|
||||||
|
|
||||||
OPENOCD_SRC=`readlink -m $OPENOCD_SRC`
|
OPENOCD_SRC=`readlink -m $OPENOCD_SRC`
|
||||||
LIBUSB1_SRC=`readlink -m $LIBUSB1_SRC`
|
LIBUSB1_SRC=`readlink -m $LIBUSB1_SRC`
|
||||||
|
@ -49,6 +50,7 @@ HIDAPI_SRC=`readlink -m $HIDAPI_SRC`
|
||||||
LIBFTDI_SRC=`readlink -m $LIBFTDI_SRC`
|
LIBFTDI_SRC=`readlink -m $LIBFTDI_SRC`
|
||||||
CAPSTONE_SRC=`readlink -m $CAPSTONE_SRC`
|
CAPSTONE_SRC=`readlink -m $CAPSTONE_SRC`
|
||||||
LIBJAYLINK_SRC=`readlink -m $LIBJAYLINK_SRC`
|
LIBJAYLINK_SRC=`readlink -m $LIBJAYLINK_SRC`
|
||||||
|
FTD2XX_SRC=`readlink -m $FTD2XX_SRC`
|
||||||
|
|
||||||
HOST_TRIPLET=$1
|
HOST_TRIPLET=$1
|
||||||
BUILD_DIR=$WORK_DIR/$HOST_TRIPLET-build
|
BUILD_DIR=$WORK_DIR/$HOST_TRIPLET-build
|
||||||
|
@ -170,6 +172,13 @@ if [ -d $LIBJAYLINK_SRC ] ; then
|
||||||
$LIBJAYLINK_CONFIG
|
$LIBJAYLINK_CONFIG
|
||||||
make -j $MAKE_JOBS
|
make -j $MAKE_JOBS
|
||||||
make install DESTDIR=$SYSROOT
|
make install DESTDIR=$SYSROOT
|
||||||
|
# ftd2xx copy to sysroot
|
||||||
|
if [ -d $FTD2XX_SRC ] ; then
|
||||||
|
FTD2XX_LIB_SRC=${FTD2XX_SRC}/amd64
|
||||||
|
if [[ "$HOST_TRIPLET" == *"w32"* ]] ; then
|
||||||
|
FTD2XX_LIB_SRC=${FTD2XX_SRC}/i386
|
||||||
|
fi
|
||||||
|
cp -f ${FTD2XX_LIB_SRC}/* $SYSROOT/usr/lib/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# OpenOCD build & install into sysroot
|
# OpenOCD build & install into sysroot
|
||||||
|
|
Loading…
Reference in New Issue