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.

Linux/AM5726: Disabling kernel logs from U-boot

Part Number: AM5726

Tool/software: Linux

Hello,

To disable kernel and filesystem logs , i have done below changes.

1) Within u-boot/include/configs/coustom_board.h, I changed CONSOLEDEV to "/dev/tty06",  It was originally "/dev/tty02"

Then i have run below command to compile u-boot.

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am57xx_evm_nodt_config
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

 and Kernel logs get disable. Filesystem logs still comes.

2). I have added below changes on top of previous changes and i can able to disable both filesystem and kernel logs.

Within u-boot/arch/arm/dts/am57xx-beagle-x15.dts, I removed below snipet, so as not to use uart3 for stdout.

chosen {
    stdout-path = &uart3;
};

Then i have run below command to compile u-boot.

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am57xx_evm_nodt_config
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

My question is,

Here we are using "am57xx_evm_nodt_config" as a defconfig file.

And building an u-boot image, so as per my understanding that generated u-boot image will not include support of dts.

and here i am changing u-boot dts file and it is going to affect on execution, how is it possible?

Can you please do the needful to clear this doubt?

Regards,

Prerak

  • Hello Prerak,

    It is impossible, u-boot-<version>/arch/arm/dts/am57xx-beagle-x15.dts has no any effect when the "am57xx_evm_nodt_config" file is used.

    Best regards,
    Kemal

  • Hi Kemal,

    I totally agree with you. I have rechecked my config file and I am using am57xx_evm_nodt_config.

    I just want to disable filesystem as well as kernel prints on the serial console from u-boot.
    Please help me to debug this issue.

    Regards,
    Prerak
  • This is not at issue. This is the normal behaviour.
    If you want to disable system prints see this and this post.

  • Hi Kemal

    1) . I have tried e2e.ti.com/.../2230139 and get the result as below.

    Uboot > setenv console /dev/null
    Uboot > boot
    Booting from nand ...

    NAND read: device 0 offset 0x100000, size 0x40000
    262144 bytes read: OK

    NAND read: device 0 offset 0x400000, size 0x800000
    8388608 bytes read: OK
    Kernel is ok
    Value Read is 0x50
    WDT Started
    Kernel image @ 0x82000000 [ 0x000000 - 0x36ee40 ]
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Loading Device Tree to 8ffe4000, end 8ffff7af ... OK

    Starting kernel ...


    _____ _____ _ _
    | _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
    | | _| .'| . | . | | __| _| . | | | -_| _| _|
    |__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
    |___| |___|

    Arago Project http://arago-project.org am57xx-evm ttyS2

    Arago 2016.10 am57xx-evm ttyS2

    am57xx-evm login:

    In this kernel logs get disabled but filesystem logs still come.

    2). I have also tried as e2e.ti.com/.../1618956
    logs as per below.
    Uboot > setenv optargs quiet
    Uboot > boot
    Booting from nand ...

    NAND read: device 0 offset 0x100000, size 0x40000
    262144 bytes read: OK

    NAND read: device 0 offset 0x400000, size 0x800000
    8388608 bytes read: OK
    Kernel is ok
    Value Read is 0x50
    WDT Started
    Kernel image @ 0x82000000 [ 0x000000 - 0x36ee40 ]
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Loading Device Tree to 8ffe4000, end 8ffff7af ... OK

    Starting kernel ...

    [ 0.000764] WARNING: Your 'console=ttyO2' has been replaced by 'ttyS2'
    [ 0.000771] This ensures that you still see kernel messages. Please
    [ 0.000776] update your kernel commandline.
    [ 0.001740] /cpus/cpu@0 missing clock-frequency property
    [ 0.001755] /cpus/cpu@1 missing clock-frequen

    here I am getting filesystem and kernel both logs on the serial console.

    Regards,
    Prerak
  • Here I am posting you the exact steps:

    $ cd <Processor SDK>/
    $ make u-boot
    $ cd board-support/u-boot-<version>/
    $ ARCH=arm make menuconfig
    Enable
    Console  ---> [*] Support a silent console
                             [*]   Only silence the U-Boot console

    Exit
    Do you wish to save your new configuration?
    Yes
    $ cp .config configs/am57xx_evm_defconfig
    $ cd ../../
    $ make u-boot_clean
    $ make u-boot

    Copy the new MLO and u-boot.img to your board.
    Power it on. Stop the booting in U-Boot console and enter these commands:
    => setenv console /dev/null
    => setenv silent 1
    => saveenv
    => reset

    am57xx-evm login: root
    root@am57xx-evm:~# rm -rf /etc/issue
    root@am57xx-evm:~# reboot

    And you will not see any messages once and for all.

    Note: If you met any little obstacles on performing these steps please feel free to ask for more help.

  • Hi Kemal,

    Thanks for your valuable support.

    I am using 2016 u-boot. In this, there is no entry of below things in menuconfig.

    " Console ---> [*] Support a silent console
    [*] Only silence the U-Boot console "

    Regards,
    Prerak
  • Then #define CONFIG_SILENT_CONSOLE in your board file <Processor SDK>/board-support/u-boot-<version>/include/configs/am57xx_evm.h
    Apply this patch.

    $ cd <Processor SDK>/board-support/u-boot-<version>/
    $ git apply 0001-common-console.c-ensure-GD_FLG_SILENT-is-set-or-clea.patch

    Rebuild, transfer the images and boot the board.

    Stop the booting in U-Boot console and enter these settings:

    => setenv console /dev/null
    => setenv silent 1
    => saveenv
    => reset

    am57xx-evm login: root
    root@am57xx-evm:~# rm -rf /etc/issue
    root@am57xx-evm:~# reboot

    And you will never see any messages thereafter.

  • Hi Kemal,

    Thanks for your valuable suggestion.

    This patch works for me. I am able to silent kernel logs as well filesystem logs. Thanks for your support.

    After completion of booting i able to see below log as a login screen.

    "am57xx-evm login:"


    If I want to disable this log from serial-console through u-boot, what should I need to do ?

    I only want to access my board through ssh.

    Regards,

    Prerak

     

  • root@am57xx-evm:~# systemctl disable serial-getty@ttyS2.service
    root@am57xx-evm:~# systemctl mask serial-getty@ttyS2.service
    root@am57xx-evm:~# systemctl daemon-reload

  • Hi Kemal,

    This service i know, but is there any way to disable this service from u-boot?

    Regards,
    Prerak
  • There is a one way.

    Change these lines in <Processor SDK>/board-support/u-boot-<version>/board/ti/am57xx/mux_data.h

        {UART2_CTSN, (M2 | PIN_INPUT_PULLUP)},    /* uart2_ctsn.uart3_rxd */
        {UART2_RTSN, (M1 | PIN_OUTPUT_PULLDOWN)},    /* uart2_rtsn.uart3_txd */

    to

        {UART2_CTSN, (M14 | PIN_INPUT_PULLDOWN)},    /* uart2_ctsn.gpio1_16 */
        {UART2_RTSN, (M14 | PIN_INPUT_PULLDOWN)},    /* uart2_rtsn.gpio1_17 */


    Note: We're degrading here.

  • hahahahahaha....

    Thanks for your support.

    Regards,
    Prerak