Radisys OLTs migration to BAL3.10.2.2

Change-Id: I146cbb480158282a940692e785f90317534cb0f5
diff --git a/BUILDING.md b/BUILDING.md
index 8f6d0fc..2f2e45c 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -11,7 +11,7 @@
 * `SW-BCM686OLT_<BAL_VER>.tgz` - Broadcom BAL source and Maple/Aspen SDK
 * `sdk-all-<SDK_VER>.tar.gz` - Broadcom Qumran SDK
 * `ACCTON_BAL_<BAL_VER>-<ACCTON_VER>.patch` - Accton/Edgecore's patch
-* `PHOENIX_BAL_<BAL_VER>_<PHOENIX_VER>.patch` - Phoenix/Radisys patch
+* `RADISYS_BAL_<BAL_VER>_<RADISYS_VER>.patch` - Radisys patch
 
 The versions currently supported by the OpenOLT agent for Accton/Edgecore ASXvOLT16/ASGvOLT64 are:
 
@@ -23,9 +23,9 @@
 
 The versions currently supported by the OpenOLT agent for Phoenix/Radisys RLT-3200G-W are:
 
-* `SW-BCM686OLT_3_4_9_9.tgz`
+* `SW-BCM686OLT_3_10_2_2.tgz`
 * `sdk-all-6.5.21.tar.gz`
