Commit Graph

99115 Commits

Author SHA1 Message Date
GitLab CI
88b9c00663 chore: Bump version for release candidate 2025.10-rc2 2025.10-rc2 c2025.10-rc2 2025-09-12 09:41:21 +00:00
Simon Glass
fc184615a7 Merge branch 'snapc' into 'master'
Add Python-based U-Boot concept release automation

See merge request u-boot/u-boot!180
2025-09-12 04:37:07 +00:00
GitLab CI Runner
7ba84e429f CI: Refactor release version calculation to use Python script
Replace shell-based date calculations with comprehensive Python script
that provides:

- Proper RC numbering counting backwards from final release dates
- Dead period detection for dates too early in the cycle
- Automated documentation updates with commit tracking
- Better error handling and testing coverage
- Shell variable output for CI integration

The new Python-based approach replaces fragile shell arithmetic with
robust datetime calculations and includes comprehensive test coverage.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org)
2025-09-11 22:00:11 -06:00
GitLab CI Runner
d5ba460e73 docs: Add concept release documentation and tracking
Add docs for the new concept release system:

- concept_cycle.rst: Technical documentation explaining the release
  mechanism, schedule calculations, and troubleshooting guide
- concept_releases.rst: Auto-updated release history file with
  installation instructions and real-time schedule generation
- Updated index.rst to include both new documentation files

The documentation covers:
- Bimonthly release schedule (Feb, Apr, Jun, Aug, Oct, Dec)
- RC numbering system counting backwards from final releases
- Dead period handling for dates too early in cycle
- Snap package distribution via Ubuntu Store
- Automated release tracking and history

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org)
2025-09-11 22:00:11 -06:00
GitLab CI Runner
4fe2797092 scripts: Add Python-based release version calculation system
Add a Python script to replace shell-based release version calculations
with proper datetime handling:

Features:
- Calculates release versions based on U-Boot's bimonthly schedule
- RC numbering counts backwards from final release (rc1=2wks, rc2=4wks,
  rc3=6wks)
- Dead-period detection for dates too early in release cycle
- Automatic Makefile version updates
- Release documentation generation and updates
- Multiple output formats (shell variables, JSON, version string)

Testing:
- 39 comprehensive test cases covering all scenarios
- 93% test coverage including edge cases and error handling
- Tests for cross-year boundaries, dead periods, and file operations

The script provides robust release automation for the GitLab CI pipeline
with proper error handling and extensive validation.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org)
2025-09-11 22:00:10 -06:00
Simon Glass
9f82dd0ecf Merge branch 'snapb' into 'master'
CI: Clean up trigger_snap_builds job

See merge request u-boot/u-boot!179
2025-09-12 00:17:41 +00:00
GitLab CI Runner
5c709228eb CI: Clean up trigger_snap_builds job
Ensure SSH user is specified in git clone URLs. Clean up the key format
a little.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: GitLab CI Runner <trini@konsulko.com>
2025-09-11 18:15:41 -06:00
Simon Glass
86d8b72f90 Merge branch 'snapa' into 'master'
CI: Push to launchpad when master updates

See merge request u-boot/u-boot!178
2025-09-11 22:52:22 +00:00
GitLab CI Runner
189c9bff47 CI: Push to launchpad when master updates
This is an attempt to trigger updates of the u-boot-concept-qemu/efi
snaps whenever code is merged in this repo.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-11 16:50:44 -06:00
Simon Glass
c91217e513 Merge branch 'rus' into 'master'
ulib: Add support for Rust main programs

See merge request u-boot/u-boot!177
2025-09-11 22:21:23 +00:00
Simon Glass
b7f16a838f CI: Build the Rust examples
Add the Rust examples to the 'Examples' test suite, so that we can be
sure they continue to build and run.

Series-to: concept
Series-cc: heinrich
Cover-letter:
ulib: Add support for Rust main programs
So far ulib only supports linking against C programs. While this is the
common case, there is no particular reason why other languages could not
be used to write the main program, so long as they can interoperate with
the libu-boot.so/.a library.

Rust provides a Foreign Function Interface feature, which makes it
possible to declare and call C functions from Rust code. It provides
memory safety without the uncertainty of garbage collection and with
less overhead. It would be nice if ulib could be used with Rust.

This series provides the necessary pieces to make this work. It adds an
example program which works just like the C one, but written in Rust. As
with the existing example, the program can be built against the static
ulib or can use dynamic linking.

Note that only sandbox is supported at present, i.e. native execution on
(for example) a Linux machine. Future work will add support for running
on other architectures.

