Make number of GPT partitions a configurable option
PATCH 1/1 Make number of GPT partitions a configurable option
Theoritically there is no limit for the partitions that can be created based on EFI/GPT, so make the number of partitions that can be visible in barebox a configurable option.
--- common/partitions/Kconfig | 5 +++++ common/partitions/parser.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-)
common/partitions/Kconfig +5 -0
@@ -31,3 +31,8 @@ config PARTITION_DISK_EFI_GPT_COMPARE depends on PARTITION_DISK_EFI default y bool "EFI: GPT: compare primary and Alternate GPT header for validity" + +config MAX_PARTITIONS + depends on PARTITION_DISK_EFI + int "Maximum of partitions needed to be supported on a GPT" + default 8
common/partitions/parser.h +1 -1
@@ -11,7 +11,7 @@#include <filetype.h> #include <linux/list.h> -#define MAX_PARTITION 8 +#define MAX_PARTITION CONFIG_MAX_PARTITIONS#define MAX_PARTITION_NAME 38struct partition {
Signature · 7 lines
1.8.4.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Hi Santosh,
Quoted 15 lines · Santosh Sivaraj
Theoritically there is no limit for the partitions that can be created based on EFI/GPT, so make the number of partitions that can be visible in barebox a configurable option.
Signed-off-by Santosh Sivaraj <[email protected]>--- common/partitions/Kconfig | 5 +++++ common/partitions/parser.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-)common/partitions/Kconfig +0
-0
common/partitions/Kconfig config PARTITION_DISK_EFI_GPT_COMPARE · line 38
Quoted 8 lines
common/partitions/Kconfig +5
-0@@ -31,3 +31,8 @@ config PARTITION_DISK_EFI_GPT_COMPARE depends on PARTITION_DISK_EFI default y bool "EFI: GPT: compare primary and Alternate GPT header for validity" + +config MAX_PARTITIONS + depends on PARTITION_DISK_EFI + int "Maximum of partitions needed to be supported on a GPT" + default 8
Can we instead allocate the partitions dynamically? This limitation to eight partitions we currently have is not nice, but making it configurable is not a proper fix.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 22 lines · Sascha Hauer
Hi Santosh,
Quoted 19 lines · Santosh Sivaraj
Theoritically there is no limit for the partitions that can be created based on EFI/GPT, so make the number of partitions that can be visible in barebox a configurable option.
Signed-off-by Santosh Sivaraj <[email protected]>--- common/partitions/Kconfig | 5 +++++ common/partitions/parser.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-)common/partitions/Kconfig +1
-0@@ -31,3 +31,8 @@ config PARTITION_DISK_EFI_GPT_COMPARE depends on PARTITION_DISK_EFI default y bool "EFI: GPT: compare primary and Alternate GPT header for validity" +
Quoted 8 lines
common/partitions/Kconfig config PARTITION_DISK_EFI_GPT_COMPARE · line 38
Quoted 4 lines
common/partitions/Kconfig +4
-0+config MAX_PARTITIONS + depends on PARTITION_DISK_EFI + int "Maximum of partitions needed to be supported on a GPT" + default 8Can we instead allocate the partitions dynamically? This limitation to eight partitions we currently have is not nice, but making it configurable is not a proper fix.
agreed but a limit will be good too
Best Regards,
J.
Quoted 13 lines
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
* Santosh Sivaraj <[email protected]> wrote (on 2014-01-09 21:36:41 +0530):
adding list, missed it.
Quoted 48 lines
* Jean-Christophe PLAGNIOL-VILLARD <[email protected]> wrote (on 2014-01-09 08:29:14 +0100):
Quoted 32 lines · Sascha Hauer
Quoted 22 lines
Hi Santosh,
Quoted 19 lines · Santosh Sivaraj
Theoritically there is no limit for the partitions that can be created based on EFI/GPT, so make the number of partitions that can be visible in barebox a configurable option.
Signed-off-by Santosh Sivaraj <[email protected]>--- common/partitions/Kconfig | 5 +++++ common/partitions/parser.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-)common/partitions/Kconfig +1
-0@@ -31,3 +31,8 @@ config PARTITION_DISK_EFI_GPT_COMPARE depends on PARTITION_DISK_EFI default y bool "EFI: GPT: compare primary and Alternate GPT header for validity" +Quoted 8 lines
common/partitions/Kconfig config PARTITION_DISK_EFI_GPT_COMPARE · line 38
Quoted 4 lines
common/partitions/Kconfig +4
-0+config MAX_PARTITIONS + depends on PARTITION_DISK_EFI + int "Maximum of partitions needed to be supported on a GPT" + default 8Can we instead allocate the partitions dynamically? This limitation to eight partitions we currently have is not nice, but making it configurable is not a proper fix.
Quoted 7 lines
agreed but a limit will be good too
Best Regards,
J.Quoted 3 lines
Sascha
We could keep a configurable maximum, with a high default, but do the allocation dynamically. I will try to send in a patch, we can discuss how it needs to be done over it.
Thanks,
Santosh
Signature · 4 lines
_______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 19 lines · Santosh Sivaraj
* Santosh Sivaraj <[email protected]> wrote (on 2014-01-09 21:36:41 +0530):
adding list, missed it.
Quoted 16 lines
Quoted 12 lines
Quoted 4 lines
Can we instead allocate the partitions dynamically? This limitation to eight partitions we currently have is not nice, but making it configurable is not a proper fix.
agreed but a limit will be good too
Best Regards,
J.Quoted 3 lines
Sascha
We could keep a configurable maximum, with a high default, but do the allocation dynamically. I will try to send in a patch, we can discuss how it needs to be done over it.
It shouldn't be configurable in Kconfig. That's not a question a user should have to answer when configuring barebox. I high default would be fine with me though since memory usually is an infinite resource in barebox.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 17 lines · Sascha Hauer
Quoted 16 lines · Santosh Sivaraj
* Santosh Sivaraj <[email protected]> wrote (on 2014-01-09 21:36:41 +0530):
adding list, missed it.
Quoted 13 lines
Quoted 12 lines
Quoted 4 lines
Can we instead allocate the partitions dynamically? This limitation to eight partitions we currently have is not nice, but making it configurable is not a proper fix.
agreed but a limit will be good too
Best Regards,
J.Quoted 3 lines
Sascha
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
We could keep a configurable maximum, with a high default, but do the allocation dynamically. I will try to send in a patch, we can discuss how it needs to be done over it.
It shouldn't be configurable in
Kconfig. That's not a question a user should have to answer when configuring barebox. I high default would be fine with me though since memory usually is an infinite resource in barebox.
I'm more thiking of a broken EFI GPT that have 1000s of partition
do we really need to handle that
Best Regards,
J.
Quoted 8 lines
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 22 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 21 lines · Sascha Hauer
Quoted 19 lines · Santosh Sivaraj
* Santosh Sivaraj <[email protected]> wrote (on 2014-01-09 21:36:41 +0530):
adding list, missed it.
Quoted 16 lines
Quoted 12 lines
Quoted 4 lines
Can we instead allocate the partitions dynamically? This limitation to eight partitions we currently have is not nice, but making it configurable is not a proper fix.
agreed but a limit will be good too
Best Regards,
J.Quoted 3 lines
Sascha
We could keep a configurable maximum, with a high default, but do the allocation dynamically. I will try to send in a patch, we can discuss how it needs to be done over it.
Quoted 8 lines
Quoted 4 lines
It shouldn't be configurable in
Kconfig. That's not a question a user should have to answer when configuring barebox. I high default would be fine with me though since memory usually is an infinite resource in barebox.I'm more thiking of a broken EFI GPT that have 1000s of partition
do we really need to handle that
Indeed it seems we can assume that something is wrong when a device has 1000s of partitions. So where do we set the border? 64?
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox