Skip to content

Commit a98aa3c

Browse files
author
Neeraj Deshpande
committed
Added support to compile bp3 tool.
1 parent 5a7b210 commit a98aa3c

File tree

5 files changed

+86
-11
lines changed

5 files changed

+86
-11
lines changed

configs/arrisrdkb0_wpe_ml_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ BR2_PACKAGE_BCM_REFSW_PLATFORM_72604_B0=y
3131
BR2_PACKAGE_BCM_REFSW_BOXMODE="4"
3232
BR2_PACKAGE_BCM_REFSW_NXCLIENT_EXAMPLES=y
3333
BR2_PACKAGE_BCM_REFSW_SAGE=y
34+
BR2_PACKAGE_BCM_REFSW_BP3=y
3435

3536
BR2_PACKAGE_DROPBEAR=y
3637
BR2_PACKAGE_LIBSOUP=y
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
diff -ruN bcm-refsw-19.2.orig/BSEAV/tools/bp3/b_bp3_targets.inc bcm-refsw-19.2/BSEAV/tools/bp3/b_bp3_targets.inc
2+
--- bcm-refsw-19.2.orig/BSEAV/tools/bp3/b_bp3_targets.inc 2020-06-24 14:44:51.000000000 +0530
3+
+++ bcm-refsw-19.2/BSEAV/tools/bp3/b_bp3_targets.inc 2021-08-04 14:49:44.891228055 +0530
4+
@@ -47,20 +47,6 @@
5+
endif
6+
7+
# Specify any prerequisite subpackages here:
8+
-include $(B_REFSW_TOP)/BSEAV/opensource/openssl/b_openssl_targets.inc
9+
-B_BP3_SUB_BUILDS += b_openssl_target_build
10+
-B_BP3_SUB_CLEANS += b_openssl_target_clean
11+
-B_BP3_SUB_CLEAN_ALL += b_openssl_target_clean_all
12+
-B_BP3_BUILD_FILES += $(B_OPENSSL_BUILD_FILES)
13+
-B_OPENSSL_TARGET_MAKEFLAGS += $(B_BP3_TARGET_MAKEFLAGS)
14+
-
15+
-include $(B_REFSW_TOP)/BSEAV/opensource/curl/b_curl_targets.inc
16+
-B_BP3_SUB_BUILDS += b_curl_target_libbuild
17+
-B_BP3_SUB_CLEANS += b_curl_target_clean
18+
-B_BP3_SUB_CLEAN_ALL += b_curl_target_clean_all
19+
-B_BP3_BUILD_FILES += $(B_CURL_BUILD_FILES)
20+
-B_CURL_TARGET_MAKEFLAGS += $(B_BP3_TARGET_MAKEFLAGS)
21+
-
22+
include $(B_REFSW_TOP)/BSEAV/opensource/cjson/b_libcjson_targets.inc
23+
B_BP3_SUB_BUILDS += b_cjson_target_build
24+
B_BP3_SUB_CLEANS += b_cjson_target_clean
25+
diff -ruN bcm-refsw-19.2.orig/BSEAV/tools/bp3/bp3_host.c bcm-refsw-19.2/BSEAV/tools/bp3/bp3_host.c
26+
--- bcm-refsw-19.2.orig/BSEAV/tools/bp3/bp3_host.c 2020-06-24 14:44:51.000000000 +0530
27+
+++ bcm-refsw-19.2/BSEAV/tools/bp3/bp3_host.c 2021-08-04 14:56:18.839951128 +0530
28+
@@ -367,7 +367,7 @@
29+
memcpy(uu + 12, &x, 4);
30+
char usn[37];
31+
uuid_unparse(uu, usn);
32+
- strncpy(usn, "bp30", 4); // last digit is version number
33+
+ memcpy(usn, "bp30", 4); // last digit is version number
34+
struct mg_context *ctx = start_webserver();
35+
run_ssdp(port, buf, model, usn);
36+
mg_stop(ctx);
37+
diff -ruN bcm-refsw-19.2.orig/BSEAV/tools/bp3/quick_ssdp.c bcm-refsw-19.2/BSEAV/tools/bp3/quick_ssdp.c
38+
--- bcm-refsw-19.2.orig/BSEAV/tools/bp3/quick_ssdp.c 2020-06-24 14:44:51.000000000 +0530
39+
+++ bcm-refsw-19.2/BSEAV/tools/bp3/quick_ssdp.c 2021-08-04 14:57:39.054248748 +0530
40+
@@ -253,7 +253,7 @@
41+
}
42+
43+
if (pModelName) {
44+
- strncpy(model_name, pModelName, sizeof(model_name));
45+
+ memcpy(model_name, pModelName, sizeof(model_name));
46+
uuid[255] = '\0';
47+
} else {
48+
strcpy(model_name, "deadbeef-dead-beef-dead-beefdeadbeef");

package/bcm-refsw/Config.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,4 +282,10 @@ config BR2_PACKAGE_BCM_REFSW_KERNELSPACE_HEADERS
282282
default n
283283
help
284284
Installs kernelspace nexus headers used to build some kernelmodules like greenpeak.
285+
286+
config BR2_PACKAGE_BCM_REFSW_BP3
287+
bool "bp3tool"
288+
default n
289+
help
290+
BP3 tool
285291
endif

package/bcm-refsw/bcm-refsw.mk

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ else
119119
BCM_REFSW_MAKE_ENV += SAGE_SUPPORT=n
120120
endif
121121

122+
ifeq ($(BR2_PACKAGE_BCM_REFSW_BP3),y)
123+
BCM_REFSW_MAKE_ENV += BP3_PROVISIONING=y
124+
endif
125+
122126
ifeq ($(shell expr $(BCM_REFSW_VERSION) \>= 17.1),1)
123127
BCM_REFSW_VCX = $(BCM_REFSW_DIR)/BSEAV/lib/gpu/${BCM_REFSW_PLATFORM_VC}
124128
else
@@ -181,11 +185,12 @@ define BCM_REFSW_BUILD_CMDS
181185
$(BCM_REFSW_BUILD_NEXUS_LIBB_OS)
182186
$(BCM_REFSW_BUILD_NEXUS_KERNEL_HEADERS)
183187
$(BCM_REFSW_GENERATE_NEXUS_PC)
184-
$(BCM_REFSW_BUILD_SAGE_PRDY30_SVP)
185-
$(BCM_REFSW_BUILD_DRMROOTFS)
186-
$(BCM_REFSW_BUILD_PRDYHTTP)
187-
$(BCM_REFSW_BUILD_SAGE_WIDEVINE)
188-
$(BCM_REFSW_BUILD_SAGE_MANUFACTURING)
188+
$(BCM_REFSW_BUILD_SAGE_PRDY30_SVP)
189+
$(BCM_REFSW_BUILD_DRMROOTFS)
190+
$(BCM_REFSW_BUILD_PRDYHTTP)
191+
$(BCM_REFSW_BUILD_SAGE_WIDEVINE)
192+
$(BCM_REFSW_BUILD_SAGE_MANUFACTURING)
193+
$(BCM_REFSW_BUILD_BP3)
189194
endef
190195

191196
define BCM_REFSW_INSTALL_STAGING_CMDS
@@ -214,12 +219,12 @@ define BCM_REFSW_INSTALL_TARGET_CMDS
214219
$(call BCM_REFSW_INSTALL_SAGE_SRAI, $(TARGET_DIR))
215220
$(call BCM_REFSW_INSTALL_SECBUF, $(TARGET_DIR))
216221
$(call BCM_REFSW_INSTALL_NEXUS_LIBB_OS, $(TARGET_DIR))
217-
$(call BCM_REFSW_INSTALL_PLAYREADY30, $(TARGET_DIR))
218-
$(call BCM_REFSW_INSTALL_WIDEVINE, $(TARGET_DIR))
219-
$(call BCM_REFSW_INSTALL_DRMROOTFS, $(TARGET_DIR))
220-
$(call BCM_REFSW_INSTALL_PRDYHTTP, $(TARGET_DIR))
221-
$(call BCM_REFSW_INSTALL_SAGE_BINS, $(TARGET_DIR))
222-
222+
$(call BCM_REFSW_INSTALL_PLAYREADY30, $(TARGET_DIR))
223+
$(call BCM_REFSW_INSTALL_WIDEVINE, $(TARGET_DIR))
224+
$(call BCM_REFSW_INSTALL_DRMROOTFS, $(TARGET_DIR))
225+
$(call BCM_REFSW_INSTALL_PRDYHTTP, $(TARGET_DIR))
226+
$(call BCM_REFSW_INSTALL_SAGE_BINS, $(TARGET_DIR))
227+
$(call BCM_REFSW_INSTALL_BP3, $(TARGET_DIR))
223228
endef
224229

225230
$(eval $(generic-package))

package/bcm-refsw/nexus.inc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,3 +328,18 @@ define BCM_REFSW_INSTALL_NEXUS_PC
328328
$(INSTALL) -D $(BCM_REFSW_OUTPUT)/nexus.pc $(1)/usr/lib/pkgconfig/
329329
$(INSTALL) -D $(BCM_REFSW_OUTPUT)/nexus-client.pc $(1)/usr/lib/pkgconfig/
330330
endef
331+
332+
ifeq ($(BR2_PACKAGE_BCM_REFSW_BP3),y)
333+
define BCM_REFSW_BUILD_BP3
334+
$(TARGET_CONFIGURE_OPTS) \
335+
$(TARGET_MAKE_ENV) \
336+
$(BCM_REFSW_CONF_OPTS) \
337+
$(BCM_REFSW_MAKE_ENV) \
338+
$(MAKE) -C $(@D)/BSEAV/tools/bp3 install
339+
endef
340+
define BCM_REFSW_INSTALL_BP3
341+
$(INSTALL) -m 750 -D $(BCM_REFSW_BIN)/bp3 $(1)/usr/bin
342+
$(INSTALL) -m 644 -D $(BCM_REFSW_BIN)/libbp3_host.so $(1)/usr/lib
343+
$(INSTALL) -m 644 -D $(BCM_REFSW_BIN)/libcjson.so $(1)/usr/lib
344+
endef
345+
endif

0 commit comments

Comments
 (0)