build devices xc7a35tcsg324-1 and xc7a100tcsg324-1
All checks were successful
/ build (push) Successful in 30m59s
/ podman-rootless-build (push) Successful in 40s

This commit is contained in:
Jacob Lifshay 2025-10-14 03:15:46 -07:00
parent f01d2667bf
commit bcc2656f24
Signed by: programmerjake
SSH key fingerprint: SHA256:HnFTLGpSm4Q4Fj502oCFisjZSoakwEuTsJJMSke63RQ
3 changed files with 58 additions and 0 deletions

View file

@ -1,2 +1,4 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
# See Notices.txt for copyright information
*
!/bbaexport_all.sh

View file

@ -78,6 +78,8 @@ RUN git clone https://github.com/chipsalliance/f4pga-xc-fasm.git /build/f4pga-xc
&& pip install . \
&& rm -rf /build ~/.cache
COPY bbaexport_all.sh /build/bbaexport_all.sh
RUN git clone https://github.com/openXC7/nextpnr-xilinx.git /build/nextpnr-xilinx \
&& cd /build/nextpnr-xilinx \
&& git checkout 724db28b41e68568690a5ea1dd9ce5082362bb91 \
@ -88,6 +90,7 @@ RUN git clone https://github.com/openXC7/nextpnr-xilinx.git /build/nextpnr-xilin
&& make -j$(nproc) \
&& make install \
&& install bbasm /usr/local/bin/ \
&& /build/bbaexport_all.sh /opt/fayalite-deps/prjxray-db /build/nextpnr-xilinx /opt/fayalite-deps/nextpnr-xilinx xc7a35tcsg324-1 xc7a100tcsg324-1 \
&& rm -rf /build
RUN mkdir -p /build \

53
bbaexport_all.sh Executable file
View file

@ -0,0 +1,53 @@
#!/bin/bash
# SPDX-License-Identifier: LGPL-3.0-or-later
# See Notices.txt for copyright information
set -e
function usage()
{
echo "usage: $0 <path-to-prjxray-db> <path-to-nextpnr-xilinx-source-code> <path-to-nextpnr-xilinx-output-directory> <device> <device> ..."
echo
echo "example: $0 /opt/fayalite-deps/prjxray-db /build/nextpnr-xilinx /opt/fayalite-deps/nextpnr-xilinx xc7a35tcsg324-1 xc7a100tcsg324-1"
}
case "$*" in
-h*|--help*)
usage
exit
;;
"")
usage >&2
exit 1
;;
esac
prjxray_db_path="$1"
nextpnr_xilinx_source_path="$2"
nextpnr_xilinx_output_path="$3"
if [[ ! ( -d "$prjxray_db_path" && -d "$nextpnr_xilinx_source_path" && ( ! -e "$nextpnr_xilinx_output_path" || -d "$nextpnr_xilinx_output_path" ) ) ]]; then
echo "invalid/nonexistent paths $prjxray_db_path $nextpnr_xilinx_source_path" >&2
usage >&2
exit 1
elif ! python3 --version > /dev/null; then
echo "can't run python3" >&2
usage >&2
exit 1
elif ! bbasm --help > /dev/null; then
echo "can't run bbasm" >&2
usage >&2
exit 1
fi
mkdir -p "$nextpnr_xilinx_output_path/xilinx"
cd "$nextpnr_xilinx_source_path"
for device in "${@:4}"; do
[[ "$device" =~ ^('xc7'[aksz][0-9]+'t'?)[^t0-9/].*$ ]] || { echo "invalid device: $device" >&2; exit 1; }
xray_device="${BASH_REMATCH[1]}"
python3 "$nextpnr_xilinx_source_path/xilinx/python/bbaexport.py" --device "$device" --bba "$nextpnr_xilinx_output_path/xilinx/$xray_device.bba"
bbasm --l "$nextpnr_xilinx_output_path/xilinx/$xray_device.bba" "$nextpnr_xilinx_output_path/xilinx/$xray_device.bin"
echo "finished $device"
done