[PATCH 1/6] Convert CONFIG_SYS_DEVICE_NULLDEV to Kconfig
Ovidiu Panait
ovidiu.panait at windriver.com
Sat Jul 18 20:04:25 CEST 2020
Hi Simon,
On 18.07.2020 06:03, Simon Glass wrote:
> This converts the following to Kconfig:
> CONFIG_SYS_DEVICE_NULLDEV
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> common/Kconfig | 16 ++++++++++++++++
> configs/M5249EVB_defconfig | 3 ++-
> configs/colibri_pxa270_defconfig | 2 +-
> doc/README.silent | 2 +-
> include/configs/M5249EVB.h | 2 --
> include/configs/colibri_pxa270.h | 2 --
> scripts/config_whitelist.txt | 1 -
> 7 files changed, 20 insertions(+), 8 deletions(-)
>
> diff --git a/common/Kconfig b/common/Kconfig
> index 67b3818fde..4d5b3a9cfb 100644
> --- a/common/Kconfig
> +++ b/common/Kconfig
> @@ -634,6 +634,22 @@ config SYS_STDIO_DEREGISTER
> removed (for example a USB keyboard) then this option can be
> enabled to ensure this is handled correctly.
>
> +config SPL_SYS_STDIO_DEREGISTER
> + bool "Allow deregistering stdio devices in SPL"
> + help
> + Generally there is no need to deregister stdio devices since they
> + are never deactivated. But if a stdio device is used which can be
> + removed (for example a USB keyboard) then this option can be
> + enabled to ensure this is handled correctly. This is very rarely
> + needed in SPL.
> +
> +config SYS_DEVICE_NULLDEV
> + bool "Enable a null device for stdio"
> + help
> + Enable creation of a "nulldev" stdio device. This allows silent
> + operation of the console by setting stdout to "nulldev". Enable
> + this to use a serial console under board control.
> +
> endmenu
>
> menu "Logging"
> diff --git a/configs/M5249EVB_defconfig b/configs/M5249EVB_defconfig
> index 12db389b69..8f8a4a6bad 100644
> --- a/configs/M5249EVB_defconfig
> +++ b/configs/M5249EVB_defconfig
> @@ -3,7 +3,9 @@ CONFIG_SYS_TEXT_BASE=0xFFE00000
> CONFIG_ENV_SIZE=0x2000
> CONFIG_ENV_SECT_SIZE=0x2000
> CONFIG_TARGET_M5249EVB=y
> +CONFIG_DEFAULT_DEVICE_TREE="M5249EVB"
> CONFIG_SYS_CONSOLE_INFO_QUIET=y
> +CONFIG_SYS_DEVICE_NULLDEV=y
> # CONFIG_DISPLAY_BOARDINFO is not set
> # CONFIG_CMDLINE_EDITING is not set
> # CONFIG_AUTOBOOT is not set
> @@ -12,7 +14,6 @@ CONFIG_LOOPW=y
> CONFIG_CMD_MX_CYCLIC=y
> # CONFIG_CMD_SETEXPR is not set
> CONFIG_CMD_CACHE=y
> -CONFIG_DEFAULT_DEVICE_TREE="M5249EVB"
> CONFIG_ENV_ADDR=0xFFE04000
> CONFIG_SYS_RELOC_GD_ENV_ADDR=y
> # CONFIG_NET is not set
> diff --git a/configs/colibri_pxa270_defconfig b/configs/colibri_pxa270_defconfig
> index 669b9dfe58..aff7b62639 100644
> --- a/configs/colibri_pxa270_defconfig
> +++ b/configs/colibri_pxa270_defconfig
> @@ -10,6 +10,7 @@ CONFIG_NR_DRAM_BANKS=1
> CONFIG_ENV_VARS_UBOOT_CONFIG=y
> CONFIG_USE_BOOTARGS=y
> CONFIG_BOOTARGS="console=tty0 console=ttyS0,115200"
> +CONFIG_SYS_DEVICE_NULLDEV=y
> # CONFIG_DISPLAY_BOARDINFO is not set
> CONFIG_DISPLAY_BOARDINFO_LATE=y
> # CONFIG_CMDLINE_EDITING is not set
> @@ -43,6 +44,5 @@ CONFIG_SYS_FLASH_CFI=y
> CONFIG_DM_SERIAL=y
> CONFIG_PXA_SERIAL=y
> CONFIG_USB=y
> -CONFIG_USB_STORAGE=y
Is this deletion intentional? It is not immediately obvious to me how it
relates to
CONFIG_SYS_DEVICE_NULLDEV getting converted to Kconfig.
Reviewed-by: Ovidiu Panait <ovidiu.panait at windriver.com>
Thanks!
Ovidiu
> # CONFIG_REGEX is not set
> CONFIG_OF_LIBFDT=y
> diff --git a/doc/README.silent b/doc/README.silent
> index 6d90a0ec40..00288e03b0 100644
> --- a/doc/README.silent
> +++ b/doc/README.silent
> @@ -19,7 +19,7 @@ The following actions are taken if "silent" is set at boot time:
> - When the console devices have been initialized, "stdout" and
> "stderr" are set to "nulldev", so subsequent messages are
> suppressed automatically. Make sure to enable "nulldev" by
> - #defining CONFIG_SYS_DEVICE_NULLDEV in your board config file.
> + enabling CONFIG_SYS_DEVICE_NULLDEV in your board defconfig file.
>
> - When booting a linux kernel, the "bootargs" are fixed up so that
> the argument "console=" will be in the command line, no matter how
> diff --git a/include/configs/M5249EVB.h b/include/configs/M5249EVB.h
> index de7132940c..1a1a110765 100644
> --- a/include/configs/M5249EVB.h
> +++ b/include/configs/M5249EVB.h
> @@ -31,8 +31,6 @@
> */
> #undef CONFIG_BOOTP_BOOTFILESIZE
>
> -#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */
> -
> #define CONFIG_SYS_LOAD_ADDR 0x200000 /* default load address */
>
> /*
> diff --git a/include/configs/colibri_pxa270.h b/include/configs/colibri_pxa270.h
> index 29827f1ee8..3bbef55ec3 100644
> --- a/include/configs/colibri_pxa270.h
> +++ b/include/configs/colibri_pxa270.h
> @@ -70,8 +70,6 @@
> #define CONFIG_BOOTP_BOOTFILESIZE
> #endif
>
> -#define CONFIG_SYS_DEVICE_NULLDEV 1
> -
> /*
> * Clock Configuration
> */
> diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
> index 1c7946fb65..2da34a5d23 100644
> --- a/scripts/config_whitelist.txt
> +++ b/scripts/config_whitelist.txt
> @@ -2178,7 +2178,6 @@ CONFIG_SYS_DEBUG_SERVER_FW_IN_NOR
> CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS
> CONFIG_SYS_DEFAULT_VIDEO_MODE
> CONFIG_SYS_DEF_EEPROM_ADDR
> -CONFIG_SYS_DEVICE_NULLDEV
> CONFIG_SYS_DFU_DATA_BUF_SIZE
> CONFIG_SYS_DFU_MAX_FILE_SIZE
> CONFIG_SYS_DIAG_ADDR
More information about the U-Boot
mailing list