File tree Expand file tree Collapse file tree 7 files changed +28
-16
lines changed
Expand file tree Collapse file tree 7 files changed +28
-16
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ permissions:
77
88env :
99 SKIP_RISCV : 1
10- SKIP_OPENOCD : 1
10+ SKIP_OPENOCD : 0
1111
1212jobs :
1313 build_windows :
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ SKIP_RISCV=${SKIP_RISCV-0}
77SKIP_OPENOCD=${SKIP_OPENOCD-0}
88
99# Install prerequisites
10- sudo apt install -y jq cmake libtool automake libusb-1.0-0-dev libhidapi-dev libftdi1-dev
10+ sudo apt install -y jq cmake libtool automake libusb-1.0-0-dev libhidapi-dev libftdi1-dev libjim-dev
1111# RISC-V prerequisites
1212sudo apt install -y autoconf automake autotools-dev curl python3 python3-pip libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev ninja-build git cmake libglib2.0-dev libslirp-dev
1313# RPi Only prerequisites
3535
3636 echo " ${href} ${tree} ${filename} ${extension} ${repodir} "
3737 rm -rf " ${repodir} "
38- git clone -b " ${tree} " --depth=1 -c advice.detachedHead=false " ${href} " " ${repodir} "
38+ git clone -b " ${tree} " --depth=1 -c advice.detachedHead=false " ${href} " " ${repodir} "
39+ submodules=$( echo " $repo " | jq -r .submodules)
40+ if [[ " $submodules " == " true" ]]; then
41+ git -C " ${repodir} " submodule update --init --depth=1
42+ fi
3943done < <( echo " $repos " )
4044
4145
4246cd $builddir
4347if [[ " $SKIP_OPENOCD " != 1 ]]; then
4448 if ! ../packages/linux/openocd/build-openocd.sh; then
45- echo " OpenOCD Build failed "
49+ echo " ::error title=openocd-fail- ${suffix} :: OpenOCD Build Failed on Linux $( uname -m ) "
4650 SKIP_OPENOCD=1
4751 fi
4852fi
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ SKIP_RISCV=${SKIP_RISCV-0}
77SKIP_OPENOCD=${SKIP_OPENOCD-0}
88
99# Install prerequisites
10- arch -x86_64 /usr/local/bin/brew install jq libtool libusb automake hidapi --quiet
11- arch -arm64 /opt/homebrew/bin/brew install jq libtool libusb automake hidapi --quiet
10+ arch -x86_64 /usr/local/bin/brew install jq libtool libusb automake hidapi jimtcl --quiet
11+ arch -arm64 /opt/homebrew/bin/brew install jq libtool libusb automake hidapi jimtcl --quiet
1212# RISC-V prerequisites
1313echo " Listing local"
1414ls /usr/local/bin
4242
4343 echo " ${href} ${tree} ${filename} ${extension} ${repodir} "
4444 rm -rf " ${repodir} "
45- git clone -b " ${tree} " --depth=1 -c advice.detachedHead=false " ${href} " " ${repodir} "
45+ git clone -b " ${tree} " --depth=1 -c advice.detachedHead=false " ${href} " " ${repodir} "
46+ submodules=$( echo " $repo " | jq -r .submodules)
47+ if [[ " $submodules " == " true" ]]; then
48+ git -C " ${repodir} " submodule update --init --depth=1
49+ fi
4650done < <( echo " $repos " )
4751
4852
4953cd $builddir
5054if [[ " $SKIP_OPENOCD " != 1 ]] && [[ $( uname -m) == ' arm64' ]]; then
5155 if ! ../packages/macos/openocd/build-openocd.sh; then
52- echo " OpenOCD Build failed "
56+ echo " ::error title=openocd-fail-macos:: OpenOCD Build Failed on macOS "
5357 SKIP_OPENOCD=1
5458 fi
5559fi
Original file line number Diff line number Diff line change 1010 },
1111 {
1212 "href" : " https://github.com/raspberrypi/openocd.git" ,
13- "tree" : " sdk-2.0.0"
13+ "tree" : " rpi-common" ,
14+ "submodules" : true
1415 },
1516 {
1617 "href" : " https://github.com/riscv/riscv-gnu-toolchain.git" ,
Original file line number Diff line number Diff line change @@ -6,11 +6,10 @@ export CFLAGS=-static
66export LDFLAGS=-static
77
88cd openocd
9- sed -i -e ' s/uint /unsigned int /g' ./src/flash/nor/rp2040.c
109./bootstrap
1110./configure --disable-werror
1211make clean
13- make -j $( nproc )
12+ make
1413INSTALLDIR=" $PWD /../openocd-install/usr/local/bin"
1514rm -rf " $PWD /../openocd-install"
1615DESTDIR=" $PWD /../openocd-install" make install
Original file line number Diff line number Diff line change 33set -euo pipefail
44
55cd openocd
6- sed -i -e ' s/uint /unsigned int /g ' ./src/flash/nor/rp2040.c
6+
77./bootstrap
88# See https://github.com/raspberrypi/openocd/issues/30
99# ./configure --disable-werror CAPSTONE_CFLAGS="$(pkg-config capstone --cflags | sed s/.capstone\$//)"
1010./configure --disable-werror
1111make clean
12- make -j $( nproc )
12+ make
1313INSTALLDIR=" $PWD /../openocd-install/usr/local/bin"
1414rm -rf " $PWD /../openocd-install"
1515DESTDIR=" $PWD /../openocd-install" make install
@@ -22,4 +22,8 @@ libhidpath=($(otool -L $INSTALLDIR/openocd | grep libhidapi))
2222echo ${libhidpath[0]}
2323cp " ${libhidpath[0]} " $INSTALLDIR /libhidapi.dylib
2424install_name_tool -change " ${libhidpath[0]} " @loader_path/libhidapi.dylib $INSTALLDIR /openocd
25+ libjimpath=($( otool -L $INSTALLDIR /openocd | grep libjim) )
26+ echo ${libjimpath[0]}
27+ cp " ${libjimpath[0]} " $INSTALLDIR /libjim0.83.dylib
28+ install_name_tool -change " ${libjimpath[0]} " @loader_path/libjim0.83.dylib $INSTALLDIR /openocd
2529install_name_tool -add_rpath @loader_path/ $INSTALLDIR /openocd
Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ BUILDDIR=$(pwd)
66INSTALLDIR=" openocd-install"
77
88cd openocd
9- sed -i -e ' s/uint /unsigned int /g ' ./src/flash/nor/rp2040.c
9+
1010./bootstrap
11- ./configure --disable-werror
11+ ./configure --disable-werror --enable-internal-jimtcl
1212make clean
13- make -j $( nproc )
13+ make
1414DESTDIR=" $BUILDDIR /$INSTALLDIR " make install
1515
1616cd " $BUILDDIR /$INSTALLDIR /${MSYSTEM,,} /bin"
You can’t perform that action at this time.
0 commit comments