Skip to content

TI: Add TI's custom debian repository and install a few packages by-default #8305

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jsuhaas22
Copy link
Contributor

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

TI maintains its own repository of debian packages here.

This PR adds this repository in TI images by-default through a new extension. So when the user performs apt update, apt install etc in Armbian images for TI boards, even TI's packages can be installed. Further, the PR also installs a few of TI's packages by-default in its images.

Additionally: it also changes TI's U-boot link from git.ti.com to Github.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

This has been tested on SK-AM62B trixie image:

  • boot test
  • apt update and apt install tests

Checklist:

Please delete options that are not relevant.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

@jsuhaas22 jsuhaas22 requested review from glneo, a team and igorpecovnik as code owners June 16, 2025 05:53
Copy link
Contributor

coderabbitai bot commented Jun 16, 2025

"""

Walkthrough

This change updates the SK-AM62B board configuration by adding the CC33XX_SUPPORT variable. The K3 family source configuration is modified to update the BOOTSOURCE URL to a GitHub repository, enable the "ti-debpkgs" extension unconditionally, and conditionally manage TI-specific package lists and WiFi configuration based on release and support variables. A new script, ti-debpkgs.sh, is introduced with functions to add TI Debian packages to the root filesystem and configure the TI APT repository inside the chroot environment. Additionally, an APT pinning configuration file is added to prioritize packages from the Texas Instruments GitHub origin.

Suggested labels

ready to merge

Suggested reviewers

  • glneo
  • igorpecovnik
    """
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Commit Unit Tests in branch add-ti-debpkgs
  • Post Copyable Unit Tests in Comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added size/small PR with less then 50 lines 08 Milestone: Third quarter release Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Framework Framework components BSP Board Support Packages labels Jun 16, 2025
@coderabbitai coderabbitai bot added the Ready to merge Reviewed, tested and ready for merge label Jun 16, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (3)
config/boards/sk-am62b.conf (1)

18-18: Add a short comment explaining the new CC33XX_SUPPORT switch

Future maintainers unfamiliar with TI’s Wi-Fi stack won’t know what turning this flag on/off implies for the image size or driver set. A one-liner right above the variable would help.

extensions/ti-debpkgs.sh (2)

17-18: Potential sed delimiter collision

If ${RELEASE} ever contains a “/” (unlikely but possible, e.g. testing/rolling), the substitution breaks. Consider sed -i "s|bookworm|${RELEASE}|g" … to switch to a safer delimiter.


25-26: Copy runs outside chroot – ownership & uid may differ

cp … $SDCARD/etc/apt/preferences.d/ happens on the host, so the file ends up owned by the invoking user (often root:root). If the rootfs later enforces different ownership (e.g. _apt), move the copy inside chroot_sdcard to inherit correct permissions.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 989f255 and 59b66e4.

