Skip to content

Commit 5aa6c30

Browse files
committed
Merge branch 'main' of https://github.com/tipoman9/msposd
2 parents 2790503 + 5a931af commit 5aa6c30

File tree

6 files changed

+79
-18
lines changed

6 files changed

+79
-18
lines changed

.github/workflows/build.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- master
6+
tags:
7+
- '*'
8+
pull_request:
9+
branches:
10+
- master
11+
workflow_dispatch:
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Build
21+
run: |
22+
sudo apt-get update
23+
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC sudo apt-get -y install git make wget gcc libevent-dev libcsfml-dev file g++ cpio unzip rsync bc bzip2
24+
./build.sh goke
25+
./build.sh hisi
26+
./build.sh star6b0
27+
./build.sh star6e
28+
./build.sh x86
29+
30+
- name: Upload binary
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: build-results
34+
path: |
35+
msposd_goke
36+
msposd_hisi
37+
msposd_star6b0
38+
msposd_star6e
39+
msposd_x86
40+
41+
- name: Versioned release
42+
if: startsWith(github.ref, 'refs/tags/')
43+
uses: softprops/action-gh-release@v2
44+
with:
45+
files: |
46+
msposd_goke
47+
msposd_hisi
48+
msposd_star6b0
49+
msposd_star6e
50+
msposd_x86
51+
52+
- name: Upload latest
53+
if: github.event_name != 'pull_request' && startsWith(github.ref, 'main')
54+
uses: softprops/action-gh-release@v2
55+
with:
56+
tag_name: latest
57+
files: |
58+
msposd_goke
59+
msposd_hisi
60+
msposd_star6b0
61+
msposd_star6e
62+
msposd_x86

.gitignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ toolchain/
55
majestic.yaml
66
/msposd
77
firmware/
8-
8+
msposd_goke
9+
msposd_hisi
10+
msposd_star6b0
11+
msposd_star6e
12+
msposd_x86

Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ CFLAGS += -Wno-address-of-packed-member -DVERSION_STRING="\"$(VERSION_STRING)\""
55

66
SRCS := compat.c msposd.c bmp/bitmap.c bmp/region.c bmp/lib/schrift.c bmp/text.c osd/net/network.c osd/msp/msp.c osd/msp/msp_displayport.c libpng/lodepng.c osd/util/interface.c osd/util/settings.c osd/util/ini_parser.c osd/msp/vtxmenu.c
77
OUTPUT ?= $(PWD)
8-
BUILD = $(CC) $(SRCS) -I $(SDK)/include -L $(DRV) $(CFLAGS) $(LIB) -levent_core -Os -s $(CFLAGS) -o $(OUTPUT)/msposd
8+
BUILD = $(CC) $(SRCS) -I $(SDK)/include -I$(TOOLCHAIN)/usr/include -L$(DRV) $(CFLAGS) $(LIB) -levent_core -Os -s $(CFLAGS) -o $(OUTPUT)
99

1010
clean:
11-
rm -f *.o x86 goke hisi star6b0 star6e msposd
11+
rm -f *.o msposd_x86 msposd_goke msposd_hisi msposd_star6b0 msposd_star6e
1212

1313
goke:
1414
$(eval SDK = ./sdk/gk7205v300)
1515
$(eval CFLAGS += -D__GOKE__)
16-
$(eval LIB = -ldl -ldnvqe -lgk_api -lhi_mpi -lsecurec -lupvqe -lvoice_engine -ldnvqe)
16+
$(eval LIB = -shared -ldl -ldnvqe -lgk_api -lhi_mpi -lsecurec -lupvqe -lvoice_engine -ldnvqe)
1717
$(BUILD)
1818

1919
hisi:
2020
$(eval SDK = ./sdk/hi3516ev300)
2121
$(eval CFLAGS += -D__GOKE__)
22-
$(eval LIB = -ldnvqe -lmpi -lsecurec -lupvqe -lVoiceEngine)
22+
$(eval LIB = -shared -ldnvqe -lmpi -lsecurec -lupvqe -lVoiceEngine)
2323
$(BUILD)
2424

2525
star6b0:
@@ -39,5 +39,5 @@ x86:
3939
$(eval CFLAGS += -D_x86)
4040
$(eval LIB = -lcsfml-graphics -lcsfml-window -lcsfml-system `pkg-config --libs cairo x11` -lm)
4141

42-
$(eval BUILD = $(CC) $(SRCS) -I $(SDK)/include -L $(DRV) $(CFLAGS) $(LIB) -levent_core -O0 -g -o $(OUTPUT)/msposd)
42+
$(eval BUILD = $(CC) $(SRCS) -I $(SDK)/include -L $(DRV) $(CFLAGS) $(LIB) -levent_core -O0 -g -o $(OUTPUT))
4343
$(BUILD)

build.sh

+5-6
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ elif [[ "$1" == *"hisi" ]]; then
1212
fi
1313

1414
GCC=$PWD/toolchain/$CC/bin/arm-linux-gcc
15-
OUT=$PWD/release/$1
16-
mkdir -p $OUT
15+
OUT=msposd_$1
1716

1817
if [ ! -e toolchain/$CC ]; then
1918
wget -c -q --show-progress $DL/$CC.tgz -P $PWD
@@ -28,16 +27,16 @@ fi
2827

2928
if [ "$1" = "goke" ]; then
3029
DRV=$PWD/firmware/general/package/goke-osdrv-gk7205v200/files/lib
31-
make -B CC=$GCC DRV=$DRV OUTPUT=$OUT $1
30+
make -B CC=$GCC DRV=$DRV TOOLCHAIN=$PWD/toolchain/$CC OUTPUT=$OUT $1
3231
elif [ "$1" = "hisi" ]; then
3332
DRV=$PWD/firmware/general/package/hisilicon-osdrv-hi3516ev200/files/lib
34-
make -B CC=$GCC DRV=$DRV OUTPUT=$OUT $1
33+
make -B CC=$GCC DRV=$DRV TOOLCHAIN=$PWD/toolchain/$CC OUTPUT=$OUT $1
3534
elif [ "$1" = "star6b0" ]; then
3635
DRV=$PWD/firmware/general/package/sigmastar-osdrv-infinity6b0/files/lib
37-
make -B CC=$GCC DRV=$DRV OUTPUT=$OUT $1
36+
make -B CC=$GCC DRV=$DRV TOOLCHAIN=$PWD/toolchain/$CC OUTPUT=$OUT $1
3837
elif [ "$1" = "star6e" ]; then
3938
DRV=$PWD/firmware/general/package/sigmastar-osdrv-infinity6e/files/lib
40-
make -B CC=$GCC DRV=$DRV OUTPUT=$OUT $1
39+
make -B CC=$GCC DRV=$DRV TOOLCHAIN=$PWD/toolchain/$CC OUTPUT=$OUT $1
4140
elif [ "$1" = "x86" ]; then
4241
DRV=$PWD
4342
make DRV=$DRV OUTPUT=$OUT $1

osd/util/interface.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#include <stdio.h>
22
#include <stdlib.h>
33
#include <string.h>
4-
#if __SIGMASTAR__
5-
#include <bits/stdint-uintn.h>
6-
#endif
4+
#include <stdint.h>
75
#include "interface.h"
86

97
#define BUFFER_SIZE 1024

osd/util/interface.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#pragma once
2-
#if __SIGMASTAR__
3-
#include <bits/stdint-uintn.h>
4-
#endif
2+
#include <stdint.h>
53
#include "../msp/msp.h"
64

75
#define MAX_ENTRIES 100 // Maximum number of frequency-channel pairs to store

0 commit comments

Comments
 (0)