Still working on Pi build.
This commit is contained in:
parent
ff45c64b7f
commit
f365a11b2f
7 changed files with 49 additions and 31 deletions
|
@ -26,6 +26,13 @@ sudo umount /tmp/mnt-${DIST}
|
|||
proot -S ${DIST} -q qemu-arm apt-get -y update
|
||||
proot -S ${DIST} -q qemu-arm apt-get -y upgrade
|
||||
proot -S ${DIST} -q qemu-arm apt-get -y install libxv-dev libx11-dev libxext-dev libxi-dev
|
||||
proot -S ${DIST} -q qemu-arm apt-get -y install libomxil-bellagio-bin libomxil-bellagio-dev libraspberrypi-dev
|
||||
proot -S ${DIST} -q qemu-arm apt-get -y install libopenal-dev libasound2-dev
|
||||
|
||||
touch ${DIST}/usr/include/immintrin.h
|
||||
|
||||
git clone https://github.com/raspberrypi/tools.git
|
||||
|
||||
wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py
|
||||
chmod +x sysroot-relativelinks.py
|
||||
./sysroot-relativelinks.py buster/
|
||||
|
|
|
@ -87,8 +87,8 @@ SKIP
|
|||
|
||||
# 32 Bit Raspbian
|
||||
SYSROOT="/opt/cross/pi/buster"
|
||||
CROSS="arm-linux-gnueabihf"
|
||||
CROSS="/opt/cross/pi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf"
|
||||
EXTRA_CFLAGS="--sysroot ${SYSROOT}"
|
||||
EXTRA_OFILES=""
|
||||
EXTRA_LD_FLAGS="--sysroot ${SYSROOT} -l:everything.a -Wl,-rpath,/opt/vc/lib -L${SYSROOT}/opt/vc/lib -lbcm_host -lpthread -lXv -lX11 -lXext -lXi -lm -ldl -lrt"
|
||||
EXTRA_LD_FLAGS="--sysroot ${SYSROOT} -l:everything.a -Wl,-rpath-link,${SYSROOT}/opt/vc/lib -L${SYSROOT}/opt/vc/lib -lbcm_host -lasound -lpthread -lXv -lX11 -lXext -lXi -lm -ldl -lrt -lsndio -lXcursor -lXinerama -lXrandr -lXss -lXxf86vm -lmmal_core -lmmal_util -lmmal_vc_client -lvdpau"
|
||||
doBuild Singe-Pi-armv6 pi 32
|
||||
|
|
10
singe/main.c
10
singe/main.c
|
@ -140,7 +140,7 @@ int main(int argc, char *argv[]) {
|
|||
{ "volume_vldp", optional_argument, NULL, 'l' },
|
||||
{ "volume_nonlvdp", optional_argument, NULL, 'e' },
|
||||
{ "scalefactor", optional_argument, NULL, 'o' },
|
||||
{ "sinden", optional_argument, NULL, 'g' },
|
||||
{ "sindengun", optional_argument, NULL, 'g' },
|
||||
{ "aspect", optional_argument, NULL, 'a' },
|
||||
{ "xresolution", optional_argument, NULL, 'x' },
|
||||
{ "yresolution", optional_argument, NULL, 'y' },
|
||||
|
@ -186,7 +186,7 @@ int main(int argc, char *argv[]) {
|
|||
while (true) {
|
||||
optionIndex = 0;
|
||||
opterr = 0;
|
||||
x = getopt_long(argc, argv, "cmnsfwha:d:v:l:e:z:x:y:o:g:", options, &optionIndex);
|
||||
x = getopt_long(argc, argv, "cmnsfwhza:d:v:l:e:x:y:o:g:", options, &optionIndex);
|
||||
|
||||
// Out of options?
|
||||
if (x == -1) break;
|
||||
|
@ -413,7 +413,7 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
// Sinden light gun?
|
||||
if (sindenString) {
|
||||
if (_confScaleFactor != 100) showUsage(argv[0], "Cannot use --sinden and --scalefactor together.");
|
||||
if (_confScaleFactor != 100) showUsage(argv[0], "Cannot use --sindengun and --scalefactor together.");
|
||||
// Was it wrapped in quotes?
|
||||
if ((sindenString[0] == '"') || (sindenString[0] == '\'')) {
|
||||
sindenString[0] = ' ';
|
||||
|
@ -428,10 +428,10 @@ int main(int argc, char *argv[]) {
|
|||
while (temp != NULL) {
|
||||
_confSindenArgv[_confSindenArgc++] = atoi(temp);
|
||||
temp = strtok(NULL, " ");
|
||||
if ((temp != NULL) && (_confSindenArgc > SINDEN_OPTION_COUNT)) showUsage(argv[0], "Too many arguments to --sinden.");
|
||||
if ((temp != NULL) && (_confSindenArgc > SINDEN_OPTION_COUNT)) showUsage(argv[0], "Too many arguments to --sindengun.");
|
||||
}
|
||||
// Did we get a sane number of arguments?
|
||||
if ((_confSindenArgc != SINDEN_WHITE) && (_confSindenArgc != SINDEN_WHITE_BLACK) && (_confSindenArgc != SINDEN_CUSTOM_WHITE) && (_confSindenArgc != SINDEN_CUSTOM_WHITE_BLACK) && (_confSindenArgc != SINDEN_CUSTOM_WHITE_CUSTOM_BLACK)) showUsage(argv[0], "Bad argument count to --sinden.");
|
||||
if ((_confSindenArgc != SINDEN_WHITE) && (_confSindenArgc != SINDEN_WHITE_BLACK) && (_confSindenArgc != SINDEN_CUSTOM_WHITE) && (_confSindenArgc != SINDEN_CUSTOM_WHITE_BLACK) && (_confSindenArgc != SINDEN_CUSTOM_WHITE_CUSTOM_BLACK)) showUsage(argv[0], "Bad argument count to --sindengun.");
|
||||
free(sindenString);
|
||||
}
|
||||
|
||||
|
|
|
@ -40,17 +40,18 @@ G_L="---------------------------------------------------------------------------
|
|||
# Work out compiler settings
|
||||
case "${G_PLATFORM}" in
|
||||
|
||||
pi-broke)
|
||||
G_CROSS_HOME="/opt/cross/pi/32bit/bin"
|
||||
pi)
|
||||
G_CROSS_HOME="/opt/cross/pi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin"
|
||||
G_OS="linux"
|
||||
G_CCOMPILER="${G_CROSS_HOME}/arm-unknown-linux-gnueabi-gcc"
|
||||
G_CPPCOMPILER="${G_CROSS_HOME}/arm-unknown-linux-gnueabi-g++"
|
||||
G_CROSS="arm-unknown-linux-gnueabi"
|
||||
G_CCOMPILER="${G_CROSS_HOME}/arm-linux-gnueabihf-gcc"
|
||||
G_CPPCOMPILER="${G_CROSS_HOME}/arm-linux-gnueabihf-g++"
|
||||
G_CROSS="arm-linux-gnueabihf"
|
||||
G_LUAPLAT="posix"
|
||||
G_ARCH="armv6"
|
||||
G_SYSROOT="/opt/cross/pi/buster"
|
||||
;;
|
||||
|
||||
pi)
|
||||
pi32)
|
||||
G_OS="linux"
|
||||
G_CCOMPILER="arm-linux-gnueabihf-gcc"
|
||||
G_CPPCOMPILER="arm-linux-gnueabihf-g++"
|
||||
|
@ -133,8 +134,8 @@ function autoBuild() {
|
|||
export CXXFLAGS="${MORE_CFLAGS} -isystem${G_INSTALLED}/include"
|
||||
export CPPFLAGS="${MORE_CFLAGS} -isystem${G_INSTALLED}/include"
|
||||
export LDFLAGS="${MORE_LIBS} -L${G_INSTALLED}/lib"
|
||||
export LD_LIBRARY_PATH=${G_INSTALLED}/lib
|
||||
export PKG_CONFIG_LIBDIR=${G_INSTALLED}/lib/pkgconfig
|
||||
export LD_LIBRARY_PATH="${G_INSTALLED}/lib"
|
||||
export PKG_CONFIG_LIBDIR="${G_INSTALLED}/lib/pkgconfig"
|
||||
|
||||
if [[ "${LOCATION}" == "ffmpeg" ]]; then
|
||||
"${G_THIRDPARTY}/${LOCATION}/configure" \
|
||||
|
@ -371,7 +372,13 @@ DEPS_CFLAGS="-I${G_INSTALLED}/include -I${G_INSTALLED}/include/opus" \
|
|||
autoBuild libopusfile.a SDL2_mixer/external/opusfile-0.11 --disable-http
|
||||
|
||||
# === FFMPEG ===
|
||||
autoBuild libavcodec.a ffmpeg "--disable-debug --disable-muxers --disable-encoders --disable-filters --disable-hwaccels --disable-network --disable-devices --enable-gpl"
|
||||
if [[ "${G_PLATFORM}" == "pi" ]]; then
|
||||
MORE_CFLAGS="-I${G_SYSROOT}/opt/vc/include/IL -I${G_SYSROOT}/opt/vc/include -I${G_SYSROOT}/usr/include -I${G_SYSROOT}/opt/vc/include/interface/vcos/pthreads" # -I${G_SYSROOT}/opt/vc/include/interface/vmcs_host/linux"
|
||||
MORE_LIBS="-Wl,-rpath-link,${G_SYSROOT}/opt/vc/lib -L${G_SYSROOT}/opt/vc/lib -lpthread -lm -ldl -lrt"
|
||||
autoBuild libavcodec.a ffmpeg "--disable-debug --disable-muxers --enable-mmal --enable-omx-rpi --enable-omx --disable-encoders --disable-filters --disable-network --disable-devices --enable-gpl"
|
||||
else
|
||||
autoBuild libavcodec.a ffmpeg "--disable-debug --disable-muxers --disable-hwaccels --disable-encoders --disable-filters --disable-network --disable-devices --enable-gpl"
|
||||
fi
|
||||
if [[ ! -e extensions.h ]]; then
|
||||
createExtensionHeader "${G_DEST}/installed/bin/ffmpeg" > extensions.h
|
||||
fi
|
||||
|
@ -381,6 +388,10 @@ if [[ "${G_PLATFORM}" == "mingw" ]]; then
|
|||
FFMPEG_LIBS="-L${G_INSTALLED}/lib -l:libavformat.a -l:libavcodec.a -l:libswscale.a -l:libavutil.a -l:libswresample.a -l:libz.a -l:liblzma.a -l:libbz2.a -lm -lbcrypt" \
|
||||
autoBuild libffms2.a ffms2 "" "src/core/libffms2.la install-libLTLIBRARIES install-includeHEADERS"
|
||||
else
|
||||
if [[ "${G_PLATFORM}" == "pi" ]]; then
|
||||
MORE_CFLAGS="-I${G_SYSROOT}/opt/vc/include/IL -I${G_SYSROOT}/opt/vc/include -I${G_SYSROOT}/usr/include -I${G_SYSROOT}/opt/vc/include/interface/vcos/pthreads" # -I${G_SYSROOT}/opt/vc/include/interface/vmcs_host/linux"
|
||||
MORE_LIBS="-Wl,-rpath-link,${G_SYSROOT}/opt/vc/lib -L${G_SYSROOT}/usr/lib/arm-linux-gnueabihf/vdpau -L${G_SYSROOT}/opt/vc/lib -lpthread -lm -ldl -lrt -llzma -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host -lz -lvdpau"
|
||||
fi
|
||||
FFMPEG_LIBS="-L${G_INSTALLED}/lib -l:libavformat.a -l:libavcodec.a -l:libswscale.a -l:libavutil.a -l:libswresample.a -l:libz.a -l:liblzma.a -l:libbz2.a -lpthread -lXv -lX11 -lXext -lm" \
|
||||
autoBuild libffms2.a ffms2
|
||||
fi
|
||||
|
@ -394,7 +405,7 @@ autoBuild libharfbuzz.a harfbuzz "--with-glib=no --with-icu=builtin --with-cairo
|
|||
# === SDL2 ===
|
||||
if [[ "${G_PLATFORM}" == "pi" ]]; then
|
||||
MORE_CFLAGS="-I${G_SYSROOT}/opt/vc/include -I${G_SYSROOT}/usr/include -I${G_SYSROOT}/opt/vc/include/interface/vcos/pthreads -I${G_SYSROOT}/opt/vc/include/interface/vmcs_host/linux"
|
||||
MORE_LIBS="-Wl,-rpath,/opt/vc/lib -L${G_SYSROOT}/opt/vc/lib -lbcm_host -lpthread -lm -ldl -lrt"
|
||||
MORE_LIBS="-Wl,-rpath-link,${G_SYSROOT}/opt/vc/lib -L${G_SYSROOT}/opt/vc/lib -lbcm_host -lpthread -lm -ldl -lrt"
|
||||
autoBuild libSDL2.a SDL2 "--disable-pulseaudio --disable-esd --disable-video-wayland --enable-video-rpi --enable-alsa"
|
||||
else
|
||||
autoBuild libSDL2.a SDL2
|
||||
|
@ -403,14 +414,14 @@ fi
|
|||
# === SDL2_image === *** Not finding libtiff ***
|
||||
if [[ "${G_PLATFORM}" == "pi" ]]; then
|
||||
MORE_CFLAGS="-I${G_SYSROOT}/opt/vc/include -I${G_SYSROOT}/usr/include -I${G_SYSROOT}/opt/vc/include/interface/vcos/pthreads -I${G_SYSROOT}/opt/vc/include/interface/vmcs_host/linux"
|
||||
MORE_LIBS="-Wl,-rpath,/opt/vc/lib -L${G_SYSROOT}/opt/vc/lib -lbcm_host"
|
||||
MORE_LIBS="-Wl,-rpath-link,${G_SYSROOT}/opt/vc/lib -L${G_SYSROOT}/opt/vc/lib -lbcm_host"
|
||||
fi
|
||||
autoBuild libSDL2_image.a SDL2_image "--disable-jpg-shared --disable-png-shared --disable-tif-shared --disable-webp-shared"
|
||||
|
||||
# === SDL2_mixer ===
|
||||
if [[ "${G_PLATFORM}" == "pi" ]]; then
|
||||
MORE_CFLAGS="-I${G_SYSROOT}/opt/vc/include -I${G_SYSROOT}/usr/include -I${G_SYSROOT}/opt/vc/include/interface/vcos/pthreads -I${G_SYSROOT}/opt/vc/include/interface/vmcs_host/linux"
|
||||
MORE_LIBS="-Wl,-rpath,/opt/vc/lib -L${G_SYSROOT}/opt/vc/lib -lbcm_host"
|
||||
MORE_LIBS="-Wl,-rpath-link,${G_SYSROOT}/opt/vc/lib -L${G_SYSROOT}/opt/vc/lib -lbcm_host"
|
||||
fi
|
||||
MODPLUG_CFLAGS="-I${G_INSTALLED}/include -DMODPLUG_STATIC" \
|
||||
MODPLUG_LIBS="-L${G_INSTALLED}/lib -lmodplug -lstdc++ -lm" \
|
||||
|
@ -419,7 +430,7 @@ MODPLUG_CFLAGS="-I${G_INSTALLED}/include -DMODPLUG_STATIC" \
|
|||
# === SDL2_ttf ===
|
||||
if [[ "${G_PLATFORM}" == "pi" ]]; then
|
||||
MORE_CFLAGS="-I${G_SYSROOT}/opt/vc/include -I${G_SYSROOT}/usr/include -I${G_SYSROOT}/opt/vc/include/interface/vcos/pthreads -I${G_SYSROOT}/opt/vc/include/interface/vmcs_host/linux"
|
||||
MORE_LIBS="-Wl,-rpath,/opt/vc/lib -L${G_SYSROOT}/opt/vc/lib -lbcm_host"
|
||||
MORE_LIBS="-Wl,-rpath-link,${G_SYSROOT}/opt/vc/lib -L${G_SYSROOT}/opt/vc/lib -lbcm_host"
|
||||
fi
|
||||
MORE_CFLAGS="${MORE_CFLAGS} -I${G_INSTALLED}/include/SDL2" \
|
||||
autoBuild libSDL2_ttf.a SDL2_ttf "--with-ft-prefix=\"${G_INSTALLED}\" --with-sdl-prefix=\"${G_INSTALLED}\"" "libSDL2_ttf.la install-libLTLIBRARIES install-libSDL2_ttfincludeHEADERS"
|
||||
|
|
|
@ -394,9 +394,9 @@ distclean-generic:
|
|||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
@HAVE_DOXYGEN_FALSE@install-data-local:
|
||||
@HAVE_DOXYGEN_FALSE@uninstall-local:
|
||||
@HAVE_DOXYGEN_FALSE@clean-local:
|
||||
@HAVE_DOXYGEN_FALSE@uninstall-local:
|
||||
@HAVE_DOXYGEN_FALSE@install-data-local:
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
|
||||
|
|
|
@ -1018,9 +1018,9 @@ distclean-generic:
|
|||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
@HAVE_DOXYGEN_FALSE@clean-local:
|
||||
@HAVE_DOXYGEN_FALSE@uninstall-local:
|
||||
@HAVE_DOXYGEN_FALSE@install-data-local:
|
||||
@HAVE_DOXYGEN_FALSE@uninstall-local:
|
||||
@HAVE_DOXYGEN_FALSE@clean-local:
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \
|
||||
|
|
12
singe/util.c
12
singe/util.c
|
@ -77,10 +77,10 @@ __attribute__((__format__(__printf__, 1, 0)))
|
|||
__attribute__((noreturn))
|
||||
void utilDie(char *fmt, ...) {
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
vfprintf(stderr, fmt, args);
|
||||
va_end(args);
|
||||
if (!_confNoConsole) {
|
||||
va_start(args, fmt);
|
||||
vfprintf(stderr, fmt, args);
|
||||
va_end(args);
|
||||
printf("\n");
|
||||
fflush(stderr);
|
||||
#ifdef _WIN32
|
||||
|
@ -290,10 +290,10 @@ void utilRedirectConsole(void) {
|
|||
__attribute__((__format__(__printf__, 1, 0)))
|
||||
void utilSay(char *fmt, ...) {
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
vfprintf(stdout, fmt, args);
|
||||
va_end(args);
|
||||
if (!_confNoConsole) {
|
||||
va_start(args, fmt);
|
||||
vfprintf(stdout, fmt, args);
|
||||
va_end(args);
|
||||
printf("\n");
|
||||
fflush(stdout);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue