This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-AM62: SK-AM62: How to disable console output Part2

Part Number: SK-AM62
Other Parts Discussed in Thread: AM625

Tool/software:

Hi,

I would like to disable console output of AM62x.

Please reference the following to check my questioin.

SK-AM62: How to disable console output

Unfortunately, my question has been locked before resolving.

I would like to disable logging from a specific UART but have the UART's status = "okay".

Now, the console isn't disabled completely yet.

U-Boot SPL 2023.04-ti-gf9b966c67473 (Mar 19 2024 - 20:31:40 +0000)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.7--v09.02.07 (Kool Koala)')
SPL initial stack usage: 13408 bytes
Trying to boot from MMC2
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Starting ATF on ARM64 core...

NOTICE:  BL31: v2.10.0(debug):v2.10.0-367-g00f1ec6b87-dirty
NOTICE:  BL31: Built : 16:09:05, Feb  9 2024
INFO:    GICv3 without legacy support detected.
INFO:    ARM GICv3 driver initialized in EL3
INFO:    Maximum SPI INTID supported: 287
INFO:    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.7--v09.02.07 (Kool Koala)')
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a53: CPU workaround for erratum 855873 was applied
INFO:    BL31: cortex_a53: CPU workaround for erratum 1530924 was applied
INFO:    BL31: Initializing BL32
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x80080000
INFO:    SPSR = 0x3c9

 

U-Boot SPL 2023.04-ti-gf9b966c67473 (Mar 19 2024 - 20:31:40 +0000)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.7--v09.02.07 (Kool Koala)')
SPL initial stack usage: 1856 bytes
Trying to boot from MMC2
Authentication passed
Authentication passed
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]

I would like to know how to disable the remaining console output.

Best Regards,

Koji

  • Hi, 

    I will try this at my end and let you know by tomorrow EOD. 

    Thank you for your patience.

    Regards,
    Aparna

  • Hi,

    I have implemented the following changes:

    diff --git a/arch/arm/mach-k3/am62a7_init.c b/arch/arm/mach-k3/am62a7_init.c
    index 8291ab41..5b167376 100644
    --- a/arch/arm/mach-k3/am62a7_init.c
    +++ b/arch/arm/mach-k3/am62a7_init.c
    @@ -13,6 +13,8 @@
     #include <dm.h>
     #include <dm/uclass-internal.h>
     #include <dm/pinctrl.h>
    +#define CONFIG_BOARD_EARLY_INIT_F 1
    +
     
     #define CTRLMMR_MCU_RST_CTRL             0x04518170
     #define RST_CTRL_ESM_ERROR_RST_EN_Z_MASK 0xFFFDFFFF
    @@ -102,6 +104,7 @@ void board_init_f(ulong dummy)
            spl_early_init();
     
            wkup_ctrl_remove_can_io_isolation_if_set();
    +       gd->flags |= (GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE);
     
            /*
             * Process pinctrl for the serial0 and serial3, aka WKUP_UART0 and
    diff --git a/configs/am62ax_evm_a53_defconfig b/configs/am62ax_evm_a53_defconfig
    index dd6817a4..ada7e537 100644
    --- a/configs/am62ax_evm_a53_defconfig
    +++ b/configs/am62ax_evm_a53_defconfig
    @@ -133,6 +137,9 @@ CONFIG_DM_SPI_FLASH=y
     CONFIG_CMD_REMOTEPROC=y
     CONFIG_SYS_MALLOC_LEN=0x2000000
     CONFIG_SPL_BOARD_INIT=y
    +CONFIG_DISABLE_CONSOLE=y
    +CONFIG_SILENT_CONSOLE=y
    +CONFIG_SYS_DEVICE_NULLDEV=y
     
     #include <configs/am62x_a53_usbdfu.config>
     #include <configs/am62x_a53_usbmsc.config>
    diff --git a/configs/am62ax_evm_r5_defconfig b/configs/am62ax_evm_r5_defconfig
    index 072c8465..e4d84830 100644
    --- a/configs/am62ax_evm_r5_defconfig
    +++ b/configs/am62ax_evm_r5_defconfig
    @@ -124,3 +124,7 @@ CONFIG_SPL_TIMER=y
     CONFIG_OMAP_TIMER=y
     CONFIG_LIB_RATIONAL=y
     CONFIG_SPL_LIB_RATIONAL=y
    +CONFIG_DISABLE_CONSOLE=y
    +CONFIG_SILENT_CONSOLE=y
    +CONFIG_SYS_DEVICE_NULLDEV=y
    +

    This could remove the R5 SPl and A53 SPL logs:

    NOTICE:  BL31: v2.10.0(release):v2.10.0-367-g00f1ec6b87-dirty                 
    NOTICE:  BL31: Built : 16:09:05, Feb  9 2024                                                     
                                                                                                     
                                                                                                     
    U-Boot 2024.04-dirty (Sep 11 2024 - 18:06:00 +0530)                                              
                                                                                                     
    SoC:   AM62AX SR1.0 HS-FS                                                                        
    Model: Texas Instruments AM62A7 SK                                                               
    DRAM:  2 GiB (effective 4 GiB)                                                                   
    Core:  87 devices, 30 uclasses, devicetree: separate                                             
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1                                                            
    Loading Environment from nowhere... OK                                                           
    In:    serial@2800000                                                                            
    Out:   serial@2800000                                                                            
    Err:   serial@2800000                                                                            
    Net:   eth0: ethernet@8000000port@1                                                              
    Hit any key to stop autoboot:  0 

    I have tested this on AM62A, but similar changes in AM62x files should work.

    Regards,
    Aparna

  • Thank you, Aparna

    I would like to try your implementation but I have some question before that.

    (1) Is it difference that define CONFIG_BOARD_EARLY_INIT_F in am625_init.c from that enable CONFIG_BOARD_EARLY_INIT_F by menuconfig?

    I would like to enable by menuconfig if it is possible.

    (2) When I added your implementation, the following compile error is occurred:

    | aarch64-oe-linux-ld.bfd: common/board_f.o:(.rodata.init_sequence_f+0x58): undefined reference to `board_early_init_f'

    | aarch64-oe-linux-ld.bfd: common/board_r.o:(.data.init_sequence_r+0xa0): undefined reference to `board_early_init_r'

    Why is the error occurred?

     

    Best Regards,

    Koji

  • Hi Aparna,

    CONFIG_BOARD_EARLY_INIT_F doesn't have to be enabled.

    I could disable u-boot console by only adding "gd->flags |= (GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE);"

    I could disable all of console.

     

    Koji