diff --git a/initrd/bin/cbfs-init b/initrd/bin/cbfs-init index a31fc1941..c82e8a239 100755 --- a/initrd/bin/cbfs-init +++ b/initrd/bin/cbfs-init @@ -6,8 +6,8 @@ set -e -o pipefail # This extraction and measurement cannot be suppressed by quiet mode, since # config.user is not yet loaded at this point. # To suppress this output, set CONFIG_QUIET_MODE=y needs be be set in /etc/config -# which is defined at buiid time under board configuration file to be part of initrd.cpio -# This script is called from initrd/init +# which is defined at build time under board configuration file to be part of initrd.cpio +# This script is called from initrd/init so really early in the boot process to put files in place in initramfs TRACE_FUNC diff --git a/initrd/init b/initrd/init index 28e42ca28..1b1044fa3 100755 --- a/initrd/init +++ b/initrd/init @@ -109,12 +109,21 @@ fi if [ "$CONFIG_QUIET_MODE" = "y" ]; then # check origin of quiet mode setting =y: if it is under /etc/config.user then early cbfs-init outputs are not suppressible # if it is under /etc/config then early cbfs-init outputs are suppressible - if ! grep -q 'CONFIG_QUIET_MODE="y"' /etc/config.user 2>/dev/null; then + if grep -q 'CONFIG_QUIET_MODE="y"' /etc/config 2>/dev/null; then echo "Quiet mode enabled: refer to '/tmp/debug.log' for boot measurements traces" >/dev/tty0 else echo "Runtime Quiet mode: refer to '/tmp/debug.log' for additional boot measurements traces past this point" >/dev/tty0 echo "To suppress earlier boot measurements traces, enable CONFIG_QUIET_MODE=y in your board configuration at build time." >/dev/tty0 fi +# If CONFIG_QUIET_MODE enabled in board config but disabled from Config->Configuration Settings +# warn that early boot measurements output was suppressed prior of this point +elif [ "$CONFIG_QUIET_MODE" = "n" ]; then + # if CONFIG_QUIET_MODE=n in /etc/config.user but CONFIG_QUIET_MODE=y in /etc/config then early cbfs-init outputs are suppressed + # both needs to be checked to determine if early boot measurements traces were suppressed + if grep -q 'CONFIG_QUIET_MODE="y"' /etc/config 2>/dev/null && grep -q 'CONFIG_QUIET_MODE="n"' /etc/config.user 2>/dev/null; then + echo "Early boot measurements traces were suppressed per CONFIG_QUIET_MODE=y in your board configuration at build time (/etc/config)" >/dev/tty0 + echo "Runtime Quiet mode disabled: refer to '/tmp/debug.log' for cbfs-init related traces prior of this point" >/dev/tty0 + fi fi TRACE_FUNC