1

I have purchased a coral dev board. The output of messages to the console during boot seem to add about 1 second to the boot time, therefore I want to disable the console or reduce the number of messages written to the console. To achieve this I have tried two different things.

I have set the bootargs parameter in U-Boot to pass quiet as kernel parameter to silence the console using these commands:

setenv bootargs quiet
saveenv

I have also added the following lines to U-Boot config file imx8mq_phanbell.h:

CONFIG_SILENT_CONSOLE
CONFIG_SILENT_CONSOLE_UPDATE_ON_SET
CONFIG_SYS_DEVICE_NULLDEV

Then I have rebuilt u-boot and flashed it to the board and set the u-boot variable silent to 1.

Neither of these changes have had any effect on the output from the console during boot. Can you help me with this problem?

Fredrik
  • 31
  • 4
  • *"I have set the bootargs parameter ..."* -- You need to confirm exactly what command line was used to boot the kernel. Inspect that boot log that you are complaining about (or dump **/proc/cmdline**), for the actual kernel command line that was used. Check the kernel config to help determine where that command line came from (e.g. from the Device Tree?). See https://stackoverflow.com/questions/48801998/passing-bootargs-via-chosen-node-in-device-tree-not-working-for-beaglebone-black/48814885#48814885 – sawdust Oct 10 '19 at 22:32
  • you can log in via `mdt shell` with the OTG cable without ever seeing the log. With the serial console you can run `sudo dmesg -D` do disable kernel log, but you shouldn't disable it permanently. – Nam Vu Oct 16 '19 at 16:01
  • @NamVu @sawdust Dump of /proc/cmdline: `console=ttymxc0,115200 console=tty0 earlycon=ec_imx6q,0x30860000,115200 root=PARTUUID=70672ec3-5eee-49ff-b3b1-eb1fbd406bf5 rootfstype=ext4 rw rootwait init=/sbin/init net.ifnames=0 pci=pcie_bus_perf` Using `sudo dmesg -D` doesn't disable the kernel log for me. – Fredrik Dec 11 '19 at 23:52

2 Answers2

2

I have solved my issue by first adding the quiet parameter to the cmdline variable defined in the file boot.txt found here: https://coral.googlesource.com/build/+/refs/heads/docker/boot.txt.

Then I compiled boot.txt to a script image file with the mkimage tool and replaced boot.scr used by U-Boot in /boot with this file.

This does indeed reduce boot time.

Fredrik
  • 31
  • 4
0

Thanks Fredrik for the response, to reiterate but this works for any kernel params that needs to be added:

  • Download boot.txt:
$ curl https://coral.googlesource.com/build/+/refs/heads/docker/boot.txt\?format\=TEXT | base64 --decode | tee boot.txt > /dev/null
  • Install mkimage:
$ sudo apt install u-boot-tools
  • Make your necessary changes in the cmdline="" line, for this example, we need to add "quiet loglevel=0":
cmdline=<preexsisting> + quiet loglevel=0
  • compile to boot.scr:
$ mkimage -A arm -T script -O linux -d boot.txt boot.scr
  • replace boot image file
$ mv boot.scr > /boot

Reboot and the new kernel params should be loaded.

Nam Vu
  • 1,727
  • 1
  • 11
  • 24