Skip to content

Commit

Permalink
feat: copy process from hm-pktfwd
Browse files Browse the repository at this point in the history
- Deleted unnecessary files and copied in modified versions where needed.
- Did not copy test_loragw_gps.c or test_loragw_gps_i2c.c because loragw_gps.c is not being used.
- Modified reset_lgw.sh according to what was in hm-pktfwd.

hm-pktfwd: https://github.com/NebraLtd/hm-pktfwd/blob/76897fd64383f849b21dabbb0f26558535a95f40/buildfiles/compileSX1302.sh#L5
loragw_gps discussion: NebraLtd/hm-pktfwd#23 (comment)
  • Loading branch information
marvinmarnold committed Oct 20, 2021
1 parent 4b42025 commit acc0770
Show file tree
Hide file tree
Showing 12 changed files with 252 additions and 530 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/compile-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Compile Docker Images

on: [push]

jobs:
main:
runs-on: ubuntu-20.04
permissions:
packages: write
contents: read
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

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

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: |
nebraltd/sx1302_hal
ghcr.io/${{ github.repository }}
flavor: |
latest=true
tags: |
type=sha,prefix=
type=sha,format=long,prefix=
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM balenalib/raspberry-pi-debian:buster-build as sx1302-hal-builder

ENV ROOT_DIR=/opt

WORKDIR "$ROOT_DIR"

# Copy upstream source into expected location
COPY . "$ROOT_DIR"

RUN . "$ROOT_DIR/compile.sh"
4 changes: 4 additions & 0 deletions compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh

make clean
make -j 4
4 changes: 1 addition & 3 deletions libloragw/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,9 @@ libloragw.a: $(OBJDIR)/loragw_spi.o \
$(OBJDIR)/loragw_debug.o \
$(OBJDIR)/loragw_hal.o \
$(OBJDIR)/loragw_lbt.o \
$(OBJDIR)/loragw_stts751.o \
$(OBJDIR)/loragw_gps.o \
$(OBJDIR)/loragw_sx1302_timestamp.o \
$(OBJDIR)/loragw_sx1302_rx.o \
$(OBJDIR)/loragw_ad5338r.o
$(OBJDIR)/loragw_sx1302_rx.o
$(AR) rcs $@ $^

### test programs
Expand Down
43 changes: 0 additions & 43 deletions libloragw/inc/loragw_ad5338r.h

This file was deleted.

65 changes: 0 additions & 65 deletions libloragw/inc/loragw_stts751.h

This file was deleted.

93 changes: 0 additions & 93 deletions libloragw/src/loragw_ad5338r.c

This file was deleted.

Loading

0 comments on commit acc0770

Please sign in to comment.