# for TIZEN-maru
maru="no"
shm="no"
+libav="no"
#
glusterfs=""
glusterfs_discard="no"
;;
--enable-shm) shm="yes"
;;
+ --enable-libav) libav="yes"
+ ;;
#
--disable-glusterfs) glusterfs="no"
;;
echo "TIZEN-maru options:"
echo " --enable-maru enable maru board"
echo " --enable-shm enable shared memory for framebuffer"
+echo " --enable-libav enable libav library"
+
echo "NOTE: The object files are built at the place where configure is launched"
exit 1
fi
fi
##########################################
+# libav probe
+
+if test "$libav" != "no"; then
+ libavcodec_package="libavcodec"
+ libavcodec_version="54.35.0"
+ libavutil_package="libavutil"
+ libavutil_version="52.3.0"
+ libavformat_package="libavformat"
+ libavformat_version="54.20.3"
+ libavresample_package="libavresample"
+ libavresample_version="1.0.1"
+
+ if $pkg_config --exists "$libavcodec_package >= $libavcodec_version" ; then
+ libav_cflags=`$pkg_config --cflags $libavcodec_package`
+ libav_libs=`$pkg_config --libs $libavcodec_package`
+ libs_softmmu="$libav_libs $libs_softmmu"
+ QEMU_CFLAGS="$QEMU_CFLAGS $libav_cflags"
+ libav="yes"
+ else
+ if test "$libav" = "yes" ; then
+ feature_not_found "libav"
+ fi
+ libav="no"
+ fi
+
+ if $pkg_config --exists "$libavutil_package >= $libavutil_version" ; then
+ libav_cflags=`$pkg_config --cflags $libavutil_package`
+ libav_libs=`$pkg_config --libs $libavutil_package`
+ libs_softmmu="$libav_libs $libs_softmmu"
+ QEMU_CFLAGS="$QEMU_CFLAGS $libav_cflags"
+ libav="yes"
+ else
+ if test "$libav" = "yes" ; then
+ feature_not_found "libav"
+ fi
+ libav="no"
+ fi
+
+ if $pkg_config --exists "$libavformat_package >= $libavformat_version" ; then
+ libav_cflags=`$pkg_config --cflags $libavformat_package`
+ libav_libs=`$pkg_config --libs $libavformat_package`
+ libs_softmmu="$libav_libs $libs_softmmu"
+ qemu_cflags="$qemu_cflags $libav_cflags"
+ libav="yes"
+ else
+ if test "$libav" = "yes" ; then
+ feature_not_found "libav"
+ fi
+ libav="no"
+ fi
+
+ if $pkg_config --exists "$libavresample_package >= $libavresample_version" ; then
+ libav_cflags=`$pkg_config --cflags $libavresample_package`
+ libav_libs=`$pkg_config --libs $libavresample_package`
+ libs_softmmu="$libav_libs $libs_softmmu"
+ qemu_cflags="$qemu_cflags $libav_cflags"
+ libav="yes"
+ else
+ if test "$libav" = "yes" ; then
+ feature_not_found "libav"
+ fi
+ libav="no"
+ fi
+
+fi
+
+##########################################
# End of CC checks
# After here, no more $cc or $ld runs
# for TIZEN-maru
echo "TIZEN-maru support $maru"
echo "TIZEN-maru shared framebuffer support $shm"
+echo "TIZEN-maru libav support $libav"
#
if test "$sdl_too_old" = "yes"; then
if test "$gl" = "yes" ; then
echo "CONFIG_GL_BACKEND=y" >> $config_host_mak
fi
+if test "$libav" = "yes" ; then
+ echo "CONFIG_LIBAV=y" >> $config_host_mak
+fi
+
# TPM passthrough support?
if test "$tpm" = "yes"; then
echo 'CONFIG_TPM=$(CONFIG_SOFTMMU)' >> $config_host_mak
exit 1
fi
- export PKG_CONFIG_PATH=$ROOTDIR/glib2/lib/pkgconfig:$ROOTDIR/curl/lib/pkgconfig:$ROOTDIR/libffi/lib/pkgconfig:$ROOTDIR/libiconv/lib/pkgconfig:$ROOTDIR/libidn/lib/pkgconfig:$ROOTDIR/libxml2/lib/pkgconfig:$ROOTDIR/ncurses/lib/pkgconfig:$ROOTDIR/openssl/lib/pkgconfig:$ROOTDIR/pixman/lib/pkgconfig:$ROOTDIR/zlib/lib/pkgconfig
+ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$ROOTDIR/glib2/lib/pkgconfig:$ROOTDIR/curl/lib/pkgconfig:$ROOTDIR/libffi/lib/pkgconfig:$ROOTDIR/libiconv/lib/pkgconfig:$ROOTDIR/libidn/lib/pkgconfig:$ROOTDIR/libxml2/lib/pkgconfig:$ROOTDIR/ncurses/lib/pkgconfig:$ROOTDIR/openssl/lib/pkgconfig:$ROOTDIR/pixman/lib/pkgconfig:$ROOTDIR/zlib/lib/pkgconfig:$ROOTDIR/libav/lib/pkgconfig
BUILD_CFLAGS="--extra-cflags=-I$ROOTDIR/curl/include "
BUILD_CFLAGS+="--extra-cflags=-I$ROOTDIR/libffi/include "
BUILD_CFLAGS+="--extra-cflags=-I$ROOTDIR/openssl/include "
BUILD_CFLAGS+="--extra-cflags=-I$ROOTDIR/pixman/include "
BUILD_CFLAGS+="--extra-cflags=-I$ROOTDIR/zlib/include "
- BUILD_CFLAGS+="--extra-cflags=-I$ROOTDIR/include"
BUILD_LDFLAGS="--extra-ldflags=-L$ROOTDIR/curl/lib "
BUILD_LDFLAGS+="--extra-ldflags=-L$ROOTDIR/libffi/lib "
BUILD_LDFLAGS+="--extra-ldflags=-L$ROOTDIR/openssl/lib "
BUILD_LDFLAGS+="--extra-ldflags=-L$ROOTDIR/pixman/lib "
BUILD_LDFLAGS+="--extra-ldflags=-L$ROOTDIR/zlib/lib "
- BUILD_LDFLAGS+="--extra-ldflags=-L$ROOTDIR/lib"
}
modify_files(){
{
prepare
+ export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${ROOTDIR}/libav/lib/pkgconfig
+
cd $SRCDIR/tizen
if test -e "Makefile"
then
# build
build()
{
- export PKG_CONFIG_PATH=${ROOTDIR}/remote/lib/pkgconfig:${PKG_CONFIG_PATH}
- BUILD_CFLAGS=--extra-cflags="-I$ROOTDIR/include"
- BUILD_LDFLAGS=--extra-ldflags="-L$ROOTDIR/lib"
+ export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${ROOTDIR}/remote/lib/pkgconfig:${ROOTDIR}/libav/lib/pkgconfig
cd $SRCDIR/tizen/
- ./emulator_configure.sh x86 -e "$BUILD_CFLAGS $BUILD_LDFLAGS"
+ ./emulator_configure.sh x86
make all_dibs
if [ $? -eq 0 ]
then
{
prepare
+ export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${ROOTDIR}/libav/lib/pkgconfig
+
cd $SRCDIR/tizen
if test -e "Makefile"
then
# build
build()
{
- export PKG_CONFIG_PATH=${ROOTDIR}/remote/lib/pkgconfig:${PKG_CONFIG_PATH}
- BUILD_CFLAGS=--extra-cflags="-I$ROOTDIR/include"
- BUILD_LDFLAGS=--extra-ldflags="-L$ROOTDIR/lib"
+ export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${ROOTDIR}/remote/lib/pkgconfig:${ROOTDIR}/libav/lib/pkgconfig
cd $SRCDIR/tizen/
- ./emulator_configure.sh x86 -e "$BUILD_CFLAGS $BUILD_LDFLAGS"
+ ./emulator_configure.sh x86
make all_dibs
if [ $? -eq 0 ]
then
echo "and then set installed Python/bin path into PATH system variable on your PC!"
exit 1
fi
-
PURIFIED_ROOTDIR=`TEMP=\`echo "${ROOTDIR}" | cut -c-2 | sed "s/[:/]//g" | awk {'print tolower ($_)'}\`; echo \`echo "${ROOTDIR}" | sed "s/^../\/${TEMP}/"\``
PATH=$PATH:$PURIFIED_ROOTDIR/bin:$PURIFIED_ROOTDIR/apache-ant_1.9.2/bin:$PURIFIED_ROOTDIR/SDL_1.2.15/bin:$PURIFIED_ROOTDIR/gtk-bundle_2.24.10/bin:$PURIFIED_ROOTDIR/libcurl-4_1.0.1/bin:$PURIFIED_ROOTDIR/pixman_0.30.0/bin
export PATH
- export PKG_CONFIG_PATH=$ROOTDIR/lib/pkgconfig:$ROOTDIR/SDL_1.2.15/lib/pkgconfig:$ROOTDIR/gtk-bundle_2.24.10/lib/pkgconfig:$ROOTDIR/libcurl-4_1.0.1/lib/pkgconfig:$ROOTDIR/pixman_0.30.0/lib/pkgconfig
- BUILD_CFLAGS=--extra-cflags="-I$ROOTDIR/include "
+ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$ROOTDIR/libav/lib/pkgconfig:$ROOTDIR/SDL_1.2.15/lib/pkgconfig:$ROOTDIR/gtk-bundle_2.24.10/lib/pkgconfig:$ROOTDIR/libcurl-4_1.0.1/lib/pkgconfig:$ROOTDIR/pixman_0.30.0/lib/pkgconfig
+
BUILD_CFLAGS+=--extra-cflags="-I$ROOTDIR/apache-ant_1.9.2/include "
BUILD_CFLAGS+=--extra-cflags="-I$ROOTDIR/SDL_1.2.15/include "
BUILD_CFLAGS+=--extra-cflags="-I$ROOTDIR/gtk-bundle_2.24.10/include "
BUILD_CFLAGS+=--extra-cflags="-I$ROOTDIR/libcurl-4_1.0.1/include "
BUILD_CFLAGS+=--extra-cflags="-I$ROOTDIR/pixman_0.30.0/include"
- BUILD_LDFLAGS=--extra-ldflags="-L$ROOTDIR/lib "
BUILD_LDFLAGS+=--extra-ldflags="-L$ROOTDIR/apache-ant_1.9.2/lib "
BUILD_LDFLAGS+=--extra-ldflags="-L$ROOTDIR/SDL_1.2.15/lib "
BUILD_LDFLAGS+=--extra-ldflags="-L$ROOTDIR/gtk-bundle_2.24.10/lib "
# resources and jar for skin
cp -pP skin/client/emulator-skin.jar $(EMUL_DIR)/bin
- cp -pP skin/client/lib/swt.jar $(EMUL_DIR)/bin
cp -pPR skin/client/skins $(EMUL_DIR)
ifndef CONFIG_USE_SHM
cp -pP skin/client/resource/images/blank-guide.png $(EMUL_DIR)/images
install_name_tool -change /opt/local/lib/libncurses.5.dylib @loader_path/libncurses.5.dylib $(EMUL_DIR)/bin/emulator-x86 ;\
install_name_tool -change /opt/local/lib/libcurl.4.dylib @loader_path/libcurl.4.dylib $(EMUL_DIR)/bin/emulator-x86 ;\
install_name_tool -change /opt/local/lib/libpixman-1.0.dylib @loader_path/libpixman-1.0.dylib $(EMUL_DIR)/bin/emulator-x86 ;\
- install_name_tool -change .//lib/libavformat-emul.54.dylib @loader_path/libavformat-emul.54.dylib $(EMUL_DIR)/bin/emulator-x86 ;\
- install_name_tool -change .//lib/libavcodec-emul.54.dylib @loader_path/libavcodec-emul.54.dylib $(EMUL_DIR)/bin/emulator-x86 ;\
- install_name_tool -change .//lib/libavresample-emul.1.dylib @loader_path/libavresample-emul.1.dylib $(EMUL_DIR)/bin/emulator-x86 ;\
- install_name_tool -change .//lib/libavutil-emul.52.dylib @loader_path/libavutil-emul.52.dylib $(EMUL_DIR)/bin/emulator-x86 ;\
;; \
arm-softmmu) \
;; \
install_name_tool -change /opt/local/lib/libncurses.5.dylib @loader_path/libncurses.5.dylib $(DIBS_X86_DIR)/bin/emulator-x86 ;\
install_name_tool -change /opt/local/lib/libcurl.4.dylib @loader_path/libcurl.4.dylib $(DIBS_X86_DIR)/bin/emulator-x86 ;\
install_name_tool -change /opt/local/lib/libpixman-1.0.dylib @loader_path/libpixman-1.0.dylib $(DIBS_X86_DIR)/bin/emulator-x86 ;\
- install_name_tool -change .//lib/libavformat-emul.54.dylib @loader_path/libavformat-emul.54.dylib $(DIBS_X86_DIR)/bin/emulator-x86 ;\
- install_name_tool -change .//lib/libavcodec-emul.54.dylib @loader_path/libavcodec-emul.54.dylib $(DIBS_X86_DIR)/bin/emulator-x86 ;\
- install_name_tool -change .//lib/libavresample-emul.1.dylib @loader_path/libavresample-emul.1.dylib $(DIBS_X86_DIR)/bin/emulator-x86 ;\
- install_name_tool -change .//lib/libavutil-emul.52.dylib @loader_path/libavutil-emul.52.dylib $(DIBS_X86_DIR)/bin/emulator-x86 ;\
;; \
arm-softmmu) \
;; \
endif
# codec
-LIBS+= -lavformat-emul -lavcodec-emul -lavresample-emul -lavutil-emul
+#LIBS+= -lavformat-emul -lavcodec-emul -lavresample-emul -lavutil-emul
ifdef CONFIG_WIN32
LIBS += -lcurl -lopengl32 -lglu32 -lgdi32 -lpng14
obj-y += maru_virtio_jack.o
obj-y += maru_virtio_power.o
obj-y += maru_virtio_esm.o
-obj-y += maru_brill_codec.o
+#obj-y += maru_brill_codec.o
+obj-$(CONFIG_LIBAV) += maru_brill_codec.o
obj-$(CONFIG_PCI) += maru_camera_common_pci.o
obj-$(CONFIG_LINUX) += maru_camera_linux_pci.o
#define MAX_IDE_BUS 2
+#if defined(CONFIG_LIBAV)
int maru_brill_codec_pci_device_init(PCIBus *bus);
+#endif
static const int ide_iobase[MAX_IDE_BUS] = { 0x1f0, 0x170 };
static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 };
pci_maru_overlay_init(pci_bus);
pci_maru_brightness_init(pci_bus);
+#if defined(CONFIG_LIBAV)
maru_brill_codec_pci_device_init(pci_bus);
+#endif
if (enable_vigs || enable_yagl) {
render_queue = work_queue_create();