Skip to contentSkip to conversation

console none support

PATCH Applied Jean-Christophe PLAGNIOL-VILLARD 2 participants 6 messages Jan 23, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover console none support

HI,

This patch serie introduce the console none support

this will allow to reduce the barebox significantly special for bootstrap

As example on at91sam9263 console none vs console simple

barebox.bin => 6.5 KiB
zbarebox.bin lzo => 3.8 KiB

The following changes since commit b290fa88fb2c97a1d5b08ded3554c0a464a4562f:

at91: usb_a9263: add bootstrap version (2013-01-18 17:17:11 +0800)

are available in the git repository at:

git://git.jcrosoft.org/barebox.git delivery/console_none

for you to fetch changes up to e75f727c6e048c9978cb47cb8af92488a8251569:

introduce console none support (2013-01-19 11:51:53 +0800)

----------------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD (2):
console: switch select to choice
introduce console none support

 arch/arm/configs/archosg9_xload_defconfig             |    2 +-
 arch/arm/configs/omap3530_beagle_xload_defconfig      |    2 +-
 arch/arm/configs/panda_xload_defconfig                |    2 +-
 arch/arm/configs/pcm049_xload_defconfig               |    2 +-
 arch/arm/configs/phycard_a_l1_xload_defconfig         |    2 +-
 arch/arm/configs/phycard_a_xl2_xload_defconfig        |    2 +-
 arch/arm/configs/usb_a9263_128mib_bootstrap_defconfig |    2 +-
 arch/arm/configs/usb_a9263_bootstrap_defconfig        |    2 +-
 commands/Kconfig                                      |    3 +++
 common/Kconfig                                        |   22 +++++++++++++++-------
 common/Makefile                                       |    1 +
 common/console_none.c                                 |   42 ++++++++++++++++++++++++++++++++++++++++++
 drivers/serial/Kconfig                                |    1 +
 drivers/usb/gadget/Kconfig                            |    2 +-
 include/stdio.h                                       |   64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
 net/Kconfig                                           |    1 +
 16 files changed, 126 insertions(+), 26 deletions(-)
 create mode 100644 common/console_none.c

Best Regards,
J.

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#1 lore raw

PATCH 1/2 console: switch select to choice

so we can add easly the console_none support

---
 arch/arm/configs/archosg9_xload_defconfig            |    2 +-
 arch/arm/configs/omap3530_beagle_xload_defconfig     |    2 +-
 arch/arm/configs/panda_xload_defconfig               |    2 +-
 arch/arm/configs/pcm049_xload_defconfig              |    2 +-
 arch/arm/configs/phycard_a_l1_xload_defconfig        |    2 +-
 arch/arm/configs/phycard_a_xl2_xload_defconfig       |    2 +-
 .../arm/configs/usb_a9263_128mib_bootstrap_defconfig |    2 +-
 arch/arm/configs/usb_a9263_bootstrap_defconfig       |    2 +-
 common/Kconfig                                       |   18 +++++++++++-------
 9 files changed, 19 insertions(+), 15 deletions(-)
arch/arm/configs/archosg9_xload_defconfig +1 -1
index 6c6782f..83743fa 100644
@@ -15,7 +15,7 @@ CONFIG_MALLOC_SIZE=0x2000000
 CONFIG_SHELL_NONE=y
 # CONFIG_ERRNO_MESSAGES is not set
 # CONFIG_TIMESTAMP is not set
-# CONFIG_CONSOLE_FULL is not set
+CONFIG_CONSOLE_SIMPLE=y
 # CONFIG_DEFAULT_ENVIRONMENT is not set
 CONFIG_DRIVER_SERIAL_OMAP4_USBBOOT=y
 # CONFIG_SPI is not set
arch/arm/configs/omap3530_beagle_xload_defconfig +1 -1
index d951b1c..244891b 100644
@@ -14,7 +14,7 @@ CONFIG_PROMPT="X-load Beagle>"
 CONFIG_SHELL_NONE=y
 # CONFIG_ERRNO_MESSAGES is not set
 # CONFIG_TIMESTAMP is not set
-# CONFIG_CONSOLE_FULL is not set
+CONFIG_CONSOLE_SIMPLE=y
 # CONFIG_DEFAULT_ENVIRONMENT is not set
 CONFIG_DRIVER_SERIAL_NS16550=y
 CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
arch/arm/configs/panda_xload_defconfig +1 -1
index fec09ce..1ed20a1 100644
@@ -14,7 +14,7 @@ CONFIG_PROMPT="barebox> "
 CONFIG_SHELL_NONE=y
 # CONFIG_ERRNO_MESSAGES is not set
 # CONFIG_TIMESTAMP is not set
-# CONFIG_CONSOLE_FULL is not set
+CONFIG_CONSOLE_SIMPLE=y
 # CONFIG_DEFAULT_ENVIRONMENT is not set
 CONFIG_DRIVER_SERIAL_NS16550=y
 CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
