TX2 system start printing information off

Hi
We do not want to screen out the log information printed by the system startup during the TX2 module startup. How do we set off the TX2 startup information printing?

The console log output is something most Linux distributions set up within the kernel boot parameters, and Ubuntu is much the same. If you run command β€œcat /proc/cmdline”, then you will probably see the tokens β€œquiet” and β€œsplash” (RedHat/Fedora substitutes β€œrhgb”, RedHat Graphical Boot, for β€œsplash”, but it is the same thing, different logo). So your goal is to remove β€œquiet” and β€œsplash” from the command line.

Assuming you are configured for use of β€œ/boot/extlinux/extlinux.conf”, look for the β€œAPPEND” key/value pair. This is one long line starting with β€œAPPEND”, and followed by a space delimited set of values. β€œ${cbootargs}” is content inherited from prior boot stages, while everything past β€œ${cbootargs}” is new content being added. Find β€œquiet” and β€œsplash”, and remove those.

Tip if you work with extlinux.conf for more advanced situations: You can duplicate that block with the LABEL and create a second block which is duplicated other than any LABEL. Then, if you have serial console during boot, you can pick an alternate boot entry, e.g., one with an experimental kernel or experimental command line arguments. If you don’t have a serial console, then it would just boot to the DEFAULT label anyway. You don’t need to do this for splash or quiet, but thought I’d mention it since it might be useful later.

1 Like

I don’t quite understand the method you mentioned. How to operate on the TX2 platform to mask the system startup printing information?

Maybe I am missing what you really want. It sounded like you were missing boot messages, but wanted those messages. Now it sounds like perhaps you want to avoid seeing messages. Can you clarify?

If you are speaking of messages from when the bootloader has just started running the Linux kernel, then either is easy. However, if we are talking about boot messages prior to Linux running (bootloader or earlier), then things become a bit different (and difficult).

In normal state, when TX2 starts, the screen will output startup information, including kernel startup information. However, we do not want these information to appear on the screen during the startup process. During the startup process of TX2 system, the screen will not display any startup information, but directly enter the system after startup.

This might require more than one step, but if you are only considering the HDMI output, then this may not be too difficult. Serial console output (which exists separate from HDMI) occurs even before Linux, and so if you wish to change serial console in addition to HDMI, then the process is more complicated.

If you want to see the current arguments passed to the kernel at the moment it starts running, see β€œcat /proc/cmdline”. Keep in mind that there are two possible ways to pass arguments to the kernel, and depending on how things are set up for you, this could alter instructions slightly.

Take a look at the file β€œ/boot/extlinux/extlinux.conf”. Within that the β€œAPPEND” key/value pair is passed to the kernel as command line arguments. If you compare the output of β€œcat /proc/cmdline” to what is actually in the extlinux.conf APPEND content, you’ll see the argument is larger. The start of that is via the environment variable β€œ${cbootargs}”, and this is inherited from boot stages prior to the kernel loading. Then the rest of the APPEND is from extlinux.conf. Your goal would be to change kernel arguments from extlinux.conf if possible, but there may be cases where you need some device tree changes (this is where the ${cbootargs} is initially created prior to Linux loading).

Indirectly you may find it useful to know that for most arguments the last argument is the final argument the kernel uses. For example, if I saw β€œrootfstype=ext2” as I read the cmdline, and then later see β€œrootfstype=ext4”, then the actual type is ext4 and it is as if ext2 was never used. Consoles have two types though, serial and the usually physical terminal, and so you might see two console arguments and both would be used (so long as one is serial and the other the local HDMI terminal).

The basic goal for removing HDMI messages is to remove this:
fbcon=map:0 console=tty1
(depending on circumstances you might see only fbcon=map:0 and not console=tty1…any console naming a serial UART can be ignored as this is for serial console)

Also, the β€œquiet” parameter hushes some scroll anyway, so you might want to make sure that is present. The β€œsplash” argument adds the graphical image during quiet times.

What is your default output from β€œcat /proc/cmdline”? What do you see within extlinux.conf for the β€œAPPEND” key/value pair?

Probably most of what you want can be done via removing the β€œfbcon=map:0” from extlinux.conf, and adding β€œquiet” if it is not already present.

Note: APPEND is a single very long line with spaces delimiting tokens. Be sure to keep this as a single long line.

If you still have the argument present, then you might need to work on the device tree as well. If you need to change serial console output prior to Linux loading, then this too probably requires device tree edits (the part that initially creates β€œ${cbootargs}”).