[rdkb][Bpi-R4][conf][Add lan0 as wan support]
[Description]
Add lan0 as wan support
[Release-log]
Change-Id: I16518d1309a4e042d7140527669b1e43cbaf22e5
diff --git a/conf/machine/filogic880-bpi-r4.conf b/conf/machine/filogic880-bpi-r4.conf
index 6d69771..ebb220e 100644
--- a/conf/machine/filogic880-bpi-r4.conf
+++ b/conf/machine/filogic880-bpi-r4.conf
@@ -70,4 +70,7 @@
HASHED_BOOT_DEVICE_secureboot = "252:0"
# for efuse tools
-#DISTRO_FEATURES_append = " efuse_tools"
\ No newline at end of file
+#DISTRO_FEATURES_append = " efuse_tools"
+
+#DISTRO_FEATURES_append = " WanManagerUnificationEnable"
+DISTRO_FEATURES_append = " lan0_as_wan"
\ No newline at end of file
diff --git a/recipes-ccsp/ccsp/ccsp-cr/cr-deviceprofile_filogic.xml b/recipes-ccsp/ccsp/ccsp-cr/cr-deviceprofile_filogic.xml
index ac1d23e..8c8a5db 100755
--- a/recipes-ccsp/ccsp/ccsp-cr/cr-deviceprofile_filogic.xml
+++ b/recipes-ccsp/ccsp/ccsp-cr/cr-deviceprofile_filogic.xml
@@ -51,6 +51,18 @@
<name>com.cisco.spvtg.ccsp.fu</name> <version>1</version>
</component>
-->
-
+ <component>
+ <name>com.cisco.spvtg.ccsp.ethagent</name> <version>1</version>
+ </component>
+ <component>
+ <name>com.cisco.spvtg.ccsp.wanmanager</name>
+ <version>1</version>
+ <dependencies>
+ <dependency>com.cisco.spvtg.ccsp.psm</dependency>
+ <dependency>com.cisco.spvtg.ccsp.pam</dependency>
+ <dependency>com.cisco.spvtg.ccsp.ethagent</dependency>
+ </dependencies>
+ <event>wan_ready_to_go</event>
+ </componen>
</components>
</deviceProfile>
diff --git a/recipes-ccsp/ccsp/ccsp-eth-agent.bbappend b/recipes-ccsp/ccsp/ccsp-eth-agent.bbappend
index b411f4c..a38b1f0 100644
--- a/recipes-ccsp/ccsp/ccsp-eth-agent.bbappend
+++ b/recipes-ccsp/ccsp/ccsp-eth-agent.bbappend
@@ -4,6 +4,7 @@
SRC_URI_append += " \
file://Fix-ccsp-eth-agent-build-error.patch;apply=no \
+ ${@bb.utils.contains('DISTRO_FEATURES','lan0_as_wan','file://support_lan0_as_wan.patch','',d)} \
"
do_filogic_patches() {
@@ -17,6 +18,7 @@
addtask filogic_patches after do_unpack before do_configure
CFLAGS_aarch64_append = " -Werror=format-truncation=1 "
+CFLAGS_aarch64_append = " -Wno-format-truncation -Wno-implicit-function-declaration -Wno-error "
EXTRA_OECONF_append_dunfell = " --with-ccsp-arch=arm"
diff --git a/recipes-ccsp/ccsp/ccsp_common_filogic.inc b/recipes-ccsp/ccsp/ccsp_common_filogic.inc
index 88eb483..709ec66 100644
--- a/recipes-ccsp/ccsp/ccsp_common_filogic.inc
+++ b/recipes-ccsp/ccsp/ccsp_common_filogic.inc
@@ -7,6 +7,7 @@
-DBUILD_WEB -D_NO_ANSC_ZLIB_ -D_DEBUG -U_ANSC_IPV6_COMPATIBLE_ -DUSE_NOTIFY_COMPONENT \
-D_PLATFORM_TURRIS_ -DENABLE_SD_NOTIFY -DCOSA_DML_WIFI_FEATURE_LoadPsmDefaults -UPARODUS_ENABLE -D_WIFI_AX_SUPPORT_ -D_2_5G_ETHERNET_SUPPORT_ -DETH_6_PORTS"
CFLAGS_append += "${@bb.utils.contains('DISTRO_FEATURES', 'rdkb_wan_manager', ' -DFEATURE_RDKB_WAN_MANAGER ', '', d)}"
+CFLAGS_append += " ${@bb.utils.contains('DISTRO_FEATURES', 'WanManagerUnificationEnable', '-DWAN_MANAGER_UNIFICATION_ENABLED', '', d)}"
CFLAGS_append_aarch64 = " -D_64BIT_ARCH_SUPPORT_ "
diff --git a/recipes-ccsp/ccsp/files/support_lan0_as_wan.patch b/recipes-ccsp/ccsp/files/support_lan0_as_wan.patch
new file mode 100644
index 0000000..0165b51
--- /dev/null
+++ b/recipes-ccsp/ccsp/files/support_lan0_as_wan.patch
@@ -0,0 +1,13 @@
+diff --git a/source/TR-181/board_sbapi/cosa_ethernet_apis.c b/source/TR-181/board_sbapi/cosa_ethernet_apis.c
+index d641857..c82419c 100644
+--- a/source/TR-181/board_sbapi/cosa_ethernet_apis.c
++++ b/source/TR-181/board_sbapi/cosa_ethernet_apis.c
+@@ -591,7 +591,7 @@ typedef enum WanMode
+ #elif defined (INTEL_PUMA7)
+ #define ETHWAN_DEF_INTF_NAME "nsgmii0"
+ #elif defined (_PLATFORM_TURRIS_)
+-#define ETHWAN_DEF_INTF_NAME "eth2"
++#define ETHWAN_DEF_INTF_NAME "wan"
+ #else
+ #define ETHWAN_DEF_INTF_NAME "eth0"
+ #endif