support for rlt-1600g-w and rlt-1600x-w in GPON mode

Change-Id: Ib230d3e336043980eb00427384a49cb8bd386bb2
diff --git a/agent/device/rlt-1600g-w/mkdebian/build_rlt-1600g-w_deb.sh b/agent/device/rlt-1600g-w/mkdebian/build_rlt-1600g-w_deb.sh
new file mode 100755
index 0000000..e4cc706
--- /dev/null
+++ b/agent/device/rlt-1600g-w/mkdebian/build_rlt-1600g-w_deb.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+#Copyright 2018-present Open Networking Foundation
+#
+#Licensed under the Apache License, Version 2.0 (the "License");
+#you may not use this file except in compliance with the License.
+#You may obtain a copy of the License at
+#
+#http://www.apache.org/licenses/LICENSE-2.0
+#
+#Unless required by applicable law or agreed to in writing, software
+#distributed under the License is distributed on an "AS IS" BASIS,
+#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#See the License for the specific language governing permissions and
+#limitations under the License.
+
+
+export ONL_ARCH="amd64"
+dpkg-buildpackage -b -us -uc -a"$ONL_ARCH"
diff --git a/agent/device/rlt-1600g-w/mkdebian/debian/changelog b/agent/device/rlt-1600g-w/mkdebian/debian/changelog
new file mode 100644
index 0000000..7abf7a7
--- /dev/null
+++ b/agent/device/rlt-1600g-w/mkdebian/debian/changelog
@@ -0,0 +1,7 @@
+rlt-1600g-w (3.4.9.8+radisys-V20210420) stable; urgency=high
+
+    * Based on code from SW-BCM686OLT_3_4_9_8.tgz.
+    * Patches required for BAL to support RLT-1600G-W has been merged to
+      PHOENIX_BAL_3.4.9.8_V20210420.patch.
+
+ -- Thiyagarajan Subramani <thiyagarajan.subramani@radisys.com>  Tue, 20 APR 2021 09:30:00 +0400
diff --git a/agent/device/rlt-1600g-w/mkdebian/debian/compat b/agent/device/rlt-1600g-w/mkdebian/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/agent/device/rlt-1600g-w/mkdebian/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/agent/device/rlt-1600g-w/mkdebian/debian/control b/agent/device/rlt-1600g-w/mkdebian/debian/control
new file mode 100644
index 0000000..35a6aa1
--- /dev/null
+++ b/agent/device/rlt-1600g-w/mkdebian/debian/control
@@ -0,0 +1,13 @@
+Source: rlt-1600g-w
+Section: misc
+Priority: optional
+Maintainer: Thiyagarajan Subramani  <thiyagarajan.subramani@radisys.com>
+Build-Depends: debhelper (>= 4.0.0)
+Standards-Version: 3.6.2
+
+Package: rlt-1600g-w
+Architecture: amd64
+Depends: ${shlibs:Depends}
+Description: Broadcom OLT drivers,CLI
+  ported from Broadcom SDK-3.4.9.8 package
+
diff --git a/agent/device/rlt-1600g-w/mkdebian/debian/copyright b/agent/device/rlt-1600g-w/mkdebian/debian/copyright
new file mode 100644
index 0000000..0e527f0
--- /dev/null
+++ b/agent/device/rlt-1600g-w/mkdebian/debian/copyright
@@ -0,0 +1 @@
+(C) Copyright Broadcom Corporation 2003-2016
diff --git a/agent/device/rlt-1600g-w/mkdebian/debian/files b/agent/device/rlt-1600g-w/mkdebian/debian/files
new file mode 100644
index 0000000..194e4db
--- /dev/null
+++ b/agent/device/rlt-1600g-w/mkdebian/debian/files
@@ -0,0 +1,3 @@
+rlt-1600g-w-dbgsym_3.4.9.8+radisys-V20210420_amd64.deb debug extra
+rlt-1600g-w_3.4.9.8+radisys-V20210420_amd64.buildinfo misc optional
+rlt-1600g-w_3.4.9.8+radisys-V20210420_amd64.deb misc optional
diff --git a/agent/device/rlt-1600g-w/mkdebian/debian/logrotate.d/openolt b/agent/device/rlt-1600g-w/mkdebian/debian/logrotate.d/openolt
new file mode 100644
index 0000000..480b59f
--- /dev/null
+++ b/agent/device/rlt-1600g-w/mkdebian/debian/logrotate.d/openolt
@@ -0,0 +1,10 @@
+/var/log/dev_mgmt_daemon.log
+/var/log/openolt.log
+{
+  rotate 7
+  daily
+  compress
+  missingok
+  delaycompress
+  copytruncate
+}
diff --git a/agent/device/rlt-1600g-w/mkdebian/debian/rlt-1600g-w.install b/agent/device/rlt-1600g-w/mkdebian/debian/rlt-1600g-w.install
new file mode 100644
index 0000000..ceeb05b
--- /dev/null
+++ b/agent/device/rlt-1600g-w/mkdebian/debian/rlt-1600g-w.install
@@ -0,0 +1 @@
+/tmp
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
new file mode 100755
index 0000000..96de4ca
--- /dev/null
+++ b/agent/device/rlt-1600g-w/mkdebian/debian/rlt-1600g-w.postinst
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+#Copyright 2018-present Open Networking Foundation
+#
+#Licensed under the Apache License, Version 2.0 (the "License");
+#you may not use this file except in compliance with the License.
+#You may obtain a copy of the License at
+#
+#http://www.apache.org/licenses/LICENSE-2.0
+#
+#Unless required by applicable law or agreed to in writing, software
+#distributed under the License is distributed on an "AS IS" BASIS,
+#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#See the License for the specific language governing permissions and
+#limitations under the License.
+
+rm -rf /opt/bcm686*
+rm -rf /broadcom
+tar zxf /tmp/release_rlt-1600g-w_V*.tar.gz -C / 2>&1 > /dev/null
+
+mkdir -p /opt/openolt && cp /tmp/watchdog/openolt_dev_mgmt_daemon_process_watchdog /opt/openolt && cp /tmp/watchdog/watchdog.config /opt/openolt
+
+sed -i -e '$i rm -rf \/tmp\/bcm68650_svk_init\/' /etc/rc.local
+[ -f /opt/openolt/openolt_dev_mgmt_daemon_process_watchdog ] && grep -q '\/opt\/openolt\/openolt_dev_mgmt_daemon_process_watchdog' /etc/rc.local || sed -i -e '$i nohup bash \/opt\/openolt\/openolt_dev_mgmt_daemon_process_watchdog &' /etc/rc.local
+
+rm -f /tmp/release_rlt-1600g-w_V*.tar.gz
+rm -f /run/bcm686*
+
+
+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
+
+cp /tmp/logrotate.d/openolt /etc/logrotate.d
+chmod +x /opt/openolt/openolt_dev_mgmt_daemon_process_watchdog
+
+cp /tmp/init.d/dev_mgmt_daemon /etc/init.d
+chmod +x /etc/init.d/dev_mgmt_daemon
+update-rc.d dev_mgmt_daemon defaults
+[ "A`cat ~/.bashrc| grep LD_LIBRARY_PATH`" = "A" ] && echo "export LD_LIBRARY_PATH=/broadcom:\$LD_LIBRARY_PATH" >> ~/.bashrc; . ~/.bashrc
+ldconfig /broadcom
+ln -s /broadcom/libbal_core_real.*.so /broadcom/libbal_core.so
+#cd /broadcom/ && export LD_LIBRARY_PATH=LD_LIBRARY_PATH:/broadcom && ./dev_mgmt_daemon -d -pcie
+service dev_mgmt_daemon start
+echo "Wait for 30 sec for BAL to be ready"
+sleep 30
+
+cp /tmp/init.d/openolt /etc/init.d
+chmod +x /etc/init.d/openolt
+update-rc.d openolt defaults
+service openolt start
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
new file mode 100755
index 0000000..fd44b74
--- /dev/null
+++ b/agent/device/rlt-1600g-w/mkdebian/debian/rlt-1600g-w.postrm
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+#Copyright 2018-present Open Networking Foundation
+#
+#Licensed under the Apache License, Version 2.0 (the "License");
+#you may not use this file except in compliance with the License.
+#You may obtain a copy of the License at
+#
+#http://www.apache.org/licenses/LICENSE-2.0
+#
+#Unless required by applicable law or agreed to in writing, software
+#distributed under the License is distributed on an "AS IS" BASIS,
+#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#See the License for the specific language governing permissions and
+#limitations under the License.
+
+# kill CLI applications
+echo "kill running time application"
+[ -n "`pidof openolt`" ] && service openolt stop
+[ -n "`pidof openolt`" ] && killall openolt
+[ -n "`pidof dev_mgmt_daemon`" ] && service dev_mgmt_daemon stop
+[ -n "`pidof dev_mgmt_daemon`" ] && killall dev_mgmt_daemon
+[ -n "`pidof bcm.user`" ] && killall bcm.user
+[ -n "`pidof dev_mgmt_attach`" ] && killall dev_mgmt_attach
+[ -n "`pidof embedded_console`" ] && killall embedded_console
+[ -n "`pidof example_user_appl`" ] && killall example_user_appl
+
+rm -f /tmp/root_dev_mgmt_pid /tmp/root_dev_mgmt_init_done
+sleep 3
+
+if [ -d /opt/bcm68650 ]; then
+    bash /opt/bcm68650/svk_init.sh -clean
+    sleep 3
+fi
+
+rm -rf /tmp/bcm68650_svk_init/
+
+rm -rf /opt/bcm68650
+rm -rf /opt/openolt
+rm -rf /broadcom
+
+sed -i '\/rm -rf \/tmp\/bcm68650_svk_init/d' /etc/rc.local
+sed -i '\/nohup bash \/opt\/openolt\/openolt_dev_mgmt_daemon_process_watchdog &/d' /etc/rc.local
+
+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/libstdc++.so.6
+rm -f /etc/init.d/openolt
+rm -f /etc/init.d/dev_mgmt_daemon
+rm -f /etc/logrotate.d/openolt
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
new file mode 100755
index 0000000..fd44b74
--- /dev/null
+++ b/agent/device/rlt-1600g-w/mkdebian/debian/rlt-1600g-w.preinst
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+#Copyright 2018-present Open Networking Foundation
+#
+#Licensed under the Apache License, Version 2.0 (the "License");
+#you may not use this file except in compliance with the License.
+#You may obtain a copy of the License at
+#
+#http://www.apache.org/licenses/LICENSE-2.0
+#
+#Unless required by applicable law or agreed to in writing, software
+#distributed under the License is distributed on an "AS IS" BASIS,
+#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#See the License for the specific language governing permissions and
+#limitations under the License.
+
+# kill CLI applications
+echo "kill running time application"
+[ -n "`pidof openolt`" ] && service openolt stop
+[ -n "`pidof openolt`" ] && killall openolt
+[ -n "`pidof dev_mgmt_daemon`" ] && service dev_mgmt_daemon stop
+[ -n "`pidof dev_mgmt_daemon`" ] && killall dev_mgmt_daemon
+[ -n "`pidof bcm.user`" ] && killall bcm.user
+[ -n "`pidof dev_mgmt_attach`" ] && killall dev_mgmt_attach
+[ -n "`pidof embedded_console`" ] && killall embedded_console
+[ -n "`pidof example_user_appl`" ] && killall example_user_appl
+
+rm -f /tmp/root_dev_mgmt_pid /tmp/root_dev_mgmt_init_done
+sleep 3
+
+if [ -d /opt/bcm68650 ]; then
+    bash /opt/bcm68650/svk_init.sh -clean
+    sleep 3
+fi
+
+rm -rf /tmp/bcm68650_svk_init/
+
+rm -rf /opt/bcm68650
+rm -rf /opt/openolt
+rm -rf /broadcom
+
+sed -i '\/rm -rf \/tmp\/bcm68650_svk_init/d' /etc/rc.local
+sed -i '\/nohup bash \/opt\/openolt\/openolt_dev_mgmt_daemon_process_watchdog &/d' /etc/rc.local
+
+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/libstdc++.so.6
+rm -f /etc/init.d/openolt
+rm -f /etc/init.d/dev_mgmt_daemon
+rm -f /etc/logrotate.d/openolt
diff --git a/agent/device/rlt-1600g-w/mkdebian/debian/rules b/agent/device/rlt-1600g-w/mkdebian/debian/rules
new file mode 100755
index 0000000..c56d2db
--- /dev/null
+++ b/agent/device/rlt-1600g-w/mkdebian/debian/rules
@@ -0,0 +1,74 @@
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+#DH_VERBOSE = 1
+
+# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/default.mk
+
+# see FEATURE AREAS in dpkg-buildflags(1)
+#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# see ENVIRONMENT in dpkg-buildflags(1)
+# package maintainers to append CFLAGS
+#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
+# package maintainers to append LDFLAGS
+#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+# main packaging script based on dh7 syntax
+%:
+	dh $@
+
+DOCS=LEGAL_TERMS README LICENSE_APACHE20
+
+DEB_DH_INSTALL_SOURCEDIR = $(CURDIR)/debian/tmp
+
+override_dh_auto_install:
+	mkdir -p $(DEB_DH_INSTALL_SOURCEDIR)/tmp
+	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/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
+	cp -a $(CURDIR)/debian/watchdog $(DEB_DH_INSTALL_SOURCEDIR)/tmp
+
+#override_dh_shlibdeps:
+#	dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -l$(ONLP_LIB_PATH):$(OFDPA_LIB_PATH)
+
+# avoid auto strip for debug ofagentapp.dbg
+#
+#override_dh_strip:
+#	echo "No auto strip!"
+
+#override_dh_installdeb:
+#	dh_installdeb
+#	for pkg in $$(dh_listpackages); do \
+#		sed -i -e 's!#DEB_SOURCE#!$(DEB_SOURCE)!' debian/$$pkg/DEBIAN/*; \
+#		sed -i -e 's!#OPDPA_VER_SUFFIX#!-$(OPDPA_VER)!g' debian/$$pkg/DEBIAN/*; \
+#	done
+
+test:
+	@echo DEB_SOURCE=$(DEB_SOURCE)
+	@echo DEB_VERSION=$(DEB_VERSION)
+	@echo DEB_VERSION_EPOCH_UPSTREAM=$(DEB_VERSION_EPOCH_UPSTREAM)
+	@echo DEB_VERSION_UPSTREAM_REVISION=$(DEB_VERSION_UPSTREAM_REVISION)
+	@echo DEB_VERSION_UPSTREAM=$(DEB_VERSION_UPSTREAM)
+	@echo DEB_DISTRIBUTION=$(DEB_DISTRIBUTION)
+	@echo DEB_HOST_ARCH=$(DEB_HOST_ARCH)
+	@echo DEB_HOST_ARCH_CPU=$(DEB_HOST_ARCH_CPU)
+	@echo DEB_HOST_ARCH_OS=$(DEB_HOST_ARCH_OS)
+	@echo DEB_HOST_GNU_TYPE=$(DEB_HOST_GNU_TYPE)
+	@echo DEB_HOST_GNU_CPU=$(DEB_HOST_GNU_CPU)
+	@echo DEB_HOST_GNU_SYSTEM=$(DEB_HOST_GNU_SYSTEM)
+	@echo DEB_BUILD_ARCH=$(DEB_BUILD_ARCH)
+	@echo DEB_BUILD_ARCH_CPU=$(DEB_BUILD_ARCH_CPU)
+	@echo DEB_BUILD_ARCH_OS=$(DEB_BUILD_ARCH_OS)
+	@echo DEB_BUILD_GNU_TYPE=$(DEB_BUILD_GNU_TYPE)
+	@echo DEB_BUILD_GNU_CPU=$(DEB_BUILD_GNU_CPU)
+	@echo DEB_BUILD_GNU_SYSTEM=$(DEB_BUILD_GNU_SYSTEM)
+	@echo ONLP_LIB_PATH=$(ONLP_LIB_PATH)
+#	@echo OFDPA_LIB_PATH=$(OFDPA_LIB_PATH)
+#	@echo OFDPA_BIN_PATH=$(OFDPA_BIN_PATH)
diff --git a/agent/device/rlt-1600g-w/update_kernel_options.sh b/agent/device/rlt-1600g-w/update_kernel_options.sh
new file mode 100755
index 0000000..0ff4c42
--- /dev/null
+++ b/agent/device/rlt-1600g-w/update_kernel_options.sh
@@ -0,0 +1,140 @@
+#!/bin/bash
+
+#Copyright 2018-present Open Networking Foundation
+#
+#Licensed under the Apache License, Version 2.0 (the "License");
+#you may not use this file except in compliance with the License.
+#You may obtain a copy of the License at
+#
+#http://www.apache.org/licenses/LICENSE-2.0
+#
+#Unless required by applicable law or agreed to in writing, software
+#distributed under the License is distributed on an "AS IS" BASIS,
+#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#See the License for the specific language governing permissions and
+#limitations under the License.
+
+TOPDIR=`pwd`
+KERNEL_CONFIG_FILE=${TOPDIR}/packages/base/any/kernels/4.19-lts/configs/x86_64-all/x86_64-all.config
+
+ADDITIONAL_OPTIONS=(
+CONFIG_CC_IS_GCC=y
+CONFIG_GCC_VERSION=80300
+CONFIG_CLANG_VERSION=0
+CONFIG_CC_HAS_ASM_GOTO=y
+CONFIG_IRQ_WORK=y
+CONFIG_BUILDTIME_EXTABLE_SORT=y
+CONFIG_THREAD_INFO_IN_TASK=y
+"# CONFIG_ACPI_IPMI is not set"
+CONFIG_HOTPLUG_PCI_ACPI_IBM=y
+CONFIG_BCM_NET_PHYLIB=y
+CONFIG_USB_NET_AX8817X=y
+CONFIG_USB_NET_AX88179_178A=y
+CONFIG_USB_NET_CDCETHER=y
+CONFIG_USB_NET_CDC_EEM=y
+CONFIG_USB_NET_CDC_NCM=y
+"# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set"
+"# CONFIG_USB_NET_CDC_MBIM is not set"
+"# CONFIG_USB_NET_DM9601 is not set"
+"# CONFIG_USB_NET_SR9700 is not set"
+"# CONFIG_USB_NET_SR9800 is not set"
+"# CONFIG_USB_NET_SMSC75XX is not set"
+"# CONFIG_USB_NET_SMSC95XX is not set"
+"# CONFIG_USB_NET_GL620A is not set"
+CONFIG_USB_NET_NET1080=y
+"# CONFIG_USB_NET_PLUSB is not set"
+"# CONFIG_USB_NET_MCS7830 is not set"
+"# CONFIG_USB_NET_RNDIS_HOST is not set"
+CONFIG_USB_NET_CDC_SUBSET_ENABLE=y
+CONFIG_USB_NET_CDC_SUBSET=y
+"# CONFIG_USB_ALI_M5632 is not set"
+"# CONFIG_USB_AN2720 is not set"
+CONFIG_USB_BELKIN=y
+CONFIG_USB_ARMLINUX=y
+"# CONFIG_USB_EPSON2888 is not set"
+"# CONFIG_USB_KC2190 is not set"
+CONFIG_USB_NET_ZAURUS=y
+"# CONFIG_USB_NET_CX82310_ETH is not set"
+"# CONFIG_USB_NET_KALMIA is not set"
+"# CONFIG_USB_NET_QMI_WWAN is not set"
+"# CONFIG_USB_NET_INT51X1 is not set"
+"# CONFIG_USB_SIERRA_NET is not set"
+"# CONFIG_USB_VL600 is not set"
+"# CONFIG_USB_NET_CH9200 is not set"
+CONFIG_IPMI_DMI_DECODE=y
+CONFIG_IPMI_PANIC_EVENT=y
+"# CONFIG_IPMI_PANIC_STRING is not set"
+CONFIG_IPMI_DEVICE_INTERFACE=y
+CONFIG_IPMI_SI=y
+"# CONFIG_IPMI_SSIF is not set"
+"# CONFIG_IPMI_WATCHDOG is not set"
+CONFIG_IPMI_POWEROFF=y
+CONFIG_HW_RANDOM_TPM=y
+CONFIG_TCG_TIS_CORE=y
+CONFIG_TCG_TIS=y
+CONFIG_TCG_TIS_SPI=y
+CONFIG_TCG_TIS_I2C_ATMEL=y
+CONFIG_TCG_TIS_I2C_INFINEON=y
+CONFIG_TCG_TIS_I2C_NUVOTON=y
+CONFIG_TCG_NSC=y
+CONFIG_TCG_ATMEL=y
+CONFIG_TCG_INFINEON=y
+CONFIG_TCG_CRB=y
+CONFIG_TCG_VTPM_PROXY=y
+CONFIG_TCG_TIS_ST33ZP24=y
+CONFIG_TCG_TIS_ST33ZP24_I2C=y
+CONFIG_TCG_TIS_ST33ZP24_SPI=y
+CONFIG_I2C_MUX_PCA954X_BUSES_CREATE_FORCE=y
+"# CONFIG_SENSORS_IBMAEM is not set"
+"# CONFIG_SENSORS_IBMPEX is not set"
+"# CONFIG_TRUSTED_KEYS is not set"
+CONFIG_ENABLE_DEFAULT_TRACERS=y
+"# CONFIG_FTRACE_STARTUP_TEST is not set"
+)
+
+OPTIONS_TO_CHANGE=(
+CONFIG_HOTPLUG_PCI_PCIE=y
+CONFIG_HOTPLUG_PCI_ACPI=y
+CONFIG_HOTPLUG_PCI_SHPC=y
+CONFIG_EEPROM_AT24=y
+CONFIG_BROADCOM_PHY=y
+CONFIG_USB_USBNET=y
+CONFIG_DEVKMEM=y
+CONFIG_IPMI_HANDLER=y
+CONFIG_TCG_TPM=y
+CONFIG_I2C_ISMT=y
+CONFIG_GPIO_ICH=y
+CONFIG_X86_PKG_TEMP_THERMAL=y
+CONFIG_INTEL_PCH_THERMAL=y
+CONFIG_LPC_ICH=y
+CONFIG_SECURITYFS=y
+)
+
+OPTIONS_TO_COMMENT=(
+CONFIG_EEPROM_LEGACY
+CONFIG_I2C_MUX_REG
+CONFIG_I2C_MUX_MLXCPLD
+CONFIG_GENERIC_TRACER
+CONFIG_BLK_DEV_IO_TRACE
+)
+
+add_additional_options() {
+	for i in "${ADDITIONAL_OPTIONS[@]}"; do echo "$i" >> ${KERNEL_CONFIG_FILE}; done
+}
+
+modify_options() {
+	for i in "${OPTIONS_TO_CHANGE[@]}"; do
+		option=$(echo $i | cut -d= -f1);
+		sed -i "s/.*$option.*/$i/" ${KERNEL_CONFIG_FILE};
+	done
+}
+
+comment_options() {
+	for i in "${OPTIONS_TO_COMMENT[@]}"; do
+		sed -i "s/.*$i.*/# $i is not set/" ${KERNEL_CONFIG_FILE};
+	done
+}
+
+modify_options
+comment_options
+add_additional_options
diff --git a/agent/device/rlt-1600g-w/vendor.cc b/agent/device/rlt-1600g-w/vendor.cc
new file mode 100644
index 0000000..86836ff
--- /dev/null
+++ b/agent/device/rlt-1600g-w/vendor.cc
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+
+ * http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "vendor.h"
+
+void vendor_init()
+{
+}
diff --git a/agent/device/rlt-1600g-w/vendor.h b/agent/device/rlt-1600g-w/vendor.h
new file mode 100644
index 0000000..a126063
--- /dev/null
+++ b/agent/device/rlt-1600g-w/vendor.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+
+ * http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __VENDOR_H__
+#define __VENDOR_H__
+#define VENDOR_ID "Radisys"
+#define RLT1600GW
+#define MODEL_ID  "rlt-1600g-w"
+#define MAX_SUPPORTED_PON 16 
+#define ONU_BIT_TRANSMISSION_DELAY 0.8038585/1000 /* unit: ns to us */
+#define MINIMUM_ONU_RESPONSE_RANGING_TIME 198075 /* hardcore: this is ranging time for the shortest distance, typically 35us */
+
+// DeviceInfo definitions
+
+#define ONU_ID_START 1
+#define ONU_ID_END 32
+#define MAX_ONUS_PER_PON (ONU_ID_END - ONU_ID_START + 1)
+
+#define MAX_ALLOC_ID_PER_ONU 4
+#define ALLOC_ID_START 256
+#define ALLOC_ID_END (ALLOC_ID_START + MAX_ONUS_PER_PON * MAX_ALLOC_ID_PER_ONU)
+
+#define GEM_PORT_ID_PER_ALLOC_ID 8
+#define GEM_PORT_ID_START 256
+#define GEM_PORT_ID_END (GEM_PORT_ID_START + MAX_ONUS_PER_PON * MAX_ALLOC_ID_PER_ONU * GEM_PORT_ID_PER_ALLOC_ID)
+
+#define FLOW_ID_START 1
+#define FLOW_ID_END 65535
+#define MAX_FLOW_ID FLOW_ID_END
+#define INVALID_FLOW_ID 0
+
+#endif
diff --git a/agent/device/rlt-1600x-w/mkdebian/build_rlt-1600x-w_deb.sh b/agent/device/rlt-1600x-w/mkdebian/build_rlt-1600x-w_deb.sh
new file mode 100755
index 0000000..e4cc706
--- /dev/null
+++ b/agent/device/rlt-1600x-w/mkdebian/build_rlt-1600x-w_deb.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+#Copyright 2018-present Open Networking Foundation
+#
+#Licensed under the Apache License, Version 2.0 (the "License");
+#you may not use this file except in compliance with the License.
+#You may obtain a copy of the License at
+#
+#http://www.apache.org/licenses/LICENSE-2.0
+#
+#Unless required by applicable law or agreed to in writing, software
+#distributed under the License is distributed on an "AS IS" BASIS,
+#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#See the License for the specific language governing permissions and
+#limitations under the License.
+
+
+export ONL_ARCH="amd64"
+dpkg-buildpackage -b -us -uc -a"$ONL_ARCH"
diff --git a/agent/device/rlt-1600x-w/mkdebian/debian/changelog b/agent/device/rlt-1600x-w/mkdebian/debian/changelog
new file mode 100644
index 0000000..cee6ace
--- /dev/null
+++ b/agent/device/rlt-1600x-w/mkdebian/debian/changelog
@@ -0,0 +1,7 @@
+rlt-1600x-w (3.4.9.8+radisys-V20210420) stable; urgency=high
+
+    * Based on code from SW-BCM686OLT_3_4_9_8.tgz.
+    * Patches required for BAL to support RLT-1600X-W has been merged to
+      PHOENIX_BAL_3.4.9.8_V20210420.patch.
+
+ -- Thiyagarajan Subramani <thiyagarajan.subramani@radisys.com>  Tue, 20 APR 2021 09:30:00 +0400
diff --git a/agent/device/rlt-1600x-w/mkdebian/debian/compat b/agent/device/rlt-1600x-w/mkdebian/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/agent/device/rlt-1600x-w/mkdebian/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/agent/device/rlt-1600x-w/mkdebian/debian/control b/agent/device/rlt-1600x-w/mkdebian/debian/control
new file mode 100644
index 0000000..c6648d8
--- /dev/null
+++ b/agent/device/rlt-1600x-w/mkdebian/debian/control
@@ -0,0 +1,13 @@
+Source: rlt-1600x-w
+Section: misc
+Priority: optional
+Maintainer: Thiyagarajan Subramani  <thiyagarajan.subramani@radisys.com>
+Build-Depends: debhelper (>= 4.0.0)
+Standards-Version: 3.6.2
+
+Package: rlt-1600x-w
+Architecture: amd64
+Depends: ${shlibs:Depends}
+Description: Broadcom OLT drivers,CLI
+  ported from Broadcom SDK-3.4.9.8 package
+
diff --git a/agent/device/rlt-1600x-w/mkdebian/debian/copyright b/agent/device/rlt-1600x-w/mkdebian/debian/copyright
new file mode 100644
index 0000000..0e527f0
--- /dev/null
+++ b/agent/device/rlt-1600x-w/mkdebian/debian/copyright
@@ -0,0 +1 @@
+(C) Copyright Broadcom Corporation 2003-2016
diff --git a/agent/device/rlt-1600x-w/mkdebian/debian/files b/agent/device/rlt-1600x-w/mkdebian/debian/files
new file mode 100644
index 0000000..22c5d8f
--- /dev/null
+++ b/agent/device/rlt-1600x-w/mkdebian/debian/files
@@ -0,0 +1,3 @@
+rlt-1600x-w-dbgsym_3.4.9.8+radisys-V20210420_amd64.deb debug extra
+rlt-1600x-w_3.4.9.8+radisys-V20210420_amd64.buildinfo misc optional
+rlt-1600x-w_3.4.9.8+radisys-V20210420_amd64.deb misc optional
diff --git a/agent/device/rlt-1600x-w/mkdebian/debian/logrotate.d/openolt b/agent/device/rlt-1600x-w/mkdebian/debian/logrotate.d/openolt
new file mode 100644
index 0000000..480b59f
--- /dev/null
+++ b/agent/device/rlt-1600x-w/mkdebian/debian/logrotate.d/openolt
@@ -0,0 +1,10 @@
+/var/log/dev_mgmt_daemon.log
+/var/log/openolt.log
+{
+  rotate 7
+  daily
+  compress
+  missingok
+  delaycompress
+  copytruncate
+}
diff --git a/agent/device/rlt-1600x-w/mkdebian/debian/rlt-1600x-w.install b/agent/device/rlt-1600x-w/mkdebian/debian/rlt-1600x-w.install
new file mode 100644
index 0000000..ceeb05b
--- /dev/null
+++ b/agent/device/rlt-1600x-w/mkdebian/debian/rlt-1600x-w.install
@@ -0,0 +1 @@
+/tmp
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
new file mode 100755
index 0000000..c78b44f
--- /dev/null
+++ b/agent/device/rlt-1600x-w/mkdebian/debian/rlt-1600x-w.postinst
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+#Copyright 2018-present Open Networking Foundation
+#
+#Licensed under the Apache License, Version 2.0 (the "License");
+#you may not use this file except in compliance with the License.
+#You may obtain a copy of the License at
+#
+#http://www.apache.org/licenses/LICENSE-2.0
+#
+#Unless required by applicable law or agreed to in writing, software
+#distributed under the License is distributed on an "AS IS" BASIS,
+#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#See the License for the specific language governing permissions and
+#limitations under the License.
+
+rm -rf /opt/bcm686*
+rm -rf /broadcom
+tar zxf /tmp/release_rlt-1600x-w_V*.tar.gz -C / 2>&1 > /dev/null
+
+mkdir -p /opt/openolt && cp /tmp/watchdog/openolt_dev_mgmt_daemon_process_watchdog /opt/openolt && cp /tmp/watchdog/watchdog.config /opt/openolt
+
+sed -i -e '$i rm -rf \/tmp\/bcm68650_svk_init\/' /etc/rc.local
+[ -f /opt/openolt/openolt_dev_mgmt_daemon_process_watchdog ] && grep -q '\/opt\/openolt\/openolt_dev_mgmt_daemon_process_watchdog' /etc/rc.local || sed -i -e '$i nohup bash \/opt\/openolt\/openolt_dev_mgmt_daemon_process_watchdog &' /etc/rc.local
+
+rm -f /tmp/release_rlt-1600x-w_V*.tar.gz
+rm -f /run/bcm686*
+
+
+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
+
+cp /tmp/logrotate.d/openolt /etc/logrotate.d
+chmod +x /opt/openolt/openolt_dev_mgmt_daemon_process_watchdog
+
+cp /tmp/init.d/dev_mgmt_daemon /etc/init.d
+chmod +x /etc/init.d/dev_mgmt_daemon
+update-rc.d dev_mgmt_daemon defaults
+[ "A`cat ~/.bashrc| grep LD_LIBRARY_PATH`" = "A" ] && echo "export LD_LIBRARY_PATH=/broadcom:\$LD_LIBRARY_PATH" >> ~/.bashrc; . ~/.bashrc
+ldconfig /broadcom
+ln -s /broadcom/libbal_core_real.*.so /broadcom/libbal_core.so
+#cd /broadcom/ && export LD_LIBRARY_PATH=LD_LIBRARY_PATH:/broadcom && ./dev_mgmt_daemon -d -pcie
+service dev_mgmt_daemon start
+echo "Wait for 30 sec for BAL to be ready"
+sleep 30
+
+cp /tmp/init.d/openolt /etc/init.d
+chmod +x /etc/init.d/openolt
+update-rc.d openolt defaults
+service openolt start
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
new file mode 100755
index 0000000..fd44b74
--- /dev/null
+++ b/agent/device/rlt-1600x-w/mkdebian/debian/rlt-1600x-w.postrm
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+#Copyright 2018-present Open Networking Foundation
+#
+#Licensed under the Apache License, Version 2.0 (the "License");
+#you may not use this file except in compliance with the License.
+#You may obtain a copy of the License at
+#
+#http://www.apache.org/licenses/LICENSE-2.0
+#
+#Unless required by applicable law or agreed to in writing, software
+#distributed under the License is distributed on an "AS IS" BASIS,
+#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#See the License for the specific language governing permissions and
+#limitations under the License.
+
+# kill CLI applications
+echo "kill running time application"
+[ -n "`pidof openolt`" ] && service openolt stop
+[ -n "`pidof openolt`" ] && killall openolt
+[ -n "`pidof dev_mgmt_daemon`" ] && service dev_mgmt_daemon stop
+[ -n "`pidof dev_mgmt_daemon`" ] && killall dev_mgmt_daemon
+[ -n "`pidof bcm.user`" ] && killall bcm.user
+[ -n "`pidof dev_mgmt_attach`" ] && killall dev_mgmt_attach
+[ -n "`pidof embedded_console`" ] && killall embedded_console
+[ -n "`pidof example_user_appl`" ] && killall example_user_appl
+
+rm -f /tmp/root_dev_mgmt_pid /tmp/root_dev_mgmt_init_done
+sleep 3
+
+if [ -d /opt/bcm68650 ]; then
+    bash /opt/bcm68650/svk_init.sh -clean
+    sleep 3
+fi
+
+rm -rf /tmp/bcm68650_svk_init/
+
+rm -rf /opt/bcm68650
+rm -rf /opt/openolt
+rm -rf /broadcom
+
+sed -i '\/rm -rf \/tmp\/bcm68650_svk_init/d' /etc/rc.local
+sed -i '\/nohup bash \/opt\/openolt\/openolt_dev_mgmt_daemon_process_watchdog &/d' /etc/rc.local
+
+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/libstdc++.so.6
+rm -f /etc/init.d/openolt
+rm -f /etc/init.d/dev_mgmt_daemon
+rm -f /etc/logrotate.d/openolt
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
new file mode 100755
index 0000000..fd44b74
--- /dev/null
+++ b/agent/device/rlt-1600x-w/mkdebian/debian/rlt-1600x-w.preinst
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+#Copyright 2018-present Open Networking Foundation
+#
+#Licensed under the Apache License, Version 2.0 (the "License");
+#you may not use this file except in compliance with the License.
+#You may obtain a copy of the License at
+#
+#http://www.apache.org/licenses/LICENSE-2.0
+#
+#Unless required by applicable law or agreed to in writing, software
+#distributed under the License is distributed on an "AS IS" BASIS,
+#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#See the License for the specific language governing permissions and
+#limitations under the License.
+
+# kill CLI applications
+echo "kill running time application"
+[ -n "`pidof openolt`" ] && service openolt stop
+[ -n "`pidof openolt`" ] && killall openolt
+[ -n "`pidof dev_mgmt_daemon`" ] && service dev_mgmt_daemon stop
+[ -n "`pidof dev_mgmt_daemon`" ] && killall dev_mgmt_daemon
+[ -n "`pidof bcm.user`" ] && killall bcm.user
+[ -n "`pidof dev_mgmt_attach`" ] && killall dev_mgmt_attach
+[ -n "`pidof embedded_console`" ] && killall embedded_console
+[ -n "`pidof example_user_appl`" ] && killall example_user_appl
+
+rm -f /tmp/root_dev_mgmt_pid /tmp/root_dev_mgmt_init_done
+sleep 3
+
+if [ -d /opt/bcm68650 ]; then
+    bash /opt/bcm68650/svk_init.sh -clean
+    sleep 3
+fi
+
+rm -rf /tmp/bcm68650_svk_init/
+
+rm -rf /opt/bcm68650
+rm -rf /opt/openolt
+rm -rf /broadcom
+
+sed -i '\/rm -rf \/tmp\/bcm68650_svk_init/d' /etc/rc.local
+sed -i '\/nohup bash \/opt\/openolt\/openolt_dev_mgmt_daemon_process_watchdog &/d' /etc/rc.local
+
+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/libstdc++.so.6
+rm -f /etc/init.d/openolt
+rm -f /etc/init.d/dev_mgmt_daemon
+rm -f /etc/logrotate.d/openolt
diff --git a/agent/device/rlt-1600x-w/mkdebian/debian/rules b/agent/device/rlt-1600x-w/mkdebian/debian/rules
new file mode 100755
index 0000000..1da531f
--- /dev/null
+++ b/agent/device/rlt-1600x-w/mkdebian/debian/rules
@@ -0,0 +1,74 @@
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+#DH_VERBOSE = 1
+
+# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/default.mk
+
+# see FEATURE AREAS in dpkg-buildflags(1)
+#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# see ENVIRONMENT in dpkg-buildflags(1)
+# package maintainers to append CFLAGS
+#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
+# package maintainers to append LDFLAGS
+#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+# main packaging script based on dh7 syntax
+%:
+	dh $@
+
+DOCS=LEGAL_TERMS README LICENSE_APACHE20
+
+DEB_DH_INSTALL_SOURCEDIR = $(CURDIR)/debian/tmp
+
+override_dh_auto_install:
+	mkdir -p $(DEB_DH_INSTALL_SOURCEDIR)/tmp
+	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/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
+	cp -a $(CURDIR)/debian/watchdog $(DEB_DH_INSTALL_SOURCEDIR)/tmp
+
+#override_dh_shlibdeps:
+#	dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -l$(ONLP_LIB_PATH):$(OFDPA_LIB_PATH)
+
+# avoid auto strip for debug ofagentapp.dbg
+#
+#override_dh_strip:
+#	echo "No auto strip!"
+
+#override_dh_installdeb:
+#	dh_installdeb
+#	for pkg in $$(dh_listpackages); do \
+#		sed -i -e 's!#DEB_SOURCE#!$(DEB_SOURCE)!' debian/$$pkg/DEBIAN/*; \
+#		sed -i -e 's!#OPDPA_VER_SUFFIX#!-$(OPDPA_VER)!g' debian/$$pkg/DEBIAN/*; \
+#	done
+
+test:
+	@echo DEB_SOURCE=$(DEB_SOURCE)
+	@echo DEB_VERSION=$(DEB_VERSION)
+	@echo DEB_VERSION_EPOCH_UPSTREAM=$(DEB_VERSION_EPOCH_UPSTREAM)
+	@echo DEB_VERSION_UPSTREAM_REVISION=$(DEB_VERSION_UPSTREAM_REVISION)
+	@echo DEB_VERSION_UPSTREAM=$(DEB_VERSION_UPSTREAM)
+	@echo DEB_DISTRIBUTION=$(DEB_DISTRIBUTION)
+	@echo DEB_HOST_ARCH=$(DEB_HOST_ARCH)
+	@echo DEB_HOST_ARCH_CPU=$(DEB_HOST_ARCH_CPU)
+	@echo DEB_HOST_ARCH_OS=$(DEB_HOST_ARCH_OS)
+	@echo DEB_HOST_GNU_TYPE=$(DEB_HOST_GNU_TYPE)
+	@echo DEB_HOST_GNU_CPU=$(DEB_HOST_GNU_CPU)
+	@echo DEB_HOST_GNU_SYSTEM=$(DEB_HOST_GNU_SYSTEM)
+	@echo DEB_BUILD_ARCH=$(DEB_BUILD_ARCH)
+	@echo DEB_BUILD_ARCH_CPU=$(DEB_BUILD_ARCH_CPU)
+	@echo DEB_BUILD_ARCH_OS=$(DEB_BUILD_ARCH_OS)
+	@echo DEB_BUILD_GNU_TYPE=$(DEB_BUILD_GNU_TYPE)
+	@echo DEB_BUILD_GNU_CPU=$(DEB_BUILD_GNU_CPU)
+	@echo DEB_BUILD_GNU_SYSTEM=$(DEB_BUILD_GNU_SYSTEM)
+	@echo ONLP_LIB_PATH=$(ONLP_LIB_PATH)
+#	@echo OFDPA_LIB_PATH=$(OFDPA_LIB_PATH)
+#	@echo OFDPA_BIN_PATH=$(OFDPA_BIN_PATH)
diff --git a/agent/device/rlt-1600x-w/update_kernel_options.sh b/agent/device/rlt-1600x-w/update_kernel_options.sh
new file mode 100755
index 0000000..0ff4c42
--- /dev/null
+++ b/agent/device/rlt-1600x-w/update_kernel_options.sh
@@ -0,0 +1,140 @@
+#!/bin/bash
+
+#Copyright 2018-present Open Networking Foundation
+#
+#Licensed under the Apache License, Version 2.0 (the "License");
+#you may not use this file except in compliance with the License.
+#You may obtain a copy of the License at
+#
+#http://www.apache.org/licenses/LICENSE-2.0
+#
+#Unless required by applicable law or agreed to in writing, software
+#distributed under the License is distributed on an "AS IS" BASIS,
+#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#See the License for the specific language governing permissions and
+#limitations under the License.
+
+TOPDIR=`pwd`
+KERNEL_CONFIG_FILE=${TOPDIR}/packages/base/any/kernels/4.19-lts/configs/x86_64-all/x86_64-all.config
+
+ADDITIONAL_OPTIONS=(
+CONFIG_CC_IS_GCC=y
+CONFIG_GCC_VERSION=80300
+CONFIG_CLANG_VERSION=0
+CONFIG_CC_HAS_ASM_GOTO=y
+CONFIG_IRQ_WORK=y
+CONFIG_BUILDTIME_EXTABLE_SORT=y
+CONFIG_THREAD_INFO_IN_TASK=y
+"# CONFIG_ACPI_IPMI is not set"
+CONFIG_HOTPLUG_PCI_ACPI_IBM=y
+CONFIG_BCM_NET_PHYLIB=y
+CONFIG_USB_NET_AX8817X=y
+CONFIG_USB_NET_AX88179_178A=y
+CONFIG_USB_NET_CDCETHER=y
+CONFIG_USB_NET_CDC_EEM=y
+CONFIG_USB_NET_CDC_NCM=y
+"# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set"
+"# CONFIG_USB_NET_CDC_MBIM is not set"
+"# CONFIG_USB_NET_DM9601 is not set"
+"# CONFIG_USB_NET_SR9700 is not set"
+"# CONFIG_USB_NET_SR9800 is not set"
+"# CONFIG_USB_NET_SMSC75XX is not set"
+"# CONFIG_USB_NET_SMSC95XX is not set"
+"# CONFIG_USB_NET_GL620A is not set"
+CONFIG_USB_NET_NET1080=y
+"# CONFIG_USB_NET_PLUSB is not set"
+"# CONFIG_USB_NET_MCS7830 is not set"
+"# CONFIG_USB_NET_RNDIS_HOST is not set"
+CONFIG_USB_NET_CDC_SUBSET_ENABLE=y
+CONFIG_USB_NET_CDC_SUBSET=y
+"# CONFIG_USB_ALI_M5632 is not set"
+"# CONFIG_USB_AN2720 is not set"
+CONFIG_USB_BELKIN=y
+CONFIG_USB_ARMLINUX=y
+"# CONFIG_USB_EPSON2888 is not set"
+"# CONFIG_USB_KC2190 is not set"
+CONFIG_USB_NET_ZAURUS=y
+"# CONFIG_USB_NET_CX82310_ETH is not set"
+"# CONFIG_USB_NET_KALMIA is not set"
+"# CONFIG_USB_NET_QMI_WWAN is not set"
+"# CONFIG_USB_NET_INT51X1 is not set"
+"# CONFIG_USB_SIERRA_NET is not set"
+"# CONFIG_USB_VL600 is not set"
+"# CONFIG_USB_NET_CH9200 is not set"
+CONFIG_IPMI_DMI_DECODE=y
+CONFIG_IPMI_PANIC_EVENT=y
+"# CONFIG_IPMI_PANIC_STRING is not set"
+CONFIG_IPMI_DEVICE_INTERFACE=y
+CONFIG_IPMI_SI=y
+"# CONFIG_IPMI_SSIF is not set"
+"# CONFIG_IPMI_WATCHDOG is not set"
+CONFIG_IPMI_POWEROFF=y
+CONFIG_HW_RANDOM_TPM=y
+CONFIG_TCG_TIS_CORE=y
+CONFIG_TCG_TIS=y
+CONFIG_TCG_TIS_SPI=y
+CONFIG_TCG_TIS_I2C_ATMEL=y
+CONFIG_TCG_TIS_I2C_INFINEON=y
+CONFIG_TCG_TIS_I2C_NUVOTON=y
+CONFIG_TCG_NSC=y
+CONFIG_TCG_ATMEL=y
+CONFIG_TCG_INFINEON=y
+CONFIG_TCG_CRB=y
+CONFIG_TCG_VTPM_PROXY=y
+CONFIG_TCG_TIS_ST33ZP24=y
+CONFIG_TCG_TIS_ST33ZP24_I2C=y
+CONFIG_TCG_TIS_ST33ZP24_SPI=y
+CONFIG_I2C_MUX_PCA954X_BUSES_CREATE_FORCE=y
+"# CONFIG_SENSORS_IBMAEM is not set"
+"# CONFIG_SENSORS_IBMPEX is not set"
+"# CONFIG_TRUSTED_KEYS is not set"
+CONFIG_ENABLE_DEFAULT_TRACERS=y
+"# CONFIG_FTRACE_STARTUP_TEST is not set"
+)
+
+OPTIONS_TO_CHANGE=(
+CONFIG_HOTPLUG_PCI_PCIE=y
+CONFIG_HOTPLUG_PCI_ACPI=y
+CONFIG_HOTPLUG_PCI_SHPC=y
+CONFIG_EEPROM_AT24=y
+CONFIG_BROADCOM_PHY=y
+CONFIG_USB_USBNET=y
+CONFIG_DEVKMEM=y
+CONFIG_IPMI_HANDLER=y
+CONFIG_TCG_TPM=y
+CONFIG_I2C_ISMT=y
+CONFIG_GPIO_ICH=y
+CONFIG_X86_PKG_TEMP_THERMAL=y
+CONFIG_INTEL_PCH_THERMAL=y
+CONFIG_LPC_ICH=y
+CONFIG_SECURITYFS=y
+)
+
+OPTIONS_TO_COMMENT=(
+CONFIG_EEPROM_LEGACY
+CONFIG_I2C_MUX_REG
+CONFIG_I2C_MUX_MLXCPLD
+CONFIG_GENERIC_TRACER
+CONFIG_BLK_DEV_IO_TRACE
+)
+
+add_additional_options() {
+	for i in "${ADDITIONAL_OPTIONS[@]}"; do echo "$i" >> ${KERNEL_CONFIG_FILE}; done
+}
+
+modify_options() {
+	for i in "${OPTIONS_TO_CHANGE[@]}"; do
+		option=$(echo $i | cut -d= -f1);
+		sed -i "s/.*$option.*/$i/" ${KERNEL_CONFIG_FILE};
+	done
+}
+
+comment_options() {
+	for i in "${OPTIONS_TO_COMMENT[@]}"; do
+		sed -i "s/.*$i.*/# $i is not set/" ${KERNEL_CONFIG_FILE};
+	done
+}
+
+modify_options
+comment_options
+add_additional_options
diff --git a/agent/device/rlt-1600x-w/vendor.cc b/agent/device/rlt-1600x-w/vendor.cc
new file mode 100644
index 0000000..86836ff
--- /dev/null
+++ b/agent/device/rlt-1600x-w/vendor.cc
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+
+ * http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "vendor.h"
+
+void vendor_init()
+{
+}
diff --git a/agent/device/rlt-1600x-w/vendor.h b/agent/device/rlt-1600x-w/vendor.h
new file mode 100644
index 0000000..80410a3
--- /dev/null
+++ b/agent/device/rlt-1600x-w/vendor.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+
+ * http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __VENDOR_H__
+#define __VENDOR_H__
+#define VENDOR_ID "Radisys"
+#define RLT1600XW
+#define MODEL_ID  "rlt-1600x-w"
+#define MAX_SUPPORTED_PON 16 
+#define ONU_BIT_TRANSMISSION_DELAY 0.8038585/1000 /* unit: ns to us */
+#define MINIMUM_ONU_RESPONSE_RANGING_TIME 198075 /* hardcore: this is ranging time for the shortest distance, typically 35us */
+
+// DeviceInfo definitions
+
+#define ONU_ID_START 1
+#define ONU_ID_END 32
+#define MAX_ONUS_PER_PON (ONU_ID_END - ONU_ID_START + 1)
+
+#define MAX_ALLOC_ID_PER_ONU 4
+#define ALLOC_ID_START 256
+#define ALLOC_ID_END (ALLOC_ID_START + MAX_ONUS_PER_PON * MAX_ALLOC_ID_PER_ONU)
+
+#define GEM_PORT_ID_PER_ALLOC_ID 8
+#define GEM_PORT_ID_START 256
+#define GEM_PORT_ID_END (GEM_PORT_ID_START + MAX_ONUS_PER_PON * MAX_ALLOC_ID_PER_ONU * GEM_PORT_ID_PER_ALLOC_ID)
+
+#define FLOW_ID_START 1
+#define FLOW_ID_END 65535
+#define MAX_FLOW_ID FLOW_ID_END
+#define INVALID_FLOW_ID 0
+
+#endif
diff --git a/agent/device/rlt-3200g-w/vendor.h b/agent/device/rlt-3200g-w/vendor.h
index e77c183..761bb53 100644
--- a/agent/device/rlt-3200g-w/vendor.h
+++ b/agent/device/rlt-3200g-w/vendor.h
@@ -19,7 +19,7 @@
 #define VENDOR_ID "Radisys"
 #define RLT3200GW
 #define MODEL_ID  "rlt-3200g-w"
-#define MAX_SUPPORTED_PON 64
+#define MAX_SUPPORTED_PON 32
 #define ONU_BIT_TRANSMISSION_DELAY 0.8038585/1000 /* unit: ns to us */
 #define MINIMUM_ONU_RESPONSE_RANGING_TIME 198075 /* hardcore: this is ranging time for the shortest distance, typically 35us */