Skip to content

RDKCOM-5603: RDKBDEV-3455, RDKBACCL-1787 Upstreaming the utopia patches from meta-rdk-bsp-arm#312

Open
mahanteshchitt wants to merge 2 commits into
developfrom
upstream_chnages
Open

RDKCOM-5603: RDKBDEV-3455, RDKBACCL-1787 Upstreaming the utopia patches from meta-rdk-bsp-arm#312
mahanteshchitt wants to merge 2 commits into
developfrom
upstream_chnages

Conversation

@mahanteshchitt

@mahanteshchitt mahanteshchitt commented May 12, 2026

Copy link
Copy Markdown

Reason For Change: Upstreamed Generic ARM specific changes into common code to avoid maintaining platform patches.
Test Procedure: No utopia patches under meta-rdk-bsp-arm, should boot-up and should work as expected.
Risks: None

A new platform GENERICARM is being introduced in RDK-B. Currently, to make the GENERICARM platform work similar to existing platforms like RPI and BPI, platform-specific changes are being maintained as patches in the meta-rdk-bsp-arm layer.

These patches add the required PLATFORM_FLAG handling (PLATFORM_GENERICARM_) and platform-specific behavior in utopia components, including firewall configuration, LAN handling, WAN handling, DHCP/DHCPv6 handling, IGD temporary path handling, and build fixes.

The goal of this work is to upstream these changes into the common/generic codebase so that GENERICARM support is available natively and the meta-rdk-bsp-arm layer becomes patch-free.

./meta-rdk-broadband/recipes-ccsp/util/utopia/0002-lan_handler-refresh-fix-lan-handler-for-rpi.patch.patch
./meta-rdk-broadband/recipes-ccsp/util/utopia/0005-service_wan-use-_GENERIC_LINUX_DATA_PATH_-to-introdu.patch
./meta-rdk-broadband/recipes-ccsp/util/utopia/0007-scripts-lan_handler-create-flag-files-for-lan-start-.patch
./meta-rdk-broadband/recipes-ccsp/util/utopia/0010-RDKBDEV-XXXX-remove-usages-of-get_current_wan_ifname.patch
./meta-rdk-broadband/recipes-ccsp/util/utopia/0011-service-dhcpv6_client-log-to-syslog-instead-of-dev-c.patch
./meta-rdk-broadband/recipes-ccsp/util/utopia/0012-firewall-disable-mac-filter.patch
./meta-rdk-broadband/recipes-ccsp/util/utopia/0008-dhcp-place-dnsmasq.conf-in-RAM-var-volatile.patch
./meta-rdk-broadband/recipes-ccsp/util/utopia/0009-igd-place-IGD-temporary-files-under-var-volatile.patch
./meta-rdk-broadband/recipes-ccsp/util/utopia/0006-scripts-utopia_init-do-nvram-restore_reboot-and-drop.patch
./meta-rdk-broadband/recipes-ccsp/util/utopia/0001-scripts-lan_handler-treat-generic-Arm-boards-Ten64-q.patch
./meta-rdk-broadband/recipes-ccsp/util/utopia/0013-scripts-fix-compile-errors-with-DNO_MTA_FEATURE_SUPP.patch
./meta-rdk-broadband/recipes-ccsp/util/utopia/0004-firewall-use-_GENERIC_LINUX_DATA_PATH_-for-reference.patch
./meta-rdk-broadband/recipes-ccsp/util/utopia/0003-bridge-use-service_bridge_rpi-for-generic-arm-platfo.patch 

these pathces includes adding firewall rules fo ARM device, adding platfrom flag i.e {}PLATFORM_GENERICARM and build time errors fixes.
Now we want make ARM as patch free build so , need to upstream to the generic code.

Actual Behavior

GENERICARM requires multiple downstream patches in meta-rdk-bsp-arm.
Without these patches:
Platform-specific code paths are not enabled.
Required firewall/LAN/WAN behavior is missing.
Build issues occur for some configurations.
Runtime behavior is inconsistent compared with other supported platforms.
Expected Behavior

GENERICARM should work similar to existing supported platforms (RPI/BPI).
Required platform-specific logic should be available in the common utopia code.
No additional utopia patches should be required from meta-rdk-bsp-arm.
build should complete successfully with GENERICARM configuration.

Reason For Change: Upstreamed Generic ARM specific changes into common
code to avoid maintaining platform patches.
Test Procedure: No utopia patches under meta-rdk-bsp-arm, should
boot-up and should work as expected.
Risks: None
Signed-off-by: mahanteshchitt <mahantesh_chittapur@comcast.com>
@mahanteshchitt mahanteshchitt marked this pull request as ready for review June 25, 2026 11:11
@mahanteshchitt mahanteshchitt requested a review from a team as a code owner June 25, 2026 11:11
Copilot AI review requested due to automatic review settings June 25, 2026 11:11
@mahanteshchitt mahanteshchitt requested a review from a team as a code owner June 25, 2026 11:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Upstreams a set of Generic ARM platform patches (previously carried out-of-tree) into the shared Utopia codebase, primarily by aligning runtime paths (e.g., /var/volatile) and extending platform gating logic to include genericarm.

