mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/5] blspec: sort entries according to specification
@ 2026-02-09  9:08 Ahmad Fatoum
  2026-02-09  9:08 ` [PATCH 1/5] boot: aggregate bootentry provider entries one by one Ahmad Fatoum
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2026-02-09  9:08 UTC (permalink / raw)
  To: barebox

Boot entries generated from bootloader spec are currently sorted by the
order the files are read from the file system.

This is inadequate if we have multiple entries with different kernels
and we want to sort the newer kernels higher.

The UAPI.1 Boot Loader Specification defines an algorithm[1] to order the
entries that takes care of this, so implement it into barebox.

[1]: https://uapi-group.org/specifications/specs/boot_loader_specification/#sorting

Ahmad Fatoum (5):
  boot: aggregate bootentry provider entries one by one
  blspec: sort entries according to specification
  boot: give struct bootentry a path member
  commands: boot: support file path in boot -M for default entry
  test: self: add bootloader spec files test

 commands/boot.c                               | 62 +++++++++++++----
 common/Kconfig                                |  1 +
 common/blspec.c                               | 66 +++++++++++++++++--
 common/boot.c                                 | 42 ++++++++----
 include/asm-generic/bug.h                     |  7 ++
 include/boot.h                                |  3 +
 include/bselftest.h                           | 20 ++++++
 include/fnmatch.h                             |  9 +++
 test/self/Kconfig                             |  5 ++
 test/self/Makefile                            |  2 +
 test/self/blspec.c                            | 46 +++++++++++++
 .../data/test/boot/boot.sh                    |  3 +
 .../data/test/loader/entries/boarda.conf      |  6 ++
 .../data/test/loader/entries/boardb.conf      |  6 ++
 .../data/test/loader/entries/boardc.conf      |  6 ++
 .../data/test/loader/entries/boardd.conf      |  5 ++
 16 files changed, 260 insertions(+), 29 deletions(-)
 create mode 100644 test/self/blspec.c
 create mode 100755 test/self/defaultenv-blspec-test/data/test/boot/boot.sh
 create mode 100644 test/self/defaultenv-blspec-test/data/test/loader/entries/boarda.conf
 create mode 100644 test/self/defaultenv-blspec-test/data/test/loader/entries/boardb.conf
 create mode 100644 test/self/defaultenv-blspec-test/data/test/loader/entries/boardc.conf
 create mode 100644 test/self/defaultenv-blspec-test/data/test/loader/entries/boardd.conf

-- 
2.47.3




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-02-09  9:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-09  9:08 [PATCH 0/5] blspec: sort entries according to specification Ahmad Fatoum
2026-02-09  9:08 ` [PATCH 1/5] boot: aggregate bootentry provider entries one by one Ahmad Fatoum
2026-02-09  9:08 ` [PATCH 2/5] blspec: sort entries according to specification Ahmad Fatoum
2026-02-09  9:08 ` [PATCH 3/5] boot: give struct bootentry a path member Ahmad Fatoum
2026-02-09  9:08 ` [PATCH 4/5] commands: boot: support file path in boot -M for default entry Ahmad Fatoum
2026-02-09  9:08 ` [PATCH 5/5] test: self: add bootloader spec files test Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox