Skip to content

Commit 1aaa296

Browse files
authored
Merge branch 'TexasInstruments:master' into master
2 parents 891d67a + 89a5d66 commit 1aaa296

File tree

501 files changed

+4287
-25426
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

501 files changed

+4287
-25426
lines changed

.github/component-owners.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,6 @@ components:
9090
- vishalmti
9191

9292
source/linux/Foundational_Components/Graphics:
93+
- Antonios-C
9394
- DarrenEtheridge
9495
- StaticRocket

.github/workflows/build.yml

Lines changed: 25 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -14,56 +14,36 @@ defaults:
1414
shell: bash
1515

1616
jobs:
17+
collect:
18+
runs-on: ubuntu-latest
19+
container:
20+
image: ghcr.io/texasinstruments/processor-sdk-doc:latest
21+
options: --entrypoint /bin/bash
22+
permissions:
23+
contents: read
24+
outputs:
25+
build-matrix: "${{ steps.matrix.outputs.matrix }}"
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Create build matrix
31+
id: matrix
32+
run: |
33+
./bin/build_matrix.py
34+
1735
build:
18-
name: Build Linux Documents
36+
name: Build
1937
runs-on: ubuntu-latest
2038
container:
2139
image: ghcr.io/texasinstruments/processor-sdk-doc:latest
2240
options: --entrypoint /bin/bash
41+
permissions:
42+
contents: read
43+
needs: collect
2344
strategy:
2445
matrix:
25-
os: [linux]
26-
device:
27-
- AM335X
28-
- AM437X
29-
- AM57X
30-
- AM62AX
31-
- AM62LX
32-
- AM62PX
33-
- AM62X
34-
- AM64X
35-
- AM65X
36-
- AM67
37-
- AM68
38-
- AM69
39-
- CORESDK
40-
- DRA821A
41-
- J7200
42-
- J721E
43-
- J721S2
44-
- J722S
45-
- J742S2
46-
- J784S4
47-
- AM62DX
48-
include:
49-
- os: android
50-
device: AM62PX
51-
- os: android
52-
device: AM62X
53-
- os: buildroot
54-
device: AM62X
55-
- os: buildroot
56-
device: AM62LX
57-
- os: debian
58-
device: AM62X
59-
- os: debian
60-
device: AM62PX
61-
- os: debian
62-
device: AM64X
63-
- os: debian
64-
device: AM62LX
65-
- os: edgeai
66-
device: AM62AX
46+
include: "${{ fromJSON(needs.collect.outputs.build-matrix) }}"
6747

6848
steps:
6949
- name: Checkout
@@ -75,7 +55,8 @@ jobs:
7555
7656
- name: Build ${{ matrix.device }}
7757
run: |
78-
make DEVFAMILY=${{ matrix.device }} OS=${{ matrix.os }}
58+
make DEVFAMILY=${{ matrix.device }} OS=${{ matrix.os }} \
59+
VERSION=${{ github.ref_name }}
7960
8061
- name: Upload artifact
8162
uses: actions/upload-artifact@v4

.github/workflows/check-files.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,23 @@ jobs:
3232
git fetch --no-tags --depth=1 origin master
3333
git switch master
3434
35-
- name: Run check-files.sh
35+
- name: Run check_files.py
3636
run: |
3737
# Disable color output
3838
export NO_COLOR=true
3939
4040
# Run the test
41-
bin/delta.sh -a master -b pr -- ./bin/check-files.sh
41+
bin/delta.sh -a master -b pr -- ./bin/check_files.py
4242
4343
# Prepare summary
4444
WARNING_COUNT=$(wc -l < _new-warn.log)
4545
if [ "$WARNING_COUNT" -gt "0" ]; then
46-
echo "New unreachable files found with check-files.sh:"
46+
echo "New unreachable files found with check_files.py:"
4747
echo '```text'
4848
cat _new-warn.log
4949
echo '```'
5050
else
51-
echo "No new unreachable files found with check-files.sh"
51+
echo "No new unreachable files found with check_files.py"
5252
fi >> "$GITHUB_STEP_SUMMARY"
5353
5454
# Prepare the artifacts

.github/workflows/check_toc_txt.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
container:
2020
image: ghcr.io/texasinstruments/processor-sdk-doc:latest
2121
options: --entrypoint /bin/bash
22+
permissions:
23+
contents: read
2224

2325
steps:
2426
- name: Checkout repository

.github/workflows/comment.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
name: Comment
1616
runs-on: ubuntu-latest
1717
if: ${{ github.event.workflow_run.event == 'pull_request' }}
18+
permissions:
19+
pull-requests: write
1820

