diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..63cc20a --- /dev/null +++ b/.github/workflows/build.yml @@ -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 diff --git a/.gitignore b/.gitignore index 89e07f1..bcb3cb2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -/firmware/ -/osd/osd -/toolchain/ +/firmware +/toolchain +/osd/osd* diff --git a/build.sh b/build.sh index c88ea4b..605695f 100755 --- a/build.sh +++ b/build.sh @@ -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 @@ -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 @@ -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 diff --git a/osd/Makefile b/osd/Makefile index ae258fe..7c970f5 100644 --- a/osd/Makefile +++ b/osd/Makefile @@ -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 $@