File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ set -e -o pipefail
66# This extraction and measurement cannot be suppressed by quiet mode, since
77# config.user is not yet loaded at this point.
88# To suppress this output, set CONFIG_QUIET_MODE=y needs be be set in /etc/config
9- # which is defined at buiid time under board configuration file to be part of initrd.cpio
10- # This script is called from initrd/init
9+ # which is defined at build time under board configuration file to be part of initrd.cpio
10+ # This script is called from initrd/init so really early in the boot process to put files in place in initramfs
1111
1212TRACE_FUNC
1313
Original file line number Diff line number Diff line change 109109if [ " $CONFIG_QUIET_MODE " = " y" ]; then
110110 # check origin of quiet mode setting =y: if it is under /etc/config.user then early cbfs-init outputs are not suppressible
111111 # if it is under /etc/config then early cbfs-init outputs are suppressible
112- if ! grep -q ' CONFIG_QUIET_MODE="y"' /etc/config.user 2> /dev/null; then
112+ if grep -q ' CONFIG_QUIET_MODE="y"' /etc/config 2> /dev/null; then
113113 echo " Quiet mode enabled: refer to '/tmp/debug.log' for boot measurements traces" > /dev/tty0
114114 else
115115 echo " Runtime Quiet mode: refer to '/tmp/debug.log' for additional boot measurements traces past this point" > /dev/tty0
116116 echo " To suppress earlier boot measurements traces, enable CONFIG_QUIET_MODE=y in your board configuration at build time." > /dev/tty0
117117 fi
118+ # If CONFIG_QUIET_MODE enabled in board config but disabled from Config->Configuration Settings
119+ # warn that early boot measurements output was suppressed prior of this point
120+ elif [ " $CONFIG_QUIET_MODE " = " n" ]; then
121+ # if CONFIG_QUIET_MODE=n in /etc/config.user but CONFIG_QUIET_MODE=y in /etc/config then early cbfs-init outputs are suppressed
122+ # both needs to be checked to determine if early boot measurements traces were suppressed
123+ 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
124+ echo " Early boot measurements traces were suppressed per CONFIG_QUIET_MODE=y in your board configuration at build time (/etc/config)" > /dev/tty0
125+ echo " Runtime Quiet mode disabled: refer to '/tmp/debug.log' for cbfs-init related traces prior of this point" > /dev/tty0
126+ fi
118127fi
119128
120129TRACE_FUNC
You can’t perform that action at this time.
0 commit comments