Log level during boot

I use Xavier AGX and l4t version is 32.4.2.
I’m now tracing actions during boot time

I use “printk” to show messages just as I did in TX2 with l4t r28.3.

But serial console didn’t show any message I put.

So I print a test message with all log level and here is what I got:

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.9.140 (fortx2@fortx2-H110N) (gcc version 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701] (Linaro GCC 7.3-2018.05) ) #3 SMP PREEMPT Tue Jun 23 09:55:54 CST 2020
[ 0.000000] Boot CPU: AArch64 Processor [4e0f0040]
[ 0.000000] OF: fdt:memory scan node memory, reg size 48,
[ 0.000000] OF: fdt: - 80000000 , 2c000000
[ 0.000000] OF: fdt: - ac200000 , 44600000
[ 0.000000] OF: fdt: - 100000000 , 780000000
[ 0.000000] earlycon: tegra_comb_uart0 at MMIO32 0x000000000c168000 (options ‘’)
[ 0.000000] bootconsole [tegra_comb_uart0] enabled
[ 1.494534] @@@@ pr_emerg 0
[ 1.494563] @@@@ pr_alert 1
[ 1.494608] @@@@ pr_crit 2
[ 1.494624] @@@@ pr_err 3
[ 5.755271] @@@@ pr_emerg 0
[ 5.755382] @@@@ pr_alert 1
[ 5.755447] @@@@ pr_crit 2
[ 5.755498] @@@@ pr_err 3
[ 6.153263] cgroup: cgroup2: unknown option “nsdelegate”
[ 6.155072] pstore: decompression failed;returned -5
[ 7.453348] using random self ethernet address
[ 7.453477] using random host ethernet address
[ 7.473537] random: crng init done
[ 7.473638] random: 7 urandom warning(s) missed due to ratelimiting
[ 8.065935] using random self ethernet address
[ 8.066056] using random host ethernet address
Ubuntu 18.04.4 LTS localhost ttyTCU0

It seems that it won’t show log level lower than 4.(FYI ,I put those message at vi5_probe).

I have tried editing /etc/sysctl.conf, but this only become effective after booting process is finish.

I can just print my messages with higher level to solve this problem,

but I am wondering where to set this default level?

Btw, is the default message log level in R32.3.2 same as R28.3?

Edit :
I have checked /proc/cmdline:

root@localhost:~# cat /proc/cmdline
root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4 video=tegrafb no_console_suspend=1 earlycon=tegra_comb_uart,mmio32,0x0c168000 gpt usbcore.old_scheme_first=1 tegraid=19.1.2.0.0 maxcpus=8 boot.slot_suffix= boot.ratchetvalues=0.4.2 vpr_resize sdhci_tegra.en_boot_part_access=1 quiet

Does that “quiet” and the end of cmdline means boot in quiet mode?

If so, where can I disable quiet mode?

Yes, that is what it does. There are two places this might occur.

The first location to check is if it is in “/boot/extlinux/extlinux.conf”, at the end of the “APPEND” key/value pair. If so, just remove “quiet”.

The other place, if this does not resolve it, is within the device tree. In that case, the correct device tree node to remove this from is “chosen->bootargs”. You can examine the current “bootargs” via:
cat /proc/device-tree/chosen/bootargs

If you need to remove this from the device tree, then check the documentation for that particular release for customizing device tree.

NOTE: The device tree can be used to provide boot arguments to earlier boot stages which are not otherwise able to read an ext4 filesystem. Or, this might be done so that a value can be edited prior to passing arguments to the kernel.

Hi linuxdev,

Thanks for reply, I modified extlinux.conf and the problem is solved.

Btw, mind if I ask where to configure boot order?

I have noticed that default setting will first try to boot from sd, then USB, then finally fixed storage

Here’s the log:

