Skip to content

Commit

Permalink
Add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorxda committed Apr 5, 2024
1 parent 2f19f32 commit eb7e2bd
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 12 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build
on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Build source
run: |
bash build.sh osd-goke
bash build.sh osd-hisi
bash build.sh osd-star
- name: Upload files
uses: softprops/action-gh-release@v2
with:
tag_name: latest
files: |
osd/osd-goke
osd/osd-hisi
osd/osd-star
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/firmware/
/osd/osd
/toolchain/
/firmware
/toolchain
/osd/osd*
8 changes: 4 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
DL="https://github.com/openipc/firmware/releases/download/latest"

if [[ "$1" = *-sst6 ]]; then
if [ "$1" = "osd-star" ]; then
CC=cortex_a7_thumb2_hf-gcc13-glibc-4_9
else
CC=cortex_a7_thumb2-gcc13-musl-4_9
Expand All @@ -10,7 +10,7 @@ fi
GCC=$PWD/toolchain/$CC/bin/arm-linux-gcc

if [ ! -e toolchain/$CC ]; then
wget -c -nv --show-progress $DL/$CC.tgz -P $PWD
wget -c -q --show-progress $DL/$CC.tgz -P $PWD
mkdir -p toolchain/$CC
tar -xf $CC.tgz -C toolchain/$CC --strip-components=1 || exit 1
rm -f $CC.tgz
Expand All @@ -26,10 +26,10 @@ if [ "$1" = "osd-goke" ]; then
elif [ "$1" = "osd-hisi" ]; then
DRV=$PWD/firmware/general/package/hisilicon-osdrv-hi3516ev200/files/lib
make -C osd -B CC=$GCC DRV=$DRV $1
elif [ "$1" = "osd-sst6" ]; then
elif [ "$1" = "osd-star" ]; then
DRV=$PWD/firmware/general/package/sigmastar-osdrv-infinity6e/files/lib
make -C osd -B CC=$GCC DRV=$DRV $1
else
echo "Usage: $0 [osd-goke|osd-hisi|osd-sst6]"
echo "Usage: $0 [osd-goke|osd-hisi|osd-star]"
exit 1
fi
10 changes: 5 additions & 5 deletions osd/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
SRCS := lib/schrift.c compat.c bitmap.c net.c region.c text.c main.c
BUILD = $(CC) $(SRCS) -I $(SDK)/include -L $(DRV) $(LIB) -Os -s -o osd
BUILD = $(CC) $(SRCS) -I $(SDK)/include -L $(DRV) $(LIB) -Os -s

osd-goke:
$(eval SDK = ../sdk/gk7205v300)
$(eval LIB = -lhi_mpi -lgk_api -ldnvqe -lupvqe -lvoice_engine -lsecurec)
$(BUILD)
$(BUILD) -o $@

osd-hisi:
$(eval SDK = ../sdk/hi3516ev300)
$(eval LIB = -lmpi -ldnvqe -lupvqe -lVoiceEngine -lsecurec)
$(BUILD)
$(BUILD) -o $@

osd-sst6:
osd-star:
$(eval SDK = ../sdk/infinity6)
$(eval LIB = -D__SIGMASTAR__ -lcam_os_wrapper -lm -lmi_rgn -lmi_sys)
$(BUILD)
$(BUILD) -o $@

0 comments on commit eb7e2bd

Please sign in to comment.