Skip to content

blspec: sort entries according to specification

Ahmad Fatoum barebox 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5boot: aggregate bootentry provider entries one by onecommon/boot.c+17 -10 replies
2/5blspec: sort entries according to specificationcommon/Kconfig common/blspec.c common/boot.c +2 more+78 -12 replies
3/5boot: give struct bootentry a path membercommon/blspec.c common/boot.c include/boot.h+12 -180 replies
4/5commands: boot: support file path in boot -M for default entrycommands/boot.c include/fnmatch.h+58 -130 replies
5/5test: self: add bootloader spec files testinclude/bselftest.h test/self/Kconfig test/self/Makefile +6 more+99 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] blspec: sort entries according to specification

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
Signature · 1 line
2.47.3