In order to make more use of ulib features, U-Boot's headers will need
to be made available in Rust format. For now, only a very few are
provided, as a starting point.
END

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-11 15:19:22 -06:00
Simon Glass
8891453c77 doc: Provide a motivation for ulib
The reason for providing a U-Boot library will not be obvious to many.
Add a comment about this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-11 15:19:22 -06:00
Simon Glass
3f24d8b2e2 test: ulib: Add a test for the rust example
Provide a test which is similar to the ulib example, to make sure that
the Rust programs can be built correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-11 15:19:22 -06:00
Simon Glass
bc33a6a74d doc: ulib: Add Rust examples documentation
Add docs for the Rust examples in the ulib documentation, covering:

- Rust demo programs (dynamic and static linking)
- Build instructions using both Makefile and cargo
- u-boot-sys crate structure and FFI bindings
- Building examples outside the U-Boot tree

This provides parallel documentation to the existing C examples, making
it possible to use either language with ulib.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-11 15:19:22 -06:00
Simon Glass
f5570d48b6 doc: ulib: Clarify calling functions in any header
It is already possible to call functions in any U-Boot header. Add more
detail to explain what is meant in this 'future work' item.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-11 15:19:22 -06:00
Simon Glass
2700bef70c doc: Fix a few nits in the ulib docs
TIdy up a few minor typos and grammar errors.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-11 15:19:22 -06:00
Simon Glass
44127a8185 ulib: Add a Rust example
The U-Boot library can be used from Rust fairly easily. Add an example
for this, following along the lines of the existing ulib example.

Note that the new way of representing C strings is not used for now,
since it is not available in v1.75 of cargo, as shipped by Ubuntu 24.04

Co-developed-by: Claude <noreply@anthropic.com>
Co-developed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-11 15:19:22 -06:00
Simon Glass
791e492d39 ulib: Add a very basic rust library
Create a new lib/rust directory and add a very basic rust library in
there. This will eventually expand to include more features. For now
it only has a few ulib calls needed for the example programs.

Co-developed-by: Claude <noreply@anthropic.com>
Co-developed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-11 15:19:22 -06:00
Simon Glass
1db2a3f13b ulib: Add a way to obtain the version
It is possible to simply read the 'version_string' variable, but it
seems better to add a proper API call to get this. It is already
defined in lib/ulib/ulib.c

Add a prototype to u-boot-lib.h

Make use of it from the demo program.

Fix the comment for ulib_uninit() while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-11 15:19:22 -06:00
Simon Glass
3b1d056b30 ulib: Return the full version with ulib_get_version()
Provide the entire version string so it is possible to see the date of
the build.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-11 15:19:22 -06:00
Simon Glass
c314785548 examples: Correct dependencies for ulib
We need to check for the ulib library before building any examples. Add
this and ensure that the examples are rebuilt if the library changes.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-11 15:19:22 -06:00
Simon Glass
87ad530f85 CI: Switch to new docker image
Use an image with Rust support so we can test the Rust integration.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-11 15:19:21 -06:00
Simon Glass
08dccb40fe docker: Provide a rust toolchain
Install a Rust toolchain in the CI image so that it is possible to build
the Rust examples.

Co-developed-by: Claude <noreply@anthropic.com>
Co-developed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-11 12:51:48 -06:00
Tom Rini
a4001909a8 CI: Update to coreboot 25.03
At this point there's problems rebuilding coreboot-24.08 without manual
intervention. Let us upgrade to a newer version.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-09-11 12:51:47 -06:00
Simon Glass
10d080a43d Merge branch 'ulij' into 'master'
sandbox: Use a mon_len of 0 with the library

See merge request u-boot/u-boot!176
2025-09-10 20:01:52 +00:00
Simon Glass
03896c170e sandbox: Use a mon_len of 0 with the library
In the case of the shared/static libraries, the _end and _init symbols
are not necessarily provided since the linker script is provided by the
program which links against the U-Boot library.

In some cases the memory size can show up as less than available memory,
but enough that there is insufficient memory for U-Boot to start.

It seems better to just set the mon_len to 0 for the library.

Series-to: concept
Series-cc: heinrich

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-10 13:07:35 -06:00
Simon Glass
46e75d6234 Revert "sandbox: Avoid mon_len being larger than available RAM"
This fix turns out to be insufficient in the corner case where mon_len
is smaller than available, emulated RAM but large enough that there
isn't enough left.

This reverts commit 88b810e241.
2025-09-10 12:59:21 -06:00
Simon Glass
ec32a6ef15 Merge branch 'ulii' into 'master'
Makefile: Dependency-test tidy-up and bug fix

See merge request u-boot/u-boot!175
2025-09-10 18:33:28 +00:00
Simon Glass
fe981e965f test: Tighten up the code in test_make_dep.py
This makes a few changes to improve code readability:

