Compare commits

...

8 Commits

Author SHA1 Message Date
Simon Glass
0c856610a9 Merge branch 'devops' into 'master'
CI: Automate releases with a scheduled job

See merge request u-boot/u-boot!113
2025-07-18 02:44:45 +00:00
Simon Glass
75360e4c45 CI: Automate releases with a scheduled job
Introduce a new CI job in .gitlab-ci-release.yml to automate the
creation of project releases.

This single job, designed to run on a schedule, contains logic to:

  - create a final release (e.g. 2025.08) on the first Monday of an
    even-numbered month.
  - create a release candidate (e.g. 2025.07-rc1) on all other
    scheduled days.

This uses official release-cli to create both the git tag and the
corresponding GitLab Release entry automatically.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-18 02:44:28 +00:00
Simon Glass
5799c8f9b1 Merge branch 'play' into 'master'
CI: Add a beagleplay board

See merge request u-boot/u-boot!124
2025-07-18 02:43:51 +00:00
Simon Glass
a00a473657 CI: Add a beagleplay board
This board is interesting since it has two separate U-Boot builds. Add
it to the sjg lab.

Add the required support for a second build directory.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-17 20:42:00 -06:00
Simon Glass
d3e3575148 Merge branch 'fix-spl' into 'master'
spl: Finish rename of jump_to_image_no_args()

See merge request u-boot/u-boot!123
2025-07-18 01:51:19 +00:00
Simon Glass
dbe7b5ae23 spl: Finish rename of jump_to_image_no_args()
Some uses of this weak function were missed. Fix them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: e2670b665d
2025-07-17 18:30:01 -06:00
Simon Glass
630c46362a Merge branch 'colib' into 'master'
test: Check booting via a script on an ARM board

See merge request u-boot/u-boot!122
2025-07-15 23:16:10 +00:00
Simon Glass
7c4ce04b1d test: Check booting via a script on an ARM board
Use the Colibri-iMX8x board to check that booting with a U-Boot script
works as expected.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-12 19:04:54 -06:00
6 changed files with 81 additions and 7 deletions

48
.gitlab-ci-release.yml Normal file
View File

@@ -0,0 +1,48 @@
# .gitlab-ci-release.yml
# This single job handles the creation of both final releases and release candidates.
# It determines which type of release to create based on the date.
release:create:
stage: release
# We use the official release-cli image provided by GitLab.
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
# This job only runs on scheduled pipelines that target the 'master' branch.
- if: '$CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_REF_NAME == "master"'
script:
- |
echo "🚀 Checking release conditions for pipeline on branch '$CI_COMMIT_REF_NAME'..."
# Use %-m, %-u, %-d to avoid issues with zero-padding (e.g., '08' being an invalid octal number).
MONTH=$(date +%-m)
DAY_OF_WEEK=$(date +%-u) # 1=Monday, 7=Sunday
DAY_OF_MONTH=$(date +%-d)
# FINAL RELEASE: Occurs on the first Monday of an even-numbered month.
# 1. The month is even (e.g., February, April...).
# 2. The day of the week is Monday.
# 3. The day is within the first 7 days of the month.
if [ $((MONTH % 2)) -eq 0 ] && [ "$DAY_OF_WEEK" -eq 1 ] && [ "$DAY_OF_MONTH" -le 7 ]; then
# This is a Final Release
TAG_NAME=$(date +%Y.%m)
RELEASE_TITLE="Release $TAG_NAME"
echo "✅ Conditions met for a Final Release. Creating tag: $TAG_NAME"
else
# This is a Release Candidate (RC)
# RC index is calculated based on the day of the month:
# Days 1-14 -> rc1, Days 15-28 -> rc2, etc.
RC_INDEX=$(( (DAY_OF_MONTH - 1) / 14 + 1 ))
TAG_NAME="$(date +%Y.%m)-rc${RC_INDEX}"
RELEASE_TITLE="Release Candidate $TAG_NAME"
echo "📝 Conditions met for a Release Candidate. Creating tag: $TAG_NAME"
fi
echo "Executing release-cli to create the release..."
release-cli create \
--name "$RELEASE_TITLE" \
--tag-name "$TAG_NAME" \
--description "Automated release created by GitLab CI. Based on commit $CI_COMMIT_SHORT_SHA on the '$CI_COMMIT_REF_NAME' branch." \
--ref "$CI_COMMIT_SHA"

