FAQ_MA35D1_Disable U-Boot and TF-A Booting Log by Yocto

Post Reply
ytliu6
Posts: 80
Joined: 08 Nov 2022, 10:28

11 Apr 2023, 15:31

Follow the steps below to disable the log output from U-Boot and TF-A.

1. Open the necessary U-Boot configurations by running the following command

Code: Select all

Path: 
/home/user/shared/yocto/build/tmp-glibc/work/numaker_som_ma35d16a81-poky-linux/u-boot-ma35d1/2020.07-r0/build/ma35d1_sdcard0_defconfig

Code: Select all

# make menuconfig

Code: Select all

Console  --->
[ ] Console recording 
[*] Add functionality to disable console completely
()  Board specific string to be added to uboot version string
(4) loglevel
[*] Support a silent console
[*]   Only silence the U-Boot console
[*]   Changes to the 'silent' environment variable update immediately
[*]   Allow flags to take effect on relocation
[*] Don't display the console devices on boot

Start-up hooks  --->
[*] Call board-specific init before relocation
2. Add the following function to the ma35d1.c file

Code: Select all

Path:
/home/user/shared/yocto/build/tmp-glibc/work/numaker_som_ma35d16a81-poky-linux/u-boot-ma35d1/2020.07-r0/git/board/nuvoton/ma35d1/ma35d1.c

Code: Select all

int board_early_init_f(void)
{
	gd->flags |= (GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE);
	return 0;
}
3. Modify the TF-A log level to disable all logs except emergency errors by editing the platform.mk file at the following path

Code: Select all

Path:
~/shared/yocto/build/tmp-glibc/work/numaker_som_ma35d16a81-poky-linux/tf-a-ma35d1/2.3.r1-r0/git/plat/nuvoton/ma35d1/platform.mk

Code: Select all

# Build option to add debugfs support
USE_DEBUGFS		:= 1
DEBUG			:= 1
LOG_LEVEL		:= 0
4. Rebuild U-Boot and TF-A, and then rebuild the whole image by running the following command:

Code: Select all

# bitbake u-boot-ma35d1 tf-a-ma35d1 –C compile && bitbake nvt-image-qt5

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests