diff --git a/framework/libs/libeloop_mini b/framework/libs/libeloop_mini new file mode 160000 index 00000000..034ed0df --- /dev/null +++ b/framework/libs/libeloop_mini @@ -0,0 +1 @@ +Subproject commit 034ed0dfdc336aa42b98bed7be57c0cc75c19ef5 diff --git a/framework/libs/log/CMakeLists.txt b/framework/libs/logging/CMakeLists.txt similarity index 100% rename from framework/libs/log/CMakeLists.txt rename to framework/libs/logging/CMakeLists.txt diff --git a/framework/libs/log/common.mk b/framework/libs/logging/common.mk similarity index 100% rename from framework/libs/log/common.mk rename to framework/libs/logging/common.mk diff --git "a/framework/libs/log/docs/10_\346\250\241\345\235\227\347\256\200\344\273\213/13_rklog.md" "b/framework/libs/logging/docs/10_\346\250\241\345\235\227\347\256\200\344\273\213/13_rklog.md" similarity index 100% rename from "framework/libs/log/docs/10_\346\250\241\345\235\227\347\256\200\344\273\213/13_rklog.md" rename to "framework/libs/logging/docs/10_\346\250\241\345\235\227\347\256\200\344\273\213/13_rklog.md" diff --git a/framework/libs/log/include/RKLog.h b/framework/libs/logging/include/RKLog.h similarity index 100% rename from framework/libs/log/include/RKLog.h rename to framework/libs/logging/include/RKLog.h diff --git a/framework/libs/log/sample/CMakeLists.txt b/framework/libs/logging/sample/CMakeLists.txt similarity index 100% rename from framework/libs/log/sample/CMakeLists.txt rename to framework/libs/logging/sample/CMakeLists.txt diff --git a/framework/libs/log/sample/sample.c b/framework/libs/logging/sample/sample.c similarity index 100% rename from framework/libs/log/sample/sample.c rename to framework/libs/logging/sample/sample.c diff --git a/framework/libs/log/src/CMakeLists.txt b/framework/libs/logging/src/CMakeLists.txt similarity index 100% rename from framework/libs/log/src/CMakeLists.txt rename to framework/libs/logging/src/CMakeLists.txt diff --git a/framework/libs/log/src/lib/CMakeLists.txt b/framework/libs/logging/src/lib/CMakeLists.txt similarity index 100% rename from framework/libs/log/src/lib/CMakeLists.txt rename to framework/libs/logging/src/lib/CMakeLists.txt diff --git a/framework/libs/log/src/lib/RKLog.cpp b/framework/libs/logging/src/lib/RKLog.cpp similarity index 99% rename from framework/libs/log/src/lib/RKLog.cpp rename to framework/libs/logging/src/lib/RKLog.cpp index a8c9f19d..5cdb4e70 100644 --- a/framework/libs/log/src/lib/RKLog.cpp +++ b/framework/libs/logging/src/lib/RKLog.cpp @@ -45,11 +45,7 @@ static int logPort() } int RKDLog::mOutputFd = 1; -#ifdef ROKID_LOG_LEVEL -int RKDLog::mLevel = ROKID_LOG_LEVEL; -#else int RKDLog::mLevel = RKDLog::DEFAULT; -#endif std::mutex RKDLog::mMutex; char RKDLog::mBuffer[LOG_SIZE]; diff --git a/framework/libs/log/src/lib/RKLog.hpp b/framework/libs/logging/src/lib/RKLog.hpp similarity index 100% rename from framework/libs/log/src/lib/RKLog.hpp rename to framework/libs/logging/src/lib/RKLog.hpp diff --git a/framework/libs/log/src/lib/RKLogServer.cpp b/framework/libs/logging/src/lib/RKLogServer.cpp similarity index 100% rename from framework/libs/log/src/lib/RKLogServer.cpp rename to framework/libs/logging/src/lib/RKLogServer.cpp diff --git a/framework/libs/log/src/lib/RKLogServer.hpp b/framework/libs/logging/src/lib/RKLogServer.hpp similarity index 100% rename from framework/libs/log/src/lib/RKLogServer.hpp rename to framework/libs/logging/src/lib/RKLogServer.hpp diff --git a/framework/libs/log/src/service/CMakeLists.txt b/framework/libs/logging/src/service/CMakeLists.txt similarity index 100% rename from framework/libs/log/src/service/CMakeLists.txt rename to framework/libs/logging/src/service/CMakeLists.txt diff --git a/framework/libs/log/src/service/cloudlog.c b/framework/libs/logging/src/service/cloudlog.c similarity index 100% rename from framework/libs/log/src/service/cloudlog.c rename to framework/libs/logging/src/service/cloudlog.c diff --git a/framework/libs/log/src/service/log2cloud.c b/framework/libs/logging/src/service/log2cloud.c similarity index 100% rename from framework/libs/log/src/service/log2cloud.c rename to framework/libs/logging/src/service/log2cloud.c diff --git a/framework/libs/log/src/tools/CMakeLists.txt b/framework/libs/logging/src/tools/CMakeLists.txt similarity index 100% rename from framework/libs/log/src/tools/CMakeLists.txt rename to framework/libs/logging/src/tools/CMakeLists.txt diff --git a/framework/libs/log/src/tools/rklogger.c b/framework/libs/logging/src/tools/rklogger.c similarity index 100% rename from framework/libs/log/src/tools/rklogger.c rename to framework/libs/logging/src/tools/rklogger.c diff --git a/framework/libs/log/src/tools/set_log_level.c b/framework/libs/logging/src/tools/set_log_level.c similarity index 100% rename from framework/libs/log/src/tools/set_log_level.c rename to framework/libs/logging/src/tools/set_log_level.c diff --git a/hardware/yodamk/android-hardware/Makefile b/hardware/yodamk/android-hardware/Makefile index 0318a0f6..d2b3df36 100644 --- a/hardware/yodamk/android-hardware/Makefile +++ b/hardware/yodamk/android-hardware/Makefile @@ -81,7 +81,20 @@ define Package/android-hardware SECTION:=libs CATEGORY:=rokid TITLE:=android-hardware - DEPENDS:=+libstdcpp +rklog +tinyalsa +android-system-core +libjson-c +libpthread +libusb-1.0 +wpa-supplicant +wpa_ctrl +libffmpeg-audio-dec +pulseaudio +PACKAGE_bsa_server:bsa_server +PACKAGE_vsp:vsp +PACKAGE_vsp_firmware:vsp_firmware +rklog + DEPENDS:=+libstdcpp \ + +logging \ + +tinyalsa \ + +android-system-core \ + +libjson-c \ + +libpthread \ + +libusb-1.0 \ + +wpa-supplicant \ + +wpa_ctrl \ + +libffmpeg-audio-dec \ + +pulseaudio \ + +PACKAGE_bsa_server:bsa_server \ + +PACKAGE_vsp:vsp \ + +PACKAGE_vsp_firmware:vsp_firmware endef define Package/android-hardware/description diff --git a/openwrt/package/yodaos/battery_service b/openwrt/package/yodaos/battery_service deleted file mode 120000 index 1207e39d..00000000 --- a/openwrt/package/yodaos/battery_service +++ /dev/null @@ -1 +0,0 @@ -../../../frameworks/native/services/battery_service/yodamk \ No newline at end of file diff --git a/openwrt/package/yodaos/battery_service/Makefile b/openwrt/package/yodaos/battery_service/Makefile new file mode 100644 index 00000000..f1fd5fd9 --- /dev/null +++ b/openwrt/package/yodaos/battery_service/Makefile @@ -0,0 +1,53 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=battery_service +PKG_VERSION:= +PKG_RELEASE:=1 + +PKG_SOURCE_DIR:=$(ROKID_DIR)/framework/services/battery +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_LICENSE:=GPL-2.0+ + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/battery_service + SECTION:=libs + CATEGORY:=rokid + TITLE:=battery_service + DEPENDS:=+libstdcpp +libjson-c +android-hardware +PACKAGE_flora:flora +PACKAGE_flora:mutils +endef + +define Package/battery_service/description + battery service +endef + +define Build/Prepare + $(CP) $(PKG_SOURCE_DIR)/* $(PKG_BUILD_DIR) + $(call Build/Prepare/Default,) +endef + +CMAKE_OPTIONS += \ + -DCUSTOM_CMAKE_MODULES=${PKG_SOURCE_DIR}/../cmake-modules +CMAKE_FIND_ROOT_PATH := ${CMAKE_FIND_ROOT_PATH};${STAGING_DIR} + +define Build/InstallDev + echo "Here is battery fileware Build/InstallDev" + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/src/battery_service $(1)/usr/bin/ +endef + +define Package/battery_service/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/src/battery_service $(1)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/demo/bat_test $(1)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/demo/bat_monitor $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/init.d/ + $(CP) ./bat_service $(1)/etc/init.d/ + $(CP) ./batchg_poll $(1)/etc/init.d/ +endef + +$(eval $(call BuildPackage,battery_service)) + diff --git a/openwrt/package/yodaos/battery_service/batchg_poll b/openwrt/package/yodaos/battery_service/batchg_poll new file mode 100755 index 00000000..ed507f2f --- /dev/null +++ b/openwrt/package/yodaos/battery_service/batchg_poll @@ -0,0 +1,27 @@ +#!/bin/sh /etc/rc.common + +START=90 +USE_PROCD=1 + +chg_detect() { + CHG_FLAG=`getprop | grep "persist.sys.charger.mode" | awk '{print $2}'` + CHG_FLAG=${CHG_FLAG:1} + CHG_FLAG=${CHG_FLAG%?} + + if [ "$CHG_FLAG" != "1" ]; then + echo "persist.sys.charger.mode is $CHG_FLAG" > /dev/console + else + while true; do + sleep 10 + echo "Enter charging mode" > /dev/console + done + fi +} + +start_service() { + procd_open_instance + procd_set_param stdout 1 + procd_set_param stderr 1 + chg_detect + procd_close_instance +} diff --git a/openwrt/package/yodaos/battery_service/battery_service b/openwrt/package/yodaos/battery_service/battery_service new file mode 100755 index 00000000..cc7b7e53 --- /dev/null +++ b/openwrt/package/yodaos/battery_service/battery_service @@ -0,0 +1,17 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2011 OpenWrt.org + +START=89 +USE_PROCD=1 +PROG=/usr/bin/battery_service + +start_service() { + mkdir /var/run/battery + + procd_open_instance + procd_set_param command $PROG + procd_set_param respawn 3600 2 -1 + procd_set_param stdout 1 + procd_set_param stderr 1 + procd_close_instance +} diff --git a/openwrt/package/yodaos/bluetooth_service b/openwrt/package/yodaos/bluetooth_service deleted file mode 120000 index e88d470c..00000000 --- a/openwrt/package/yodaos/bluetooth_service +++ /dev/null @@ -1 +0,0 @@ -../../../frameworks/native/services/bluetooth_service/yodamk \ No newline at end of file diff --git a/openwrt/package/yodaos/bluetooth_service/Config.in b/openwrt/package/yodaos/bluetooth_service/Config.in new file mode 100644 index 00000000..1ca7cad7 --- /dev/null +++ b/openwrt/package/yodaos/bluetooth_service/Config.in @@ -0,0 +1,15 @@ +menu "bluetooth_service configs" + + config BT_SERVICE_IPC_BY_FLORA + bool "Bluetooth ipc by flora" + default y + + config BT_SERVICE_IPC_BY_ZEROMQ + bool "Bluetooth ipc by zeromq" + default n + + config BT_SERVICE_HAVE_HFP + bool "Bluetooth service have hfp" + default n + +endmenu diff --git a/openwrt/package/yodaos/bluetooth_service/Makefile b/openwrt/package/yodaos/bluetooth_service/Makefile new file mode 100644 index 00000000..4bdcfd04 --- /dev/null +++ b/openwrt/package/yodaos/bluetooth_service/Makefile @@ -0,0 +1,82 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=bluetooth_service +PKG_VERSION:= +PKG_RELEASE:=1 + +PKG_SOURCE_DIR:=$(ROKID_DIR)/framework/services/bluetooth +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_LICENSE:=GPL-2.0+ + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/bluetooth_service + SECTION:=libs + CATEGORY:=yodaos + TITLE:=bluetooth_service + DEPENDS:=+libstdcpp \ + +libjson-c \ + +libffmpeg-audio-dec \ + +android-hardware \ + +libeloop_mini \ + +PACKAGE_flora:flora \ + +PACKAGE_flora:mutils \ + +libopus \ + +PACKAGE_gxopus:gxopus +endef + +CMAKE_OPTIONS += -DBT_SERVICE_IPC_BY_FLORA=1 + +ifeq ($(CONFIG_PRODUCT_OS_NAME),"yodaos") + CMAKE_OPTIONS += -DROKID_YODAOS=1 +endif + +ifeq ($(CONFIG_BT_SERVICE_HAVE_HFP),y) + CMAKE_OPTIONS += -DBT_SERVICE_HAVE_HFP=1 +endif + +ifeq ($(CONFIG_TARGET_leo),y) + CMAKE_OPTIONS += -DBT_SERVICE_USE_K18_HW_OPUS=1 +else + CMAKE_OPTIONS += -DBT_SERVICE_USE_SW_OPUS=1 +endif + +define Package/bluetooth_service/config + source "$(SOURCE)/Config.in" +endef + +define Package/bluetooth_service/description + bluetooth service +endef + +define Build/Prepare + $(CP) $(PKG_SOURCE_DIR)/* $(PKG_BUILD_DIR) + $(call Build/Prepare/Default,) +endef + +CMAKE_OPTIONS += \ + -DCUSTOM_CMAKE_MODULES=${PKG_SOURCE_DIR}/../cmake-modules +CMAKE_FIND_ROOT_PATH := ${CMAKE_FIND_ROOT_PATH};${STAGING_DIR} + +define Build/InstallDev + echo "Here is bluetooth fileware Build/InstallDev" + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/src/bluetooth_service $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ +endef + +define Package/bluetooth_service/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/src/bluetooth_service $(1)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/demo/bt_service_test $(1)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/demo/bt_monitor $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/init.d/ + $(CP) ./bt_service $(1)/etc/init.d/ +endef + +$(eval $(call BuildPackage,bluetooth_service)) + diff --git a/openwrt/package/yodaos/bluetooth_service/bt_service b/openwrt/package/yodaos/bluetooth_service/bt_service new file mode 100755 index 00000000..05d861c6 --- /dev/null +++ b/openwrt/package/yodaos/bluetooth_service/bt_service @@ -0,0 +1,18 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2011 OpenWrt.org + +START=89 +USE_PROCD=1 +PROG=/usr/bin/bluetooth_service + +start_service() { + mkdir -p /var/run/bluetooth + + procd_open_instance + procd_set_param command $PROG + procd_set_param respawn 3600 2 -1 + procd_set_param stdout 1 + procd_set_param stderr 1 + # procd_set_param limits core="unlimited" + procd_close_instance +} diff --git a/openwrt/package/yodaos/bsa_server b/openwrt/package/yodaos/bsa_server deleted file mode 120000 index a31a211c..00000000 --- a/openwrt/package/yodaos/bsa_server +++ /dev/null @@ -1 +0,0 @@ -../../../vendor/yodamk/bsa_server \ No newline at end of file diff --git a/openwrt/package/yodaos/googletest b/openwrt/package/yodaos/googletest deleted file mode 120000 index 3c5cff03..00000000 --- a/openwrt/package/yodaos/googletest +++ /dev/null @@ -1 +0,0 @@ -../../../frameworks/native/libs/googletest/yodamk \ No newline at end of file diff --git a/openwrt/package/yodaos/gsensor_service b/openwrt/package/yodaos/gsensor_service deleted file mode 120000 index ad04a1d3..00000000 --- a/openwrt/package/yodaos/gsensor_service +++ /dev/null @@ -1 +0,0 @@ -../../../frameworks/native/services/gsensor_service/yodamk \ No newline at end of file diff --git a/openwrt/package/yodaos/httpdns b/openwrt/package/yodaos/httpdns deleted file mode 120000 index d4eb4e02..00000000 --- a/openwrt/package/yodaos/httpdns +++ /dev/null @@ -1 +0,0 @@ -../../../frameworks/native/libs/httpdns/yodamk \ No newline at end of file diff --git a/openwrt/package/yodaos/httpsession b/openwrt/package/yodaos/httpsession deleted file mode 120000 index da6e397c..00000000 --- a/openwrt/package/yodaos/httpsession +++ /dev/null @@ -1 +0,0 @@ -../../../frameworks/native/libs/httpsession/yodamk \ No newline at end of file diff --git a/openwrt/package/yodaos/httpsession/Makefile b/openwrt/package/yodaos/httpsession/Makefile new file mode 100644 index 00000000..30113e0e --- /dev/null +++ b/openwrt/package/yodaos/httpsession/Makefile @@ -0,0 +1,41 @@ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=httpsession +PKG_VERSION:= +PKG_RELEASE:=1 + +PKG_SOURCE_DIR:=$(ROKID_DIR)/framework/libs/httpsession +PKG_FIXUP:=libtool +PKG_BUILD_PARALLEL:=1 +PKG_LICENSE:=GPL-2.0+ + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +PKG_INSTALL:= + +define Package/httpsession + SECTION:=libs + CATEGORY:=rokid + TITLE:=httpsession + DEPENDS:=+libcurl +libstdcpp +libpthread +endef + +define Build/Prepare + $(CP) $(PKG_SOURCE_DIR)/* $(PKG_BUILD_DIR) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_BUILD_DIR)/*.so $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/include/*.h $(1)/usr/include +endef + +define Package/httpsession/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/*.so $(1)/usr/lib +endef + +$(eval $(call BuildPackage,httpsession)) diff --git a/openwrt/package/yodaos/iot_autoconnect b/openwrt/package/yodaos/iot_autoconnect deleted file mode 120000 index 2551e1ba..00000000 --- a/openwrt/package/yodaos/iot_autoconnect +++ /dev/null @@ -1 +0,0 @@ -../../../frameworks/native/libs/iot_autoconnect_adapter/yodamk \ No newline at end of file diff --git a/openwrt/package/yodaos/libapp_manager b/openwrt/package/yodaos/libapp_manager deleted file mode 120000 index 3f34d2cf..00000000 --- a/openwrt/package/yodaos/libapp_manager +++ /dev/null @@ -1 +0,0 @@ -../../../frameworks/native/libs/libapp_manager/yodamk/ \ No newline at end of file diff --git a/openwrt/package/yodaos/libeloop_mini b/openwrt/package/yodaos/libeloop_mini deleted file mode 120000 index db261a23..00000000 --- a/openwrt/package/yodaos/libeloop_mini +++ /dev/null @@ -1 +0,0 @@ -../../../frameworks/native/libs/libeloop_mini/yodamk \ No newline at end of file diff --git a/openwrt/package/yodaos/libeloop_mini/Makefile b/openwrt/package/yodaos/libeloop_mini/Makefile new file mode 100755 index 00000000..c04a8c4f --- /dev/null +++ b/openwrt/package/yodaos/libeloop_mini/Makefile @@ -0,0 +1,49 @@ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libeloop_mini +PKG_VERSION:= +PKG_RELEASE:=1 +PKG_SOURCE_DIR:=$(ROKID_DIR)/framework/libs/libeloop_mini +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_LICENSE:=GPL-2.0+ + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + + +define Package/libeloop_mini + SECTION:=libs + CATEGORY:=rokid + DEPENDS+= +libpthread + TITLE:=libeloop_mini +endef + +define Package/libeloop_mini/description + eloop_run lib +endef + +define Build/Prepare + echo $(PKG_BUILD_DIR) + $(CP) $(PKG_SOURCE_DIR)/* $(PKG_BUILD_DIR) +endef + +define Build/InstallDev + echo "zpershuai build stage" + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/build/*.so $(1)/usr/lib + $(INSTALL_DIR) $(1)/usr/include/eloop_mini + $(CP) $(PKG_BUILD_DIR)/include/eloop.h $(1)/usr/include/eloop_mini/ + $(CP) $(PKG_BUILD_DIR)/include/eloop.h $(1)/usr/include/eloop_mini/ +endef + + + +define Package/libeloop_mini/install + echo "zpershuai build adfadfasdf" + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/build/*.so $(1)/usr/lib +endef + +$(eval $(call BuildPackage,libeloop_mini)) diff --git a/openwrt/package/yodaos/librplayer b/openwrt/package/yodaos/librplayer deleted file mode 120000 index 1ffbd25b..00000000 --- a/openwrt/package/yodaos/librplayer +++ /dev/null @@ -1 +0,0 @@ -../../../frameworks/native/libs/librplayer/yodamk \ No newline at end of file diff --git a/openwrt/package/yodaos/librplayer/Config.in b/openwrt/package/yodaos/librplayer/Config.in new file mode 100644 index 00000000..d3cf55f1 --- /dev/null +++ b/openwrt/package/yodaos/librplayer/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBRPLAYER + bool "rokid librplayer sdk" + select BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_SDL2 + select BR2_PACKAGE_PULSEAUDIO + default y diff --git a/openwrt/package/yodaos/librplayer/Makefile b/openwrt/package/yodaos/librplayer/Makefile new file mode 100755 index 00000000..c999d9fb --- /dev/null +++ b/openwrt/package/yodaos/librplayer/Makefile @@ -0,0 +1,67 @@ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=librplayer +PKG_VERSION:= +PKG_RELEASE:=1 + +PKG_SOURCE_DIR:=$(ROKID_DIR)/framework/libs/player + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_LICENSE:=GPL-2.0+ + +ifeq ($(CONFIG_PACKAGE_soundtouch),y) +CMAKE_OPTIONS:= -DROKID_LIBS_SOUNDTOUCH=y +endif + +ifeq ($(CONFIG_PACKAGE_eq_ctrl),y) +CMAKE_OPTIONS += -DROKID_LIBS_EQ_CTRL=y +endif + +ifeq ($(CONFIG_AUDIO_LINK_CUT),y) +else + CMAKE_OPTIONS += -DNEED_AUDIO_PRE_LINK=1 +endif + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/librplayer + SECTION:=libs + CATEGORY:=rokid + TITLE:=librplayer + DEPENDS:=+libstdcpp \ + +SDL2 \ + +libffmpeg-audio-dec \ + +pulseaudio \ + +libopus \ + +logging \ + +PACKAGE_eq_ctrl:eq_ctrl \ + +PACKAGE_soundtouch:soundtouch +endef + +define Package/librplayer/description + librplayer +endef + +define Build/Prepare + $(CP) $(PKG_SOURCE_DIR)/* $(PKG_BUILD_DIR) + $(call Build/Prepare/Default,) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/ +endef + +define Package/librplayer/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,librplayer)) diff --git a/openwrt/package/yodaos/librplayer/librplayer.mk b/openwrt/package/yodaos/librplayer/librplayer.mk new file mode 100755 index 00000000..c215bc12 --- /dev/null +++ b/openwrt/package/yodaos/librplayer/librplayer.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# librplayer -- rokid librplayer for media play. +# +################################################################################ + +LIBRPLAYER_SITE = $(call qstrip,$(BR2_EXTERNAL_ROKID_PATH)/../frameworks/native/libs/librplayer) +LIBRPLAYER_SITE_METHOD = local +LIBRPLAYER_INSTALL_STAGING = YES +LIBRPLAYER_DEPENDENCIES = ffmpeg sdl2 pulseaudio + +#ifeq ($(BR2_STATIC_LIBS),y) +#LIBRPLAYER_PIC = +#LIBRPLAYER_SHARED = --static +#else +#LIBRPLAYER_PIC = -fPIC +#LIBRPLAYER_SHARED = --shared +#endif + +LIBRPLAYER_INC_HEADERS = audio/pulseaudio/audioplayer.h video/sdl2/videoplayer.h \ + ffmpeg_mediaplayer.h ffmpeg_utils.h \ + mediaplayer.h + +LIBRPLAYER_INC_HEADERS += $(addprefix include/librplayer/, rplayer_error.h rplayer_mutex.h rplayer_type.h) + +define LIBRPLAYER_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" \ + PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \ + SYSROOT="$(STAGING_DIR)" \ + -C $(@D) all +endef + +define LIBRPLAYER_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 0755 $(@D)/librplayer.so $(STAGING_DIR)/usr/lib/librplayer.so + $(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/include/librplayer + cp -pf $(addprefix $(@D)/, $(LIBRPLAYER_INC_HEADERS)) $(STAGING_DIR)/usr/include/librplayer/ +endef + +define LIBRPLAYER_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/librplayer.so $(TARGET_DIR)/usr/lib/librplayer.so +endef + +$(eval $(generic-package)) + diff --git a/openwrt/package/yodaos/rklog/Config.in b/openwrt/package/yodaos/logging/Config.in similarity index 100% rename from openwrt/package/yodaos/rklog/Config.in rename to openwrt/package/yodaos/logging/Config.in diff --git a/openwrt/package/yodaos/rklog/Makefile b/openwrt/package/yodaos/logging/Makefile similarity index 82% rename from openwrt/package/yodaos/rklog/Makefile rename to openwrt/package/yodaos/logging/Makefile index 53225e0f..e0f628aa 100644 --- a/openwrt/package/yodaos/rklog/Makefile +++ b/openwrt/package/yodaos/logging/Makefile @@ -1,11 +1,11 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=rklog +PKG_NAME:=logging PKG_VERSION:= PKG_RELEASE:=1 -PKG_SOURCE_DIR:=$(ROKID_DIR)/framework/libs/log +PKG_SOURCE_DIR:=$(ROKID_DIR)/framework/libs/logging PKG_FIXUP:=libtool PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 @@ -14,19 +14,19 @@ PKG_LICENSE:=GPL-2.0+ include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk -define Package/rklog +define Package/logging SECTION:=libs CATEGORY:=yodaos - TITLE:=rklog + TITLE:=logging DEPENDS:=+libstdcpp +android-system-core +cJSON +flora +mutils +ubox +ubus +libubox endef -define Package/rklog/config +define Package/logging/config source "$(SOURCE)/Config.in" endef -define Package/rklog/description - rklog lib +define Package/logging/description + logging lib endef TARGET_CFLAGS += $(FPIC) @@ -51,7 +51,7 @@ define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so $(1)/usr/lib/ endef -define Package/rklog/install +define Package/logging/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/bin @@ -60,4 +60,4 @@ define Package/rklog/install $(INSTALL_DIR) $(1)/etc/init.d/ endef -$(eval $(call BuildPackage,rklog)) +$(eval $(call BuildPackage,logging)) diff --git a/openwrt/package/yodaos/yodajs/Makefile b/openwrt/package/yodaos/yodajs/Makefile index 3d08b95c..503b80e4 100755 --- a/openwrt/package/yodaos/yodajs/Makefile +++ b/openwrt/package/yodaos/yodajs/Makefile @@ -17,10 +17,10 @@ CMAKE_OPTIONS += -H$(PKG_BUILD_DIR) CMAKE_OPTIONS += -DCMAKE_INCLUDE_DIR='$(STAGING_DIR)' # CMAKE_OPTIONS += -DHOST_NODEJS_BIN='$(TOPDIR)/package/rokid/jsruntime/node' -define Package/jsruntime +define Package/yodajs SECTION:=libs CATEGORY:=yodaos - TITLE:=yodajs + TITLE:=yoda.js the application framework at YodaOS DEPENDS:=+libstdcpp \ +android-system-core \ +shadow-node \ @@ -38,9 +38,6 @@ define Package/jsruntime endef define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/rklogger $(1)/usr/bin/rklogger - $(INSTALL_DIR) $(1)/etc $(CP) $(PKG_INSTALL_DIR)/etc/manifest.json $(1)/etc $(CP) $(PKG_INSTALL_DIR)/etc/hotplug.d $(1)/etc @@ -75,9 +72,6 @@ define Package/yodajs/install $(INSTALL_DIR) $(1)/etc/init.d/ $(CP) ./files/* $(1)/etc/init.d/ - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/rklogger $(1)/usr/bin/rklogger - $(INSTALL_DIR) $(1)/opt $(CP) $(PKG_INSTALL_DIR)/opt/* $(1)/opt/ diff --git a/vendor/nationalchip/gx8010/ko/uart_control.ko b/vendor/nationalchip/gx8010/ko/uart_control.ko new file mode 100644 index 00000000..a590ce5d Binary files /dev/null and b/vendor/nationalchip/gx8010/ko/uart_control.ko differ