We used to automatically prepend the device name before the partition
name. So when we added a partition named 'barebox' to a device named
'nor0' the partition was named 'nor0.barebox'.
The Kernel can mount its rootfs based on the mtd name, for example with
root=mtd:root. If for example we have multiple mtd devices (nor and nand)
'root' is a bad name for the partition, it should better be 'nor0.root'
This patch adds an additional commandline switch to addpart to optionally
skip the automatic device name adding. This makes it possible to define
our mtd partitions like this:
nor_parts="512k(nor0.barebox)ro,128k(nor0.bareboxenv),2M(nor0.kernel),-(nor0.root)"
This way the barebox partition names stay the same, but we can now
pass the exact name to the kernel (root=mtd:nor0.root).
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We claim to be compatible with the kernel's cmdlinepart parser, so
support <size>@<offset> like the kernel does.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
No need to check for maximum argument counts. The commands are
safe to be called with more arguments, so lets safe some bytes.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Add an own device id for partitions. This is necessary to allow
the partition layer to check if the given device is really a partition.
Also, check for readonly flag in erase.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
For practical reasons I changed all string literals assumed to be constant
to reside in .rodata subsection at end of .text section.
Signed-off-by: Carsten Schlote <schlote@vahanus.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The dynamic partition adding is improved with this patch.
When adding dynamic partitions they are checked against the existing
FIXED ones to ensure that they match.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
- Use device tree structure to implement partitions
- Let devinfo print a nice tree
- Introduce 'fixed' partitions which are not removable
- Fix mount: It was not possible to mount on a relative path.
With this function we can get a pointer to directly memory mapped
devices like nor flash or RAM. Useful for bootm where we save one
memcopy when the image is mappable