- Avoid skipping tests
- Put all tests at bottom
- Shorten messages
- Avoid searching for files; just use those known to be there

Series-to: concept
Series-cc: heinrich

Signed-off-by: Simon Glass <sjg@chromium.org>
Series-links: 1:30
2025-09-10 11:37:29 -06:00
Simon Glass
e63307f8c0 efi: Add a missing dependency for capsule_esl_dtsi
The input file is used to process the dtsi, so add a dependency. This
bug was previously masked by a FORCE which was removed in

   7738c4c2d7 Makefile: Avoid FORCE with ESL

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-10 11:37:03 -06:00
Simon Glass
b3f9ef0d8d Merge branch 'ulig' into 'master'
ulib: Add a boot example

See merge request u-boot/u-boot!174
2025-09-10 11:19:12 +00:00
Simon Glass
7811a8ae52 ulib: Add a boot example
Add an example of a program which boots an OS by calling into the U-Boot
library.

Series-to: concept
Co-developed-by: Claude <noreply@anthropic.com>
Co-developed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Series-links: 1:28
2025-09-10 03:37:08 -06:00
Simon Glass
4ba77a661f ulib: Refactor the Makefile to support multiple programs
The current Makefile for the ulib examples is not very easy to modify.

Split it into three parts:
- config.mk containing the variables used by the build tools
- a list of programs and the objects in each one
- rules.mk with some rules to make it all work

Use sys-objs to indicate objects which should be built with system
headers. Use U-Boot headers by default.

With this it is fairly simply to add a new program. Of course we could
make use of U-Boot's kbuild implementation to tidy this up, but the
purpose of the examples is to show how to do things outside the U-Boot
build system.

Co-developed-by: Claude <noreply@anthropic.com>
Co-developed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-10 03:35:59 -06:00
Simon Glass
cd20477293 Merge branch 'buia' into 'master'
Makefile: Reduce unnecessary rebuilds

See merge request u-boot/u-boot!173
2025-09-09 22:58:46 +00:00
Simon Glass
ccd038bdcf test/py: Add ESL dependency tracking test
Add test for ESL (EFI Signature List) dependency chain that verifies proper
dependency tracking when FORCE is removed. Tests the transformation chain:
certificate -> ESL file -> DTSI file

The test ensures that:
- Certificate changes trigger ESL file rebuild
- ESL file changes trigger DTSI file rebuild
- Template changes rebuild DTSI but not ESL file
- No unnecessary rebuilds occur when dependencies are unchanged

Series-to: concept
Cover-letter:
Makefile: Reduce unnecessary rebuilds
In a few cases, U-Boot always rebuilds files even if nothing has
changed. This series fixes these and adds some tests which attempt to
show that these changes cause no problems.

The affected build rules are:

- converting htids to dtsi
- building devicetree overlays
- converting a certificate to an ESL file and a dtsi
END

Co-developed-by: Claude <noreply@anthropic.com>
Co-developed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-09 22:58:34 +00:00
Simon Glass
7738c4c2d7 Makefile: Avoid FORCE with ESL
We don't need to force building of the ESL dtsi or capsule file if they
already exist. Drop the FORCE dependencies.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-09 22:58:34 +00:00
Simon Glass
6247067f46 test/py: Add test for dtbo dependency tracking
Add a comprehensive test to verify that the $(obj)/%.dtbo rule properly
tracks dependencies and rebuilds when the corresponding .dtso source
file is modified. This ensures that removing FORCE from the dtbo rule
still maintains correct dependency tracking behavior.

The test creates a sample device tree overlay (.dtso) file and verifies:
- Initial build creates the .dtbo file
- Subsequent builds don't rebuild when nothing changed
- Changes to the .dtso source file trigger a rebuild

Co-developed-by: Claude <noreply@anthropic.com>
Co-developed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-09 22:58:34 +00:00
Simon Glass
53a402b8c6 Makefile: Avoid FORCE with test overlays
We don't need to force building of these files if they already exist.
Drop the FORCE dependencies.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-09 22:58:34 +00:00
Simon Glass
2699626960 test/py: Add test for Makefile dependency tracking
Add a comprehensive test to verify that Makefile dependency tracking
works correctly when FORCE is removed from build rules. The test
ensures that targets are rebuilt when dependencies change but not
when they remain unchanged.

Co-developed-by: Claude <noreply@anthropic.com>
Co-developed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-09 22:58:34 +00:00
Simon Glass
eeaaa9c448 Makefile: Avoid FORCE with CHID
We don't need to force building of this file if it already exists. Drop
the FORCE dependency.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-09 22:58:34 +00:00
Simon Glass
896268f40e Makefile: Shorten a few quiet build steps
A few of the steps are longer than the 7 characters allowed. Shorten
them so that the build output looks better:

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-09 22:58:34 +00:00
Simon Glass
32b86c4c65 Merge branch 'ulif' into 'master'
ulib: Complete initial U-Boot library

