-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
445 additions
and
33 deletions.
There are no files selected for viewing
Submodule libeloop_mini
added at
034ed0
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.