Commit graph

2131 commits

Author SHA1 Message Date
AKASHI Takahiro
7017fc54a5 bootmeth: use efi_loader interfaces instead of bootefi command
Now that efi_loader subsystem provides interfaces that are equivalent
with bootefi command, we can replace command invocations with APIs.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2023-12-17 13:04:54 +01:00
Heinrich Schuchardt
229c4da6ca test: vboot: Using variable 'old_dtb' before assignment
old_dtb can only be assumed initialized in the finally block
if it is assigned a value before the try statement.

Avoid a pylint error reported by current pylint.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-12-13 18:39:06 -05:00
Heinrich Schuchardt
643f5c37fb test: fit: Using variable 'old_dtb' before assignment
old_dtb can only be assumed initialized in the finally block
if it is assigned a value before the try statement.

Avoid a pylint error reported by current pylint.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-12-13 18:39:06 -05:00
Heinrich Schuchardt
36e3a1e91a cmd: acpi: fix acpi list command
ACPI tables may comprise either RSDT, XSDT, or both. The current code fails
to check the presence of the RSDT table before accessing it. This leads to
an exception if the RSDT table is not provided.

The XSDT table takes precedence over the RSDT table.

The return values of list_rsdt() and list_rsdp() are always zero and not
checked. Remove the return values.

Addresses in the XSDT table are 64-bit. Adjust the output accordingly.

As the RSDT table has to be ignored if the XSDT command is present there is
no need to compare the tables in a display command. Anyway the
specification does not require that the sequence of addresses in the RSDT
and XSDT table are the same.

The FACS table header does not provide revision information. Correct the
description of dump_hdr().

Adjust the ACPI test to match the changed output format of the 'acpi list'
command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-12-13 18:39:06 -05:00
Heinrich Schuchardt
bda020e762 acpi: fix struct acpi_xsdt
The size of the ACPI table header is not a multiple of 8. We have to mark
struct acpi_xsdt as packed to correctly access field Entry.

Add a unit test for the offsets of field Entry in the RSDT and XSDT tables.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-12-13 18:39:06 -05:00
Heinrich Schuchardt
0c2f6c317f test: unit test for acpi_find_table()
Provide a unit test for acpi_find_table()

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-12-13 18:39:05 -05:00
Simon Glass
a4bee0b455 bootstd: Add a menu option to bootflow scan
Allow showing a menu and automatically booting, with 'bootflow scan'.
This is more convenient than using a script.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-13 18:39:05 -05:00
Simon Glass
c0e708eb9f test: print: Skip test on x86
These tests cannot work on x86 machines as memory at address zero is
not writable. Add a condition to skip these.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-13 18:39:05 -05:00
Simon Glass
631d8a34f3 test: lmb: Move tests into the lib suite
These tests are marked as driver model tests, but have nothing to do
with driver model. As a result, they are run as part of 'ut dm' which
only exists for sandbox.

Move them to the 'lib' suite and drop the requirement for initing
devices, since they don't use devices.

Also put the lib_test_lmb_max_regions() macro inside the same #ifdef
as its function, to avoid a build error if the condition is false.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-13 18:39:05 -05:00
Simon Glass
14f0cc49df test: event: Only run test_event_probe() on sandbox
This needs test devices which are only present on sandbox. Add a check
for this and skip just this test if running on a real board.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-13 18:39:05 -05:00
Simon Glass
078c6e2f8a test: font: Add dependencies on fonts
The font test needs two fonts. If one is not available, skip out early,
to avoid an error.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-13 18:39:05 -05:00
Simon Glass
40565bba7c test: fdt: Add a special case for real boards
The error that this test checks for is only shown on sandbox. For real
boards, there is normally no error. Add a special case to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-13 18:39:05 -05:00
Simon Glass
3535f60726 test: bdinfo: Add missing asserts
Calling into sub-test functions should be done using ut_assertok() so
that the test exits immediately on failure. Add those which are
missing.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-13 18:39:05 -05:00
Simon Glass
80a8a2ebb3 test: Handle use of stack pointer in bdinfo
This test assumes that the stack pointer is the same across two calls
to lmb_init_and_reserve() but this is not the case on x86, for example.

