From d9feaaa57bd89a32e8d246a399163bf28fff902d Mon Sep 17 00:00:00 2001 From: Mykyta Dorokhin Date: Fri, 8 Feb 2019 14:58:29 +0200 Subject: u-boot: enable silent console feature --- recipes-bsp/u-boot/u-boot-2016.09.01/config.patch | 12 +++- .../u-boot/u-boot-2016.09.01/kconfig_common.patch | 65 ++++++++++++++++++++++ recipes-bsp/u-boot/u-boot_2016.09.01.bb | 1 + 3 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 recipes-bsp/u-boot/u-boot-2016.09.01/kconfig_common.patch (limited to 'recipes-bsp/u-boot') diff --git a/recipes-bsp/u-boot/u-boot-2016.09.01/config.patch b/recipes-bsp/u-boot/u-boot-2016.09.01/config.patch index 726b9bf..3e9c0c2 100644 --- a/recipes-bsp/u-boot/u-boot-2016.09.01/config.patch +++ b/recipes-bsp/u-boot/u-boot-2016.09.01/config.patch @@ -1,6 +1,6 @@ diff -raNu old/configs/at91sam9x5ek_nandflash_defconfig new/configs/at91sam9x5ek_nandflash_defconfig ---- old/configs/at91sam9x5ek_nandflash_defconfig 2017-05-04 14:33:41.143172324 -0500 -+++ new/configs/at91sam9x5ek_nandflash_defconfig 2017-05-04 17:54:27.132377607 -0500 +--- old/configs/at91sam9x5ek_nandflash_defconfig 2016-09-19 17:45:12.000000000 +0300 ++++ new/configs/at91sam9x5ek_nandflash_defconfig 2019-02-08 13:39:19.941473452 +0200 @@ -1,9 +1,9 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y @@ -13,7 +13,7 @@ diff -raNu old/configs/at91sam9x5ek_nandflash_defconfig new/configs/at91sam9x5ek CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="U-Boot> " CONFIG_CMD_BOOTZ=y -@@ -23,3 +23,12 @@ +@@ -23,3 +23,18 @@ CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT=y @@ -26,3 +26,9 @@ diff -raNu old/configs/at91sam9x5ek_nandflash_defconfig new/configs/at91sam9x5ek +CONFIG_CMD_BOOTZ=y +CONFIG_CMD_MII=y +CONFIG_CMD_I2C=y ++ ++# The config option CONFIG_SILENT_CONSOLE can be used to quiet messages ++# on the console. If the option has been enabled, the output can be ++# silenced by setting the environment variable "silent" ++CONFIG_SILENT_CONSOLE=y ++CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC=y diff --git a/recipes-bsp/u-boot/u-boot-2016.09.01/kconfig_common.patch b/recipes-bsp/u-boot/u-boot-2016.09.01/kconfig_common.patch new file mode 100644 index 0000000..db6773a --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-2016.09.01/kconfig_common.patch @@ -0,0 +1,65 @@ +# +# MD: based on the following change: +# +# http://git.denx.de/?p=u-boot.git;a=commit;h=98af87997670af840ef178f76b4d6888534a6700 +# author Simon Glass +# Tue, 18 Oct 2016 04:12:35 +0200 (20:12 -0600) +# committer Tom Rini +# Mon, 24 Oct 2016 00:33:18 +0200 (18:33 -0400) +# +# Convert SILENT_CONSOLE options to Kconfig +# +# Move these option to Kconfig and tidy up existing uses. +# +# The Power PC boards don't have a suitable common element: the common header +# files don't appear to line up with the Kconfig files as far as I can tell. +# This results in a lot of defconfig changes. +# +diff -raNu old/common/Kconfig new/common/Kconfig +--- old/common/Kconfig 2016-09-19 17:45:12.000000000 +0300 ++++ new/common/Kconfig 2019-02-08 13:41:54.925466228 +0200 +@@ -213,3 +213,44 @@ + version as printed by the "version" command. + Any change to this variable will be reverted at the + next reset. ++ ++config SILENT_CONSOLE ++ bool "Support a silent console" ++ help ++ This option allows the console to be silenced, meaning that no ++ output will appear on the console devices. This is controlled by ++ setting the environment variable 'silent' to a non-empty value. ++ Note this also silences the console when booting Linux. ++ ++ When the console is set up, the variable is checked, and the ++ GD_FLG_SILENT flag is set. Changing the environment variable later ++ will update the flag. ++ ++config SILENT_U_BOOT_ONLY ++ bool "Only silence the U-Boot console" ++ depends on SILENT_CONSOLE ++ help ++ Normally when the U-Boot console is silenced, Linux's console is ++ also silenced (assuming the board boots into Linux). This option ++ allows the linux console to operate normally, even if U-Boot's ++ is silenced. ++ ++config SILENT_CONSOLE_UPDATE_ON_SET ++ bool "Changes to the 'silent' environment variable update immediately" ++ depends on SILENT_CONSOLE ++ default y if SILENT_CONSOLE ++ help ++ When the 'silent' environment variable is changed, update the ++ console silence flag immediately. This allows 'setenv' to be used ++ to silence or un-silence the console. ++ ++ The effect is that any change to the variable will affect the ++ GD_FLG_SILENT flag. ++ ++config SILENT_CONSOLE_UPDATE_ON_RELOC ++ bool "Allow flags to take effect on relocation" ++ depends on SILENT_CONSOLE ++ help ++ In some cases the environment is not available until relocation ++ (e.g. NAND). This option makes the value of the 'silent' ++ environment variable take effect at relocation. diff --git a/recipes-bsp/u-boot/u-boot_2016.09.01.bb b/recipes-bsp/u-boot/u-boot_2016.09.01.bb index d68960c..44c9e04 100644 --- a/recipes-bsp/u-boot/u-boot_2016.09.01.bb +++ b/recipes-bsp/u-boot/u-boot_2016.09.01.bb @@ -4,6 +4,7 @@ DEPENDS += "dtc-native" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-2016.09.01:" SRC_URI = "ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \ + file://kconfig_common.patch \ file://config.patch \ file://i2c.patch \ file://macb.patch \ -- cgit v1.2.3