aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAlexander Gendin <agendin@matrox.com>2023-10-09 01:24:36 +0000
committerTom Rini <trini@konsulko.com>2023-10-24 17:05:24 -0400
commit04291ee0aba6d731bd66bcae5080e126d6c0411b (patch)
treeecc87083ddf3df1f18d455bc45aef2e839762a2e /arch
parent9859edd3fc10ffb63f53e1d21aa6eb34b688f6da (diff)
downloadu-boot-04291ee0aba6d731bd66bcae5080e126d6c0411b.zip
u-boot-04291ee0aba6d731bd66bcae5080e126d6c0411b.tar.gz
u-boot-04291ee0aba6d731bd66bcae5080e126d6c0411b.tar.bz2
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 'arch')
-rw-r--r--arch/Kconfig2
-rw-r--r--arch/sandbox/dts/test.dts8
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index 19f2891..4f5b751 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -208,6 +208,8 @@ config SANDBOX
imply PHYSMEM
imply GENERATE_ACPI_TABLE
imply BINMAN
+ imply CMD_MBR
+ imply CMD_MMC
config SH
bool "SuperH architecture"
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index e430347..577ef34 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -41,6 +41,7 @@
mmc3 = "/mmc3";
mmc4 = "/mmc4";
mmc5 = "/mmc5";
+ mmc6 = "/mmc6";
pci0 = &pci0;
pci1 = &pci1;
pci2 = &pci2;
@@ -1102,6 +1103,13 @@
filename = "mmc5.img";
};
+ /* This is used for mbr tests */
+ mmc6 {
+ status = "disabled";
+ compatible = "sandbox,mmc";
+ filename = "mmc6.img";
+ };
+
pch {
compatible = "sandbox,pch";
};