Skip to content

Commit 77c15f1

Browse files
authored
Merge pull request #331 from WebPlatformForEmbedded/dev/amazon-iapplication
Integrate Amazon Prime
2 parents 4438903 + c9bbdf4 commit 77c15f1

File tree

9 files changed

+462
-7
lines changed

9 files changed

+462
-7
lines changed

package/Config.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ menu "Target packages"
1212
menu "Audio and video applications"
1313
source "package/alsa-utils/Config.in"
1414
source "package/atest/Config.in"
15+
source "package/amazon-backend/Config.in"
16+
source "package/amazon-ignition/Config.in"
1517
source "package/aumix/Config.in"
1618
source "package/bellagio/Config.in"
1719
source "package/bluez-alsa/Config.in"

package/amazon-backend/Config.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
config BR2_PACKAGE_AMAZON_BACKEND
2+
bool "amazon backend"
3+
select BR2_PACKAGE_WPEFRAMEWORK_CLIENTLIBRARIES
4+
help
5+
amazon backend for bme player
6+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
################################################################################
2+
#
3+
# amazon-backend
4+
#
5+
################################################################################
6+
7+
AMAZON_BACKEND_VERSION = 23ddafb2838a48daaa2865060663da2e6a9c3268
8+
AMAZON_BACKEND_SITE = [email protected]:Metrological/amazon-backend.git
9+
AMAZON_BACKEND_SITE_METHOD = git
10+
AMAZON_BACKEND_DEPENDENCIES = wpeframework wpeframework-clientlibraries
11+
AMAZON_BACKEND_LICENSE = PROPRIETARY
12+
AMAZON_BACKEND_INSTALL_STAGING = YES
13+
14+
ifeq ($(BR2_PACKAGE_GSTREAMER1),y)
15+
AMAZON_BACKEND_DEPENDENCIES += gstreamer1 gst1-plugins-base gst1-plugins-good gst1-plugins-bad
16+
endif
17+
18+
ifeq ($(BR2_PACKAGE_BCM_REFSW),y)
19+
AMAZON_BACKEND_DEPENDENCIES += bcm-refsw
20+
endif
21+
22+
ifeq ($(BR2_PACKAGE_AMAZON_BUILD_TYPE_TESTING),y)
23+
AMAZON_BACKEND_CONF_OPTS += -DAMAZON_BUILD_TYPE="testing"
24+
endif
25+
26+
ifeq ($(BR2_PACKAGE_VSS_SDK),y)
27+
AMAZON_BACKEND_CONF_OPTS += -DAMAZON_GST_LIBRARY_PREFIX="wpe"
28+
endif
29+
30+
AMAZON_BACKEND_CONF_OPTS += -DDISABLE_OUTPUT_STATUS_CHECK=ON
31+
32+
$(eval $(cmake-package))
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/ignition/amazon-player/ruby/amp/CMakeLists.txt 2020-10-13 17:52:40.000000000 +0530
2+
+++ b/ignition/amazon-player/ruby/amp/CMakeLists.txt 2022-06-03 22:31:07.677699807 +0530
3+
@@ -25,6 +25,8 @@ set(RUBY_PLATFORM_DIR ${RUBY_PLATFORM_RO
4+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
5+
6+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
7+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=stringop-overflow")
8+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=stringop-truncation")
9+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
10+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wswitch")
11+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wswitch-default")
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--- a/thunder/amp-thunder/libs/Hawaii/HawaiiBindings/src/hawaii/bindings/PosixBindings.cpp 2021-02-08 19:26:57.000000000 +0530
2+
+++ b/thunder/amp-thunder/libs/Hawaii/HawaiiBindings/src/hawaii/bindings/PosixBindings.cpp 2021-06-09 14:19:45.824472091 +0530
3+
@@ -159,10 +159,11 @@ extern "C"
4+
* as ROOT on linux systems. This fails the initialisation of Bindings
5+
* if the user id of the calling process is 0.
6+
*/
7+
+#if 0 //Disable the ROOT userid check
8+
uid_t userId = getuid();
9+
core::Log::write( core::Log::kInfo, "Initialising Bindings with User Id: %d\n", userId );
10+
AMP_VALIDATE( userId != 0, ::error::kError_InvalidUserPermissions );
11+
-
12+
+#endif
13+
if ( !posixBindings )
14+
{
15+
posixBindings = new hawaii::bindings::PosixBindings();

package/amazon-ignition/Config.in

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
config BR2_PACKAGE_AMAZON_IGNITION
2+
select BR2_PACKAGE_JPEG
3+
select BR2_PACKAGE_ZLIB
4+
select BR2_PACKAGE_LIBCURL
5+
select BR2_PACKAGE_LIBPNG
6+
select BR2_PACKAGE_WPEFRAMEWORK
7+
select BR2_PACKAGE_WPEFRAMEWORK_VIRTUALINPUT
8+
bool "amazon-ignition"
9+
help
10+
Amazon project
11+
12+
if BR2_PACKAGE_AMAZON_IGNITION
13+
menu "Options"
14+
15+
choice
16+
prompt "Build type"
17+
default BR2_PACKAGE_AMAZON_IGNITION_BUILD_TYPE_RELEASE
18+
help
19+
Select the build type to use.
20+
21+
config BR2_PACKAGE_AMAZON_IGNITION_BUILD_TYPE_RELEASE
22+
bool "release"
23+
config BR2_PACKAGE_AMAZON_IGNITION_BUILD_TYPE_RELEASE_DEBUG
24+
bool "release with debug symbols"
25+
config BR2_PACKAGE_AMAZON_IGNITION_BUILD_TYPE_DEBUG
26+
bool "debug"
27+
config BR2_PACKAGE_AMAZON_IGNITION_BUILD_TYPE_TESTING
28+
bool "testing"
29+
endchoice
30+
31+
config BR2_PACKAGE_AMAZON_IGNITION_BUILD_SHARED_LIBRARY_LAUNCHER
32+
bool "shared library launcher"
33+
default "n"
34+
35+
config BR2_PACKAGE_AMAZON_IGNITION_DEVELOPER_MODE
36+
bool "developer mode"
37+
default "n"
38+
help
39+
Enable this to use info and debug traces
40+
41+
config BR2_PACKAGE_AMAZON_IGNITION_BUILD_RUBY
42+
bool "Build RUBY Player"
43+
default "y"
44+
45+
config BR2_PACKAGE_AMAZON_IGNITION_BUILD_TESTS
46+
bool "include tests"
47+
select BR2_PACKAGE_AMAZON_IGNITION_DEVELOPER_MODE
48+
default "n"
49+
50+
config BR2_PACKAGE_AMAZON_IGNITION_IG_INSTALL_PATH
51+
string "install path"
52+
default "/usr/share/ignition"
53+
endmenu
54+
endif
Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
################################################################################
2+
#
3+
# amazon-ignition
4+
#
5+
################################################################################
6+
7+
AMAZON_IGNITION_VERSION = 5e0e61cffb4cc65e4fc68e51a84a411a9875b5dd
8+
AMAZON_IGNITION_SITE_METHOD = git
9+
AMAZON_IGNITION_SITE = [email protected]:Metrological/amazon.git
10+
AMAZON_IGNITION_DEPENDENCIES = jpeg libpng wpeframework amazon-backend libcurl
11+
# AMAZON_IGNITION_DEPENDENCIES = zlib jpeg libcurl libpng icu wpeframework amazon amazon-backend
12+
AMAZON_IGNITION_SUPPORTS_IN_SOURCE_BUILD = NO
13+
AMAZON_IGNITION_INSTALL_STAGING = YES
14+
AMAZON_IGNITION_INSTALL_TARGET = YES
15+
16+
AMAZON_IGNITION_SUBDIR = ignition
17+
18+
AMAZON_IGNITION_DEVICE_LAYER_DIR = "$(@D)/thunder/linux-device-layer/implementation/"
19+
AMAZON_IGNITION_RUBY_PLATFORM_ROOT = "$(@D)/thunder/amp-thunder"
20+
AMAZON_IGNITION_BUILD_DIR = "$(AMAZON_IGNITION_SRCDIR)/buildroot-build"
21+
AMAZON_IGNITION_BINARY_INSTALL_DIR = "$(@D)/binary-install"
22+
AMAZON_IGNITION_TEST_INSTALL_BASE_DIR = "$(AMAZON_IGNITION_BINARY_INSTALL_DIR)/test-install"
23+
24+
ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
25+
AMAZON_IGNITION_DEPENDENCIES += rpi-userland
26+
endif
27+
28+
ifeq ($(BR2_PACKAGE_BCM_REFSW),y)
29+
AMAZON_IGNITION_DEPENDENCIES += bcm-refsw
30+
endif
31+
32+
# Default CMake config
33+
AMAZON_IGNITION_CONF_OPTS += \
34+
-DCMAKE_SYSTEM_NAME=Linux \
35+
-DCMAKE_INSTALL_PREFIX=${AMAZON_IGNITION_BINARY_INSTALL_DIR} \
36+
-DBUILD_SHARED_LIBS=OFF
37+
38+
ifeq ($(BR2_PACKAGE_AMAZON_IGNITION),y)
39+
40+
AMAZON_IGNITION_CONF_OPTS += \
41+
-DDEVICE_LAYER_DIR=${AMAZON_IGNITION_DEVICE_LAYER_DIR} \
42+
-DIGNITION_PLATFORM_LINK_LIBRARIES="-pthread" \
43+
-DUSE_MEDIA_PIPELINE_BACKEND=OFF \
44+
-DBUILD_AS_SHARED_LIBRARY=ON \
45+
-DBUILD_CURL_7_72_0=ON \
46+
-DDISABLE_SAFE_BUILD_ROOT_CHECK=ON
47+
48+
ifeq ($(BR2_PACKAGE_AMAZON_IGNITION_BUILD_TESTS),y)
49+
AMAZON_IGNITION_CONF_OPTS += -DBUILD_SHARED_LIBRARY_LAUNCHER=ON
50+
endif
51+
52+
ifeq ($(BR2_PACKAGE_AMAZON_IGNITION_BUILD_HAWKTRACER),y)
53+
AMAZON_IGNITION_CONF_OPTS += -DENABLE_HAWKTRACER=ON
54+
else
55+
AMAZON_IGNITION_CONF_OPTS += -DENABLE_HAWKTRACER=OFF
56+
endif
57+
58+
ifeq ($(BR2_PACKAGE_AMAZON_IGNITION_DEVELOPER_MODE),y)
59+
AMAZON_IGNITION_CONF_OPTS += -DDEVELOPMENT_MODE=ON
60+
else
61+
AMAZON_IGNITION_CONF_OPTS += -DDEVELOPMENT_MODE=OFF
62+
endif
63+
64+
ifeq ($(BR2_PACKAGE_EXPLORA_SDK),y)
65+
AMAZON_IGNITION_DEVICE_LAYER_CMAKE_ARGS += -DUSE_EXPLICIT_SOFTWARE_CRYPTOGRAPHY=ON
66+
endif
67+
68+
# This is still experimental
69+
# Build smallest 41MB/3,2MB (DEBUG/RELEASE) results
70+
# -DBUILD_FREETYPE_LIB=OFF safes 2MB/0,5MB. check that its linked properly
71+
# -DIGNITE_DISABLE_ICU_BUILD=ON safes 13MB/11,6MB.
72+
# -DENABLE_WEBSOCKETS=OFF safes 2MB/0,2MB
73+
# -DBUILD_HARFBUZZ_LIB=OFF safes 9MB/0,5MB but minimal version should be 2.6.2, check netflix and webkit. Check that its linked properly
74+
#ifeq ($(BR2_PACKAGE_AMAZON_IGNITION_BUILD_SMALL),y)
75+
# AMAZON_IGNITION_CONF_OPTS += \
76+
# -DUSE_SYSTEM_LIBRARIES=ON \
77+
# -DBUILD_LIBJPEG=OFF \
78+
# -DBUILD_LIBPNG=OFF
79+
#endif
80+
81+
ifeq ($(BR2_PACKAGE_AMAZON_IGNITION_BUILD_RUBY),y)
82+
AMAZON_IGNITION_CONF_OPTS += \
83+
-DBUILD_RUBY_PLAYER=ON \
84+
-DRUBY_PLATFORM_ROOT=${AMAZON_IGNITION_RUBY_PLATFORM_ROOT} \
85+
-DUSE_FAKE_PLAYER=OFF
86+
else
87+
AMAZON_IGNITION_CONF_OPTS += \
88+
-DBUILD_RUBY_PLAYER=OFF
89+
endif
90+
91+
ifeq ($(BR2_PACKAGE_AMAZON_IGNITION_BUILD_SHARED_LIBRARY_LAUNCHER),y)
92+
AMAZON_IGNITION_CONF_OPTS += \
93+
-DBUILD_SHARED_LIBRARY_LAUNCHER=ON
94+
endif
95+
96+
ifeq ($(BR2_PACKAGE_AMAZON_IGNITION_BUILD_TYPE_RELEASE),y)
97+
AMAZON_IGNITION_BUILD_TYPE = Release
98+
else ifeq ($(BR2_PACKAGE_AMAZON_IGNITION_BUILD_TYPE_RELEASE_DEBUG),y)
99+
AMAZON_IGNITION_BUILD_TYPE = RelWithDebInfo
100+
else ifeq ($(BR2_PACKAGE_AMAZON_IGNITION_BUILD_TYPE_DEBUG),y)
101+
AMAZON_IGNITION_BUILD_TYPE = Debug
102+
else ifeq ($(BR2_PACKAGE_AMAZON_IGNITION_BUILD_TYPE_TESTING),y)
103+
AMAZON_IGNITION_BUILD_TYPE = Testing
104+
endif
105+
106+
AMAZON_IGNITION_BUILD_TYPE ?= Release
107+
108+
AMAZON_IGNITION_CONF_OPTS += \
109+
-DCMAKE_BUILD_TYPE=${AMAZON_IGNITION_BUILD_TYPE}
110+
111+
endif
112+
# BR2_PACKAGE_AMAZON_IGNITION
113+
114+
define IGNITION_MAKE
115+
@$(call MESSAGE,"Ignition make target $(call qstrip, ${1})")
116+
@$(MAKE) -C $(AMAZON_IGNITION_BUILD_DIR)$(call qstrip, ${2}) $(call qstrip, ${1})
117+
endef
118+
119+
ifeq ($(BR2_PACKAGE_AMAZON_IGNITION_BUILD_TESTS),y)
120+
AMAZON_IGNITION_DEVICE_LAYER_CMAKE_ARGS += -DUSE_INCLUDED_DPP_TEST_CONFIG=ON
121+
endif
122+
123+
AMAZON_IGNITION_CONF_OPTS += \
124+
-DDEVICE_LAYER_CMAKE_ARGS="${AMAZON_IGNITION_DEVICE_LAYER_CMAKE_ARGS}"
125+
126+
$(eval $(cmake-package))
127+
128+
define AMAZON_IGNITION_INSTALL_GENERIC
129+
@$(call MESSAGE,"Install ignition targets")
130+
@$(call IGNITION_MAKE, install)
131+
endef
132+
133+
define AMAZON_IGNITION_INSTALL_IGNITION
134+
@$(call MESSAGE,"Installing ignition to: $(call qstrip,$(1))")
135+
@$(INSTALL) -v -d -m 0755 $(call qstrip,$(1))/$(BR2_PACKAGE_AMAZON_IGNITION_IG_INSTALL_PATH)
136+
137+
rsync -av ${AMAZON_IGNITION_BINARY_INSTALL_DIR}/ $(call qstrip,$(1))$(BR2_PACKAGE_AMAZON_IGNITION_IG_INSTALL_PATH)
138+
139+
ln -sf "../../../lib/libamazon-backend.so" "$(call qstrip,$(1))$(BR2_PACKAGE_AMAZON_IGNITION_IG_INSTALL_PATH)lib/libamazon-backend.so"
140+
141+
ln -sf "$(BR2_PACKAGE_AMAZON_IGNITION_IG_INSTALL_PATH)lib/libignition.so" "$(call qstrip,$(1))/usr/lib/libignition.so"
142+
ln -sf "$(BR2_PACKAGE_AMAZON_IGNITION_IG_INSTALL_PATH)lib/libprime-video-device-layer.so" "$(call qstrip,$(1))/usr/lib/libprime-video-device-layer.so"
143+
ln -sf "$(BR2_PACKAGE_AMAZON_IGNITION_IG_INSTALL_PATH)lib/libamazon_playready.so" "$(call qstrip,$(1))/usr/lib/libamazon_playready.so"
144+
ln -sf "$(BR2_PACKAGE_AMAZON_IGNITION_IG_INSTALL_PATH)lib/libamazon_player_mediapipeline.so" "$(call qstrip,$(1))/usr/lib/libamazon_player_mediapipeline.so"
145+
ln -sf "$(BR2_PACKAGE_AMAZON_IGNITION_IG_INSTALL_PATH)lib/libamazon_player.so" "$(call qstrip,$(1))/usr/lib/libamazon_player.so"
146+
endef
147+
148+
define AMAZON_IGNITION_INSTALL_IGNITION_DEV
149+
@$(call MESSAGE,"Installing ignition headers to: ${STAGING_DIR}/usr/include/ignition")
150+
@$(call AMAZON_IGNITION_INSTALL_IGNITION, ${STAGING_DIR})
151+
152+
@$(INSTALL) -v -d -m 0755 ${STAGING_DIR}/usr/include/ignition
153+
154+
@$(call MESSAGE,"Installing ignition header [ ${AMAZON_IGNITION_DEVICE_LAYER_DIR}/../interface/ ] to: ${STAGING_DIR}/usr/include/ignition")
155+
cd "${AMAZON_IGNITION_DEVICE_LAYER_DIR}/../interface/include" && find -name "*.h" -type f -exec cp --parents {} ${STAGING_DIR}/usr/include/ignition/ \;
156+
endef
157+
158+
ifeq ($(BR2_PACKAGE_AMAZON_IGNITION_BUILD_TESTS),y)
159+
AMAZON_IGNITION_INSTALL_STAGING = NO
160+
AMAZON_IGNITION_INSTALL_TARGET = NO
161+
162+
define AMAZON_IGNITION_BUILD_IGNITION_TESTS
163+
@$(call MESSAGE,"Building ignition tests")
164+
@$(call IGNITION_MAKE, test_ignition)
165+
endef
166+
167+
define AMAZON_IGNITION_BUILD_INTERACTION_TESTS
168+
@$(call MESSAGE,"Building ignition tests")
169+
@$(call IGNITION_MAKE, integration-tests-package-with-mock-device-layer)
170+
endef
171+
172+
define AMAZON_IGNITION_BUILD_DEVICE_LAYER_TESTS
173+
@$(call MESSAGE,"Building device layer test")
174+
@$(call IGNITION_MAKE, install-prime-video-device-layer-test)
175+
endef
176+
177+
define AMAZON_IGNITION_BUILD_INTERGRATION_TESTS
178+
@$(call MESSAGE,"Building device layer test")
179+
@$(call IGNITION_MAKE, integration-tests-package)
180+
endef
181+
182+
define AMAZON_IGNITION_BUILD_CMDS
183+
@$(call AMAZON_IGNITION_BUILD_INTERGRATION_TESTS)
184+
endef
185+
186+
define AMAZON_IGNITION_INSTALL_STAGING_CMDS
187+
endef
188+
189+
define AMAZON_IGNITION_INSTALL_TARGET_CMDS
190+
endef
191+
192+
else #BR2_PACKAGE_AMAZON_IGNITION_BUILD_TESTS
193+
define AMAZON_IGNITION_BUILD_CMDS
194+
@$(call IGNITION_MAKE all)
195+
endef
196+
197+
AMAZON_IGNITION_POST_BUILD_HOOKS += AMAZON_IGNITION_INSTALL_GENERIC
198+
199+
define AMAZON_IGNITION_INSTALL_STAGING_CMDS
200+
@$(call AMAZON_IGNITION_INSTALL_IGNITION_DEV)
201+
endef
202+
203+
define AMAZON_IGNITION_INSTALL_TARGET_CMDS
204+
@$(call AMAZON_IGNITION_INSTALL_IGNITION_DEV)
205+
@$(call AMAZON_IGNITION_INSTALL_IGNITION, ${TARGET_DIR})
206+
endef
207+
208+
endif # BR2_PACKAGE_AMAZON_IGNITION_BUILD_TESTS
209+
210+

0 commit comments

Comments
 (0)