RDKCOM-5603: RDKBDEV-3455, RDKBACCL-1787 Upstreaming the utopia patches from meta-rdk-bsp-arm#312
Open
mahanteshchitt wants to merge 2 commits into
Open
RDKCOM-5603: RDKBDEV-3455, RDKBACCL-1787 Upstreaming the utopia patches from meta-rdk-bsp-arm#312mahanteshchitt wants to merge 2 commits into
mahanteshchitt wants to merge 2 commits into
Conversation
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>
Contributor
There was a problem hiding this comment.
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=genericarmhandling 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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.