-* `PHOENIX_BAL_3.4.9.9_V20210727.patch`. This is downloadable from the common CSP CS00003233745.
+* `RADISYS_BAL_3.10.2.2_V20211129.patch`. This will be provided by Radisys.
 
 > NOTE: the repository does not contain the above three source packages.  These
 > are needed to build the OpenOLT agent executable. Contact [Dave Baron at
@@ -277,7 +277,7 @@
 
 ```shell
 cd <dir containing Broadcom source and patch files>
-cp PHOENIX_BAL_3.4.9.9_V20210727.patch SW-BCM686OLT_3_4_9_9.tgz sdk-all-6.5.13.tar.gz <cloned openolt repo path>/agent/download
+cp RADISYS_BAL_3.10.2.2_V20211129.patch sdk-all-6.5.21.tar.gz SW-BCM686OLT_3_10_2_2.tgz <cloned openolt repo path>/agent/download
 ```
 
 Run the configure script to generate the appropriate Makefile scaffolding for
diff --git a/README.md b/README.md
index c62563d..82f2293 100644
--- a/README.md
+++ b/README.md
@@ -9,8 +9,7 @@
 
 OpenOLT agent uses Broadcom's BAL (Broadband Adaptation Layer) software for
 interfacing with the Maple/Qumran chipsets in OLTs such as the Edgecore/Accton
-ASXvOLT16 and with Aspen/Qumran chipsets in OLTs such as the Radisys/Phoenix
-RLT-3200G-W.
+ASXvOLT16 and with Aspen/Qumran chipsets in OLTs such as the Radisys RLT-3200G-W.
 The current version of the Broadcom BAL integrated with OpenOLT agent is BAL3.10.2.2.
 
 ```text
diff --git a/VERSION b/VERSION
index 7c69a55..a76ccff 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.7.0
+3.7.1
diff --git a/agent/Makefile.in b/agent/Makefile.in
index abcc0cc..ab9de52 100644
--- a/agent/Makefile.in
+++ b/agent/Makefile.in
@@ -33,7 +33,7 @@
 BAL_API_SO_VER = $(BAL_MAJOR_VER).$(BAL_MINOR_VER).$(BAL_REV_HOST_VER)
 BAL_VER = $(BAL_API_SO_VER).$(BAL_REV_EMBEDDED_VER)
 ifeq ("$(strip $(OPENOLTDEVICE))",$(findstring "$(strip $(OPENOLTDEVICE))", "rlt-3200g-w" "rlt-1600g-w" "rlt-1600x-w"))
-DEV_VER = 202111040101
+DEV_VER = 20211129
 # Version of Open Network Linux (ONL).
 ONL_KERN_VER_MAJOR = 4.19
 else
@@ -174,17 +174,29 @@
 		cd $(BAL_API_DIR); \
 		git clone https://github.com/balapi/bal-sdk.git -b $(BAL_VER); \
 		mv bal-sdk bal-sdk-$(BAL_VER); \
-		cat $(TOP_DIR)/download/$(BAL_API_PATCH) | patch -p1 -d $(BAL_API_DIR)/bal-sdk-$(BAL_VER); \
-		cd $(BAL_API_DIR)/bal-sdk-$(BAL_VER); \
-		make BOARD=$(OPENOLTDEVICE); \
-		cp build/fs/libbal_host_api-oss.$(BAL_API_SO_VER).so ../../../$(BUILD_DIR)/libbal_host_api-oss.so; \
-		cp config/$(OPENOLTDEVICE)/bcm_config.h build/fs/include; \
-		cd .. && ln -s bal-sdk-$(BAL_VER)/build/fs/include include; \
-		cd; \
+		if [ "$(OPENOLTDEVICE)" = "rlt-3200g-w" ] || [ "$(OPENOLTDEVICE)" = "rlt-1600g-w" ] || [ "$(OPENOLTDEVICE)" = "rlt-1600x-w" ]; \
+		then \
+			cd $(BAL_API_DIR)/bal-sdk-$(BAL_VER); \
+			make; \
+			cp build/fs/libbal_host_api-oss.$(BAL_API_SO_VER).so ../../../$(BUILD_DIR)/libbal_host_api-oss.so; \
+			cd .. && ln -s bal-sdk-$(BAL_VER)/build/fs/include include; \
+			cd; \
+		else \
+			cat $(TOP_DIR)/download/$(BAL_API_PATCH) | patch -p1 -d $(BAL_API_DIR)/bal-sdk-$(BAL_VER); \
+			cd $(BAL_API_DIR)/bal-sdk-$(BAL_VER); \
+			make BOARD=$(OPENOLTDEVICE); \
+			cp build/fs/libbal_host_api-oss.$(BAL_API_SO_VER).so ../../../$(BUILD_DIR)/libbal_host_api-oss.so; \
+			cp config/$(OPENOLTDEVICE)/bcm_config.h build/fs/include; \
+			cd .. && ln -s bal-sdk-$(BAL_VER)/build/fs/include include; \
+			cd; \
+		fi; \
 	else \
 		cd $(BAL_API_DIR)/bal-sdk-$(BAL_VER); \
 		cp build/fs/libbal_host_api-oss.$(BAL_API_SO_VER).so ../../../$(BUILD_DIR)/libbal_host_api-oss.so; \
-		cp config/$(OPENOLTDEVICE)/bcm_config.h build/fs/include; \
+		if [ "$(OPENOLTDEVICE)" != "rlt-3200g-w" ] && [ "$(OPENOLTDEVICE)" != "rlt-1600g-w" ] && [ "$(OPENOLTDEVICE)" != "rlt-1600x-w" ]; \
+		then \
+			cp config/$(OPENOLTDEVICE)/bcm_config.h build/fs/include; \
+		fi; \
 		cd .. && ln -s bal-sdk-$(BAL_VER)/build/fs/include include; \
 		cd; \
 	fi;
@@ -232,6 +244,7 @@
 BAL_SDK_ZIP = SW-BCM686OLT_$(subst .,_,$(BAL_VER)).tgz
 CSG_SDK_ZIP = sdk-all-$(SDK_VER).tar.gz
 ACCTON_PATCH = ACCTON_BAL_$(BAL_VER)-V$(DEV_VER).patch
+RADISYS_PATCH = RADISYS_BAL_$(BAL_VER)_V$(DEV_VER).patch
 BROADCOM_IP_PATCH = ACCTON_BAL_$(BAL_VER)-V$(DEV_VER)-BROADCOM-IP.patch 
 BCM_SWITCH_SDK = $(BAL_DIR)/switch_sdk/$(SDK_VER)
 
@@ -241,8 +254,12 @@
 	tar zxvf download/$(BAL_SDK_ZIP) --strip 1 -C $(BAL_DIR)
 	cp download/$(CSG_SDK_ZIP) $(BCM_SWITCH_SDK)
 	chmod -R 744 $(BAL_DIR)
+ifeq ("$(strip $(OPENOLTDEVICE))",$(findstring "$(strip $(OPENOLTDEVICE))", "rlt-3200g-w" "rlt-1600g-w" "rlt-1600x-w"))
+	cat download/$(RADISYS_PATCH) | patch -p1 -d $(BAL_DIR)
+else
 	cat download/$(ACCTON_PATCH) | patch -p1 -d $(BAL_DIR)
 	cat download/$(BROADCOM_IP_PATCH) | patch -p1 -d $(BAL_DIR)
+endif
 
 ifeq ("$(strip $(OPENOLTDEVICE))","asfvolt16")
 	echo "setenv port_speed_for_100 $(PORT_100G_SPEED)" > $(PORT_SPEED_FILE)
@@ -253,8 +270,9 @@
 
 ifeq ("$(strip $(OPENOLTDEVICE))",$(findstring "$(strip $(OPENOLTDEVICE))", "rlt-3200g-w" "rlt-1600g-w" "rlt-1600x-w"))
 	chmod 0755 $(BAL_DIR)/onu_mgmt/libomcistack/me_codegen/omci_stack_codegen
-	make -C $(BAL_DIR) BOARD=phoenix ONL=$(TOP_DIR)/$(ONL_DIR)/OpenNetworkLinux ONL_DEBIAN_SUITE=$(shell lsb_release -c -s)
-	make -C $(BAL_DIR) BOARD=phoenix release_board
+	chmod 0755 $(BCM_SWITCH_SDK)/sdk_patches_apply.sh
+	make -C $(BAL_DIR) BOARD=radisys ONL=$(TOP_DIR)/$(ONL_DIR)/OpenNetworkLinux ONL_DEBIAN_SUITE=$(shell lsb_release -c -s)
+	make -C $(BAL_DIR) BOARD=radisys release_board
 else
 	make -C $(BAL_DIR) BOARD=$(OPENOLTDEVICE) ONL_DIR=$(TOP_DIR)/$(ONL_DIR)/OpenNetworkLinux
 	make -C $(BAL_DIR) BOARD=$(OPENOLTDEVICE) release_board
@@ -324,7 +342,11 @@
 all: $(BUILD_DIR)/openolt
 $(BUILD_DIR)/openolt: $(BUILD_DIR)/lib$(BALLIBNAME).so sdk protos $(OBJS)
 	$(CXX) $(LDFLAGS) -L$(BALLIBDIR) $(OBJS) $(OPENOLT_API_LIB) $(LIBPROTOBUF_PATH)/libprotobuf.a -o $@ -l$(BALLIBNAME) $(shell pkg-config --libs protobuf grpc++ grpc) $(PCAPPLUSPLUS_LIB_PATH)
+ifeq ("$(strip $(OPENOLTDEVICE))",$(findstring "$(strip $(OPENOLTDEVICE))", "rlt-3200g-w" "rlt-1600g-w" "rlt-1600x-w"))
+	ln -sf $(TOP_DIR)/$(BAL_DIR)/build/fs/radisys/release/release_radisys_v$(BAL_VER).tar.gz $(BUILD_DIR)/release_$(OPENOLTDEVICE)_V$(BAL_VER).$(DEV_VER).tar.gz
+else
 	ln -sf $(TOP_DIR)/$(BAL_DIR)/build/fs/$(OPENOLTDEVICE)/release/release_$(OPENOLTDEVICE)_V$(BAL_VER).$(DEV_VER).tar.gz $(BUILD_DIR)/.
+endif
 	ln -sf $(LIBGRPC_PATH)/libz.so.1 $(BUILD_DIR)/libz.so.1
 	ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 $(BUILD_DIR)/libstdc++.so.6
 	strip $(BUILD_DIR)/openolt
diff --git a/agent/device/rlt-1600g-w/mkdebian/debian/changelog b/agent/device/rlt-1600g-w/mkdebian/debian/changelog
index 3ab95e7..3a6d5b9 100644
--- a/agent/device/rlt-1600g-w/mkdebian/debian/changelog
+++ b/agent/device/rlt-1600g-w/mkdebian/debian/changelog
@@ -1,7 +1,7 @@
-rlt-1600g-w (3.4.9.9+radisys-V20210727) stable; urgency=high
+rlt-1600g-w (3.10.2.2+radisys-V20211129) stable; urgency=high
 
-    * Based on code from SW-BCM686OLT_3_4_9_9.tgz.
+    * Based on code from SW-BCM686OLT_3_10_2_2.tgz.
     * Patches required for BAL to support RLT-1600G-W has been merged to
-      PHOENIX_BAL_3.4.9.9_V20210727.patch.
+      RADISYS_BAL_3.10.2.2_V20211129.patch.
 
- -- Naresh Kumar Palanisamy <nakumar@radisys.com>  Tue, 27 JUL 2021 09:30:00 +0400
+ -- Thiyagarajan Subramani <tsubrama@radisys.com>  Wed, 23 FEB 2022 09:30:00 +0400
diff --git a/agent/device/rlt-1600g-w/mkdebian/debian/control b/agent/device/rlt-1600g-w/mkdebian/debian/control
index 1ae94aa..73d82ba 100644
--- a/agent/device/rlt-1600g-w/mkdebian/debian/control
+++ b/agent/device/rlt-1600g-w/mkdebian/debian/control
@@ -9,5 +9,5 @@
 Architecture: amd64
 Depends: ${shlibs:Depends}
 Description: Broadcom OLT drivers,CLI
-  ported from Broadcom SDK-3.4.9.9 package
+  ported from Broadcom SDK-3.10.2.2 package
 
diff --git a/agent/device/rlt-1600g-w/mkdebian/debian/files b/agent/device/rlt-1600g-w/mkdebian/debian/files
index 6a17408..9381774 100644
--- a/agent/device/rlt-1600g-w/mkdebian/debian/files
+++ b/agent/device/rlt-1600g-w/mkdebian/debian/files
@@ -1,3 +1,3 @@
-rlt-1600g-w-dbgsym_3.4.9.9+radisys-V20210727_amd64.deb debug extra
-rlt-1600g-w_3.4.9.9+radisys-V20210727_amd64.buildinfo misc optional
-rlt-1600g-w_3.4.9.9+radisys-V20210727_amd64.deb misc optional
+rlt-1600g-w-dbgsym_3.10.2.2+radisys-V20211129_amd64.deb debug extra
+rlt-1600g-w_3.10.2.2+radisys-V20211129_amd64.buildinfo misc optional
+rlt-1600g-w_3.10.2.2+radisys-V20211129_amd64.deb misc optional
diff --git a/agent/device/rlt-1600g-w/mkdebian/debian/rlt-1600g-w.postinst b/agent/device/rlt-1600g-w/mkdebian/debian/rlt-1600g-w.postinst
index 96de4ca..236dbe5 100755
--- a/agent/device/rlt-1600g-w/mkdebian/debian/rlt-1600g-w.postinst
+++ b/agent/device/rlt-1600g-w/mkdebian/debian/rlt-1600g-w.postinst
@@ -30,7 +30,7 @@
 mv /tmp/openolt /broadcom
 mv /tmp/libz.so.1 /usr/local/lib
 mv /tmp/libstdc++.so.6 /usr/local/lib
-mv /tmp/libbal_host_api.so /usr/local/lib
+mv /tmp/libbal_host_api-oss.so /usr/local/lib
 
 cp /tmp/logrotate.d/openolt /etc/logrotate.d
 chmod +x /opt/openolt/openolt_dev_mgmt_daemon_process_watchdog
diff --git a/agent/device/rlt-1600g-w/mkdebian/debian/rlt-1600g-w.postrm b/agent/device/rlt-1600g-w/mkdebian/debian/rlt-1600g-w.postrm
index fd44b74..ab6c3b5 100755
--- a/agent/device/rlt-1600g-w/mkdebian/debian/rlt-1600g-w.postrm
+++ b/agent/device/rlt-1600g-w/mkdebian/debian/rlt-1600g-w.postrm
@@ -44,7 +44,7 @@
 
 rm -rf /run/bcm68650
 rm -rf /usr/local/lib/libz.so.1
-rm -rf /usr/local/lib/libbal_host_api.so
+rm -rf /usr/local/lib/libbal_host_api-oss.so
 rm -rf /usr/local/lib/libstdc++.so.6
 rm -f /etc/init.d/openolt
 rm -f /etc/init.d/dev_mgmt_daemon
diff --git a/agent/device/rlt-1600g-w/mkdebian/debian/rlt-1600g-w.preinst b/agent/device/rlt-1600g-w/mkdebian/debian/rlt-1600g-w.preinst
index fd44b74..ab6c3b5 100755
--- a/agent/device/rlt-1600g-w/mkdebian/debian/rlt-1600g-w.preinst
+++ b/agent/device/rlt-1600g-w/mkdebian/debian/rlt-1600g-w.preinst
@@ -44,7 +44,7 @@
 
 rm -rf /run/bcm68650
 rm -rf /usr/local/lib/libz.so.1
-rm -rf /usr/local/lib/libbal_host_api.so
+rm -rf /usr/local/lib/libbal_host_api-oss.so
 rm -rf /usr/local/lib/libstdc++.so.6
 rm -f /etc/init.d/openolt
 rm -f /etc/init.d/dev_mgmt_daemon
diff --git a/agent/device/rlt-1600g-w/mkdebian/debian/rules b/agent/device/rlt-1600g-w/mkdebian/debian/rules
index c56d2db..51cc83c 100755
--- a/agent/device/rlt-1600g-w/mkdebian/debian/rules
+++ b/agent/device/rlt-1600g-w/mkdebian/debian/rules
@@ -29,7 +29,7 @@
 	cp -a $(CURDIR)/debian/release_rlt-1600g-w_V*.tar.gz $(DEB_DH_INSTALL_SOURCEDIR)/tmp
 	cp -a $(CURDIR)/debian/libz.so.1 $(DEB_DH_INSTALL_SOURCEDIR)/tmp
 	cp -a $(CURDIR)/debian/libstdc++.so.6 $(DEB_DH_INSTALL_SOURCEDIR)/tmp
-	cp -a $(CURDIR)/debian/libbal_host_api.so $(DEB_DH_INSTALL_SOURCEDIR)/tmp
+	cp -a $(CURDIR)/debian/libbal_host_api-oss.so $(DEB_DH_INSTALL_SOURCEDIR)/tmp
 	cp -a $(CURDIR)/debian/openolt $(DEB_DH_INSTALL_SOURCEDIR)/tmp
 	cp -a $(CURDIR)/debian/init.d $(DEB_DH_INSTALL_SOURCEDIR)/tmp
 	cp -a $(CURDIR)/debian/logrotate.d $(DEB_DH_INSTALL_SOURCEDIR)/tmp
diff --git a/agent/device/rlt-1600x-w/mkdebian/debian/changelog b/agent/device/rlt-1600x-w/mkdebian/debian/changelog
index c604cc1..1c435f9 100644
--- a/agent/device/rlt-1600x-w/mkdebian/debian/changelog
+++ b/agent/device/rlt-1600x-w/mkdebian/debian/changelog
@@ -1,7 +1,7 @@
-rlt-1600x-w (3.4.9.9+radisys-V20210727) stable; urgency=high
+rlt-1600x-w (3.10.2.2+radisys-V20211129) stable; urgency=high
 
-    * Based on code from SW-BCM686OLT_3_4_9_9.tgz.
+    * Based on code from SW-BCM686OLT_3_10_2_2.tgz.
     * Patches required for BAL to support RLT-1600X-W has been merged to
-      PHOENIX_BAL_3.4.9.9_V20210727.patch.
+      RADISYS_BAL_3.10.2.2_V20211129.patch.
 
- -- Naresh Kumar Palanisamy <nakumar@radisys.com>  Tue, 27 JUL 2021 09:30:00 +0400
+ -- Thiyagarajan Subramani <tsubrama@radisys.com>  Wed, 23 FEB 2022 09:30:00 +0400
diff --git a/agent/device/rlt-1600x-w/mkdebian/debian/control b/agent/device/rlt-1600x-w/mkdebian/debian/control
index 9cafed6..8614ab1 100644
--- a/agent/device/rlt-1600x-w/mkdebian/debian/control
+++ b/agent/device/rlt-1600x-w/mkdebian/debian/control
@@ -9,5 +9,5 @@
 Architecture: amd64
 Depends: ${shlibs:Depends}
 Description: Broadcom OLT drivers,CLI
-  ported from Broadcom SDK-3.4.9.9 package
+  ported from Broadcom SDK-3.10.2.2 package
 
diff --git a/agent/device/rlt-1600x-w/mkdebian/debian/files b/agent/device/rlt-1600x-w/mkdebian/debian/files
index 36a29b6..5e8d218 100644
--- a/agent/device/rlt-1600x-w/mkdebian/debian/files
+++ b/agent/device/rlt-1600x-w/mkdebian/debian/files
@@ -1,3 +1,3 @@
-rlt-1600x-w-dbgsym_3.4.9.9+radisys-V20210727_amd64.deb debug extra
-rlt-1600x-w_3.4.9.9+radisys-V20210727_amd64.buildinfo misc optional
-rlt-1600x-w_3.4.9.9+radisys-V20210727_amd64.deb misc optional
+rlt-1600x-w-dbgsym_3.10.2.2+radisys-V20211129_amd64.deb debug extra
+rlt-1600x-w_3.10.2.2+radisys-V20211129_amd64.buildinfo misc optional
+rlt-1600x-w_3.10.2.2+radisys-V20211129_amd64.deb misc optional
diff --git a/agent/device/rlt-1600x-w/mkdebian/debian/rlt-1600x-w.postinst b/agent/device/rlt-1600x-w/mkdebian/debian/rlt-1600x-w.postinst
index c78b44f..fd630c8 100755
--- a/agent/device/rlt-1600x-w/mkdebian/debian/rlt-1600x-w.postinst
+++ b/agent/device/rlt-1600x-w/mkdebian/debian/rlt-1600x-w.postinst
@@ -30,7 +30,7 @@
 mv /tmp/openolt /broadcom
 mv /tmp/libz.so.1 /usr/local/lib
 mv /tmp/libstdc++.so.6 /usr/local/lib
-mv /tmp/libbal_host_api.so /usr/local/lib
+mv /tmp/libbal_host_api-oss.so /usr/local/lib
 
 cp /tmp/logrotate.d/openolt /etc/logrotate.d
 chmod +x /opt/openolt/openolt_dev_mgmt_daemon_process_watchdog
diff --git a/agent/device/rlt-1600x-w/mkdebian/debian/rlt-1600x-w.postrm b/agent/device/rlt-1600x-w/mkdebian/debian/rlt-1600x-w.postrm
index fd44b74..ab6c3b5 100755
--- a/agent/device/rlt-1600x-w/mkdebian/debian/rlt-1600x-w.postrm
+++ b/agent/device/rlt-1600x-w/mkdebian/debian/rlt-1600x-w.postrm
@@ -44,7 +44,7 @@
 
 rm -rf /run/bcm68650
 rm -rf /usr/local/lib/libz.so.1
-rm -rf /usr/local/lib/libbal_host_api.so
+rm -rf /usr/local/lib/libbal_host_api-oss.so
 rm -rf /usr/local/lib/libstdc++.so.6
 rm -f /etc/init.d/openolt
 rm -f /etc/init.d/dev_mgmt_daemon
diff --git a/agent/device/rlt-1600x-w/mkdebian/debian/rlt-1600x-w.preinst b/agent/device/rlt-1600x-w/mkdebian/debian/rlt-1600x-w.preinst
index fd44b74..ab6c3b5 100755
--- a/agent/device/rlt-1600x-w/mkdebian/debian/rlt-1600x-w.preinst
+++ b/agent/device/rlt-1600x-w/mkdebian/debian/rlt-1600x-w.preinst
@@ -44,7 +44,7 @@
 
 rm -rf /run/bcm68650
 rm -rf /usr/local/lib/libz.so.1
-rm -rf /usr/local/lib/libbal_host_api.so
+rm -rf /usr/local/lib/libbal_host_api-oss.so
 rm -rf /usr/local/lib/libstdc++.so.6
 rm -f /etc/init.d/openolt
 rm -f /etc/init.d/dev_mgmt_daemon
diff --git a/agent/device/rlt-1600x-w/mkdebian/debian/rules b/agent/device/rlt-1600x-w/mkdebian/debian/rules
index 1da531f..fda420d 100755
--- a/agent/device/rlt-1600x-w/mkdebian/debian/rules
+++ b/agent/device/rlt-1600x-w/mkdebian/debian/rules
@@ -29,7 +29,7 @@
 	cp -a $(CURDIR)/debian/release_rlt-1600x-w_V*.tar.gz $(DEB_DH_INSTALL_SOURCEDIR)/tmp
 	cp -a $(CURDIR)/debian/libz.so.1 $(DEB_DH_INSTALL_SOURCEDIR)/tmp
 	cp -a $(CURDIR)/debian/libstdc++.so.6 $(DEB_DH_INSTALL_SOURCEDIR)/tmp
-	cp -a $(CURDIR)/debian/libbal_host_api.so $(DEB_DH_INSTALL_SOURCEDIR)/tmp
+	cp -a $(CURDIR)/debian/libbal_host_api-oss.so $(DEB_DH_INSTALL_SOURCEDIR)/tmp
 	cp -a $(CURDIR)/debian/openolt $(DEB_DH_INSTALL_SOURCEDIR)/tmp
 	cp -a $(CURDIR)/debian/init.d $(DEB_DH_INSTALL_SOURCEDIR)/tmp
 	cp -a $(CURDIR)/debian/logrotate.d $(DEB_DH_INSTALL_SOURCEDIR)/tmp
diff --git a/agent/device/rlt-3200g-w/mkdebian/debian/changelog b/agent/device/rlt-3200g-w/mkdebian/debian/changelog
index 05e36b0..791278e 100644
--- a/agent/device/rlt-3200g-w/mkdebian/debian/changelog
+++ b/agent/device/rlt-3200g-w/mkdebian/debian/changelog
@@ -1,7 +1,7 @@
-rlt-3200g-w (3.4.9.9+radisys-V20210727) stable; urgency=high
+rlt-3200g-w (3.10.2.2+radisys-V20211129) stable; urgency=high
 
-    * Based on code from SW-BCM686OLT_3_4_9_9.tgz.
+    * Based on code from SW-BCM686OLT_3_10_2_2.tgz.
     * Patches required for BAL to support RLT-3200G-W has been merged to
-      PHOENIX_BAL_3.4.9.9_V20210727.patch.
+      RADISYS_BAL_3.10.2.2_V20211129.patch.
 
- -- Naresh Kumar Palanisamy <nakumar@radisys.com>  Tue, 27 JUL 2021 09:30:00 +0400
+ -- Thiyagarajan Subramani <tsubrama@radisys.com>  Wed, 23 FEB 2022 09:30:00 +0400
diff --git a/agent/device/rlt-3200g-w/mkdebian/debian/control b/agent/device/rlt-3200g-w/mkdebian/debian/control
index 7a9bbc6..8e50a2b 100644
--- a/agent/device/rlt-3200g-w/mkdebian/debian/control
+++ b/agent/device/rlt-3200g-w/mkdebian/debian/control
@@ -9,5 +9,5 @@
 Architecture: amd64
 Depends: ${shlibs:Depends}
 Description: Broadcom OLT drivers,CLI
-  ported from Broadcom SDK-3.4.9.9 package
+  ported from Broadcom SDK-3.10.2.2 package
 
diff --git a/agent/device/rlt-3200g-w/mkdebian/debian/files b/agent/device/rlt-3200g-w/mkdebian/debian/files
index 1e54526..c343b3a 100644
--- a/agent/device/rlt-3200g-w/mkdebian/debian/files
+++ b/agent/device/rlt-3200g-w/mkdebian/debian/files
@@ -1,3 +1,3 @@
-rlt-3200g-w-dbgsym_3.4.9.9+radisys-V20210727_amd64.deb debug extra
-rlt-3200g-w_3.4.9.9+radisys-V20210727_amd64.buildinfo misc optional
-rlt-3200g-w_3.4.9.9+radisys-V20210727_amd64.deb misc optional
+rlt-3200g-w-dbgsym_3.10.2.2+radisys-V20211129_amd64.deb debug extra
+rlt-3200g-w_3.10.2.2+radisys-V20211129_amd64.buildinfo misc optional
+rlt-3200g-w_3.10.2.2+radisys-V20211129_amd64.deb misc optional
diff --git a/agent/device/rlt-3200g-w/mkdebian/debian/rlt-3200g-w.postinst b/agent/device/rlt-3200g-w/mkdebian/debian/rlt-3200g-w.postinst
index 25b782f..cc39740 100755
--- a/agent/device/rlt-3200g-w/mkdebian/debian/rlt-3200g-w.postinst
+++ b/agent/device/rlt-3200g-w/mkdebian/debian/rlt-3200g-w.postinst
@@ -30,7 +30,7 @@
 mv /tmp/openolt /broadcom
 mv /tmp/libz.so.1 /usr/local/lib
 mv /tmp/libstdc++.so.6 /usr/local/lib
-mv /tmp/libbal_host_api.so /usr/local/lib
+mv /tmp/libbal_host_api-oss.so /usr/local/lib
 
 cp /tmp/logrotate.d/openolt /etc/logrotate.d
 chmod +x /opt/openolt/openolt_dev_mgmt_daemon_process_watchdog
diff --git a/agent/device/rlt-3200g-w/mkdebian/debian/rlt-3200g-w.postrm b/agent/device/rlt-3200g-w/mkdebian/debian/rlt-3200g-w.postrm
index fd44b74..ab6c3b5 100755
--- a/agent/device/rlt-3200g-w/mkdebian/debian/rlt-3200g-w.postrm
+++ b/agent/device/rlt-3200g-w/mkdebian/debian/rlt-3200g-w.postrm
@@ -44,7 +44,7 @@
 
 rm -rf /run/bcm68650
 rm -rf /usr/local/lib/libz.so.1
-rm -rf /usr/local/lib/libbal_host_api.so
+rm -rf /usr/local/lib/libbal_host_api-oss.so
 rm -rf /usr/local/lib/libstdc++.so.6
 rm -f /etc/init.d/openolt
 rm -f /etc/init.d/dev_mgmt_daemon
diff --git a/agent/device/rlt-3200g-w/mkdebian/debian/rlt-3200g-w.preinst b/agent/device/rlt-3200g-w/mkdebian/debian/rlt-3200g-w.preinst
index fd44b74..ab6c3b5 100755
--- a/agent/device/rlt-3200g-w/mkdebian/debian/rlt-3200g-w.preinst
+++ b/agent/device/rlt-3200g-w/mkdebian/debian/rlt-3200g-w.preinst
@@ -44,7 +44,7 @@
 
 rm -rf /run/bcm68650
 rm -rf /usr/local/lib/libz.so.1
-rm -rf /usr/local/lib/libbal_host_api.so
+rm -rf /usr/local/lib/libbal_host_api-oss.so
 rm -rf /usr/local/lib/libstdc++.so.6
 rm -f /etc/init.d/openolt
 rm -f /etc/init.d/dev_mgmt_daemon
diff --git a/agent/device/rlt-3200g-w/mkdebian/debian/rules b/agent/device/rlt-3200g-w/mkdebian/debian/rules
index 82c1083..235f4e2 100755
--- a/agent/device/rlt-3200g-w/mkdebian/debian/rules
+++ b/agent/device/rlt-3200g-w/mkdebian/debian/rules
@@ -29,7 +29,7 @@
 	cp -a $(CURDIR)/debian/release_rlt-3200g-w_V*.tar.gz $(DEB_DH_INSTALL_SOURCEDIR)/tmp
 	cp -a $(CURDIR)/debian/libz.so.1 $(DEB_DH_INSTALL_SOURCEDIR)/tmp
 	cp -a $(CURDIR)/debian/libstdc++.so.6 $(DEB_DH_INSTALL_SOURCEDIR)/tmp
-	cp -a $(CURDIR)/debian/libbal_host_api.so $(DEB_DH_INSTALL_SOURCEDIR)/tmp
+	cp -a $(CURDIR)/debian/libbal_host_api-oss.so $(DEB_DH_INSTALL_SOURCEDIR)/tmp
 	cp -a $(CURDIR)/debian/openolt $(DEB_DH_INSTALL_SOURCEDIR)/tmp
 	cp -a $(CURDIR)/debian/init.d $(DEB_DH_INSTALL_SOURCEDIR)/tmp
 	cp -a $(CURDIR)/debian/logrotate.d $(DEB_DH_INSTALL_SOURCEDIR)/tmp
diff --git a/agent/download/Makefile.onl b/agent/download/Makefile.onl
index 5fd51a6..c47206d 100644
--- a/agent/download/Makefile.onl
+++ b/agent/download/Makefile.onl
@@ -23,8 +23,8 @@
 	cd OpenNetworkLinux && git stash && git checkout -B $@ $(COMMIT_ID) && git pull origin pull/822/head -ff -q --no-edit && git apply disable-certificate-validation-v$(COMMIT_ID).patch && docker/tools/onlbuilder --non-interactive -8 -c ./build-onl.sh; \
 	fi;
 onl-4.19:
-	if [ "$(BOARD)" = "rlt-3200g-w" ]; then \
-	        cd OpenNetworkLinux && git stash && git checkout -B $@ $(COMMIT_ID) && bash update_kernel_options.sh && docker/tools/onlbuilder --non-interactive -9 -c ./build-onl.sh; \
+	if [ "$(BOARD)" = "rlt-3200g-w" ] || [ "$(BOARD)" = "rlt-1600g-w" ] || [ "$(BOARD)" = "rlt-1600x-w" ]; then \
+		cd OpenNetworkLinux && git stash && git checkout -B $@ $(COMMIT_ID) && git apply disable-certificate-validation-v$(COMMIT_ID).patch && bash update_kernel_options.sh && docker/tools/onlbuilder --non-interactive -9 -c ./build-onl.sh; \
 	else \
-		cd OpenNetworkLinux && git stash && git checkout -B $@ $(COMMIT_ID) && docker/tools/onlbuilder --non-interactive -9 -c ./build-onl.sh; \
+		cd OpenNetworkLinux && git stash && git checkout -B $@ $(COMMIT_ID) && git pull origin pull/822/head -ff -q --no-edit && git apply disable-certificate-validation-v$(COMMIT_ID).patch && docker/tools/onlbuilder --non-interactive -9 -c ./build-onl.sh; \
 	fi;