forked from andoma/movian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.rpi
executable file
·124 lines (93 loc) · 3.08 KB
/
configure.rpi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#!/bin/bash
OS="rpi"
DEFAULT_UI="glw"
CONFIGURE_POSTFIX="rpi"
source support/configure.inc
show_help(){
common_help
exit 1
}
for opt do
optval="${opt#*=}"
case "$opt" in
--help) show_help
;;
--toolchain=*) TOOLCHAIN="$optval"
;;
--vcroot=*) VCROOT="$optval"
;;
--sysroot=*) SYSROOT="$optval"
;;
*)
common_opt $opt $optval
esac
done
[ -z "$TOOLCHAIN" ] && die_cause "--toolchain not specified"
CC=${TOOLCHAIN}gcc
CXX=${TOOLCHAIN}g++
setup_env "$@"
enable sqlite_internal
enable spidermonkey
enable glw_backend_opengl_es
enable glw
enable polarssl
enable librtmp
enable httpserver
enable dvd
enable libfreetype
enable stdin
enable realpath
enable bspatch
LIBAV_CFLAGS="-mfpu=vfp -mcpu=arm1176jzf-s -I${EXT_INSTALL_DIR}/include"
LIBAV_LDFLAGS="-L${EXT_INSTALL_DIR}/lib"
LIBAV_ARCH_FLAGS="--cross-prefix=${TOOLCHAIN} --enable-cross-compile --arch=arm --cpu=arm1176jzf-s --target-os=linux --disable-armv5te --disable-neon --enable-armv6t2 --enable-armv6 --enable-vfp"
if [ -n "$SYSROOT" ]; then
echo >>${CONFIG_MAK} "LDFLAGS_cfg += --sysroot=$SYSROOT"
echo >>${CONFIG_MAK} "CFLAGS_cfg += --sysroot=$SYSROOT"
LIBAV_CFLAGS="--sysroot=$SYSROOT ${LIBAV_CFLAGS}"
LIBAV_LDFLAGS="--sysroot=$SYSROOT ${LIBAV_LDFLAGS}"
export PKG_CONFIG_SYSROOT_DIR="$SYSROOT"
export PKG_CONFIG_LIBDIR="$SYSROOT/usr/lib/pkgconfig"
echo >>${CONFIG_MAK} "LDFLAGS_cfg += " `pkg-config --libs zlib`
echo >>${CONFIG_MAK} "CFLAGS_cfg += " `pkg-config --cflags zlib`
echo "Using zlib: `pkg-config --modversion zlib`"
echo >>${CONFIG_MAK} "LDFLAGS_cfg += " `pkg-config --libs freetype2`
echo >>${CONFIG_MAK} "CFLAGS_cfg += " `pkg-config --cflags freetype2`
echo "Using freetype: `pkg-config --modversion freetype2`"
echo >>${CONFIG_MAK} "LDFLAGS_cfg += " `pkg-config --libs gio-2.0`
echo >>${CONFIG_MAK} "CFLAGS_cfg += " `pkg-config --cflags gio-2.0`
echo "Using gio: `pkg-config --modversion gio-2.0`"
echo >>${CONFIG_MAK} "LDFLAGS_cfg += -lbz2"
enable connman
if [ -z "$VCROOT" ]; then
VCROOT="${SYSROOT}/usr"
fi
else
zlib_setup
bzip2_setup
freetype_setup --host=arm-linux-gnueabihf
fi
libav_setup
rtmpdump_setup
xmp_setup
libspotify_setup "12.1.103-Linux-armv6-bcm2708hardfp"
cat >> ${CONFIG_MAK} <<EOF
CFLAGS_cfg += -fgnu89-inline
CFLAGS_cfg += -mfpu=vfp -mcpu=arm1176jzf-s -funwind-tables
CFLAGS_cfg += -DOMX_SKIP64BIT
CFLAGS_cfg += -DRPISTOS -DSTOS
CFLAGS_cfg += -I${VCROOT}/include
CFLAGS_cfg += -I${VCROOT}/include/IL
CFLAGS_cfg += -I${VCROOT}/include/interface/vcos/pthreads/
CFLAGS_cfg += -I${VCROOT}/include/interface/vmcs_host/linux
LDFLAGS_cfg += -L${VCROOT}/lib
LDFLAGS_cfg += -lopenmaxil -lGLESv2 -lEGL -lvcos -lbcm_host -lvchiq_arm
LDFLAGS_cfg += -lpthread -lrt -ldl
EOF
echo >>${CONFIG_H} "#define SHOWTIME_LIBDIR \"/stos/mnt/showtime/lib\""
if enabled release; then
# the rpi firmware have assignment to variables that are only
# referenced via asserts so we need this to work around that
echo >>${CONFIG_MAK} "CFLAGS_cfg += -Wno-error=unused-but-set-variable"
fi
finalize