Skip to content

Commit 31e8542

Browse files
committed
Use native build instead of x86/jetson target
Discussion: [ Ignore msposd_jetson for gs on jetson orin #29 ](#29)
1 parent 517c55a commit 31e8542

File tree

4 files changed

+13
-22
lines changed

4 files changed

+13
-22
lines changed

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ msposd_goke
1010
msposd_hisi
1111
msposd_star6b0
1212
msposd_star6e
13-
msposd_x86
14-
serial_monitor.c
13+
serial_monitor.c

Makefile

+3-10
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ version.h:
1919
all: version.h
2020

2121
clean:
22-
rm -f *.o msposd_x86 msposd_goke msposd_hisi msposd_star6b0 msposd_star6e
22+
rm -f *.o msposd msposd_goke msposd_hisi msposd_star6b0 msposd_star6e
2323

2424
goke: version.h
2525
$(eval SDK = ./sdk/gk7205v300)
@@ -45,17 +45,10 @@ star6e: version.h
4545
$(eval LIB = -lcam_os_wrapper -lm -lmi_rgn -lmi_sys -lmi_venc)
4646
$(BUILD)
4747

48-
jetson: version.h
49-
$(eval SDK = ./sdk/gk7205v300)
50-
$(eval CFLAGS += -D_x86 -D_jetson)
51-
$(eval LIB = -lcsfml-graphics -lcsfml-window -lcsfml-system `pkg-config --libs cairo x11` -lm)
52-
$(eval BUILD = $(CC) $(SRCS) -I $(SDK)/include -L $(DRV) $(CFLAGS) $(LIB) -levent_core -O0 -g -o $(OUTPUT))
53-
$(BUILD)
54-
55-
x86: version.h
48+
native: version.h
5649
$(eval SDK = ./sdk/gk7205v300)
5750
$(eval CFLAGS += -D_x86)
5851
$(eval LIB = -lcsfml-graphics -lcsfml-window -lcsfml-system `pkg-config --libs cairo x11` -lm)
59-
6052
$(eval BUILD = $(CC) $(SRCS) -I $(SDK)/include -L $(DRV) $(CFLAGS) $(LIB) -levent_core -O0 -g -o $(OUTPUT))
6153
$(BUILD)
54+

build.sh

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/bin/bash
22
DL="https://github.com/OpenIPC/firmware/releases/download/toolchain/toolchain"
33

4+
if [ "$#" -ne 1 ]; then
5+
echo "Usage: $0 [goke|hisi|star6b0|star6e|native]"
6+
exit 1
7+
fi
48

59
if [[ "$1" == *"star6b0" ]]; then
610
CC=sigmastar-infinity6b0
@@ -13,15 +17,16 @@ elif [[ "$1" == *"hisi" ]]; then
1317
fi
1418

1519
GCC=$PWD/toolchain/$CC/bin/arm-linux-gcc
16-
OUT=msposd_$1
20+
OUT=msposd
1721

18-
if [[ "$1" != *"jetson"* && "$1" != *"x86"* ]]; then
22+
if [[ "$1" != *"native"* ]]; then
1923
if [ ! -e toolchain/$CC ]; then
2024
wget -c -q --show-progress $DL.$CC.tgz -P $PWD
2125
mkdir -p toolchain/$CC
2226
tar -xf toolchain.$CC.tgz -C toolchain/$CC --strip-components=1 || exit 1
2327
rm -f $CC.tgz
2428
fi
29+
OUT=msposd_$1
2530
fi
2631

2732

@@ -41,13 +46,7 @@ elif [ "$1" = "star6b0" ]; then
4146
elif [ "$1" = "star6e" ]; then
4247
DRV=$PWD/firmware/general/package/sigmastar-osdrv-infinity6e/files/lib
4348
make -B CC=$GCC DRV=$DRV TOOLCHAIN=$PWD/toolchain/$CC OUTPUT=$OUT $1
44-
elif [ "$1" = "jetson" ]; then
45-
DRV=$PWD
46-
make DRV=$DRV OUTPUT=$OUT $1
47-
elif [ "$1" = "x86" ]; then
49+
else
4850
DRV=$PWD
4951
make DRV=$DRV OUTPUT=$OUT $1
50-
else
51-
echo "Usage: $0 [goke|hisi|star6b0|star6e|jetson|x86]"
52-
exit 1
5352
fi

osd/util/Render_x86.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ int Init_x86(uint16_t *width, uint16_t *height) {
7575
#endif
7676

7777

78-
#ifdef _jetson
78+
#ifdef _x86
7979
if (getenv("DISPLAY") == NULL) {
8080
/*
8181
* Use default display screen, especially launch from console

0 commit comments

Comments
 (0)