Changes:

  • Add _PLATFORM_GENERICARM_ / BOX_TYPE=genericarm handling across WAN, DHCP, IGD, init, and LAN handler flows.
  • Move several runtime artifacts for genericarm to /var/volatile (dnsmasq + IGD temp/web directories).
  • Extend firewall rule generation conditionals for genericarm (including MAP-T rule output interface selection and various feature gates).

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
source/service_wan/service_wan.c Treat genericarm like other embedded targets by skipping interface-down in one path and gating a refresh call.
source/service_dhcp/service_dhcp_server.c Use /var/volatile/dnsmasq.conf for genericarm.
source/service_dhcp/dhcp_server_functions.c Use /var/volatile/dnsmasq.conf for genericarm.
source/scripts/init/system/utopia_init.sh Include BOX_TYPE=genericarm in model-based init behaviors (restore reboot reason, sshd start).
source/scripts/init/service.d/service_ipv4.sh Include genericarm in the platform list that triggers LAN-status recovery behavior.
source/scripts/init/service.d/service_igd.sh Use /var/volatile/IGD temp dir for genericarm.
source/scripts/init/service.d/service_dhcpv6_client.sh Add targeted logging for genericarm callbacks.
source/scripts/init/service.d/service_dhcp_server/dhcp_server_functions.sh Include genericarm in LAN-status/DHCP startup gating.
source/scripts/init/service.d/service_dhcp_server.sh Use /var/volatile/dnsmasq.conf for genericarm and include genericarm in platform conditionals.
source/scripts/init/service.d/lan_handler.sh Add genericarm compatibility shims and genericarm-specific LAN bring-up logic.
source/igd/src/igd_device_root.c Use /var/volatile/IGD web dir for genericarm.
source/firewall/firewall.c Add genericarm platform guards and use current_wan_ifname in some genericarm branches.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 1187 to +1192
#if defined(IVI_KERNEL_SUPPORT)
#if define(_PLATFORM_GENERICARM_)
fprintf(nat_fp, "-A POSTROUTING -o %s -j %s\n",current_wan_ifname,MAPT_NAT_IPV4_POST_ROUTING_TABLE);
#else
fprintf(nat_fp, "-A POSTROUTING -o %s -j %s\n",get_current_wan_ifname(),MAPT_NAT_IPV4_POST_ROUTING_TABLE);
#endif
Comment on lines +5478 to 5480
#if (defined (_COSA_BCM_ARM_) || defined(_PLATFORM_TURRIS_) || defined(_PLATFORM_BANANAPI_R4_)) && !defined (_HUB4_PRODUCT_REQ_) || defined(_PLATFORM_GENERICARM_)
if(bEthWANEnable || isBridgeMode) // Check is required for TCHXB6 TCHXB7 CBR and not for HUB4
#else
Comment on lines 15183 to +15188
v_secure_system("/bin/sh -c /tmp/mac_filter.sh");
#endif
#ifdef _PLATFORM_GENERICARM__
/* Apply Mac Filtering rules */
v_secure_system("/bin/sh -c /tmp/mac_filter.sh");
#endif
Comment on lines +334 to +342
PHY_BRIDGE_IFNAME=`syscfg get lan_ifname`
PHY_ETH_IFNAMES=`syscfg get lan_ethernet_physical_ifnames`
IFS=' ' read -r -a PHY_ETH_IFNAME_ARRAY <<< "$PHY_ETH_IFNAMES"
for PHY_ETH_IFNAME in "${PHY_ETH_IFNAME_ARRAY[@]}"
do
echo "LAN HANDLER : PHY_ETH_IFNAME = $PHY_ETH_IFNAME"
ifconfig $PHY_ETH_IFNAME up
brctl addif $PHY_BRIDGE_IFNAME $PHY_ETH_IFNAME
done
@mahanteshchitt mahanteshchitt changed the title RDKBACCL-1787: Upstreaming the utopia patches from meta-rdk-bsp-arm RDKBDEV-3455, RDKBACCL-1787: Upstreaming the utopia patches from meta-rdk-bsp-arm Jun 25, 2026
@pradeeptakdas pradeeptakdas changed the title RDKBDEV-3455, RDKBACCL-1787: Upstreaming the utopia patches from meta-rdk-bsp-arm RDKCOM-5603: RDKBDEV-3455, RDKBACCL-1787 Upstreaming the utopia patches from meta-rdk-bsp-arm Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants