Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8421dcc9c2 |
@@ -1,73 +0,0 @@
|
||||
# .gitlab-ci-release.yml
|
||||
|
||||
# Job to automatically update the version in the Makefile and push a commit.
|
||||
# This runs on a schedule and only acts when a final release is due.
|
||||
version:bump:
|
||||
stage: version_bump
|
||||
image: alpine:3.18 # A small image with git and bash
|
||||
rules:
|
||||
# Run only on scheduled pipelines targeting the 'master' branch.
|
||||
- if: '$CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_REF_NAME == "master"'
|
||||
script:
|
||||
- |
|
||||
echo "Checking if a final release is scheduled today..."
|
||||
MONTH=$(date +%-m)
|
||||
DAY_OF_WEEK=$(date +%-u)
|
||||
DAY_OF_MONTH=$(date +%-d)
|
||||
|
||||
# Only proceed on the first Monday of an even-numbered month.
|
||||
if ! { [ $((MONTH % 2)) -eq 0 ] && [ "$DAY_OF_WEEK" -eq 1 ] && [ "$DAY_OF_MONTH" -le 7 ]; }; then
|
||||
echo "Not a final release day. Nothing to do."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "✅ Final release day detected. Updating Makefile..."
|
||||
|
||||
# Set up Git
|
||||
apk add --no-cache git
|
||||
git config --global user.name "GitLab CI"
|
||||
git config --global user.email "gitlab-ci@${CI_SERVER_HOST}"
|
||||
|
||||
# Set the new version details
|
||||
NEW_VERSION=$(date +%Y)
|
||||
NEW_PATCHLEVEL=$(printf "%02d" $MONTH)
|
||||
|
||||
# Use sed to update the Makefile
|
||||
sed -i "s/^VERSION = .*/VERSION = $NEW_VERSION/" Makefile
|
||||
sed -i "s/^PATCHLEVEL = .*/PATCHLEVEL = $NEW_PATCHLEVEL/" Makefile
|
||||
sed -i "s/^SUBLEVEL = .*/SUBLEVEL =/" Makefile
|
||||
sed -i "s/^EXTRAVERSION = .*/EXTRAVERSION =/" Makefile
|
||||
|
||||
# If there are no changes, exit.
|
||||
if git diff --quiet Makefile; then
|
||||
echo "Makefile is already up-to-date."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Commit and push the changes
|
||||
echo "Pushing version bump to master branch..."
|
||||
git add Makefile
|
||||
COMMIT_MESSAGE="chore: Bump version to $NEW_VERSION.$NEW_PATCHLEVEL"
|
||||
git commit -m "$COMMIT_MESSAGE"
|
||||
# The GIT_WRITE_TOKEN is a variable you need to create (see setup below)
|
||||
git push "https://gitlab-ci-token:${GIT_WRITE_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git" HEAD:master
|
||||
|
||||
# Job to create the release. This job now triggers from the commit pushed by the 'version:bump' job.
|
||||
release:create:
|
||||
stage: release
|
||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||
rules:
|
||||
# Run only on commits to master with a specific commit message.
|
||||
- if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_MESSAGE =~ /^chore: Bump version to/'
|
||||
script:
|
||||
- |
|
||||
echo "🚀 Release commit detected. Creating GitLab Release..."
|
||||
# Extract the tag name directly from the commit message (e.g., "2025.08")
|
||||
TAG_NAME=$(echo "$CI_COMMIT_MESSAGE" | sed -n 's/chore: Bump version to //p')
|
||||
RELEASE_TITLE="Release $TAG_NAME"
|
||||
|
||||
release-cli create \
|
||||
--name "$RELEASE_TITLE" \
|
||||
--tag-name "$TAG_NAME" \
|
||||
--description "Automated release created by GitLab CI for commit $CI_COMMIT_SHORT_SHA." \
|
||||
--ref "$CI_COMMIT_SHA"
|
||||
@@ -1,8 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
include:
|
||||
- local: '.gitlab-ci-release.yml'
|
||||
|
||||
variables:
|
||||
DEFAULT_TAG: ""
|
||||
MIRROR_DOCKER: docker.io
|
||||
@@ -27,8 +24,6 @@ stages:
|
||||
- test.py
|
||||
- sjg-lab
|
||||
- world build
|
||||
- version_bump
|
||||
- release
|
||||
|
||||
.buildman_and_testpy_template: &buildman_and_testpy_dfn
|
||||
stage: test.py
|
||||
@@ -638,8 +633,7 @@ coreboot test.py:
|
||||
fi;
|
||||
fi
|
||||
- export SRC="$(pwd)"
|
||||
- export OUT="${SRC}/build/${ROLE}"
|
||||
- export OUT_EXTRA="${SRC}/build/${ROLE}_extra"
|
||||
- export OUT="${SRC}/build/${BOARD}"
|
||||
- export PATH=$PATH:~/bin
|
||||
- export PATH=$PATH:test/hooks/bin
|
||||
|
||||
@@ -654,8 +648,7 @@ coreboot test.py:
|
||||
vars="-V build-adjust ${ADJUST}";
|
||||
fi
|
||||
- ${SRC}/test/py/test.py --role ${ROLE} --build-dir "${OUT}"
|
||||
--build-dir-extra ${OUT_EXTRA} --capture=tee-sys
|
||||
-k "not bootstd ${TEST_PY_TEST_SPEC}" || ret=$?
|
||||
--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;
|
||||
@@ -663,8 +656,8 @@ coreboot test.py:
|
||||
artifacts:
|
||||
when: always
|
||||
paths:
|
||||
- "build/${ROLE}/test-log.html"
|
||||
- "build/${ROLE}/multiplexed_log.css"
|
||||
- "build/${BOARD}/test-log.html"
|
||||
- "build/${BOARD}/multiplexed_log.css"
|
||||
expire_in: 1 week
|
||||
|
||||
rpi3:
|
||||
@@ -849,8 +842,3 @@ vbe:
|
||||
variables:
|
||||
ROLE: vbe
|
||||
<<: *lab_dfn
|
||||
|
||||
play:
|
||||
variables:
|
||||
ROLE: play
|
||||
<<: *lab_dfn
|
||||
|
||||
@@ -136,7 +136,7 @@ void release_resources_for_core_shutdown(void)
|
||||
}
|
||||
}
|
||||
|
||||
void __noreturn jump_to_image(struct spl_image_info *spl_image)
|
||||
void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
|
||||
{
|
||||
typedef void __noreturn (*image_entry_noargs_t)(void);
|
||||
struct ti_sci_handle *ti_sci = get_ti_sci_handle();
|
||||
|
||||
@@ -347,7 +347,7 @@ uintptr_t get_stm32mp_bl2_dtb(void)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_XPL_BUILD
|
||||
void __noreturn jump_to_image(struct spl_image_info *spl_image)
|
||||
void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
|
||||
{
|
||||
typedef void __noreturn (*image_entry_stm32_t)(u32 romapi);
|
||||
uintptr_t romapi = get_stm32mp_rom_api_table();
|
||||
|
||||
@@ -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(). Allocate this
|
||||
* Set up spl_image to boot from jump_to_image_no_args(). Allocate this
|
||||
* outside the RAM buffer (i.e. don't use strdup()).
|
||||
*/
|
||||
fname = state->prog_fname ? state->prog_fname : state->argv[0];
|
||||
|
||||
@@ -53,6 +53,7 @@ CONFIG_SPL_DM_MAILBOX=y
|
||||
CONFIG_SPL_POWER_DOMAIN=y
|
||||
CONFIG_SPL_RAM_DEVICE=y
|
||||
CONFIG_SPL_YMODEM_SUPPORT=y
|
||||
CONFIG_CMD_BOOTEFI_SELFTEST=y
|
||||
CONFIG_CMD_NVEDIT_EFI=y
|
||||
CONFIG_CMD_DFU=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
|
||||
8
doc/api/fuse.rst
Normal file
8
doc/api/fuse.rst
Normal file
@@ -0,0 +1,8 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0+
|
||||
.. Copyright 2025 Simon Glass <sjg@chromium.org>
|
||||
|
||||
FUSE - Filesystem in Userspace
|
||||
==============================
|
||||
|
||||
.. kernel-doc:: include/linux/fuse.h
|
||||
:internal:
|
||||
@@ -13,6 +13,7 @@ U-Boot API documentation
|
||||
efi
|
||||
event
|
||||
fs
|
||||
fuse
|
||||
getopt
|
||||
interrupt
|
||||
led
|
||||
|
||||
1247
include/linux/fuse.h
1247
include/linux/fuse.h
File diff suppressed because it is too large
Load Diff
@@ -38,6 +38,6 @@
|
||||
|
||||
exec labgrid-client -V do-bootstrap ${bootstrap:-1} -V do-build ${build:-1} \
|
||||
-V do-send ${send:-0} -V do-clean ${clean:-0} ${vars} \
|
||||
-V process-limit ${BUILDMAN_PROCESS_LIMIT:-0} ${log_output} ${V} \
|
||||
-V process-limit ${BUILDMAN_PROCESS_LIMIT:-0} \
|
||||
-r "${U_BOOT_BOARD_IDENTITY}" ${strategy} ${verbose} -a console \
|
||||
${console_log}
|
||||
|
||||
@@ -87,9 +87,6 @@ def pytest_addoption(parser):
|
||||
help='Compile U-Boot before running tests')
|
||||
parser.addoption('--buildman', default=False, action='store_true',
|
||||
help='Use buildman to build U-Boot (assuming --build is given)')
|
||||
parser.addoption(
|
||||
'-E', '--allow-exceptions', '-E', default=False, action='store_true',
|
||||
help='Avoid catching exceptions with test failures')
|
||||
parser.addoption('--gdbserver', default=None,
|
||||
help='Run sandbox under gdbserver. The argument is the channel '+
|
||||
'over which gdbserver should communicate, e.g. localhost:1234')
|
||||
@@ -170,7 +167,7 @@ def get_details(config):
|
||||
if build_dir_extra:
|
||||
env['U_BOOT_BUILD_DIR_EXTRA'] = build_dir_extra
|
||||
|
||||
# Make sure the script sees that it is being run from pytest
|
||||
# Make sure the script sees that it is being run from pytest
|
||||
env['U_BOOT_SOURCE_DIR'] = source_dir
|
||||
|
||||
proc = subprocess.run(cmd, stdout=subprocess.PIPE,
|
||||
@@ -339,7 +336,6 @@ def pytest_configure(config):
|
||||
ubconfig.connection_ok = True
|
||||
ubconfig.timing = config.getoption('timing')
|
||||
ubconfig.role = config.getoption('role')
|
||||
ubconfig.allow_exceptions = config.getoption('allow_exceptions')
|
||||
|
||||
env_vars = (
|
||||
'board_type',
|
||||
@@ -511,9 +507,6 @@ def ubman(request):
|
||||
if not ubconfig.connection_ok:
|
||||
pytest.skip('Cannot get target connection')
|
||||
return None
|
||||
if ubman_fix.config.allow_exceptions:
|
||||
ubman_fix.ensure_spawned()
|
||||
return ubman_fix
|
||||
try:
|
||||
ubman_fix.ensure_spawned()
|
||||
except OSError as err:
|
||||
@@ -887,23 +880,20 @@ def pytest_runtest_protocol(item, nextitem):
|
||||
test_list.append(item.name)
|
||||
tests_not_run.remove(item.name)
|
||||
|
||||
if ubman_fix.config.allow_exceptions:
|
||||
try:
|
||||
msg_log(msg)
|
||||
else:
|
||||
try:
|
||||
msg_log(msg)
|
||||
except:
|
||||
# If something went wrong with logging, it's better to let the test
|
||||
# process continue, which may report other exceptions that triggered
|
||||
# the logging issue (e.g. ubman_fix.log wasn't created). Hence, just
|
||||
# squash the exception. If the test setup failed due to e.g. syntax
|
||||
# error somewhere else, this won't be seen. However, once that issue
|
||||
# is fixed, if this exception still exists, it will then be logged
|
||||
# as part of the test's stdout.
|
||||
import traceback
|
||||
print('Exception occurred while logging runtest status:')
|
||||
traceback.print_exc()
|
||||
# FIXME: Can we force a test failure here?
|
||||
except:
|
||||
# If something went wrong with logging, it's better to let the test
|
||||
# process continue, which may report other exceptions that triggered
|
||||
# the logging issue (e.g. ubman_fix.log wasn't created). Hence, just
|
||||
# squash the exception. If the test setup failed due to e.g. syntax
|
||||
# error somewhere else, this won't be seen. However, once that issue
|
||||
# is fixed, if this exception still exists, it will then be logged as
|
||||
# part of the test's stdout.
|
||||
import traceback
|
||||
print('Exception occurred while logging runtest status:')
|
||||
traceback.print_exc()
|
||||
# FIXME: Can we force a test failure here?
|
||||
|
||||
log.end_section(item.name)
|
||||
|
||||
|
||||
@@ -60,11 +60,14 @@ class ConsoleSandbox(ConsoleBase):
|
||||
cmd += self.sandbox_flags
|
||||
return Spawn(cmd, cwd=self.config.source_dir, decode_signal=True)
|
||||
|
||||
def restart_uboot_with_flags(self, flags, use_dtb=True):
|
||||
def restart_uboot_with_flags(self, flags, expect_reset=False, use_dtb=True):
|
||||
"""Run U-Boot with the given command-line flags
|
||||
|
||||
Args:
|
||||
flags: List of flags to pass, each a string
|
||||
expect_reset: Boolean indication whether this boot is expected
|
||||
to be reset while the 1st boot process after main boot before
|
||||
prompt. False by default.
|
||||
use_dtb: True to use a device tree file, False to run without one
|
||||
|
||||
Returns:
|
||||
@@ -74,7 +77,7 @@ class ConsoleSandbox(ConsoleBase):
|
||||
try:
|
||||
self.sandbox_flags = flags
|
||||
self.use_dtb = use_dtb
|
||||
return self.restart_uboot(False)
|
||||
return self.restart_uboot(expect_reset)
|
||||
finally:
|
||||
self.sandbox_flags = []
|
||||
self.use_dtb = True
|
||||
|
||||
@@ -59,18 +59,3 @@ 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()
|
||||
|
||||
Reference in New Issue
Block a user