[0002.178] I> Hit any key to stop autoboot: 4 3 2 1
[0004.186] initializing target
[0004.186] calling apps_init()
[0004.187] starting app kernel_boot_app
[0004.206] I> found decompressor handler: lz4-legacy
[0004.207] I> decompressing BMP blob …
[0004.211] I> Kernel type = Normal
[0004.211] I> Loading kernel-bootctrl from partition
[0004.211] I> Loading partition kernel-bootctrl at 0xa42b0000 from device(0x1)
[0004.218] W> tegrabl_get_kernel_bootctrl: magic number(0x00000000) is invalid
[0004.218] W> tegrabl_get_kernel_bootctrl: use default dummy boot control data
[0004.219] I> ########## SD boot ##########
[0004.223] I> Found sdcard
[0004.227] I> enabling ‘vdd-sdmmc1-sw’ regulator
[0004.233] I> regulator ‘vdd-sdmmc1-sw’ already enabled
[0004.358] I> sdmmc SDR mode
[0004.372] I> -0 params source =
[0004.380] I> Found 1 partitions in SDCARD (instance 0)
[0004.381] I> Look for boot partition
[0004.381] I> Fallback: assuming 0th partition is boot partition
[0004.382] I> Detect filesystem
[0004.398] I> Loading extlinux.conf …
[0004.398] I> rootfs path: /sd/boot/extlinux/extlinux.conf
[0008.528] I> lookup_linear_dir:441: Invalid file block num
[0008.529] I> ext2_walk:142: ‘boot’ lookup failed
[0008.529] I> ext4_open_file:647: ‘/boot/extlinux/extlinux.conf’ lookup failed
[0008.530] E> file /sd/boot/extlinux/extlinux.conf open failed!!
[0008.530] E> Failed to find/load /boot/extlinux/extlinux.conf
[0008.531] I> Fallback: Load binaries from partition
[0008.536] I> Loading kernel …
[0008.539] E> Cannot open partition kernel
[0008.543] E> SD boot failed, err: 202184205
[0008.547] I> ########## USB boot ##########
[0008.556] W> No valid slot number is found in scratch register
[0008.557] W> Return default slot: _a
[0008.572] I> USB Firmware Version: 60.06 release
[0008.628] I> regulator of usb2-0 already enabled
[0008.634] I> regulator of usb2-1 already enabled
[0008.640] I> regulator of usb2-2 already enabled
[0008.649] I> enabling ‘vdd-5v-sata’ regulator
[0009.653] E> failed to initialize xhci controller
[0009.653] E> Error in init of XUSB host driver, err: 79790026
[0009.654] E> Failed to initialize device 5-0
[0009.654] E> USB boot failed, err: 2037973030
[0009.654] I> ########## Fixed storage boot ##########
[0009.655] I> Already published: 00010003
[0009.655] I> Look for boot partition
[0009.659] I> Fallback: assuming 0th partition is boot partition
[0009.664] I> Detect filesystem
[0009.691] I> Loading extlinux.conf …
[0009.692] I> rootfs path: /sdmmc_user/boot/extlinux/extlinux.conf
[0009.734] I> L4T boot options
[0009.735] I> [1]: “primary kernel”
[0009.735] I> Enter choice:
[0012.736] I> Continuing with default option: 1
[0012.736] I> Loading kernel sig file from rootfs …
[0012.736] I> rootfs path: /sdmmc_user/boot/Image.sig
[0012.755] I> Loading kernel binary from rootfs …
[0012.755] I> rootfs path: /sdmmc_user/boot/Image
[0012.999] I> Validate kernel …

Sometimes the sd card I uesd has system partition inside, and kernel will crash during boot if I boot from sd.

So, I want to change to boot from fixed storage first to avoid this situation.

For Xavier I don’t know. The other Jetsons have U-Boot, but Xavier boots directly to Linux from CBoot (on those other systems CBoot runs U-Boot, and U-Boot runs the Linux kernel). On the U-Boot systems there is an environment which can easily be edited without editing the actual source code.

Would anyone happen to know if there are environment variables which can be edited in CBoot for boot order without editing source code?

@ts01399984, the boot-order on Xavier can be modified using the cbo.dtb file on the host system. This file is present at ~/nvidia/nvidia_sdk/JetPack*AGX_XAVIER/Linux_for_Tegra/bootloader/cbo.dts.

Modify the “boot-order” variable to something like this:

boot-order = "emmc", "sd", "usb", "net";

Build a .dtb file with below command:

dtc -I dts -O dtb -o bootloader/cbo.dtb bootloader/cbo.dts

This requires that “device-tree-compiler” debian package is installed on the host system. I think NVIDIA does provide a dts(1) binary but I have never used it since downloading/installing a package is easier ;-)

However, I have a doubt (unless it has been fixed in R32.3.2) that this change will take effect because of a bug in cboot binary. Here’s a forum post Cbo.dtb not getting flashed with JetPack 4.3 - #11 by WayneWWW that I submitted.

Hi, linuxdev and AnishAney

Thanks for reply, these information help a lot.

Hi AnishAney,

I have checked your post.

I’m using R32.4 and I have built cbo.dtb on my host system.

I also modified partition size in “flash_t194_sdmmc.xml” (The sample root file system I downloaded

doesn’t have “flash_l4t_t194_sdmmc.xml” in it, I’m not sure if it is typo or not.)

But after flashing, my log shows it still first boot from sd.

Do I need to move this file to other folder or I need to compile whole cboot again?

EDIT: It works, I guess I just didn’t save the change