arch/arm/configs/pcm049_xload_defconfig +1 -1
index b6d3a7a..9dfc30d 100644
@@ -17,7 +17,7 @@ CONFIG_PROMPT="barebox> "
 CONFIG_SHELL_NONE=y
 # CONFIG_ERRNO_MESSAGES is not set
 # CONFIG_TIMESTAMP is not set
-# CONFIG_CONSOLE_FULL is not set
+CONFIG_CONSOLE_SIMPLE=y
 # CONFIG_DEFAULT_ENVIRONMENT is not set
 CONFIG_DRIVER_SERIAL_NS16550=y
 CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
arch/arm/configs/phycard_a_l1_xload_defconfig +1 -1
index 30253cb..5901ed1 100644
@@ -20,7 +20,7 @@ CONFIG_CBSIZE=128
 CONFIG_SHELL_NONE=y
 # CONFIG_ERRNO_MESSAGES is not set
 # CONFIG_TIMESTAMP is not set
-# CONFIG_CONSOLE_FULL is not set
+CONFIG_CONSOLE_SIMPLE=y
 # CONFIG_DEFAULT_ENVIRONMENT is not set
 CONFIG_DRIVER_SERIAL_NS16550=y
 CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
arch/arm/configs/phycard_a_xl2_xload_defconfig +1 -1
index 7975220..84160e3 100644
@@ -17,7 +17,7 @@ CONFIG_PROMPT="barebox> "
 CONFIG_SHELL_NONE=y
 # CONFIG_ERRNO_MESSAGES is not set
 # CONFIG_TIMESTAMP is not set
-# CONFIG_CONSOLE_FULL is not set
+CONFIG_CONSOLE_SIMPLE=y
 # CONFIG_DEFAULT_ENVIRONMENT is not set
 CONFIG_DRIVER_SERIAL_NS16550=y
 CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
arch/arm/configs/usb_a9263_128mib_bootstrap_defconfig +1 -1
index 0411bd8..be56eb8 100644
@@ -12,7 +12,7 @@ CONFIG_MMU=y
 CONFIG_MALLOC_DUMMY=y
 CONFIG_PROMPT="USB-9263:"
 CONFIG_SHELL_NONE=y
-# CONFIG_CONSOLE_FULL is not set
+CONFIG_CONSOLE_SIMPLE=y
 # CONFIG_DEFAULT_ENVIRONMENT is not set
 # CONFIG_SPI is not set
 CONFIG_MTD=y
arch/arm/configs/usb_a9263_bootstrap_defconfig +1 -1
index 78c1c8f..d493efe 100644
@@ -11,7 +11,7 @@ CONFIG_MMU=y
 CONFIG_MALLOC_DUMMY=y
 CONFIG_PROMPT="USB-9263:"
 CONFIG_SHELL_NONE=y
-# CONFIG_CONSOLE_FULL is not set
+CONFIG_CONSOLE_SIMPLE=y
 # CONFIG_DEFAULT_ENVIRONMENT is not set
 # CONFIG_SPI is not set
 CONFIG_MTD=y
common/Kconfig +11 -7
index 9d26abb..3231c27 100644
@@ -461,10 +461,13 @@ config TIMESTAMP
 	  commands like bootm or iminfo. This option is
 	  automatically enabled when you select CFG_CMD_DATE .
 
+choice
+	prompt "console support"
+	default CONSOLE_FULL
+
 config CONSOLE_FULL
 	bool
-	default y
-	prompt "Enable full console support"
+	prompt "full"
 	help
 	  This option enables full console support capable of
 	  handling multiple consoles. Also the full console support
@@ -473,6 +476,12 @@ config CONSOLE_FULL
 	  once the first console is registered. Recommended for most
 	  usecases.
 
+config CONSOLE_SIMPLE
+	bool
+	prompt "simple"
+
+endchoice
+
 choice
 	prompt "Console activation strategy"
 	depends on CONSOLE_FULL
@@ -505,11 +514,6 @@ config CONSOLE_ACTIVATE_NONE
 
 endchoice
 
-config CONSOLE_SIMPLE
-	bool
-	default y
-	depends on !CONSOLE_FULL
-
 config PARTITION
 	bool
 	prompt "Enable Partitions"
Signature · 7 lines
1.7.10.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

PATCH 2/2 introduce console none support

this will allow to have no console support

Use full for bootstrap as we can save 6.5 KiB (barebox.bin) and 3.8 KiB (zbarebox.bin lzo) on at91sam9263 as example vs console simple

As on bootstrap we have often very limited size.

---
 commands/Kconfig           |    3 +++
 common/Kconfig             |    4 +++
 common/Makefile            |    1 +
 common/console_none.c      |   42 +++++++++++++++++++++++++++++
 drivers/serial/Kconfig     |    1 +
 drivers/usb/gadget/Kconfig |    2 +-
 include/stdio.h            |   64 +++++++++++++++++++++++++++++++++++++-------
 net/Kconfig                |    1 +
 8 files changed, 107 insertions(+), 11 deletions(-)
 create mode 100644 common/console_none.c
commands/Kconfig +3 -0
index 53cee5c..2e8f214 100644
@@ -260,6 +260,7 @@ endmenu
 menu "memory"
 
 config CMD_LOADB
