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:
7
7
8
8
env :
9
9
SKIP_RISCV : 1
10
- SKIP_OPENOCD : 1
10
+ SKIP_OPENOCD : 0
11
11
12
12
jobs :
13
13
build_windows :
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ SKIP_RISCV=${SKIP_RISCV-0}
7
7
SKIP_OPENOCD=${SKIP_OPENOCD-0}
8
8
9
9
# 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
11
11
# RISC-V prerequisites
12
12
sudo 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
13
13
# RPi Only prerequisites
35
35
36
36
echo " ${href} ${tree} ${filename} ${extension} ${repodir} "
37
37
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
39
43
done < <( echo " $repos " )
40
44
41
45
42
46
cd $builddir
43
47
if [[ " $SKIP_OPENOCD " != 1 ]]; then
44
48
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 ) "
46
50
SKIP_OPENOCD=1
47
51
fi
48
52
fi
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ SKIP_RISCV=${SKIP_RISCV-0}
7
7
SKIP_OPENOCD=${SKIP_OPENOCD-0}
8
8
9
9
# 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
12
12
# RISC-V prerequisites
13
13
echo " Listing local"
14
14
ls /usr/local/bin
42
42
43
43
echo " ${href} ${tree} ${filename} ${extension} ${repodir} "
44
44
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
46
50
done < <( echo " $repos " )
47
51
48
52
49
53
cd $builddir
50
54
if [[ " $SKIP_OPENOCD " != 1 ]] && [[ $( uname -m) == ' arm64' ]]; then
51
55
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 "
53
57
SKIP_OPENOCD=1
54
58
fi
55
59
fi
Original file line number Diff line number Diff line change 10
10
},
11
11
{
12
12
"href" : " https://github.com/raspberrypi/openocd.git" ,
13
- "tree" : " sdk-2.0.0"
13
+ "tree" : " rpi-common" ,
14
+ "submodules" : true
14
15
},
15
16
{
16
17
"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
6
6
export LDFLAGS=-static
7
7
8
8
cd openocd
9
- sed -i -e ' s/uint /unsigned int /g' ./src/flash/nor/rp2040.c
10
9
./bootstrap
11
10
./configure --disable-werror
12
11
make clean
13
- make -j $( nproc )
12
+ make
14
13
INSTALLDIR=" $PWD /../openocd-install/usr/local/bin"
15
14
rm -rf " $PWD /../openocd-install"
16
15
DESTDIR=" $PWD /../openocd-install" make install
Original file line number Diff line number Diff line change 3
3
set -euo pipefail
4
4
5
5
cd openocd
6
- sed -i -e ' s/uint /unsigned int /g ' ./src/flash/nor/rp2040.c
6
+
7
7
./bootstrap
8
8
# See https://github.com/raspberrypi/openocd/issues/30
9
9
# ./configure --disable-werror CAPSTONE_CFLAGS="$(pkg-config capstone --cflags | sed s/.capstone\$//)"
10
10
./configure --disable-werror
11
11
make clean
12
- make -j $( nproc )
12
+ make
13
13
INSTALLDIR=" $PWD /../openocd-install/usr/local/bin"
14
14
rm -rf " $PWD /../openocd-install"
15
15
DESTDIR=" $PWD /../openocd-install" make install
@@ -22,4 +22,8 @@ libhidpath=($(otool -L $INSTALLDIR/openocd | grep libhidapi))
22
22
echo ${libhidpath[0]}
23
23
cp " ${libhidpath[0]} " $INSTALLDIR /libhidapi.dylib
24
24
install_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
25
29
install_name_tool -add_rpath @loader_path/ $INSTALLDIR /openocd
Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ BUILDDIR=$(pwd)
6
6
INSTALLDIR=" openocd-install"
7
7
8
8
cd openocd
9
- sed -i -e ' s/uint /unsigned int /g ' ./src/flash/nor/rp2040.c
9
+
10
10
./bootstrap
11
- ./configure --disable-werror
11
+ ./configure --disable-werror --enable-internal-jimtcl
12
12
make clean
13
- make -j $( nproc )
13
+ make
14
14
DESTDIR=" $BUILDDIR /$INSTALLDIR " make install
15
15
16
16
cd " $BUILDDIR /$INSTALLDIR /${MSYSTEM,,} /bin"
You can’t perform that action at this time.
0 commit comments