Add a special case to handle this, along with a detailed comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-13 18:39:05 -05:00
Simon Glass
07073d2beb test: Run bootstd tests only on sandbox
These make use of disk images which are not available on reak boards.
Add a new Kconfig to ensure these tests only run where they are valid.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-13 18:39:05 -05:00
Simon Glass
f2311519ca test: Make UT_LIB_ASN1 depend on sandbox
This doesn't seem to work on a real board, so use the test on sandbox
only.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-13 18:39:05 -05:00
Simon Glass
30a75e7794 test: Add helper to skip to partial console line
Sometimes we need to skip to a line but it includes addresses or other
information which can vary depending on the runtime conditions.

Add a new ut_assert_skip_to_linen() which is similar to the existing
ut_assert_skip_to_line() function but only checks that the console line
matches up to the length of the provided string.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-13 18:39:05 -05:00
Simon Glass
4001e5ab9b test: Add a new suite for commands
Add a new suite for 'cmd' tests, used for testing commands. These are
kept in the test/cmd directory.

For now it is empty, but it will be used for coreboot-command tests.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-13 18:39:04 -05:00
Tom Rini
9565771076 Merge patch series "bootm: Refactoring to reduce reliance on CMDLINE (part A)"
To quote the author:

It would be useful to be able to boot an OS when CONFIG_CMDLINE is
disabled. This could allow reduced code size.

Standard boot provides a way to handle programmatic boot, without
scripts, so such a feature is possible. The main impediment is the
inability to use the booting features of U-Boot without a command line.
So the solution is to avoid passing command arguments and the like to
code in boot/

A similar process has taken place with filesystems, for example, where
we have (somewhat) separate Kconfig options for the filesystem commands
and the filesystems themselves.

This series starts the process of refactoring the bootm logic so that
it can be called from standard boot without using the command line.
Mostly it removes the use of argc, argv and cmdtbl from the internal
logic.

Some limited tidy-up is included, but this is kept to smaller patches,
rather than trying to remove all #ifdefs etc. Some function comments
are added, however.

A simple programmatic boot is provided as a starting point.

This work will likely take many series, so this is just the start.

Size growth with this series for firefly-rk3288 (Thumb2) is:

       arm: (for 1/1 boards) all +23.0 rodata -49.0 text +72.0

This should be removed by:

   https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/11

but it is not included in this series as it is already large enough.

No functional change is intended in this series.

Changes in v3:
- Add a panic if programmatic boot fails
- Drop RFC tag

Changes in v2:
- Add new patch to adjust position of unmap_sysmem() in boot_get_kernel()
- Add new patch to obtain command arguments
- Fix 'boot_find_os' typo
- Pass in the command name
- Use the command table to provide the command name, instead of "bootm"
2023-12-13 11:51:53 -05:00
Simon Glass
8632b36b96 command: Introduce functions to obtain command arguments
Add some functions which provide an argument to a command, or NULL if
the argument does not exist.

Use the same numbering as argv[] since it seems less confusing than the
previous idea.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Tom Rini <trini@konsulko.com>
2023-12-13 11:51:24 -05:00
Marek Vasut
be4a5f7c35 test: bdinfo: Handle systems without getopt
Systems without getopt support fall back to plain full bdinfo print,
handle such a case, which occurs e.g. with sandbox_flattree_defconfig .

Fixes: 8827a38714 ("test: bdinfo: Test bdinfo -h")
Fixes: 2696f3ab81 ("test: bdinfo: Test bdinfo -m")
Fixes: 3ff2d796a6 ("test: bdinfo: Test bdinfo -e")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-12-10 10:08:30 -05:00
Tom Rini
3a2b6ba5cf test/py: Disable error E0611 in two cases for pylint
Recently pylint has started to complain about:
No name 'fs_helper' in module 'tests' (no-name-in-module)

Due to:
from tests import fs_helper

However, we have:
test/py/tests/fs_helper.py

