-
Notifications
You must be signed in to change notification settings - Fork 1
/
ci-build.sh
34 lines (26 loc) · 1.37 KB
/
ci-build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
gdbVersion="12.1"
wget https://ftp.gnu.org/gnu/gdb/gdb-${gdbVersion}.tar.xz
tar -xf gdb-${gdbVersion}.tar.xz
pushd gdb-${gdbVersion}
echo "[i] configuring"
./configure --target=nios2-elf --with-python --without-auto-load-safe-path --with-gdb-datadir=c:/intelfpga_lite/22.1std/nios2eds/bin/gnu/h-x86_64-mingw32/nios2-elf/share/gdb
echo "[i] starting build"
make all-gdb -j$(nproc)
strip gdb/gdb.exe
popd
echo "[i] copying data directory"
mkdir -p assets/intelFPGA_lite/22.1std/nios2eds/bin/gnu/H-x86_64-mingw32/nios2-elf/share/gdb
cp -r ./gdb-${gdbVersion}/gdb/data-directory/python ./assets/intelFPGA_lite/22.1std/nios2eds/bin/gnu/H-x86_64-mingw32/nios2-elf/share/gdb
echo "[i] copying gdb.exe and .dll files"
mkdir -p assets/intelFPGA_lite/22.1std/nios2eds/bin/gnu/H-x86_64-mingw32/bin
cp ./gdb-${gdbVersion}/gdb/gdb.exe ./assets/intelFPGA_lite/22.1std/nios2eds/bin/gnu/H-x86_64-mingw32/bin/nios2-elf-gdb.exe
cp /ucrt64/bin/*.dll ./assets/intelFPGA_lite/22.1std/nios2eds/bin/gnu/H-x86_64-mingw32/bin
echo "[i] get python dll from embeddeble source"
wget https://www.python.org/ftp/python/3.11.5/python-3.11.5-embed-amd64.zip
unzip python-3.11.5-embed-amd64.zip -d python3.11
cp -f ./python3.11/python311.dll ./assets/intelFPGA_lite/22.1std/nios2eds/bin/gnu/H-x86_64-mingw32/bin/libpython3.11.dll
pushd assets
echo "[i] tarballing final artifact"
tar -cJf ../nios-gdb.tar.xz .
popd