📒 Files selected for processing (4)
  • config/boards/sk-am62b.conf (1 hunks)
  • config/sources/families/k3.conf (2 hunks)
  • extensions/ti-debpkgs.sh (1 hunks)
  • packages/bsp/ti/ti-debpkgs/ti-debpkgs (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
extensions/ti-debpkgs.sh (1)
.github/generate_CODEOWNERS.sh (1)
  • display_alert (6-6)
🪛 Shellcheck (0.10.0)
extensions/ti-debpkgs.sh

[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.

(SC2148)


[warning] 9-9: Prefer mapfile or read -a to split command output (or quote to avoid splitting).

(SC2207)


[error] 10-10: Argument mixes string and array. Use * or separate argument.

(SC2145)


[error] 12-12: Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).

(SC2199)


[warning] 12-12: Remove quotes from right-hand side of =~ to match as a regex rather than literally.

(SC2076)


[error] 31-31: Argument mixes string and array. Use * or separate argument.

(SC2145)

🔇 Additional comments (2)
packages/bsp/ti/ti-debpkgs/ti-debpkgs (1)

1-3: Pin-priority 1001 may unintentionally override security updates

A priority above 1000 forces TI packages to win every dependency race – even over Debian security/point-release updates from official mirrors. Confirm this is the desired policy for all packages, or consider lowering to 990 and use per-package pins where absolutely required.

config/sources/families/k3.conf (1)

22-23: Unconditional enable_extension "ti-debpkgs" can break non-TI derivatives

If a downstream board reuses this family file but does not host the TI repo key, apt update will warn/fail on the missing source. Consider gating the call behind [[ "${TI_PACKAGES[*]}" ]] or another feature flag.

@github-actions github-actions bot added size/medium PR with more then 50 and less then 250 lines and removed size/small PR with less then 50 lines Ready to merge Reviewed, tested and ready for merge labels Jun 16, 2025
@coderabbitai coderabbitai bot added the Ready to merge Reviewed, tested and ready for merge label Jun 16, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
extensions/ti-debpkgs.sh (1)

17-18: Quote the output path in wget
You correctly added the temp-dir creation but still need to quote the target file to handle paths with spaces (SC2086):

- run_host_command_logged "wget -qO $SDCARD/tmp/ti-debpkgs.sources https://…"
+ run_host_command_logged "wget -qO \"$SDCARD/tmp/ti-debpkgs.sources\" https://…"
🧹 Nitpick comments (3)
extensions/ti-debpkgs.sh (3)

1-1: Add a shebang or shell directive
The script has no interpreter declaration (SC2148). Include a shebang and/or a ShellCheck directive to specify Bash explicitly.

+#!/usr/bin/env bash
+# shellcheck shell=bash

13-13: Avoid mixing array expansion inside quoted strings
ShellCheck SC2145 warns about mixing strings and arrays. Consider using ${valid_suites[*]} or separate arguments:

- display_alert "TI Repo has the following valid suites - ${valid_suites[@]}..."
+ display_alert "TI Repo has the following valid suites - ${valid_suites[*]}..."
- display_alert "Valid Options Would Have Been: ${valid_suites[@]}"
+ display_alert "Valid Options Would Have Been: ${valid_suites[*]}"

Also applies to: 35-35


32-36: Error-path alert formatting
Same array-expansion mix on display_alert as above—use ${valid_suites[*]} for consistency.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 59b66e4 and 7fafbda.

📒 Files selected for processing (4)
  • config/boards/sk-am62b.conf (1 hunks)
  • config/sources/families/k3.conf (2 hunks)
  • extensions/ti-debpkgs.sh (1 hunks)
  • packages/bsp/ti/ti-debpkgs/ti-debpkgs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/bsp/ti/ti-debpkgs/ti-debpkgs
  • config/boards/sk-am62b.conf
  • config/sources/families/k3.conf
🧰 Additional context used
🧬 Code Graph Analysis (1)
extensions/ti-debpkgs.sh (1)
.github/generate_CODEOWNERS.sh (1)
  • display_alert (6-6)
🪛 Shellcheck (0.10.0)
extensions/ti-debpkgs.sh

[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.

(SC2148)


[error] 13-13: Argument mixes string and array. Use * or separate argument.

(SC2145)


[error] 35-35: Argument mixes string and array. Use * or separate argument.

(SC2145)

🔇 Additional comments (4)
extensions/ti-debpkgs.sh (4)

1-5: The extension_prepare_config__add_packages function correctly checks and expands TI_PACKAGES into add_packages_to_rootfs. No changes needed here.


9-12: Good use of mapfile for JSON parsing
Using mapfile -t to populate valid_suites avoids word-splitting issues and addresses earlier ShellCheck concerns.


15-16: Suite membership check is robust
Using printf … | grep -qx safely tests for exact matches.


21-27: Sed replacement and chroot copy are sound
The in-place sed substitution for ${RELEASE} and subsequent chroot operations look correct.

Grippy98 and others added 2 commits June 17, 2025 12:03
Texas Instruments maintains a custom apt repository [0] that contains:
    * tools like k3conf, which run on K3 devices
    * TI's versions of upstream packages (such as mesa)
    * out-of-tree drivers and firmware for graphics, wifi etc

Therefore, add TI's custom repository as the highest priority repository
in the filesystem. Doing this ensures that if apt finds a version of a
package that exists in both upstream Debian and the TI repository, it
picks the latter.

Additionally, introduce K3_PACKAGES variable to store a list of packages
that should be installed by-default in a K3 image. Initialize it to hold
TI's CC33xx packages.

Also set EXTRAWIFI to "no" in `current` image.

[0] https://github.com/TexasInstruments/ti-debpkgs

Co-authored-by: Suhaas Joshi <s-joshi@ti.com>
Signed-off-by: Suhaas Joshi <s-joshi@ti.com>
Change U-Boot repository link from git.ti.com to Github. In the past,
there have been CI issues caused due to git.ti.com failing.

Signed-off-by: Suhaas Joshi <s-joshi@ti.com>
@github-actions github-actions bot removed the Ready to merge Reviewed, tested and ready for merge label Jun 17, 2025
@coderabbitai coderabbitai bot added the Ready to merge Reviewed, tested and ready for merge label Jun 17, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (1)
extensions/ti-debpkgs.sh (1)

17-17: Ensure temporary directory creation

The addition of mkdir -p "$SDCARD/tmp" addresses the missing-directory issue raised previously.

🧹 Nitpick comments (4)
extensions/ti-debpkgs.sh (4)

1-1: Specify shell interpreter & enable strict mode

Add a shebang (#!/usr/bin/env bash) and consider set -euo pipefail at the top to ensure the script runs under Bash and fails fast on errors.


13-13: Quote array expansion in display_alert

display_alert "TI Repo has the following valid suites - ${valid_suites[@]}..." mixes string and array. Consider using ${valid_suites[*]} or wrapping the expansion in quotes to avoid unintended word-splitting.


18-18: Quote wget output path

wget -qO $SDCARD/tmp/ti-debpkgs.sources … is unquoted; wrap the path in quotes to handle potential spaces in $SDCARD/tmp.

-run_host_command_logged "wget -qO $SDCARD/tmp/ti-debpkgs.sources https://raw.githubusercontent.com/TexasInstruments/ti-debpkgs/main/ti-debpkgs.sources"
+run_host_command_logged "wget -qO \"$SDCARD/tmp/ti-debpkgs.sources\" https://raw.githubusercontent.com/TexasInstruments/ti-debpkgs/main/ti-debpkgs.sources"

35-35: Quote array expansion in error message

Same as above in the failure path: use ${valid_suites[*]} or quote the expansion to prevent word-splitting.

-display_alert "Valid Options Would Have Been: ${valid_suites[@]}"
+display_alert "Valid Options Would Have Been: ${valid_suites[*]}"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7fafbda and 43fb4a8.

📒 Files selected for processing (4)
  • config/boards/sk-am62b.conf (1 hunks)
  • config/sources/families/k3.conf (2 hunks)
  • extensions/ti-debpkgs.sh (1 hunks)
  • packages/bsp/ti/ti-debpkgs/ti-debpkgs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • config/boards/sk-am62b.conf
  • packages/bsp/ti/ti-debpkgs/ti-debpkgs
  • config/sources/families/k3.conf
🧰 Additional context used
🪛 Shellcheck (0.10.0)
extensions/ti-debpkgs.sh

[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.

(SC2148)


[error] 13-13: Argument mixes string and array. Use * or separate argument.

(SC2145)


[error] 35-35: Argument mixes string and array. Use * or separate argument.

(SC2145)

🔇 Additional comments (3)
extensions/ti-debpkgs.sh (3)

1-5: Validate TI_PACKAGES handling

extension_prepare_config__add_packages correctly checks for populated TI_PACKAGES and invokes add_packages_to_rootfs. Implementation looks solid.


8-12: Use of mapfile is correct

The JSON-to-array conversion via mapfile -t valid_suites avoids word-splitting and is a robust replacement for the previous $(...) approach.


21-21: Fix sed quoting so ${RELEASE} is expanded

Using single quotes around the substitution prevents ${RELEASE} from being interpolated. Switch to a quoting style that allows host-level expansion:
[sraise_critical_issue]

-chroot_sdcard "sed -i 's/bookworm/${RELEASE}/g' /tmp/ti-debpkgs.sources"
+chroot_sdcard "sed -i \"s/bookworm/${RELEASE}/g\" /tmp/ti-debpkgs.sources"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
08 Milestone: Third quarter release BSP Board Support Packages Framework Framework components Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review Ready to merge Reviewed, tested and ready for merge size/medium PR with more then 50 and less then 250 lines
Development

Successfully merging this pull request may close these issues.

2 participants