And since we do not want to add a dummy test/py/tests/__init__.py to
silence this warning we instead just disable it as needed.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-12-09 15:59:13 -05:00
Tom Rini
e54987d6af Merge patch series "cmd: bdinfo: Optionally use getopt and implement bdinfo -a"
Clean up our bdinfo command a bit and introduce "bdinfo -a"
2023-12-09 08:42:49 -05:00
Marek Vasut
3ff2d796a6 test: bdinfo: Test bdinfo -e
The bdinfo -e should print only the board ethernet settings.
Test the expected output.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-12-09 08:42:29 -05:00
Marek Vasut
2696f3ab81 test: bdinfo: Test bdinfo -m
The bdinfo -m should print only the board memory layout.
Test the expected output.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-12-09 08:42:29 -05:00
Marek Vasut
8827a38714 test: bdinfo: Test bdinfo -h
The bdinfo -h should print error message that -h is an unknown
parameter and then command help text. Test the expected output.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-12-09 08:42:29 -05:00
Marek Vasut
4823b05f01 test: bdinfo: Test both bdinfo and bdinfo -a
Factor out the core of test for all bdinfo output into bdinfo_test_all()
and then reuse it to verify that both 'bdinfo' and 'bdinfo -a' print all
the bdinfo output.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-12-09 08:42:29 -05:00
Marek Vasut
5bd32a96ad test: bdinfo: Rename bdinfo_test_move() to bdinfo_test_full()
Rename bdinfo_test_move() to bdinfo_test_full(). The former is a
remnant of deriving this test from another test. No functional
change.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-12-09 08:42:29 -05:00
Love Kumar
9f0588a1a9 test/py: net: Add a TFTP put test
Execute tftpput command for uploading files to a server and validate its
size & CRC32.

Signed-off-by: Love Kumar <love.kumar@amd.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-11-29 09:32:15 -05:00
Tom Rini
339d96822e Merge patch series "cmd: add scmi command"
To quote the author:

"Scmi" command will be re-introduced per Michal's request.
The functionality is the same as I put it in my patch set of adding
SCMI base protocol support, but made some tweak to make UT, "ut dm
scmi_cmd," more flexible and tolerable when enabling/disabling a specific
SCMI protocol for test purpose.

Each commit may have some change history inherited from the preceding
patch series.

Test
====
The patch series was tested on the following platforms:
* sandbox
2023-11-28 22:31:09 -05:00
AKASHI Takahiro
3d6fe58437 test: dm: add scmi command test
In this test, "scmi" command is tested against different sub-commands.
Please note that scmi command is for debug purpose and is not intended
in production system.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
2023-11-28 22:31:03 -05:00
AKASHI Takahiro
63cd0dceea test: dm: skip scmi tests against disabled protocols
This is a precautionary change to make scmi tests workable whether or not
a specific protocol be enabled. If a given protocol is not configured,
we skip the test by returning -EAGAIN.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-28 22:31:03 -05:00
Tom Rini
e2a9edc0ce Merge patch series "fs: fat: calculate FAT type based on cluster count"
To quote the author:

This series fixes an issue where the FAT type (FAT12, FAT16) is not
correctly detected, e.g. when the BPB field BS_FilSysType contains the
valid value "FAT     ".

This issue occures, for example, if a partition is formatted by
swupdate using its diskformat handler. swupdate uses the FAT library
from http://elm-chan.org/fsw/ff/ internally.

See https://groups.google.com/g/swupdate/c/7Yc3NupjXx8 for a
discussion in the swupdate mailing list.

Please refer to the commit messages for more details.

1. Added bootsector checks

Most tests from https://www.win.tue.nl/~aeb/linux/fs/fat/fat-2.html
are added in the commit 'fs: fat: add bootsector validity check'.
Only the tests VIII, IX and X are not implemented.

I also checked the Linux kernel code (v6.6) and did not find any
checks on 'vistart->fs_type'. This is the reason why is skipped them
here.

See section '2. Size comparisons' for the impact on the binary size.

2. Size comparisons

I executed bloat-o-meter from the Linux kernel for an arm64
target (config xilinx_zynqmp_mini_emmc0_defconfig):

Comparison of the binary spl/u-boot-spl between master (rev
e17d174773) and this patch
series (including the added validity checks of the boot sector):

add/remove: 0/0 grow/shrink: 1/1 up/down: 100/-12 (88)
Function                                     old     new   delta
read_bootsectandvi                           308     408    +100
fat_itr_root                                 444     432     -12
Total: Before=67977, After=68065, chg +0.13%

When compare the size of the binary spl/u-boot-spl between master this
series without the the validity checks of the boot sector:

