Skip to content

Commit

Permalink
add cross-maia-sdr docker image
Browse files Browse the repository at this point in the history
This image is needed to build a new version of maia-httpd that
depends on pm-remez.

Signed-off-by: Daniel Estévez <[email protected]>
  • Loading branch information
daniestevez committed Apr 10, 2024
1 parent f2357dc commit 32d5cce
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/cross-maia-sdr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build and publish cross-maia-sdr Docker image

on:
push:
branches: ['test-cross-maia-sdr']
tags:
- cross-maia-sdr-**

env:
REGISTRY: ghcr.io
IMAGE_NAME: cross-armv7-unknown-linux-gnueabihf-maia-sdr

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
tags: |
type=match,pattern=cross-maia-sdr-(\d+),group=1
type=ref,event=branch
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ${{ env.IMAGE_NAME }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ docker exec -u 0 -it maia-sdr-devel /bin/bash
From this session, it is possible to run the Vivado installer and choose
`/opt/Xilinx` as the installation path.

## cross-armv7-unknown-linux-gnueabihf-maia-sdr

[ghcr.io/maia-sdr/cross-armv7-unknown-linux-gnueabihf-maia-sdr](https://github.com/orgs/maia-sdr/packages/container/package/cross-armv7-unknown-linux-gnueabihf-maia-sdr)
can be used to build
[maia-httpd](https://github.com/maia-sdr/maia-sdr/tree/main/maia-httpd) with
[cross](https://github.com/cross-rs/cross). In addition to the usual cross
stable Docker image, it contains some packages required to build
[pm-remez](https://github.com/maia-sdr/pm-remez), including the Fortran
cross-compiler.

## cross-armv7-buildroot-linux-uclibc-gnueabihf

[ghcr.io/maia-sdr/cross-armv7-buildroot-linux-uclibc-gnueabihf](https://github.com/orgs/maia-sdr/packages/container/package/cross-armv7-buildroot-linux-uclibc-gnueabihf) is used to build
Expand Down
14 changes: 14 additions & 0 deletions cross-armv7-unknown-linux-gnueabihf-maia-sdr/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM ghcr.io/cross-rs/armv7-unknown-linux-gnueabihf:0.2.5
ARG DEBIAN_FRONTEND=noninteractive

# Set up env variables to cross-compile openblas and install packages required
# to build pm-remez

ENV OPENBLAS_TARGET=armv7
ENV OPENBLAS_HOSTCC=gcc
ENV OPENBLAS_CC=arm-linux-gnueabihf-gcc
ENV OPENBLAS_FC=arm-linux-gnueabihf-gfortran

RUN apt-get update && \
apt-get -y install pkg-config libssl-dev gfortran-arm-linux-gnueabihf && \
rm -rf /var/lib/apt/lists/*

0 comments on commit 32d5cce

Please sign in to comment.