-
Notifications
You must be signed in to change notification settings - Fork 14
RDKOSS-602: RDKE][Middleware][All components] Use IPK instead of build from source #485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
build from source Reason For Change: To Reduce the build time ,Added some extra lines in this rdk.conf file which helps to enable the ipk mode for both middleware components and Oss Components to fetch the ipk from artifactory. Test Procedure: None Risks: low Signed-off-by: ss127 <Shalini_S@comcast.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces IPK (package) mode configuration to reduce build time by fetching pre-built packages from artifactory instead of building from source. The changes add configuration for both middleware and OSS (Open Source Software) components.
Changes:
- Added middleware IPK mode configuration with architecture-specific paths and feed URIs
- Added OSS IPK mode configuration with separate architecture handling and priority settings
- Hardcoded release version "8.4.1.0" for middleware package paths
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| MIDDLEWARE_ARCH = "${RDK_MW_ARCH}-middleware" | ||
| STACK_LAYER_EXTENSION = "${MIDDLEWARE_ARCH}" | ||
| RELEASE_NUM = "8.4.1.0" |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The release version "8.4.1.0" is hardcoded in this configuration file. This creates a maintainability issue as the version needs to be manually updated for each release. Consider making this configurable by using the ?= operator (e.g., RELEASE_NUM ?= "8.4.1.0") to allow overriding from local.conf or other configuration files, or parameterizing it based on existing version variables in the build system.
| RELEASE_NUM = "8.4.1.0" | |
| RELEASE_NUM ?= "8.4.1.0" |
| STACK_LAYER_EXTENSION = "${MIDDLEWARE_ARCH}" | ||
| RELEASE_NUM = "8.4.1.0" | ||
|
|
||
| MW_IPK_PATH ?= "middleware-rel/${RELEASE_NUM}" | ||
| MW_IPK_SERVER_PATH ?= "${RDK_ARTIFACTS_BASE_URL}/${MW_IPK_PATH}/${RDK_MW_ARCH}/ipks/${BUILD_VARIANT}" | ||
| IPK_FEED_URIS += " \ | ||
| ${STACK_LAYER_EXTENSION}##${MW_IPK_SERVER_PATH} " | ||
| #OSS IPK MODE | ||
| MW_EXTENSION = "-middleware" | ||
| MW_OSS = "${@get_oss_arch(d)}${MW_EXTENSION}" | ||
| STACK_LAYER_EXTENSION += " ${MW_OSS}" |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable STACK_LAYER_EXTENSION is assigned on line 397 and then appended to on line 407. However, the first assignment uses = (immediate expansion), and the append operation adds to the value. This could lead to unexpected behavior if STACK_LAYER_EXTENSION was previously defined elsewhere. Consider using ?= for the initial assignment if you want to allow override, or use a different approach to combine these values, such as using += for both assignments.
| STACK_LAYER_EXTENSION += " ${MW_OSS}" | ||
| OPKG_ARCH_PRIORITY:${MW_OSS} = "205" | ||
| MW_OSS_IPK_PATH ?= "middleware-rel/${RELEASE_NUM}" | ||
| MW_OSS_IPK_SERVER_PATH = "${RDK_ARTIFACTS_BASE_URL}/${MW_OSS_IPK_PATH}/${RDK_MW_ARCH}/${MW_OSS}/ipks/${BUILD_VARIANT}" |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable MW_OSS_IPK_SERVER_PATH is assigned using = (immediate expansion) instead of ?= (conditional assignment). This means it cannot be overridden from local.conf or other configuration files. For consistency with MW_IPK_SERVER_PATH on line 401, and to provide flexibility for different build environments, consider using ?= instead of =.
| MW_OSS_IPK_SERVER_PATH = "${RDK_ARTIFACTS_BASE_URL}/${MW_OSS_IPK_PATH}/${RDK_MW_ARCH}/${MW_OSS}/ipks/${BUILD_VARIANT}" | |
| MW_OSS_IPK_SERVER_PATH ?= "${RDK_ARTIFACTS_BASE_URL}/${MW_OSS_IPK_PATH}/${RDK_MW_ARCH}/${MW_OSS}/ipks/${BUILD_VARIANT}" |
| MW_EXTENSION = "-middleware" | ||
| MW_OSS = "${@get_oss_arch(d)}${MW_EXTENSION}" | ||
| STACK_LAYER_EXTENSION += " ${MW_OSS}" | ||
| OPKG_ARCH_PRIORITY:${MW_OSS} = "205" |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The OPKG_ARCH_PRIORITY is set only for the OSS packages (MW_OSS) but not for the middleware packages (MIDDLEWARE_ARCH). This asymmetry might cause the middleware packages to use the default priority, potentially leading to unexpected package selection behavior. Consider whether middleware packages also need an explicit priority setting for consistency and predictable behavior, or document why only OSS packages require this priority.
| MW_IPK_SERVER_PATH ?= "${RDK_ARTIFACTS_BASE_URL}/${MW_IPK_PATH}/${RDK_MW_ARCH}/ipks/${BUILD_VARIANT}" | ||
| IPK_FEED_URIS += " \ | ||
| ${STACK_LAYER_EXTENSION}##${MW_IPK_SERVER_PATH} " | ||
| #OSS IPK MODE |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function get_oss_arch is called but is not defined anywhere in the codebase. This will cause a build failure when BitBake tries to evaluate this variable. You need to either define this Python function (similar to how functions like get_oe_version are defined in classes/image_container_generator.bbclass) or use an existing BitBake variable or function. Consider defining the function in a bbclass file or directly in this configuration file using Python inline code.
| #OSS IPK MODE | |
| #OSS IPK MODE | |
| def get_oss_arch(d): | |
| """ | |
| Determine the OSS architecture string for middleware IPKs. | |
| By default this uses RDK_MW_ARCH, which itself defaults to MACHINE. | |
| """ | |
| arch = d.getVar('RDK_MW_ARCH') | |
| if arch is None: | |
| arch = "" | |
| return arch |
| MIDDLEWARE_ARCH = "${RDK_MW_ARCH}-middleware" | ||
| STACK_LAYER_EXTENSION = "${MIDDLEWARE_ARCH}" | ||
| RELEASE_NUM = "8.4.1.0" | ||
|
|
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable RDK_ARTIFACTS_BASE_URL is used but not defined anywhere in this file or elsewhere in the codebase. This variable must be defined before it can be used in the path construction, otherwise the IPK server path will be incomplete or invalid. Consider defining it with a default value using the ?= operator, or ensure it is defined in an included file or environment configuration.
| RDK_ARTIFACTS_BASE_URL ?= "" |
| MIDDLEWARE_ARCH = "${RDK_MW_ARCH}-middleware" | ||
| STACK_LAYER_EXTENSION = "${MIDDLEWARE_ARCH}" | ||
| RELEASE_NUM = "8.4.1.0" | ||
|
|
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable BUILD_VARIANT is used but not defined anywhere in this file or elsewhere in the codebase. This variable is critical for constructing the correct IPK server path. You need to either define it with a default value or ensure it's set in the build environment. Consider using the ?= operator to provide a sensible default value.
| BUILD_VARIANT ?= "release" |
Reason For Change: To Reduce the build time ,Added some extra lines in this rdk.conf file which helps to enable the ipk mode for both middleware components and Oss Components to fetch the ipk from artifactory.
Test Procedure: None
Risks: low