add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-24 (-24)
Function                                     old     new   delta
read_bootsectandvi                           308     296     -12
fat_itr_root                                 444     432     -12
Total: Before=67977, After=67953, chg -0.04%

So the size of the spl on this arm64 target increases by 88 bytes for
this series. When i remove the validity check the size decreases by 24 bytes.
2023-11-28 20:10:36 -05:00
Christian Taedcke
8154ac1613 test: fs: Add test to detect fat type
Ensure that a large FAT12 filesystem and a small FAT16 filesystem are
detected correctly.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2023-11-28 20:10:25 -05:00
Christian Taedcke
c667b26b26 test: Add size granularity parameter to mk_fs
Without this commit it is only possible to create filesystem images
with a size granularity of 1MB.
This commit adds the option to create file systems with different
sizes, e.g 8.5MB.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2023-11-28 20:10:25 -05:00
Christian Taedcke
1e85b66212 test: fs: Add fat12 to supported fs of some tests
The tests fs_ext, fs_mkdir and fs_unlink support fat12 without
modifications.
The fs_basic test uses a partition that is too large for fat12, so it
is omitted here.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2023-11-28 20:10:25 -05:00
Christian Taedcke
764b411824 test: Add support to create a fat12 fs
This enables to implement tests for fat12 filesystem.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2023-11-28 20:10:25 -05:00
Christian Taedcke
601d33f31a test: spl: Remove usage of FAT32_SIGN
FAT32_SIGN is removed in the following commits.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2023-11-28 20:10:24 -05:00
Tom Rini
dca7a8958f Prepare v2024.01-rc3
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmVbZ4QACgkQFHw5/5Y0
 tyzlggwAowkAYxSOUkwhWSbEYctVObZUPF1kDEbWlbskx52ZrQ56nWbfojZPKYdT
 OYe7fNrOJaYpbpU31lJ6U7Jm/iLCHw7vqMBmTJCNNr/BBW5jQ/exEVMa+/ZG640T
 6pTWqAHp3CfqNjBK9bnFmIqWTwrqUCZKNllPfEWNs1Pl00ypJsY9ZYaAw+4I9t0p
 2cG/BrSUyCDkgLYHi0YVUHXWQKYU4LVfz6EASGIOwTrrJGEUJ9EAGJmzgUSC0Zuw
 7qQBwHPXHBkpfP4bOFZ6xSKLp79rHXNSdjx21XW/4yerp4GC16xB+pZWZOSuz2J9
 0anoiSGPh1N81B6aciTOWeCdKPJeXEp1AxqyCcvmwLZrOOs+MSGjbKCUFnjyNtAJ
 hTXzlJQM6tQ3BhGQLY85sNe8/dOF3WNt4RiRM3K87mU8e0pahrYKSj5oUSbcrOBx
 4Hk6rQc33MvyLAYEhSJ3naktA0dPQseleOrXuOGdSWOlFf2sweVEjip4VKBlbUNb
 t3kEfQ9F
 =YBkC
 -----END PGP SIGNATURE-----

Merge tag 'v2024.01-rc3' into next

Prepare v2024.01-rc3
2023-11-20 09:19:50 -05:00
Raymond Mao
550862bc12 efi_loader: Boot var automatic management
Changes for complying to EFI spec §3.5.1.1
'Removable Media Boot Behavior'.
Boot variables can be automatically generated during a removable
media is probed. At the same time, unused boot variables will be
detected and removed.

Please note that currently the function 'efi_disk_remove' has no
ability to distinguish below two scenarios
a) Unplugging of a removable media under U-Boot
b) U-Boot exiting and booting an OS
Thus currently the boot variables management is not added into
'efi_disk_remove' to avoid boot options being added/erased
repeatedly under scenario b) during power cycles
See TODO comments under function 'efi_disk_remove' for more details

The original efi_secboot tests expect that BootOrder EFI variable
is not defined. With this commit, the BootOrder EFI variable is
automatically added when the disk is detected. The original
efi_secboot tests end up with unexpected failure.
The efi_secboot tests need to be modified to explicitly set
the BootOrder EFI variable.

squashfs and erofs ls tests are also affected by this modification,
need to clear the previous state before squashfs ls test starts.

