Compare commits

..

1 Commits
loadf ... loadd

Author SHA1 Message Date
Simon Glass
7d5b0f8671 Revert "tools: fit_image: Add the loadable property to configs"
This is not correct when building a kernel FIT, since it adds a second
loadable in addition to the kernel.

There may in fact be a bug in SPL FIT, in which case that should be
fixed, rather than adding an invalid loadable to the FIT.

This reverts commit cabde449b9.

Series-to: concept
Series-cc: heinrich
Cover-letter:
mkimage: Start to tidy up mkimage and friends
The current mkimage code is a bit messy:

- the main() function is very long
- two similarly named structs are used throughout: the first
  (struct image_tool_params) is not actually just parameters, the second
  (struct image_type_params) is confusingly similar
- quite a bit of FIT processing happens right at the start of main(),
  which can be hard to follow
- the program calls exit() from many different places

This series renames the main structures, avoiding using the common
'params' word. It breaks up part of main() into separate functions and
starts the process of exiting in one place.

It also reverts a patch which causes an invalid 'loadables' property to
be added with '-f auto'.

More remains to be done, but this is a start.
END
2025-08-01 13:43:31 +12:00
3 changed files with 28 additions and 71 deletions

View File

@@ -6,10 +6,6 @@ include:
variables:
DEFAULT_TAG: ""
MIRROR_DOCKER: docker.io
TEST_SUITES: "1"
TEST_PY: "1"
TEST_SPEC: ""
WORLD_BUILD: "1"
LAB_ONLY: ""
SJG_LAB: ""
PLATFORM: linux/amd64,linux/arm64
@@ -27,10 +23,10 @@ default:
# We run some tests in different order, to catch some failures quicker.
stages:
- test_suites
- testsuites
- test.py
- sjg-lab
- world_build
- world build
- version_bump
- release
@@ -38,15 +34,10 @@ stages:
stage: test.py
retry: 2 # QEMU may be too slow, etc.
rules:
- if: $LAB_ONLY != "1"
when: always
- if: $LAB_ONLY == "1"
when: never
- if: $TEST_PY == "1"
when: always
- if: $TEST_PY == $CI_JOB_NAME
when: always
- if: $TEST_PY == $TEST_PY_BD
when: always
- when: never
before_script:
- git config --global --add safe.directory "${CI_PROJECT_DIR}"
# qemu_arm64_lwip_defconfig is the same as qemu_arm64 but with NET_LWIP enabled.
@@ -115,17 +106,11 @@ stages:
export bl1=/tmp/bl1.bin;
export PATH=/opt/Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3:${PATH};
fi
- if [[ -n "${TEST_SPEC}" ]]; then
SPEC="${TEST_SPEC}";
echo 'Using provided test spec ${TEST_SPEC}"';
else
SPEC="${TEST_PY_TEST_SPEC}";
fi
# "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not
- export PATH=/opt/qemu/bin:test/hooks/bin:${PATH};
export PYTHONPATH=test/hooks/py/travis-ci;
./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID} ${TEST_PY_EXTRA}
${SPEC:+"-k ${SPEC}"}
${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"}
--build-dir "$UBOOT_TRAVIS_BUILD_DIR"
--junitxml=/tmp/${TEST_PY_BD}/results.xml
artifacts:
@@ -139,13 +124,12 @@ stages:
expire_in: 1 week
.world_build:
stage: world_build
stage: world build
rules:
- if: $LAB_ONLY != "1"
when: always
- if: $LAB_ONLY == "1"
when: never
- if: $WORLD_BUILD == "1"
when: always
- when: never
build all 32bit ARM platforms:
extends: .world_build
@@ -222,17 +206,16 @@ build all other platforms:
exit $ret;
fi;
.test_suites:
stage: test_suites
.testsuites:
stage: testsuites
rules:
- if: $LAB_ONLY != "1"
when: always
- if: $LAB_ONLY == "1"
when: never
- if: $TEST_SUITES == "1"
when: always
- when: never
check for new CONFIG symbols outside Kconfig:
extends: .test_suites
extends: .testsuites
script:
- git config --global --add safe.directory "${CI_PROJECT_DIR}"
# If grep succeeds and finds a match the test fails as we should
@@ -245,7 +228,7 @@ check for new CONFIG symbols outside Kconfig:
# build documentation
docs:
extends: .test_suites
extends: .testsuites
script:
- python3 -m venv /tmp/venvhtml
- . /tmp/venvhtml/bin/activate
@@ -255,13 +238,13 @@ docs:
# ensure all configs have MAINTAINERS entries
Check for configs without MAINTAINERS entry:
extends: .test_suites
extends: .testsuites
script:
- ./tools/buildman/buildman --maintainer-check
# Ensure host tools build
Build tools-only and envtools:
extends: .test_suites
extends: .testsuites
tags:
- single
script:
@@ -269,8 +252,8 @@ Build tools-only and envtools:
make mrproper;
make tools-only_config envtools -j$(nproc)
Run binman, buildman, dtoc, Kconfig and patman test suites:
extends: .test_suites
Run binman, buildman, dtoc, Kconfig and patman testsuites:
extends: .testsuites
script:
- git config --global user.name "GitLab CI Runner";
git config --global user.email trini@konsulko.com;
@@ -299,7 +282,7 @@ Run binman, buildman, dtoc, Kconfig and patman test suites:
# Check for any pylint regressions
Run pylint:
extends: .test_suites
extends: .testsuites
tags:
- single
script:
@@ -323,7 +306,7 @@ Run pylint:
# Check for pre-schema driver model tags
Check for pre-schema tags:
extends: .test_suites
extends: .testsuites
script:
- git config --global --add safe.directory "${CI_PROJECT_DIR}";
# If grep succeeds and finds a match the test fails as we should
@@ -332,7 +315,7 @@ Check for pre-schema tags:
# Check we can package the Python tools
Check packing of Python tools:
extends: .test_suites
extends: .testsuites
script:
- make pip
@@ -649,6 +632,11 @@ coreboot test.py:
# Environment:
# SRC - source tree
# OUT - output directory for builds
- if [[ -n ${SJG_LAB} ]]; then
if [[ "${SJG_LAB}" != "${ROLE}" && "${SJG_LAB}" != "1" ]]; then
exit 0;
fi;
fi
- export SRC="$(pwd)"
- export OUT="${SRC}/build/${ROLE}"
- export OUT_EXTRA="${SRC}/build/${ROLE}_extra"

View File

@@ -95,34 +95,6 @@ testing cycle to edit these pipelines in separate local commits to pair them
down to just the jobs you're interested in. These changes must be removed
prior to submission.
Available variables are:
TEST_SUITES
Set to 0 to disable the test_suites stage::
git push ci -o ci.variable=TEST_SUITES=0
TEST_PY
Set to 0 to disable the test.py stage, or set to the job name to run just
that job, or set to the board name to run all tests for that board:
For example::
git push ci -o ci.variable=TEST_PY=0
git push ci -o ci.variable=TEST_PY=sandbox
git push ci -o ci.variable=TEST_PY='sandbox with clang test.py'
WORLD_BUILD
Set to 0 to disable the world_build stage::
git push ci -o ci.variable=WORLD_BUILD=0
TEST_SPEC
Set to the test spec to use when running a test.py tests. This overrides
the spec provided by the job. For example::
git push ci -o ci.variable=TEST_SPEC=bootstd
Using the lab
-------------
@@ -141,9 +113,7 @@ To request that the lab runs::
git push ci -o ci.variable=SJG_LAB=1 <branch>
To request that *only* the lab runs, you can set TEST_PY=0 and TEST_SUITES=0
and WORD_BUILD=0 as above. But as a shortcut you can use the LAB_ONLY
variables::
To request that *only* the lab runs::
git push ci -o ci.variable=SJG_LAB=1 ci.variable=LAB_ONLY=1 <branch>

View File

@@ -63,8 +63,7 @@ class FsHelper:
# Use a default filename; the caller can adjust it
leaf = f'{prefix}.{fs_type}.img'
self.fs_img = os.path.join(
config.persistent_data_dir if config else '', leaf)
self.fs_img = os.path.join(config.persistent_data_dir, leaf)
# Some distributions do not add /sbin to the default PATH, where mkfs
# lives