Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions conf/distro/rdk.conf
Original file line number Diff line number Diff line change
Expand Up @@ -390,3 +390,22 @@ PREFERRED_PROVIDER_virtual/firebolt ?= "ripple"

include conf/distro/rdk-cpc.conf

#MW IPK MODE
RDK_MW_ARCH ??= "${MACHINE}"

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.

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.
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.
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
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.
MW_EXTENSION = "-middleware"
MW_OSS = "${@get_oss_arch(d)}${MW_EXTENSION}"
STACK_LAYER_EXTENSION += " ${MW_OSS}"
Comment on lines +397 to +407
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.
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_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.
IPK_FEED_URIS += " ${MW_OSS}##${MW_OSS_IPK_SERVER_PATH} "
Loading