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/PROCESSOR-SDK-AM335X: Stopping debug messages on UART0

Part Number: PROCESSOR-SDK-AM335X

Tool/software: Linux

hi all

i have beagle bone black and it uses the latest ti sdk

  1. it uses UART0 as a debug port to get the log message since boot up
  2. now i want to use this UART0 for some other purpose
  3. hence i do not want to see boot up messages on UART0 (at the end we will connect the UART0 to some other sensor device from which we can read and write sensor values).
  4. since we have ssh access to the device we don't want log messages since boot up just in case we need log message we can login via ssh and see the logs.

now can you please help how to deconfigure the UART0 so that it can be used as normal RS232 and not for debug serial log message as used by current TI SDK

Regards

  • Hello Nick,

    Since you do not want to change the debug UART to another port, but only want to disable debug messages on that port.

    Remove the:

    U-Boot SPL 2017.01-gc68ed086bd (Mar 26 2018 - 15:08:11)

    message by commenting:
    <Processor SDK>/board-support/u-boot-<version>/common/spl/spl.c

    puts("\nU-Boot SPL " PLAIN_VERSION " (" U_BOOT_DATE " - " \
    U_BOOT_TIME ")\n");

    to remove:
    Trying to boot from MMC1

    comment out:
    #if defined(CONFIG_SPL_SERIAL_SUPPORT) && defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
    if (loader)
    /*printf("Trying to boot from %s\n", loader->name);*/
    else
    puts("SPL: Unsupported Boot Device!\n");

    #endif

    to remove:
    reading uboot.env
    reading uboot.env

    comment out:
    <Processor SDK>/board-support/u-boot-<version>/fs/fat/fat.c

    printf("reading %s\n", filename);

    to remove:
    U-Boot 2017.01-gc68ed086bd (Mar 26 2018 - 15:08:11 -0400)

    comment out:
    <Processor SDK>/board-support/u-boot-<version>/lib/display_options.c

    printf ("\n\n%s\n\n", version_string);

    to remove:
    CPU

    <Processor SDK>/board-support/u-boot-<version>/arch/arm/mach-omap2/am33xx/sys_info.c

    printf("CPU : %s-%s rev %s\n", cpu_s, sec_s, rev_s);


    to remove:
    Model: TI AM335x EVM

    comment out:
    <Processor SDK>/board-support/u-boot-<version>/common/board_info.c

    printf("Model: %s\n", model);

    to remove:
    DRAM:

    comment out:
    <Processor SDK>/board-support/u-boot-<version>/common/board_f.c

    puts("DRAM: ");

    .....................................

    print_size(size, "");
    board_add_ram_info(0);
    putc('\n');

    to remove:
    NAND:

    comment out:
    <Processor SDK>/board-support/u-boot-<version>/common/board_r.c

    puts("NAND: ");

    <Processor SDK>/board-support/u-boot-<version>/drivers/mtd/nand/nand.c

    printf("%lu MiB\n", total_nand_size / 1024);

    to remove:
    MMC:

    comment out:
    <Processor SDK>/board-support/u-boot-<version>/common/board_r.c

    puts("MMC: ");

    comment out:
    <Processor SDK>/board-support/u-boot-<version>/drivers/mmc/mmc.c

    print_mmc_devices(',');

    To remove the U-Boot general debug messages:

    $ 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/am335x_evm_defconfig
    or
    $ cp .config configs/am335x_boneblack_defconfig
    depending which config file you set in your <Processor SDK>/Rules.make file.
    $ 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 init_console 'if test $board_name = A335_ICE; then setenv console ttyO3,115200n8;else setenv console /dev/null;fi;'
    => setenv silent 1
    => saveenv
    => reset

    Remove the login prompt and arago project message:

    am335x-evm login: root
    root@am335x-evm:~# rm -rf /etc/issue
    root@am335x-evm:~# systemctl disable serial-getty@ttyS0.service
    root@am335x-evm:~# systemctl mask serial-getty@ttyS0.service
    root@am335x-evm:~# systemctl daemon-reload
    root@am335x-evm:~# reboot

    Now your UART0 console is free form debug messages.


    Best regards,
    Kemal

  • thanks kemal

    if i undestand [*] Only silence the U-Boot console would only silence the output but still it can receive input so i am wondering at boot up time if the connected RS232 sends some data over this UART0 it might enter u-boot prompt

    Regards

  • Have you entered the => setenv silent 1 after enabling this option. The connected RS232 can stop the booting and enter in U-Boot console while loading. To avoid this set "the delay in seconds before automatically booting" option in menuconfig to -2.