Skip to content

Commit

Permalink
debian-bookworm: add arachne-pnr
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Jun 23, 2023
1 parent bb5406c commit 572f324
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 1 deletion.
44 changes: 44 additions & 0 deletions debian-bookworm/arachne-pnr/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Authors:
# Unai Martinez-Corral
#
# Copyright 2021-2023 Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

ARG REGISTRY='gcr.io/hdl-containers/debian/bookworm'

#---

# WORKAROUND: this is required because 'COPY --from' does not support ARGs
FROM $REGISTRY/pkg/icestorm AS pkg-icestorm

FROM $REGISTRY/build/build AS build

COPY --from=pkg-icestorm /icestorm/usr/local/share/icebox /usr/local/share/icebox

RUN git clone https://github.com/YosysHQ/arachne-pnr.git /tmp/arachne-pnr \
&& cd /tmp/arachne-pnr \
&& make -j $(nproc) \
&& make DESTDIR=/opt/arachne-pnr install

#---

FROM scratch AS pkg
COPY --from=build /opt/arachne-pnr /arachne-pnr

#---

FROM $REGISTRY/build/base
COPY --from=build /opt/arachne-pnr /
29 changes: 29 additions & 0 deletions debian-bookworm/arachne-pnr/HDLC
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# HDLC arachne-pnr

# Authors:
# Unai Martinez-Corral
#
# Copyright 2021-2023 Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

set -e

build() {
git clone https://github.com/YosysHQ/arachne-pnr.git /tmp/arachne-pnr
cd /tmp/arachne-pnr
make -j $(nproc)
make DESTDIR=/opt/arachne-pnr install
}
2 changes: 1 addition & 1 deletion utils/pyHDLC/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:

default:
apicula: *SysDebianBullseyeAmd64
arachne-pnr: *SysDebianBullseyeDefaultArchSet
arachne-pnr: *SysDebianDefaultArchSet
gtkwave: *SysDebianDefaultArchSet
icestorm: *SysDebianDefaultArchSet
irsim: *SysDebianDefaultArchSet
Expand Down

0 comments on commit 572f324

Please sign in to comment.