[Fix utopia build fail issue]
[Description]
Fix utopia build fail issue
1. patch some lack function in hal_platform.c for 2022 rdkb version
[Release-log]
diff --git a/recipes-ccsp/hal/files/001-rdkb-utopia-build-issue.patch b/recipes-ccsp/hal/files/001-rdkb-utopia-build-issue.patch
new file mode 100644
index 0000000..89e4973
--- /dev/null
+++ b/recipes-ccsp/hal/files/001-rdkb-utopia-build-issue.patch
@@ -0,0 +1,28 @@
+diff --git a/src/platform/platform_hal.c b/src/platform/platform_hal.c
+index 845b80f..b02bb07 100644
+--- a/src/platform/platform_hal.c
++++ b/src/platform/platform_hal.c
+@@ -236,3 +236,22 @@ INT platform_hal_GetRouterRegion(CHAR* pValue)
+ {
+ return RETURN_OK;
+ }
++
++char *get_current_wan_ifname()
++{
++return "0";
++}
++
++
++
++INT platform_hal_GetDhcpv6_Options ( dhcp_opt_list ** req_opt_list, dhcp_opt_list ** send_opt_list)
++{
++return RETURN_OK;
++}
++
++
++
++INT platform_hal_GetDhcpv4_Options ( dhcp_opt_list ** req_opt_list, dhcp_opt_list ** send_opt_list)
++{
++return RETURN_OK;
++}
+\ No newline at end of file
diff --git a/recipes-ccsp/hal/hal-platform-generic_git.bbappend b/recipes-ccsp/hal/hal-platform-generic_git.bbappend
index 6e4c489..4a62ecc 100644
--- a/recipes-ccsp/hal/hal-platform-generic_git.bbappend
+++ b/recipes-ccsp/hal/hal-platform-generic_git.bbappend
@@ -1,5 +1,10 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
SRC_URI += "git://gerrit.mediatek.inc/gateway/rdk-b/rdkb_hal;protocol=https;destsuffix=git/source/platform/rdkb_hal"
+SRC_URI_append += " \
+ file://001-rdkb-utopia-build-issue.patch;apply=no \
+ "
SRCREV = "${AUTOREV}"
DEPENDS += "utopia-headers"
@@ -11,3 +16,13 @@
rm ${S}/platform_hal.c
ln -sf ${S}/rdkb_hal/src/platform/platform_hal.c ${S}/platform_hal.c
}
+
+do_mtk_patches() {
+ cd ${S}/rdkb_hal
+ if [ ! -e patch_applied ]; then
+ patch -p1 < ${WORKDIR}/001-rdkb-utopia-build-issue.patch
+ touch patch_applied
+ fi
+}
+
+addtask mtk_patches after do_configure before do_compile
\ No newline at end of file