How to customize u-boot default prompt text

In this quick tutorial we’re going to edit the default prompt text of u-boot bootloader.

default prompt


To customize the prompt text you need to edit the appropriate configuration file.

  1. Locate the configuration file and open it with a text editor
    $ gedit uboot-imx/include/configs/mx6var_som.h  
  2. Locate the following lines in the file
    #define CONFIG_SYS_PROMPT		"VAR_SOM_MX6(nand) U-Boot > "  
    #define CONFIG_SYS_PROMPT		"VAR_SOM_MX6(sd) U-Boot > "  
  3. Replace the prompt text with whatever you like. For example:
    #define CONFIG_SYS_PROMPT		"VAR_SOM_MX6 on Amber board (nand)> "  
    #define CONFIG_SYS_PROMPT		"VAR_SOM_MX6 on Amber board (sd) > "  
  4. Save the file and compile again
    $ cd uboot-imx/
    $ export ARCH=arm  
    $ export CROSS_COMPILE=arm-linux-gnueabihf-  
    $ make mrproper
    $ make mx6var_som_sd_config  
    $ make  
  5. Flash the SPL and the u-boot image again and boot the board from SD-Card to see the changes.
custom prompt