Skip to content

Conversation

@Shalini1516
Copy link

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

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>
@Shalini1516 Shalini1516 requested a review from a team as a code owner January 26, 2026 14:57
Copilot AI review requested due to automatic review settings January 26, 2026 14:57
@Shalini1516 Shalini1516 requested a review from a team as a code owner January 26, 2026 14:57
Copy link
Contributor

Copilot AI left a 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"
Copy link

Copilot AI Jan 26, 2026

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.

Suggested change
RELEASE_NUM = "8.4.1.0"
RELEASE_NUM ?= "8.4.1.0"

Copilot uses AI. Check for mistakes.
Comment on lines +397 to +407
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}"
Copy link

Copilot AI Jan 26, 2026

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.

Copilot uses AI. Check for mistakes.
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}"
Copy link

Copilot AI Jan 26, 2026

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 =.

Suggested change
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}"

Copilot uses AI. Check for mistakes.
MW_EXTENSION = "-middleware"
MW_OSS = "${@get_oss_arch(d)}${MW_EXTENSION}"
STACK_LAYER_EXTENSION += " ${MW_OSS}"
OPKG_ARCH_PRIORITY:${MW_OSS} = "205"
Copy link

Copilot AI Jan 26, 2026

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.

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Jan 26, 2026

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.

Suggested change
#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

Copilot uses AI. Check for mistakes.
MIDDLEWARE_ARCH = "${RDK_MW_ARCH}-middleware"
STACK_LAYER_EXTENSION = "${MIDDLEWARE_ARCH}"
RELEASE_NUM = "8.4.1.0"

Copy link

Copilot AI Jan 26, 2026

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.

Suggested change
RDK_ARTIFACTS_BASE_URL ?= ""

Copilot uses AI. Check for mistakes.
MIDDLEWARE_ARCH = "${RDK_MW_ARCH}-middleware"
STACK_LAYER_EXTENSION = "${MIDDLEWARE_ARCH}"
RELEASE_NUM = "8.4.1.0"

Copy link

Copilot AI Jan 26, 2026

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.

Suggested change
BUILD_VARIANT ?= "release"

Copilot uses AI. Check for mistakes.
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.

1 participant