+	depends on !CONSOLE_NONE
 	select CRC16
 	tristate
 	prompt "loadb"
@@ -267,10 +268,12 @@ config CMD_LOADB
 config CMD_LOADY
 	select CRC16
 	select XYMODEM
+	depends on !CONSOLE_NONE
 	tristate
 	prompt "loady"
 
 config CMD_LOADS
+	depends on !CONSOLE_NONE
 	tristate
 	prompt "loads"
 
common/Kconfig +4 -0
index 3231c27..eccae4c 100644
@@ -480,6 +480,10 @@ config CONSOLE_SIMPLE
 	bool
 	prompt "simple"
 
+config CONSOLE_NONE
+	bool
+	prompt "none"
+
 endchoice
 
 choice
common/Makefile +1 -0
index d82fc99..7206eed 100644
@@ -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 +42 -0

42 lines not on this page · raw message

drivers/serial/Kconfig +1 -0
index a8be9cd..f61d670 100644
@@ -1,4 +1,5 @@
 menu "serial drivers"
+	depends on !CONSOLE_NONE
 
 config DRIVER_SERIAL_ARM_DCC
 	depends on ARM
drivers/usb/gadget/Kconfig +1 -1
index 6501d42..5f65cea 100644
@@ -44,7 +44,7 @@ config USB_GADGET_DFU
 
 config USB_GADGET_SERIAL
 	bool
-	depends on EXPERIMENTAL
+	depends on EXPERIMENTAL && !CONSOLE_NONE
 	prompt "Serial Gadget"
 
 endif
include/stdio.h +54 -10

82 lines not on this page · raw message

net/Kconfig +1 -0
index acd92ff..c12193d 100644
@@ -17,6 +17,7 @@ config NET_PING
 
 config NET_NETCONSOLE
 	bool
+	depends on !CONSOLE_NONE
 	prompt "network console support"
 	help
 	  This option adds support for a simple udp based network console.
Signature · 7 lines
1.7.10.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#3 lore raw
In reply to Jean-Christophe PLAGNIOL-VILLARD
Quoted 12 lines · Jean-Christophe PLAGNIOL-VILLARD

HI,

This patch serie introduce the console none support

this will allow to reduce the barebox significantly special for bootstrap

As example on at91sam9263 console none vs console simple

barebox.bin => 6.5 KiB
zbarebox.bin lzo => 3.8 KiB

Quoted 8 lines

The following changes since commit b290fa88fb2c97a1d5b08ded3554c0a464a4562f:

at91: usb_a9263: add bootstrap version (2013-01-18 17:17:11 +0800)

are available in the git repository at:

git://git.jcrosoft.org/barebox.git delivery/console_none

Applied, thanks

BTW for the pcm038_defconfig this saves around 30k which is about 10% of the binary size. Well, this configuration is not particularly useful, but still it successfully boots the kernel.

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
#4 lore raw
Quoted 19 lines · Sascha Hauer
Quoted 18 lines · Jean-Christophe PLAGNIOL-VILLARD

HI,

This patch serie introduce the console none support

this will allow to reduce the barebox significantly special for bootstrap

As example on at91sam9263 console none vs console simple

barebox.bin => 6.5 KiB
zbarebox.bin lzo => 3.8 KiB

The following changes since commit b290fa88fb2c97a1d5b08ded3554c0a464a4562f:

at91: usb_a9263: add bootstrap version (2013-01-18 17:17:11 +0800)

are available in the git repository at:

Quoted 8 lines
Quoted 2 lines

git://git.jcrosoft.org/barebox.git delivery/console_none

Applied, thanks

BTW for the pcm038_defconfig this saves around 30k which is about 10% of the binary size. Well, this configuration is not particularly useful, but still it successfully boots the kernel.

for production boot where the boot time is critical it could be

I'll take a look to finish the dmesg support
as this will help too on the boot time

Best Regards,
J.

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#5 lore raw
Quoted 23 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 22 lines · Sascha Hauer
Quoted 20 lines · Jean-Christophe PLAGNIOL-VILLARD

HI,

This patch serie introduce the console none support

this will allow to reduce the barebox significantly special for bootstrap

As example on at91sam9263 console none vs console simple

barebox.bin => 6.5 KiB
zbarebox.bin lzo => 3.8 KiB

The following changes since commit b290fa88fb2c97a1d5b08ded3554c0a464a4562f:

at91: usb_a9263: add bootstrap version (2013-01-18 17:17:11 +0800)

are available in the git repository at:

git://git.jcrosoft.org/barebox.git delivery/console_none

Quoted 7 lines
Quoted 5 lines

Applied, thanks

BTW for the pcm038_defconfig this saves around 30k which is about 10% of the binary size. Well, this configuration is not particularly useful, but still it successfully boots the kernel.

for production boot where the boot time is critical it could be

Yes, indeed. I just meant that in such a case I would disable a lot of other features which are useless without console.

Quoted 3 lines

I'll take a look to finish the dmesg support
as this will help too on the boot time

Great ;)

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