diff options
author | Alexander Gendin <agendin@matrox.com> | 2023-10-09 01:24:36 +0000 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-10-24 17:05:24 -0400 |
commit | 04291ee0aba6d731bd66bcae5080e126d6c0411b (patch) | |
tree | ecc87083ddf3df1f18d455bc45aef2e839762a2e /test/cmd_ut.c | |
parent | 9859edd3fc10ffb63f53e1d21aa6eb34b688f6da (diff) | |
download | u-boot-04291ee0aba6d731bd66bcae5080e126d6c0411b.tar.gz u-boot-04291ee0aba6d731bd66bcae5080e126d6c0411b.tar.bz2 u-boot-04291ee0aba6d731bd66bcae5080e126d6c0411b.zip |
cmd: mbr: Allow 4 MBR partitions without need for extended
Current code allows up to 3 MBR partitions without extended one.
If more than 3 partitions are required, then extended partition(s)
must be used.
This commit allows up to 4 primary MBR partitions without the
need for extended partition.
Add mbr test unit. In order to run the test manually, mmc6.img file
of size 12 MiB or greater is required in the same directory as u-boot.
Test also runs automatically via ./test/py/test.py tool.
Running mbr test is only supported in sandbox mode.
Signed-off-by: Alex Gendin <agendin@matrox.com>
[ And due to some further changes for testing ]
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/cmd_ut.c')
-rw-r--r-- | test/cmd_ut.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/cmd_ut.c b/test/cmd_ut.c index 477d475952..0343d47217 100644 --- a/test/cmd_ut.c +++ b/test/cmd_ut.c @@ -87,6 +87,10 @@ static struct cmd_tbl cmd_ut_sub[] = { #ifdef CONFIG_UT_LOG U_BOOT_CMD_MKENT(log, CONFIG_SYS_MAXARGS, 1, do_ut_log, "", ""), #endif +#if defined(CONFIG_SANDBOX) && defined(CONFIG_CMD_MBR) && defined(CONFIG_CMD_MMC) \ + && defined(CONFIG_MMC_SANDBOX) && defined(CONFIG_MMC_WRITE) + U_BOOT_CMD_MKENT(mbr, CONFIG_SYS_MAXARGS, 1, do_ut_mbr, "", ""), +#endif U_BOOT_CMD_MKENT(mem, CONFIG_SYS_MAXARGS, 1, do_ut_mem, "", ""), #if defined(CONFIG_SANDBOX) && defined(CONFIG_CMD_SETEXPR) U_BOOT_CMD_MKENT(setexpr, CONFIG_SYS_MAXARGS, 1, do_ut_setexpr, "", |