See merge request u-boot/u-boot!172
2025-09-09 21:21:24 +00:00
Simon Glass
f457b31524 test/py: Add a test for ulib functionality
Provide a test that checks that ulib operates as expected.

Add a .gitignore file for the executables thus created

There is a strange interaction with PLATFORM_LIBS which can cause the
examples to fail to build via 'make qcheck':

- CI runs 'make qcheck'
- the main Makefile sets PLATFORM_LIBS
- test/run calls test.py
- at some point test_ulib_demos() starts, with PLATFORM_LIBS set
- the test calls 'make' on examples/ulib/Makefile
- PLATFORM_LIBS is left alone, since it already has a value
- lSDL ends up not being in the link line

Thank you to Claude for helping to debug this and figure out the
PLATFORM_LIBS interaction.

Series-to: concept
Series-cc: heinrich
Cover-letter:
ulib: Complete initial U-Boot library

This series completes support for building U-Boot as a shared or static
library, enabling reuse of U-Boot functionality in external programs and
test suites.

The U-Boot library (ulib) allows developers to:
- Link against U-Boot functionality without a full U-Boot image
- Use U-Boot's OS abstraction layer, drivers, and utility functions
- Build test programs that can exercise U-Boot code in isolation
- Create applications that benefit from U-Boot's hardware support

Key features:
- Builds both shared (libu-boot.so) and static (libu-boot.a) libraries
- Preserves U-Boot linker lists for proper driver/subsystem init
- Configurable symbol renaming to avoid conflicts with system libraries
- Generated API headers with renamed function declarations
- Documentation and working examples
- Currently only supports sandbox architecture

The series includes:
- More build-infrastructure and Makefile integration
- Python-based mechanism for symbol renaming and API generation
- Test programs demonstrating basic library usage
- A simple example program showing real-world usage patterns

Symbol renaming ensures that U-Boot functions don't conflict with system
libraries. For example, printf() remains the standard library function
while ub_printf() provides access to U-Boot's printf implementation.
This is handled automatically during the build process.

The library excludes main() to allow external programs to provide their own
entry points while still accessing U-Boot functionality through ulib_init()
and ulib_uninit().

For example:

    #include <u-boot-lib.h>
    #include <u-boot-api.h>

    int main(int argc, char *argv[])
    {
        if (ulib_init(argv[0]) < 0)
            return 1;

        ub_printf("Hello from U-Boot library!\n");

        ulib_uninit();

        return 0;
    }

License implications are documented - the GPL-2.0+ license applies to
any programs linked with the library, requiring source code distribution
for compliant usage.

Future work will look at expanding support to other architectures.
END

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-09 09:14:05 -06:00
Simon Glass
cf01d4702f ulib: doc: Expand the documentation to cover new features
Most of the ulib functionality is in place now. Update the documentation
to match. Include details of how to run the example.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-08 13:10:54 -06:00
Simon Glass
cc428a8bbc ulib: Adjust the test to check symbol renaming
Update the test to use both the system printf() and the U-Boot one, in
the same program. This provides verification that symbol-renaming is
working as expected.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-08 13:10:54 -06:00
Simon Glass
4c32ae1087 ulib: Expand the ulib example to have two files
It is possible to have some files that build in the system environment
and some in the U-Boot environment. To build for the system, the system
headers must be used, or at least have priority. For a U-Boot file, its
headers must be used exclusively.

Expand the Makefile example to have two files, one of which is built
using U-Boot headers. This shows how a program can be built which
straddles both domains.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-08 13:10:53 -06:00
Simon Glass
1a89708f16 ulib: Makefile: Plumb in creation of the API header
Plumb in generation of the u-boot-api.h file, containing renamed symbols
for inclusion by the program being linked with ulib.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-08 13:09:58 -06:00
Simon Glass
e2d0a0d8da ulib: Makefile: Plumb in renaming symbols for ulib
Plumb this feature in, so that symbols are renamed as expected.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-08 13:09:58 -06:00
Simon Glass
791e1b746c ulib: Makefile: Create a library with renamed symbols
Add a way to create a .ulib-objs file which contains all of the object
files from the build, but with symbols renamed according to the
rename.syms file.

The file excludes main() which is present in the sandbox build, so that
programs which link with libu-boot can provide their own main()

For now this file is not used.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-08 13:09:58 -06:00
Simon Glass
278e98baaf ulib: Provide a symbol-rename file
Add a file which lists various symbols to rename when building the
U-Boot library. For now it contains printf() and related functions, but
more can be added later, as needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-08 13:09:58 -06:00