Search code examples
u-boot

How to undefine CONFIG_CMD_NET?


I can not find this configuration defined anywhere in my include/configs/.h file and includes, nor in configs/_defconfig and it is still defined in .config file after configuring u-boot. I am seeing this configuration defined in tools/Makefile. Is it default? Should I use #undef in me include/configs/.h or CONFIG_CMD_NET=n in configs/_defconfig? What is better?


Solution

  • This configuration option is described as

    CONFIG_CMD_NET:
    
       Network commands.                                 
       bootp - boot image via network using BOOTP/TFTP protocol   
       tftpboot - boot image via network using TFTP protocol  
    
       Symbol: CMD_NET [=y] 
       Type  : boolean                                
       Prompt: bootp, tftpboot  
         Location:   
           -> Command line interface  
             -> Network commands 
         Defined at cmd/Kconfig:403  
         Selects: NET [=n] 
    

    You can disable CMD_NET using make menuconfig.

    Command line interface
        Network commands
            [*] bootp, tftpboot
    

    You can also hardcode your configuration in your board's config file, as suggested in the README file:

    EXAMPLE: If you want all functions except for network support you can write:
    
       #include "config_cmd_all.h"
       #undef CONFIG_CMD_NET