introduce console none support
PATCH 1/1 introduce console none support
this will allow to have no console support
Use full for bootstrap as we can save 900bytes (barebox.bin) and 500bytes (zbarebox.bin lzo) on at91sam9263 as example.
As on bootstrap we have often very limited size.
--- common/Kconfig | 6 ++++ common/Makefile | 1 + common/console_none.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 common/console_none.c
common/Kconfig +6 -0
@@ -506,10 +506,16 @@ config CONSOLE_ACTIVATE_NONE endchoice config CONSOLE_SIMPLE + prompt "Enable simple console support" bool default y depends on !CONSOLE_FULL +config CONSOLE_NONE + bool + default y + depends on !CONSOLE_FULL && !CONSOLE_SIMPLE + config PARTITION bool prompt "Enable Partitions"
common/Makefile +1 -0
@@ -23,6 +23,7 @@ obj-$(CONFIG_MEMINFO) += meminfo.o obj-$(CONFIG_COMMAND_SUPPORT) += command.o obj-$(CONFIG_CONSOLE_FULL) += console.o obj-$(CONFIG_CONSOLE_SIMPLE) += console_simple.o +obj-$(CONFIG_CONSOLE_NONE) += console_none.o obj-$(CONFIG_DIGEST) += digest.o obj-$(CONFIG_ENVIRONMENT_VARIABLES) += env.o obj-$(CONFIG_UIMAGE) += image.o
common/console_none.c new file +85 -0
85 lines not on this page · raw message
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 23 lines · Jean-Christophe PLAGNIOL-VILLARD
this will allow to have no console support
Use full for bootstrap as we can save 900bytes (barebox.bin) and 500bytes (zbarebox.bin lzo) on at91sam9263 as example.
As on bootstrap we have often very limited size.
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- common/Kconfig | 6 ++++ common/Makefile | 1 + common/console_none.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 common/console_none.ccommon/Kconfig +0
-0@@ -506,10 +506,16 @@ config CONSOLE_ACTIVATE_NONE endchoice config CONSOLE_SIMPLE
common/Kconfig config CONSOLE_ACTIVATE_NONE · line 518
Quoted 10 lines
common/Kconfig +6
-0+ prompt "Enable simple console support" bool default y depends on !CONSOLE_FULL +config CONSOLE_NONE + bool + default y + depends on !CONSOLE_FULL && !CONSOLE_SIMPLE +
This is probably a good moment to convert this to a choice.
common/Kconfig config CONSOLE_ACTIVATE_NONE
Quoted 6 lines
common/Kconfig +6
-0+ +int printf (const char *fmt, ...) +{ + return 0; +} +EXPORT_SYMBOL(printf);
Have you tried providing static inline wrappers for these? I would assume that a lot more space could be saved when gcc is able to optimize the function calls away.
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