RDKBACCL-1887: Port sysint scripts for ARM system ready#353
Open
mahanteshchitt wants to merge 2 commits into
Open
RDKBACCL-1887: Port sysint scripts for ARM system ready#353mahanteshchitt wants to merge 2 commits into
mahanteshchitt wants to merge 2 commits into
Conversation
Reason for change: Migrate scripts from BPI to ARM system ready Test Procedure: Image should bootup and all functionality should work Risks: Low Signed-off-by: mahanteshchitt <mahantesh_chittapur@comcast.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR ports existing “rpi/bpi”-specific init/service behaviors to a new BOX_TYPE=genericarm target to support ARM SystemReady images booting with the expected LAN/WAN/DHCP/mcast behavior.
Changes:
- Extend multiple service scripts’ platform conditionals to treat
genericarmsimilarly torpi/bpi. - Update DHCP/LAN/forwarding flow gating so
genericarmtriggers the same lan-status and restart behavior paths.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| source/scripts/init/service.d/service_mcastproxy.sh | Adds genericarm to igmpproxy launch logic for the expected platform branch. |
| source/scripts/init/service.d/service_ipv4.sh | Ensures genericarm participates in rpi/bpi-specific lan-status handling. |
| source/scripts/init/service.d/service_forwarding.sh | Aligns WAN/LAN restart behavior for genericarm with rpi/bpi handling. |
| source/scripts/init/service.d/service_dhcp_server/dhcp_server_functions.sh | Includes genericarm in DHCP helper logic for starting lan-status under certain conditions. |
| source/scripts/init/service.d/service_dhcp_server.sh | Extends DHCP-server start/retry and LAN refresh behaviors to genericarm. |
| source/scripts/init/service.d/lan_handler.sh | Extends LAN init/start special-casing to include genericarm. |
Comments suppressed due to low confidence (2)
source/scripts/init/service.d/service_mcastproxy.sh:120
- The BOX_TYPE check is a very long chain of test expressions and mixes
=and==under a#!/bin/shscript, which makes this branch harder to maintain and potentially less portable across/bin/shimplementations. Acasestatement is simpler and avoids repeated[ ... ]calls.
if [ "$BOX_TYPE" = "HUB4" ] || [ "$BOX_TYPE" = "SR300" ] || [ "$BOX_TYPE" = "SE501" ] || [ "$BOX_TYPE" = "SR213" ] || [ "$BOX_TYPE" == "WNXL11BWL" ] || [ "$BOX_TYPE" == "rpi" ] || [ "$BOX_TYPE" == "bpi" ] || [ "$BOX_TYPE" == "genericarm" ] || [ "$BOX_TYPE" == "SCER11BEL" ] || [ "$BOX_TYPE" == "SCXF11BFL" ]; then
$BIN $CONF_FILE &
else
$BIN -c $CONF_FILE &
fi
source/scripts/init/service.d/service_dhcp_server/dhcp_server_functions.sh:1140
- By adding
genericarmto this platform-specific block, the following bridge-mode check becomes relevant for that platform as well. The test[ $BRIDGE_MODE == 0 ]is not POSIX (==) and will also throw a syntax error ifsyscfg get bridge_modereturns an empty string (unquoted variable).
if [ "$BOX_TYPE" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ] || [ "$BOX_TYPE" = "turris" ] || [ "$BOX_TYPE" = "genericarm" ]; then
LAN_STATUS=`sysevent get lan-status`
BRIDGE_MODE=`syscfg get bridge_mode`
if [ "$LAN_STATUS" = "stopped" ] && [ $BRIDGE_MODE == 0 ]; then
echo_t "DHCP_SERVER : Starting lan-status"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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: Migrate scripts from BPI to ARM system ready
Test Procedure: Image should bootup and all functionality should work
Risks: Low