Skip to content

Commit

Permalink
Use native build instead of x86/jetson target
Browse files Browse the repository at this point in the history
Discussion: [ Ignore msposd_jetson for gs on jetson orin #29 ](#29)
  • Loading branch information
lida2003 committed Nov 25, 2024
1 parent 517c55a commit 5f539b2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 21 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ msposd_goke
msposd_hisi
msposd_star6b0
msposd_star6e
msposd_x86
serial_monitor.c
serial_monitor.c
11 changes: 2 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,10 @@ star6e: version.h
$(eval LIB = -lcam_os_wrapper -lm -lmi_rgn -lmi_sys -lmi_venc)
$(BUILD)

jetson: version.h
$(eval SDK = ./sdk/gk7205v300)
$(eval CFLAGS += -D_x86 -D_jetson)
$(eval LIB = -lcsfml-graphics -lcsfml-window -lcsfml-system `pkg-config --libs cairo x11` -lm)
$(eval BUILD = $(CC) $(SRCS) -I $(SDK)/include -L $(DRV) $(CFLAGS) $(LIB) -levent_core -O0 -g -o $(OUTPUT))
$(BUILD)

x86: version.h
native: version.h
$(eval SDK = ./sdk/gk7205v300)
$(eval CFLAGS += -D_x86)
$(eval LIB = -lcsfml-graphics -lcsfml-window -lcsfml-system `pkg-config --libs cairo x11` -lm)

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

17 changes: 8 additions & 9 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/bin/bash
DL="https://github.com/OpenIPC/firmware/releases/download/toolchain/toolchain"

if [ "$#" -ne 1 ]; then
echo "Usage: $0 [goke|hisi|star6b0|star6e|native]"
exit 1
fi

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

GCC=$PWD/toolchain/$CC/bin/arm-linux-gcc
OUT=msposd_$1
OUT=msposd

if [[ "$1" != *"jetson"* && "$1" != *"x86"* ]]; then
if [[ "$1" != *"native"* ]]; then
if [ ! -e toolchain/$CC ]; then
wget -c -q --show-progress $DL.$CC.tgz -P $PWD
mkdir -p toolchain/$CC
tar -xf toolchain.$CC.tgz -C toolchain/$CC --strip-components=1 || exit 1
rm -f $CC.tgz
fi
OUT=msposd_$1
fi


Expand All @@ -41,13 +46,7 @@ elif [ "$1" = "star6b0" ]; then
elif [ "$1" = "star6e" ]; then
DRV=$PWD/firmware/general/package/sigmastar-osdrv-infinity6e/files/lib
make -B CC=$GCC DRV=$DRV TOOLCHAIN=$PWD/toolchain/$CC OUTPUT=$OUT $1
elif [ "$1" = "jetson" ]; then
DRV=$PWD
make DRV=$DRV OUTPUT=$OUT $1
elif [ "$1" = "x86" ]; then
else
DRV=$PWD
make DRV=$DRV OUTPUT=$OUT $1
else
echo "Usage: $0 [goke|hisi|star6b0|star6e|jetson|x86]"
exit 1
fi
2 changes: 1 addition & 1 deletion osd/util/Render_x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ int Init_x86(uint16_t *width, uint16_t *height) {
#endif


#ifdef _jetson
#ifdef _x86
if (getenv("DISPLAY") == NULL) {
/*
* Use default display screen, especially launch from console
Expand Down

0 comments on commit 5f539b2

Please sign in to comment.