Skip to content

Commit 421dc05

Browse files
authored
Merge pull request #3 from SgrrZhf/topics/huizha01/2.9.0-updates
TF-A 2.9.0 updates
2 parents 28f5e13 + 42e05cb commit 421dc05

File tree

1,444 files changed

+77429
-19134
lines changed

Some content is hidden

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

1,444 files changed

+77429
-19134
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ build/
1111

1212
# Ignore build products from tools
1313
tools/**/*.o
14+
tools/**/*.d
1415
tools/renesas/rcar_layout_create/*.bin
1516
tools/renesas/rcar_layout_create/*.srec
1617
tools/renesas/rcar_layout_create/*.map
@@ -31,6 +32,8 @@ tools/stm32image/*.o
3132
tools/stm32image/stm32image
3233
tools/stm32image/stm32image.exe
3334
tools/sptool/__pycache__/
35+
tools/encrypt_fw/encrypt_fw
36+
tools/encrypt_fw/encrypt_fw.exe
3437

3538
# GNU GLOBAL files
3639
GPATH
@@ -43,3 +46,9 @@ tags
4346

4447
# Node.js
4548
node_modules/
49+
50+
# common python virtual environment directories
51+
.env/
52+
env/
53+
.venv/
54+
venv/

.husky/pre-commit

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
3+
# shellcheck source=./_/husky.sh
4+
. "$(dirname "$0")/_/husky.sh"
5+
6+
"$(dirname "$0")/pre-commit.copyright" "$@"

.husky/pre-commit.copyright

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#!/bin/bash
2+
3+
# A hook script that checks if files staged for commit have updated Arm copyright year.
4+
# In case they are not - updates the years and prompts user to add them to the change.
5+
# This hook is called on "git commit" after changes have been staged, but before commit
6+
# message has to be provided.
7+
8+
RED="\033[00;31m"
9+
YELLOW="\033[00;33m"
10+
BLANK="\033[00;00m"
11+
12+
FILES=`git diff --cached --name-only HEAD`
13+
YEAR_NOW=`date +"%Y"`
14+
15+
YEAR_RGX="[0-9][0-9][0-9][0-9]"
16+
ARM_RGX="\(ARM\|Arm\|arm\)"
17+
18+
exit_code=0
19+
20+
function user_warning() {
21+
echo -e "Copyright of $RED$FILE$BLANK is out of date/incorrect"
22+
echo -e "Updated copyright to"
23+
grep -nr "opyright.*$YEAR_RGX.*$ARM_RGX" "$FILE"
24+
echo
25+
}
26+
27+
while read -r FILE; do
28+
if [ -z "$FILE" ]
29+
then
30+
break
31+
fi
32+
# Check if correct copyright notice is in file.
33+
# To reduce false positives, we assume files with no
34+
# copyright notice do not require it.
35+
if ! grep "opyright.*$YEAR_NOW.*$ARM_RGX" "$FILE">/dev/null 2>&1
36+
then
37+
# If it is "from_date - to_date" type of entry - change to_date entry.
38+
if grep "opyright.*$YEAR_RGX.*-.*$YEAR_RGX.*$ARM_RGX" "$FILE" >/dev/null 2>&1
39+
then
40+
exit_code=1
41+
sed -i "s/\(opyright.*\)$YEAR_RGX\(.*$ARM_RGX\)/\1$(date +"%Y"), Arm/" $FILE
42+
user_warning
43+
# If it is single "date" type of entry - add the copyright extension to current year.
44+
elif grep "opyright.*$YEAR_RGX.*$ARM_RGX" "$FILE" >/dev/null 2>&1
45+
then
46+
exit_code=1
47+
sed -i "s/\(opyright.*$YEAR_RGX\)\(.*$ARM_RGX\)/\1-$(date +"%Y"), Arm/" $FILE
48+
user_warning
49+
fi
50+
# Even if the year is correct - verify that Arm copyright is formatted correctly.
51+
elif grep "opyright.*\(ARM\|arm\)" "$FILE">/dev/null 2>&1
52+
then
53+
exit_code=1
54+
sed -i "s/\(opyright.*\)\(ARM\|arm\)/\1Arm/" $FILE
55+
user_warning
56+
fi
57+
done <<< "$FILES"
58+
59+
if [ $exit_code -eq 1 ]
60+
then
61+
echo -e "$RED""Please stage updated files$BLANK before commiting or use$YELLOW git commit --no-verify$BLANK to skip copyright check"
62+
fi
63+
exit $exit_code

.husky/prepare-commit-msg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
# shellcheck source=./_/husky.sh
44
. "$(dirname "$0")/_/husky.sh"
55

6-
"$(dirname "$0")/prepare-commit-msg.cz" "$@"
6+
if ! git config --get tf-a.disableCommitizen > /dev/null; then
7+
"$(dirname "$0")/prepare-commit-msg.cz" "$@"
8+
fi

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v16.17.1

.readthedocs.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (c) 2023, Arm Limited. All rights reserved
2+
#
3+
# SPDX-License-Identifier: BSD-3-Clause
4+
#
5+
# Configuration file for the readthedocs deploy
6+
# Available at https://trustedfirmware-a.readthedocs.io/en/latest/
7+
8+
9+
# readthedocs config version
10+
version: 2
11+
12+
build:
13+
os: ubuntu-22.04 # Ubuntu Jammy LTS
14+
tools:
15+
python: "3.10"
16+
apt_packages:
17+
- plantuml
18+
jobs:
19+
post_create_environment:
20+
- pip install poetry=="1.3.2"
21+
- poetry config virtualenvs.create false
22+
post_install:
23+
- poetry install --with doc
24+
25+
sphinx:
26+
configuration: docs/conf.py

.versionrc.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, Arm Limited. All rights reserved.
2+
* Copyright (c) 2021-2023, Arm Limited. All rights reserved.
33
*
44
* SPDX-License-Identifier: BSD-3-Clause
55
*/
@@ -80,6 +80,23 @@ module.exports = {
8080
"filename": "package.json",
8181
"type": "json"
8282
},
83+
{
84+
"filename": "pyproject.toml",
85+
"updater": {
86+
"readVersion": function (contents) {
87+
const _ver = contents.match(/version\s=.*"(\d)\.(\d)\.(\d)/);
88+
89+
return `${_ver[1]}.${_ver[2]}.${_ver[2]}`;
90+
},
91+
92+
"writeVersion": function (contents, version) {
93+
const _ver = 'version = "' + version + '"'
94+
95+
return contents.replace(/^(version\s=\s")((\d).?)*$/m, _ver)
96+
}
97+
98+
},
99+
},
83100
{
84101
"filename": "package-lock.json",
85102
"type": "json"

0 commit comments

Comments
 (0)