Skip to content

Commit

Permalink
Simplify build by using symlinks.
Browse files Browse the repository at this point in the history
Previously the nextpnr build did not allow this.

This also makes all of the package-*-*.sh scripts look almost exactly
the same, paving way for future simplification.
  • Loading branch information
whitequark committed Jan 22, 2025
1 parent e85ff72 commit 2010e5a
Show file tree
Hide file tree
Showing 63 changed files with 42 additions and 102 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/wasi-sdk-*
*.wasm

/boost-*
/eigen-*
Expand Down
2 changes: 0 additions & 2 deletions npmjs-common/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@

/*.wasm
/gen
/share
/index.*
2 changes: 0 additions & 2 deletions npmjs-ecp5/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@

/*.wasm
/gen
/share
/index.*
1 change: 1 addition & 0 deletions npmjs-ecp5/share/ecp5
1 change: 1 addition & 0 deletions npmjs-ecp5/share/trellis/database/ECP5
1 change: 1 addition & 0 deletions npmjs-ecp5/share/trellis/database/devices.json
2 changes: 0 additions & 2 deletions npmjs-ice40/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@

/*.wasm
/gen
/share
/index.*
1 change: 1 addition & 0 deletions npmjs-ice40/share/ice40
1 change: 0 additions & 1 deletion npmjs-machxo2/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@

/*.wasm
/gen
/share
1 change: 1 addition & 0 deletions npmjs-machxo2/share/machxo2
1 change: 1 addition & 0 deletions npmjs-machxo2/share/trellis/database/MachXO
1 change: 1 addition & 0 deletions npmjs-machxo2/share/trellis/database/MachXO2
1 change: 1 addition & 0 deletions npmjs-machxo2/share/trellis/database/MachXO3
1 change: 1 addition & 0 deletions npmjs-machxo2/share/trellis/database/MachXO3D
1 change: 1 addition & 0 deletions npmjs-machxo2/share/trellis/database/devices.json
2 changes: 0 additions & 2 deletions npmjs-nexus/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@

/*.wasm
/gen
/share
/index.*
1 change: 1 addition & 0 deletions npmjs-nexus/share/nexus
8 changes: 0 additions & 8 deletions package-npmjs-ecp5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ cd $(dirname $0)

PYTHON=${PYTHON:-python}

mkdir -p npmjs-ecp5/share/ecp5
cp -r nextpnr-build/share/ecp5/* \
npmjs-ecp5/share/ecp5
mkdir -p npmjs-ecp5/share/trellis/database
cp -r prjtrellis-src/database/ECP5 \
prjtrellis-src/database/devices.json \
npmjs-ecp5/share/trellis/database

cd npmjs-ecp5
${PYTHON} prepare.py ecp5
npm install
Expand Down
4 changes: 0 additions & 4 deletions package-npmjs-ice40.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ cd $(dirname $0)

PYTHON=${PYTHON:-python}

mkdir -p npmjs-ice40/share/ice40
cp -r nextpnr-build/share/ice40/* \
npmjs-ice40/share/ice40

cd npmjs-ice40
${PYTHON} prepare.py ice40
npm install
Expand Down
8 changes: 0 additions & 8 deletions package-npmjs-machxo2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ cd $(dirname $0)

PYTHON=${PYTHON:-python}

mkdir -p npmjs-machxo2/share/machxo2
cp -r nextpnr-build/share/machxo2/* \
npmjs-machxo2/share/machxo2
mkdir -p npmjs-machxo2/share/trellis/database
cp -r prjtrellis-src/database/MachXO* \
prjtrellis-src/database/devices.json \
npmjs-machxo2/share/trellis/database

cd npmjs-machxo2
${PYTHON} prepare.py machxo2
npm install
Expand Down
4 changes: 0 additions & 4 deletions package-npmjs-nexus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ cd $(dirname $0)

PYTHON=${PYTHON:-python}

mkdir -p npmjs-nexus/share/nexus
cp -r nextpnr-build/share/nexus/* \
npmjs-nexus/share/nexus

cd npmjs-nexus
${PYTHON} prepare.py nexus
npm install
Expand Down
16 changes: 0 additions & 16 deletions package-pypi-ecp5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@ PYTHON=${PYTHON:-python}

cd $(dirname $0)

mkdir -p pypi-ecp5/yowasp_nextpnr_ecp5/bin/
cp prjtrellis-build/ecppll.wasm \
prjtrellis-build/ecpbram.wasm \
prjtrellis-build/ecpmulti.wasm \
prjtrellis-build/ecppack.wasm \
prjtrellis-build/ecpunpack.wasm \
nextpnr-build/nextpnr-ecp5.wasm \
pypi-ecp5/yowasp_nextpnr_ecp5/
mkdir -p pypi-ecp5/yowasp_nextpnr_ecp5/share/ecp5
cp -r nextpnr-build/share/ecp5/* \
pypi-ecp5/yowasp_nextpnr_ecp5/share/ecp5
mkdir -p pypi-ecp5/yowasp_nextpnr_ecp5/share/trellis/database
cp -r prjtrellis-src/database/ECP5 \
prjtrellis-src/database/devices.json \
pypi-ecp5/yowasp_nextpnr_ecp5/share/trellis/database

cd pypi-ecp5
rm -rf build && ${PYTHON} -m build -w
sha256sum dist/*.whl
7 changes: 0 additions & 7 deletions package-pypi-gowin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ PYTHON=${PYTHON:-python}

cd $(dirname $0)

mkdir -p pypi-gowin/yowasp_nextpnr_gowin/bin/
cp nextpnr-build/nextpnr-gowin.wasm \
pypi-gowin/yowasp_nextpnr_gowin/
mkdir -p pypi-gowin/yowasp_nextpnr_gowin/share/gowin
cp -r nextpnr-build/share/gowin/* \
pypi-gowin/yowasp_nextpnr_gowin/share/gowin

cd pypi-gowin
rm -rf build && ${PYTHON} -m build -w
sha256sum dist/*.whl
11 changes: 0 additions & 11 deletions package-pypi-ice40.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,6 @@ PYTHON=${PYTHON:-python}

cd $(dirname $0)

mkdir -p pypi-ice40/yowasp_nextpnr_ice40/bin/
cp icestorm-prefix/bin/icepll.wasm \
icestorm-prefix/bin/icebram.wasm \
icestorm-prefix/bin/icemulti.wasm \
icestorm-prefix/bin/icepack.wasm \
nextpnr-build/nextpnr-ice40.wasm \
pypi-ice40/yowasp_nextpnr_ice40/
mkdir -p pypi-ice40/yowasp_nextpnr_ice40/share/ice40
cp -r nextpnr-build/share/ice40/* \
pypi-ice40/yowasp_nextpnr_ice40/share/ice40

cd pypi-ice40
rm -rf build && ${PYTHON} -m build -w
sha256sum dist/*.whl
16 changes: 0 additions & 16 deletions package-pypi-machxo2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@ PYTHON=${PYTHON:-python}

cd $(dirname $0)

mkdir -p pypi-machxo2/yowasp_nextpnr_machxo2/bin/
cp prjtrellis-build/ecppll.wasm \
prjtrellis-build/ecpbram.wasm \
prjtrellis-build/ecpmulti.wasm \
prjtrellis-build/ecppack.wasm \
prjtrellis-build/ecpunpack.wasm \
nextpnr-build/nextpnr-machxo2.wasm \
pypi-machxo2/yowasp_nextpnr_machxo2/
mkdir -p pypi-machxo2/yowasp_nextpnr_machxo2/share/machxo2
cp -r nextpnr-build/share/machxo2/* \
pypi-machxo2/yowasp_nextpnr_machxo2/share/machxo2
mkdir -p pypi-machxo2/yowasp_nextpnr_machxo2/share/trellis/database
cp -r prjtrellis-src/database/MachXO* \
prjtrellis-src/database/devices.json \
pypi-machxo2/yowasp_nextpnr_machxo2/share/trellis/database

cd pypi-machxo2
rm -rf build && ${PYTHON} -m build -w
sha256sum dist/*.whl
8 changes: 0 additions & 8 deletions package-pypi-nexus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ PYTHON=${PYTHON:-python}

cd $(dirname $0)

mkdir -p pypi-nexus/yowasp_nextpnr_nexus/bin/
cp prjoxide-build/wasm32-wasip1/release/prjoxide.wasm \
nextpnr-build/nextpnr-nexus.wasm \
pypi-nexus/yowasp_nextpnr_nexus/
mkdir -p pypi-nexus/yowasp_nextpnr_nexus/share/nexus
cp -r nextpnr-build/share/nexus/* \
pypi-nexus/yowasp_nextpnr_nexus/share/nexus

cd pypi-nexus
rm -rf build && ${PYTHON} -m build -w
sha256sum dist/*.whl
2 changes: 0 additions & 2 deletions pypi-ecp5/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ __pycache__/
/.eggs
/build
/dist

/yowasp_*/share
1 change: 1 addition & 0 deletions pypi-ecp5/yowasp_nextpnr_ecp5/ecpbram.wasm
1 change: 1 addition & 0 deletions pypi-ecp5/yowasp_nextpnr_ecp5/ecpmulti.wasm
1 change: 1 addition & 0 deletions pypi-ecp5/yowasp_nextpnr_ecp5/ecppack.wasm
1 change: 1 addition & 0 deletions pypi-ecp5/yowasp_nextpnr_ecp5/ecppll.wasm
1 change: 1 addition & 0 deletions pypi-ecp5/yowasp_nextpnr_ecp5/ecpunpack.wasm
1 change: 1 addition & 0 deletions pypi-ecp5/yowasp_nextpnr_ecp5/nextpnr-ecp5.wasm
1 change: 1 addition & 0 deletions pypi-ecp5/yowasp_nextpnr_ecp5/share/ecp5
1 change: 1 addition & 0 deletions pypi-ecp5/yowasp_nextpnr_ecp5/share/trellis/database/ECP5
2 changes: 0 additions & 2 deletions pypi-gowin/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ __pycache__/
/.eggs
/build
/dist