Co-developed-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-11-18 10:08:08 +02:00
Tom Rini
ae7ec8b0be Merge branch '2023-11-16-assorted-updates' into next
- squashfs improvements, remove common.h in some places, assorted code
  fixes, fix a few CONFIG symbol names in Kconfig files, bring in
  linux's <linux/time.h> conversion functions, poplar updates, bcb
  improvements.
2023-11-17 08:38:05 -05:00
Paul Barker
da35ab68de sysreset: Fix unsupported request return values
The description of the sysreset request method in <sysreset.h> says that
the return value should be -EPROTONOSUPPORT if the requested reset type
is not supported by this device.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-16 18:53:09 -05:00
Sean Anderson
2a1812de20 test: eth: Don't crash if env_get returns NULL
env_get can return NULL if it fails to find the variable. Check its result
before using it.

Fixes: 6d9764c2a8 ("dm: test: Add a new test case against dm eth codes for NULL pointer access")
Fixes: df33fd2889 ("test: eth: Add test for ethernet addresses")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
2023-11-16 16:21:38 -05:00
Sean Anderson
a04d5f60a5 spl: Convert spi to spl_load
This converts the spi load method to use spl_load. The address used for
LOAD_FIT_FULL may be different, but there are no in-tree users of that
config. Since payload_offs is only used without OS_BOOT, we defer its
initialization.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-16 13:49:14 -05:00
Sean Anderson
6029a0e1af spl: Convert NVMe to spl_load
This converts the blk load method (used exclusively by NVMe) to use
spl_load. As a consequence, it also adds support for LOAD_FIT_FULL and
IMX images.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-16 13:49:14 -05:00
Sean Anderson
cbe86576cb spl: Convert nor to spl_load
This converts the nor load method to use spl_load. As a result it also
adds support for LOAD_FIT_FULL. Since this is the last caller of
spl_load_legacy_img, it has been removed.

We can't load FITs with external data with SPL_LOAD_FIT_FULL, so disable the
test in that case. No boards enable SPL_NOR_SUPPORT and SPL_LOAD_FIT_FULL, so
this is not a regression.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-16 13:49:14 -05:00
Sean Anderson
2e5476b5a7 spl: Convert net to spl_load
This converts the net load method to use spl_load. As a result, it also
adds support for LOAD_FIT_FULL and IMX images.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-16 13:49:14 -05:00
Sean Anderson
11f834614e spl: Convert nand to spl_load
This converts the nand load method to use spl_load. nand_page_size may not
be valid until after nand_spl_load_image is called (see e.g. fsl_ifc_spl),
so we set bl_len in spl_nand_read. Since spl_load reads the header for us,
we can remove that argument from spl_nand_load_element.

There are two possible regressions which could result from this commit.
First, we ask for a negative address from spl_get_load_buffer. That is,
instead of

	header = spl_get_load_buffer(0, sizeof(*header));

we do

	header = spl_get_load_buffer(-sizeof(*header), sizeof(*header));

this could cause a problem if spl_get_load_buffer does not return valid
memory for negative offsets. Second, we now set bl_len for legacy images.
This can cause memory up to a bl_len - 1 before the image load address to
be written, which might not have been the case before. If this turns out to
be a problem, we can add an option for a bounce buffer.

We can't load FITs with external data with SPL_LOAD_FIT_FULL, so disable the
test in that case. No boards enable SPL_NAND_SUPPORT and SPL_LOAD_FIT_FULL, so
this is not a regression.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-16 13:49:14 -05:00
Sean Anderson
5d3401a448 spl: Convert mmc to spl_load
This converts the mmc loader to spl_load. Legacy images are handled by
spl_load (via spl_parse_image_header), so mmc_load_legacy can be
omitted. To accurately determine whether mmc_load_image_raw_sector is used
(which might not be the case if SYS_MMCSD_FS_BOOT is enabled), we introduce
a helper config SYS_MMCSD_RAW_MODE. This ensures we can inline spl_load
correctly when a board only boots from filesystems. We still need to check
for SPL_MMC, since some boards enable configure raw mode even without MMC
support.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-16 13:49:14 -05:00
Sean Anderson
682184e9b9 spl: Convert fat to spl_load
This converts the fat loader to use spl_load. Some platforms are very
tight on space, so we take care to only include the code we really need.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-16 13:49:14 -05:00