View File

@@ -1,5 +1,8 @@
# SPDX-License-Identifier: GPL-2.0+
include:
- local: '.gitlab-ci-release.yml'
variables:
DEFAULT_TAG: ""
MIRROR_DOCKER: docker.io
@@ -24,6 +27,7 @@ stages:
- test.py
- sjg-lab
- world build
- release
.buildman_and_testpy_template: &buildman_and_testpy_dfn
stage: test.py
@@ -633,7 +637,8 @@ coreboot test.py:
fi;
fi
- export SRC="$(pwd)"
- export OUT="${SRC}/build/${BOARD}"
- export OUT="${SRC}/build/${ROLE}"
- export OUT_EXTRA="${SRC}/build/${ROLE}_extra"
- export PATH=$PATH:~/bin
- export PATH=$PATH:test/hooks/bin
@@ -648,7 +653,8 @@ coreboot test.py:
vars="-V build-adjust ${ADJUST}";
fi
- ${SRC}/test/py/test.py --role ${ROLE} --build-dir "${OUT}"
--capture=tee-sys -k "not bootstd ${TEST_PY_TEST_SPEC}" || ret=$?
--build-dir-extra ${OUT_EXTRA} --capture=tee-sys
-k "not bootstd ${TEST_PY_TEST_SPEC}" || ret=$?
- U_BOOT_BOARD_IDENTITY="${ROLE}" u-boot-test-release || true
- if [[ $ret -ne 0 ]]; then
exit $ret;
@@ -656,8 +662,8 @@ coreboot test.py:
artifacts:
when: always
paths:
- "build/${BOARD}/test-log.html"
- "build/${BOARD}/multiplexed_log.css"
- "build/${ROLE}/test-log.html"
- "build/${ROLE}/multiplexed_log.css"
expire_in: 1 week
rpi3:
@@ -842,3 +848,8 @@ vbe:
variables:
ROLE: vbe
<<: *lab_dfn
play:
variables:
ROLE: play
<<: *lab_dfn

View File

@@ -136,7 +136,7 @@ void release_resources_for_core_shutdown(void)
}
}
void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
void __noreturn jump_to_image(struct spl_image_info *spl_image)
{
typedef void __noreturn (*image_entry_noargs_t)(void);
struct ti_sci_handle *ti_sci = get_ti_sci_handle();

View File

@@ -347,7 +347,7 @@ uintptr_t get_stm32mp_bl2_dtb(void)
}
#ifdef CONFIG_XPL_BUILD
void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
void __noreturn jump_to_image(struct spl_image_info *spl_image)
{
typedef void __noreturn (*image_entry_stm32_t)(u32 romapi);
uintptr_t romapi = get_stm32mp_rom_api_table();

View File

@@ -112,7 +112,7 @@ static int load_from_image(struct spl_image_info *spl_image,
log_info("Reading from pos %lx size %lx\n", pos, size);
/*
* Set up spl_image to boot from jump_to_image_no_args(). Allocate this
* Set up spl_image to boot from jump_to_image(). Allocate this
* outside the RAM buffer (i.e. don't use strdup()).
*/
fname = state->prog_fname ? state->prog_fname : state->argv[0];

View File

@@ -59,3 +59,18 @@ def test_distro(ubman):
ubman.p.expect(['Welcome to .*Ubuntu 24.04.1 LTS.*!'])
ubman.restart_uboot()
@pytest.mark.boardspec('colibri-imx8x')
@pytest.mark.role('colibrimx8')
def test_distro_script(ubman):
"""Test that a selected board can boot into Llinux using a script"""
with ubman.log.section('boot'):
ubman.run_command('boot', wait_for_prompt=False)
# This is the start of userspace
ubman.p.expect(['Welcome to TDX Wayland'])
# Shortly later, we should see this banner
ubman.p.expect(['Colibri-iMX8X_Reference-Multimedia-Image'])
ubman.restart_uboot()