/yowasp_*/share
1 change: 1 addition & 0 deletions pypi-gowin/yowasp_nextpnr_gowin/nextpnr-gowin.wasm
1 change: 1 addition & 0 deletions pypi-gowin/yowasp_nextpnr_gowin/share/gowin
2 changes: 0 additions & 2 deletions pypi-ice40/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ __pycache__/
/.eggs
/build
/dist

/yowasp_*/share
1 change: 1 addition & 0 deletions pypi-ice40/yowasp_nextpnr_ice40/icebram.wasm
1 change: 1 addition & 0 deletions pypi-ice40/yowasp_nextpnr_ice40/icemulti.wasm
1 change: 1 addition & 0 deletions pypi-ice40/yowasp_nextpnr_ice40/icepack.wasm
1 change: 1 addition & 0 deletions pypi-ice40/yowasp_nextpnr_ice40/icepll.wasm
1 change: 1 addition & 0 deletions pypi-ice40/yowasp_nextpnr_ice40/nextpnr-ice40.wasm
1 change: 1 addition & 0 deletions pypi-ice40/yowasp_nextpnr_ice40/share/ice40
2 changes: 0 additions & 2 deletions pypi-machxo2/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ __pycache__/
/.eggs
/build
/dist

/yowasp_*/share
1 change: 1 addition & 0 deletions pypi-machxo2/yowasp_nextpnr_machxo2/ecpbram.wasm
1 change: 1 addition & 0 deletions pypi-machxo2/yowasp_nextpnr_machxo2/ecpmulti.wasm
1 change: 1 addition & 0 deletions pypi-machxo2/yowasp_nextpnr_machxo2/ecppack.wasm
1 change: 1 addition & 0 deletions pypi-machxo2/yowasp_nextpnr_machxo2/ecppll.wasm
1 change: 1 addition & 0 deletions pypi-machxo2/yowasp_nextpnr_machxo2/ecpunpack.wasm
Binary file not shown.
1 change: 1 addition & 0 deletions pypi-machxo2/yowasp_nextpnr_machxo2/share/machxo2
2 changes: 0 additions & 2 deletions pypi-nexus/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ __pycache__/
/.eggs
/build
/dist

/yowasp_*/share
1 change: 1 addition & 0 deletions pypi-nexus/yowasp_nextpnr_nexus/nextpnr-nexus.wasm
1 change: 1 addition & 0 deletions pypi-nexus/yowasp_nextpnr_nexus/prjoxide.wasm
1 change: 1 addition & 0 deletions pypi-nexus/yowasp_nextpnr_nexus/share/nexus

0 comments on commit 2010e5a

Please sign in to comment.