1921
steps:
2022
- name: Download artifact

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
container:
1717
image: ghcr.io/texasinstruments/processor-sdk-doc:latest
1818
options: --entrypoint /bin/bash
19+
permissions:
20+
contents: read
1921

2022
steps:
2123
- name: Checkout

.github/workflows/rstcheck.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
container:
1919
image: ghcr.io/texasinstruments/processor-sdk-doc:latest
2020
options: --entrypoint /bin/bash
21+
permissions:
22+
contents: read
2123

2224
steps:
2325
- name: Checkout repository

.github/workflows/vale.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
container:
1515
image: ghcr.io/staticrocket/processor-sdk-doc:latest
1616
options: --entrypoint /bin/bash
17+
permissions:
18+
contents: read
1719

1820
steps:
1921
- name: Prepare GitHub workdir

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ of directories listed under `configs/`. For example:
4646
* "J721S2" (representing Jacinto 7 AEP)
4747
* "J784S4" (representing Jacinto 7 AHP)
4848
* "J722S" (representing Jacinto 7 AEN)
49-
* "GEN" (representing General family not listed above)
50-
* "CORESDK" (representing CORESDK)
5149

5250
OS represents the operating system. Possible values correspond to the second
5351
parameter of files listed under the `configs/<DEVFAMILY>/` directory. For

bin/build_matrix.py

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
#!/usr/bin/env python3
2+
3+
"""Tool to create a build matrix for the current tree
4+
5+
SPDX-License-Identifier: MIT
6+
Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com
7+
"""
8+
9+
import json
10+
import logging
11+
import os
12+
from pathlib import Path
13+
14+
CONFIG_PATH = Path("configs/")
15+
GITHUB_PATH = Path(os.environ.get("GITHUB_OUTPUT", "test_output.txt"))
16+
REQUIRED_CONFIG_FRAGMENTS = {"config.txt", "tags.py", "toc.txt"}
17+
logger = logging.getLogger(__name__)
18+
19+
20+
def output_matrix(matrix):
21+
"""Write the output of the matrix to the GitHub CI managed file
22+
23+
:param matrix: List of dictionaries of valid os and platform combinations
24+
"""
25+
matrix_string = json.dumps(matrix)
26+
logging.info("Writing matrix data to: %s", GITHUB_PATH)
27+
with GITHUB_PATH.open("a", encoding="utf-8") as file:
28+
file.write(f"matrix={matrix_string}\n")
29+
30+
31+
def unpack_os_set(platform, os_set):
32+
"""Produce a list of dictionaries of valid platform to os mappings.
33+
34+
:param platform: String name of platform to use
35+
:param os_set: Set of string os names supported
36+
:return: List of dictionaries with os and platform mappings
37+
"""
38+
platform_matrix = []
39+
for name in os_set:
40+
platform_matrix.append({"device": platform, "os": name})
41+
return platform_matrix
42+
43+
44+
def valid_os_set(platform):
45+
"""Get a set of valid OS options for a give platform path. This is a little more complex than it
46+
needs to be so that we can produce some more verbose warnings.
47+
48+
:param platform: Pathlib path to platform config directory
49+
:return: Set of valid OS options
50+
"""
51+
config_fragments = set()
52+
for fragment in REQUIRED_CONFIG_FRAGMENTS:
53+
config_fragments |= {
54+
x.name for x in platform.glob(f"{platform.stem}_*_{fragment}")
55+
}
56+
57+
os_names = set()
58+
for name in config_fragments:
59+
os_names.add(name.split("_")[1])
60+
61+
valid_os = set()
62+
for name in os_names:
63+
invalid = False
64+
for fragment in REQUIRED_CONFIG_FRAGMENTS:
65+
required_file = f"{platform.stem}_{name}_{fragment}"
66+
if required_file not in config_fragments:
67+
invalid = True
68+
logging.warning("Missing the required file: %s", required_file)
69+
70+
if invalid:
71+
logging.warning("Skipping the invalid OS: %s", name)
72+
else:
73+
valid_os.add(name)
74+
75+
return valid_os
76+
77+
78+
def main():
79+
"""Main processing loop"""
80+
logging.basicConfig(level=logging.INFO)
81+
82+
matrix_list = []
83+
for platform in CONFIG_PATH.glob("*/"):
84+
if not platform.is_dir():
85+
continue
86+
logging.info("Parsing platform at: %s", platform)
87+
os_set = valid_os_set(platform)
88+
matrix_list.extend(unpack_os_set(platform.stem, os_set))
89+
90+
output_matrix(matrix_list)
91+
92+
93+
if __name__ == "__main__":
94+
main()

0 commit comments

Comments
 (0)