Can U-Boot create mtdparts from device tree partition info?
Alexander Dahl
ada at thorsis.com
Thu Mar 7 10:17:28 CET 2024
Hello Chuck,
Am Wed, Mar 06, 2024 at 11:48:39AM -0500 schrieb Chuck Meade:
> Hello,
>
> In looking through the source, I'm not yet seeing logic that allows U-Boot
> to actually use MTD partition information found in the device tree. Does
> this logic exist and I'm just missing it? Or do I need to parse the device
> tree partitions manually and create the mtdparts env variable?
U-Boot can use the partition information from device tree, but not
with mtdparts. Try enabling CMD_MTD and run `mtd list` and you will
see those partitions.
> Sorry if this is obvious, I'm just not seeing it yet. Also, if the answer
> is just to manually enter the mtdparts env variable, and keep it in line
> with the partition information in the device tree as a manual operation,
> please let me know that too. I'm just hoping there is a way to have U-Boot
> get the info from the device tree automatically.
You could do that, but it is probably not necessary. The 'nand'
command has some nice ways to enter commands using those mtdparts
labels, but the 'mtd' covers the basic features like read, write,
erase too, also with names, but with a different calling syntax for
the commands.
Unfortunately the 'nand' command uses mtdparts only and does not work
with partitions defined in DT. The 'mtd' command is organized
differently and you might not find all features the 'nand' command
has.
Greets
Alex
>
> Thanks very much,
> Chuck
More information about the U-Boot
mailing list